lms/public/build/assets/richtor-CRcM6Du2.js
2025-12-15 12:26:23 +01:00

282 lines
1.6 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DPB4Rf0C-BGgsGAY9.js","assets/html-B50bmoVb-Cb86E5ej.js","assets/javascript-C25yR2R2-wDzz0qaB.js","assets/css-CECN5uSL-DPfMkruS.js","assets/angular-ts-CTOR2ofC-k8fsuEIJ.js","assets/scss-B1FaCqwR-D5j8Lzl0.js","assets/apl-CjNiDgad-CT4Sbzkr.js","assets/xml-C2J0sS9M-wPCL2nsB.js","assets/java-DY6VlHhP-CylS5w8V.js","assets/json-DxJze_jm-Cp-IABpG.js","assets/astro-CFFExE8Q-HUi9-hH-.js","assets/typescript-RycA9KXf-BPQ3VLAy.js","assets/postcss-05aHdL-n-CXtECtnM.js","assets/tsx-B8rCNbgL-COt5Ahok.js","assets/blade-CRa6j5zS-DjoTdYFr.js","assets/html-derivative-C6bxFbFW-Iy97gZi_.js","assets/sql-Cn_v3PB0-BLtJtn59.js","assets/bsl-NkNNwerW-COH_2WFP.js","assets/sdbl-B7T8abf4-DVxCFoDh.js","assets/cairo-DM6WF2e3-DtzH3ucv.js","assets/python-BFNSHbwJ-B6aJPvgy.js","assets/cobol-HihOMwht-CEH5cA2t.js","assets/coffee-DGBR_nr_-BGq2hPi0.js","assets/cpp-Cj177cuW-CX9fafSh.js","assets/regexp-BazyLpPg-CDVJQ6XC.js","assets/glsl-CkUcVZNK-Bf0UjSP5.js","assets/c-eeMepfLm-BIGW1oBm.js","assets/crystal-CRJyc4G--DiK3qIky.js","assets/shellscript-InADTalH-Yzrsuije.js","assets/edge-BYQkOzbF-DYO1BWoQ.js","assets/elixir-Dh036GMp-Bmki-TVL.js","assets/elm-BtNbw_Cd-Bp18OckW.js","assets/erb-CS4zioBv-CIsDXqOo.js","assets/ruby-DMPw6uKF-che4axXI.js","assets/haml-NZLVzu_R-C8mKtd0e.js","assets/graphql-CBu2ehBn-Cr253Gy9.js","assets/jsx-BtKADgXT-g9-lgVsj.js","assets/lua-kX5WP_P5-BiSz3S93.js","assets/yaml-DaO7k5B1-Buea-lGh.js","assets/erlang-DNcDT8Hi-BWqZUIhL.js","assets/markdown-CrScaQ96-Cvjx9yec.js","assets/fortran-fixed-form-DUsA-VGo-CqycLhgt.js","assets/fortran-free-form-DPIT_jbP-D22FLkUw.js","assets/fsharp-CYOiIVNx-C_zLmMdw.js","assets/gdresource-BwtMIoBm-DAu1Gww7.js","assets/gdshader-Bk8fF6yr-DkwncUOv.js","assets/gdscript-BifyeYhI-DTMYz4Jt.js","assets/git-commit-Bd32YZ0K-DKnZnecv.js","assets/diff-BxzP2J8R-D97Zzqfu.js","assets/git-rebase-ZWUFO_T4-PODeWoq4.js","assets/glimmer-js-DkxNrfPT-CYvKIGv7.js","assets/glimmer-ts-D6YZEmK_-BwkeDeeu.js","assets/hack-ItRNKiEb-Dz4s7CVj.js","assets/handlebars-mxStpSE7-B5GnhLue.js","assets/http-DLvAkeD--BNfsu0Nw.js","assets/hurl-CgkFN90t-RkzLjdXO.js","assets/csv-CmYOceLb-Co7V7EpZ.js","assets/hxml-GbqSQCLa-MyDbT556.js","assets/haxe-TztHsm5T-CzTSHFRz.js","assets/jinja-CFW5uAwY-CRnS6Ysd.js","assets/jison-DdreslRX-C_aDQymB.js","assets/julia--2-efCjg-ZfD7vPuG.js","assets/r-Bm0uF0U2-DiinP2Uv.js","assets/latex-Cs75fyNk-BaSXX46b.js","assets/tex-DpOayVob-BUPSY20p.js","assets/liquid-CHzkx3jT-zQly3uxw.js","assets/marko-ls0Jg2j8-CH6c4llz.js","assets/less-B1GLI2Di-B1dDrJ26.js","assets/mdc-uaivvctV-DArzT8kn.js","assets/nginx-5vhPAEw3-DWisHew1.js","assets/nim-QAjRdh9w-DCY1hsTS.js","assets/perl-DkVrgJBg-BOYFiEPK.js","assets/php-j2zCzTEz-D4sqbyu8.js","assets/pug-XOw9Q1Ho-ibTSJqKJ.js","assets/qml-rTNXsquU-ChczqDSS.js","assets/razor-B1z-bksM-BImEwUiZ.js","assets/csharp-C7yUs7-w-K5feNrxe.js","assets/rst-CcbeA9zE-DJw32adD.js","assets/cmake-BJz8BOTU-D1j8_8rp.js","assets/sas-fpEvgATw-BHxbuS_h.js","assets/shaderlab-Cr62-Wb4-DBlXx3uy.js","assets/hlsl-Bk8TCZNL-D3lLCCz7.js","assets/shellsession-DiDJNQdy-DyhC3EVy.js","assets/soy-C1-6njHa-gzSMiW6X.js","assets/sparql-B0KWFEri-hRQCfo7w.js","assets/turtle-_H59FV7D-BsS91CYL.js","assets/stata-B8c5fTjX-C93OJGXX.js","assets/svelte-5UasyOg7-zJZT0dEM.js","assets/templ-peLZIM2D-BFctp3GS.js","assets/go-ChxJuLYK-Dn2_MT6a.js","assets/ts-tags-ioVe2PKw-KHYt7rNi.js","assets/twig-CcRLVyUg-C7btHcUR.js","assets/vue-DOVAQqiz-Cv_ide59.js","assets/vue-html-C7WI2elu-3aWFIZnF.js","assets/vue-vine-D386fra9-CJV7hRr5.js","assets/stylus-CyKEU1Ej-BEDo0Tqx.js","assets/xsl-BmSZphgC-CVyS_1ZI.js"])))=>i.map(i=>d[i]);
var p3=Object.defineProperty;var CS=t=>{throw TypeError(t)};var f3=(t,e,n)=>e in t?p3(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var V=(t,e,n)=>f3(t,typeof e!="symbol"?e+"":e,n),tg=(t,e,n)=>e.has(t)||CS("Cannot "+n);var vi=(t,e,n)=>(tg(t,e,"read from private field"),n?n.call(t):e.get(t)),Oh=(t,e,n)=>e.has(t)?CS("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),DS=(t,e,n,r)=>(tg(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),co=(t,e,n)=>(tg(t,e,"access private method"),n);import{j as E,r as v,y as Ne,aL as pl,_ as k,z as iA,aM as sA}from"./vendor-BKmmeuxg.js";var AS={};function oA(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=oA(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function bn(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=oA(t))&&(r&&(r+=" "),r+=e);return r}const li=v.forwardRef(({children:t,dense:e,vertical:n=!1,className:r,...i},s)=>{const o=bn("rte-toolbar",e&&"rte-toolbar--dense",n&&"rte-toolbar--vertical",r);return E.jsx("div",{className:o,...i,ref:s,children:t})});li.displayName="Toolbar";const Ni=v.forwardRef(({horizontal:t,className:e,...n},r)=>{const i=bn("bg-neutral-200 dark:bg-neutral-800 rte-toolbar__divider",t&&"rte-toolbar__divider--horizontal",e);return E.jsx("div",{className:i,ref:r,...n})});Ni.displayName="Toolbar.Divider";function ve(t,e,{checkForDefaultPrevented:n=!0}={}){return function(r){if(t==null||t(r),n===!1||!r.defaultPrevented)return e==null?void 0:e(r)}}function PS(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function xf(...t){return e=>{let n=!1;const r=t.map(i=>{const s=PS(i,e);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():PS(t[i],null)}}}}function _t(...t){return v.useCallback(xf(...t),t)}function m3(t,e){const n=v.createContext(e),r=s=>{const{children:o,...a}=s,l=v.useMemo(()=>a,Object.values(a));return E.jsx(n.Provider,{value:l,children:o})};r.displayName=t+"Provider";function i(s){const o=v.useContext(n);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${s}\` must be used within \`${t}\``)}return[r,i]}function Ys(t,e=[]){let n=[];function r(s,o){const a=v.createContext(o),l=n.length;n=[...n,o];const c=h=>{var y;const{scope:d,children:p,...f}=h,m=((y=d==null?void 0:d[t])==null?void 0:y[l])||a,g=v.useMemo(()=>f,Object.values(f));return E.jsx(m.Provider,{value:g,children:p})};c.displayName=s+"Provider";function u(h,d){var m;const p=((m=d==null?void 0:d[t])==null?void 0:m[l])||a,f=v.useContext(p);if(f)return f;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[c,u]}const i=()=>{const s=n.map(o=>v.createContext(o));return function(o){const a=(o==null?void 0:o[t])||s;return v.useMemo(()=>({[`__scope${t}`]:{...o,[t]:a}}),[o,a])}};return i.scopeName=t,[r,g3(i,...e)]}function g3(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(i){const s=r.reduce((o,{useScope:a,scopeName:l})=>{const c=a(i)[`__scope${l}`];return{...o,...c}},{});return v.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])}};return n.scopeName=e.scopeName,n}function Ba(t){const e=O3(t),n=v.forwardRef((r,i)=>{const{children:s,...o}=r,a=v.Children.toArray(s),l=a.find(b3);if(l){const c=l.props.children,u=a.map(h=>h===l?v.Children.count(c)>1?v.Children.only(null):v.isValidElement(c)?c.props.children:null:h);return E.jsx(e,{...o,ref:i,children:v.isValidElement(c)?v.cloneElement(c,void 0,u):null})}return E.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function O3(t){const e=v.forwardRef((n,r)=>{const{children:i,...s}=n;if(v.isValidElement(i)){const o=v3(i),a=E3(s,i.props);return i.type!==v.Fragment&&(a.ref=r?xf(r,o):o),v.cloneElement(i,a)}return v.Children.count(i)>1?v.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var aA=Symbol("radix.slottable");function y3(t){const e=({children:n})=>E.jsx(E.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=aA,e}function b3(t){return v.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===aA}function E3(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...o)=>{const a=s(...o);return i(...o),a}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function v3(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var T3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pt=T3.reduce((t,e)=>{const n=Ba(`Primitive.${e}`),r=v.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function lA(t,e){t&&pl.flushSync(()=>t.dispatchEvent(e))}function Wi(t){const e=v.useRef(t);return v.useEffect(()=>{e.current=t}),v.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function S3(t,e=globalThis==null?void 0:globalThis.document){const n=Wi(t);v.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var w3="DismissableLayer",JO="dismissableLayer.update",k3="dismissableLayer.pointerDownOutside",_3="dismissableLayer.focusOutside",NS,cA=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ru=v.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...l}=t,c=v.useContext(cA),[u,h]=v.useState(null),d=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=v.useState({}),f=_t(e,C=>h(C)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,T=c.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,w=D3(C=>{const N=C.target,$=[...c.branches].some(I=>I.contains(N));!S||$||(i==null||i(C),o==null||o(C),C.defaultPrevented||(a==null||a()))},d),A=A3(C=>{const N=C.target;[...c.branches].some($=>$.contains(N))||(s==null||s(C),o==null||o(C),C.defaultPrevented||(a==null||a()))},d);return S3(C=>{b===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},d),v.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(NS=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),RS(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=NS)}},[u,d,n,c]),v.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),RS())},[u,c]),v.useEffect(()=>{const C=()=>p({});return document.addEventListener(JO,C),()=>document.removeEventListener(JO,C)},[]),E.jsx(pt.div,{...l,ref:f,style:{pointerEvents:T?S?"auto":"none":void 0,...t.style},onFocusCapture:ve(t.onFocusCapture,A.onFocusCapture),onBlurCapture:ve(t.onBlurCapture,A.onBlurCapture),onPointerDownCapture:ve(t.onPointerDownCapture,w.onPointerDownCapture)})});Ru.displayName=w3;var x3="DismissableLayerBranch",C3=v.forwardRef((t,e)=>{const n=v.useContext(cA),r=v.useRef(null),i=_t(e,r);return v.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),E.jsx(pt.div,{...t,ref:i})});C3.displayName=x3;function D3(t,e=globalThis==null?void 0:globalThis.document){const n=Wi(t),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){uA(k3,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function A3(t,e=globalThis==null?void 0:globalThis.document){const n=Wi(t),r=v.useRef(!1);return v.useEffect(()=>{const i=s=>{s.target&&!r.current&&uA(_3,n,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function RS(){const t=new CustomEvent(JO);document.dispatchEvent(t)}function uA(t,e,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?lA(i,s):i.dispatchEvent(s)}var ng=0;function yE(){v.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??MS()),document.body.insertAdjacentElement("beforeend",t[1]??MS()),ng++,()=>{ng===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),ng--}},[])}function MS(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var rg="focusScope.autoFocusOnMount",ig="focusScope.autoFocusOnUnmount",IS={bubbles:!1,cancelable:!0},P3="FocusScope",Cf=v.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,l]=v.useState(null),c=Wi(i),u=Wi(s),h=v.useRef(null),d=_t(e,m=>l(m)),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let m=function(T){if(p.paused||!a)return;const S=T.target;a.contains(S)?h.current=S:fs(h.current,{select:!0})},g=function(T){if(p.paused||!a)return;const S=T.relatedTarget;S!==null&&(a.contains(S)||fs(h.current,{select:!0}))},y=function(T){if(document.activeElement===document.body)for(const S of T)S.removedNodes.length>0&&fs(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const b=new MutationObserver(y);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),b.disconnect()}}},[r,a,p.paused]),v.useEffect(()=>{if(a){QS.add(p);const m=document.activeElement;if(!a.contains(m)){const g=new CustomEvent(rg,IS);a.addEventListener(rg,c),a.dispatchEvent(g),g.defaultPrevented||(N3(Q3(hA(a)),{select:!0}),document.activeElement===m&&fs(a))}return()=>{a.removeEventListener(rg,c),setTimeout(()=>{const g=new CustomEvent(ig,IS);a.addEventListener(ig,u),a.dispatchEvent(g),g.defaultPrevented||fs(m??document.body,{select:!0}),a.removeEventListener(ig,u),QS.remove(p)},0)}}},[a,c,u,p]);const f=v.useCallback(m=>{if(!n&&!r||p.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(g&&y){const b=m.currentTarget,[T,S]=R3(b);T&&S?!m.shiftKey&&y===S?(m.preventDefault(),n&&fs(T,{select:!0})):m.shiftKey&&y===T&&(m.preventDefault(),n&&fs(S,{select:!0})):y===b&&m.preventDefault()}},[n,r,p.paused]);return E.jsx(pt.div,{tabIndex:-1,...o,ref:d,onKeyDown:f})});Cf.displayName=P3;function N3(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(fs(r,{select:e}),document.activeElement!==n)return}function R3(t){const e=hA(t),n=LS(e,t),r=LS(e.reverse(),t);return[n,r]}function hA(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function LS(t,e){for(const n of t)if(!M3(n,{upTo:e}))return n}function M3(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function I3(t){return t instanceof HTMLInputElement&&"select"in t}function fs(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&I3(t)&&e&&t.select()}}var QS=L3();function L3(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=$S(t,e),t.unshift(e)},remove(e){var n;t=$S(t,e),(n=t[0])==null||n.resume()}}}function $S(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function Q3(t){return t.filter(e=>e.tagName!=="A")}var Vs=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},$3=sA[" useId ".trim().toString()]||(()=>{}),F3=0;function Is(t){const[e,n]=v.useState($3());return Vs(()=>{n(r=>r??String(F3++))},[t]),e?`radix-${e}`:""}const dA=["top","right","bottom","left"],FS=["start","end"],BS=dA.reduce((t,e)=>t.concat(e,e+"-"+FS[0],e+"-"+FS[1]),[]),kr=Math.min,dn=Math.max,Yd=Math.round,yh=Math.floor,si=t=>({x:t,y:t}),B3={left:"right",right:"left",bottom:"top",top:"bottom"},j3={start:"end",end:"start"};function ey(t,e,n){return dn(t,kr(e,n))}function _r(t,e){return typeof t=="function"?t(e):t}function Yn(t){return t.split("-")[0]}function wr(t){return t.split("-")[1]}function bE(t){return t==="x"?"y":"x"}function EE(t){return t==="y"?"height":"width"}const z3=new Set(["top","bottom"]);function vr(t){return z3.has(Yn(t))?"y":"x"}function vE(t){return bE(vr(t))}function pA(t,e,n){n===void 0&&(n=!1);const r=wr(t),i=vE(t),s=EE(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Jd(o)),[o,Jd(o)]}function V3(t){const e=Jd(t);return[Kd(t),e,Kd(e)]}function Kd(t){return t.replace(/start|end/g,e=>j3[e])}const jS=["left","right"],zS=["right","left"],U3=["top","bottom"],H3=["bottom","top"];function X3(t,e,n){switch(t){case"top":case"bottom":return n?e?zS:jS:e?jS:zS;case"left":case"right":return e?U3:H3;default:return[]}}function q3(t,e,n,r){const i=wr(t);let s=X3(Yn(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Kd)))),s}function Jd(t){return t.replace(/left|right|bottom|top/g,e=>B3[e])}function Z3(t){return{top:0,right:0,bottom:0,left:0,...t}}function TE(t){return typeof t!="number"?Z3(t):{top:t,right:t,bottom:t,left:t}}function ja(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function VS(t,e,n){let{reference:r,floating:i}=t;const s=vr(e),o=vE(e),a=EE(o),l=Yn(e),c=s==="y",u=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,d=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-i.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:h};break;case"left":p={x:r.x-i.width,y:h};break;default:p={x:r.x,y:r.y}}switch(wr(e)){case"start":p[o]-=d*(n&&c?-1:1);break;case"end":p[o]+=d*(n&&c?-1:1);break}return p}const W3=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:h}=VS(c,r,l),d=r,p={},f=0;for(let m=0;m<a.length;m++){const{name:g,fn:y}=a[m],{x:b,y:T,data:S,reset:w}=await y({x:u,y:h,initialPlacement:r,placement:d,strategy:i,middlewareData:p,rects:c,platform:o,elements:{reference:t,floating:e}});u=b??u,h=T??h,p={...p,[g]:{...p[g],...S}},w&&f<=50&&(f++,typeof w=="object"&&(w.placement&&(d=w.placement),w.rects&&(c=w.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):w.rects),{x:u,y:h}=VS(c,d,l)),m=-1)}return{x:u,y:h,placement:d,strategy:i,middlewareData:p}};async function za(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:d=!1,padding:p=0}=_r(e,t),f=TE(p),m=a[d?h==="floating"?"reference":"floating":h],g=ja(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(m)))==null||n?m:m.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=h==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),T=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},S=ja(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-S.top+f.top)/T.y,bottom:(S.bottom-g.bottom+f.bottom)/T.y,left:(g.left-S.left+f.left)/T.x,right:(S.right-g.right+f.right)/T.x}}const G3=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=_r(t,e)||{};if(c==null)return{};const h=TE(u),d={x:n,y:r},p=vE(i),f=EE(p),m=await o.getDimensions(c),g=p==="y",y=g?"top":"left",b=g?"bottom":"right",T=g?"clientHeight":"clientWidth",S=s.reference[f]+s.reference[p]-d[p]-s.floating[f],w=d[p]-s.reference[p],A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let C=A?A[T]:0;(!C||!await(o.isElement==null?void 0:o.isElement(A)))&&(C=a.floating[T]||s.floating[f]);const N=S/2-w/2,$=C/2-m[f]/2-1,I=kr(h[y],$),L=kr(h[b],$),Z=I,B=C-m[f]-L,j=C/2-m[f]/2+N,U=ey(Z,j,B),J=!l.arrow&&wr(i)!=null&&j!==U&&s.reference[f]/2-(j<Z?I:L)-m[f]/2<0,fe=J?j<Z?j-Z:j-B:0;return{[p]:d[p]+fe,data:{[p]:U,centerOffset:j-U-fe,...J&&{alignmentOffset:fe}},reset:J}}});function Y3(t,e,n){return(t?[...n.filter(r=>wr(r)===t),...n.filter(r=>wr(r)!==t)]:n.filter(r=>Yn(r)===r)).filter(r=>t?wr(r)===t||(e?Kd(r)!==r:!1):!0)}const K3=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,r,i;const{rects:s,middlewareData:o,placement:a,platform:l,elements:c}=e,{crossAxis:u=!1,alignment:h,allowedPlacements:d=BS,autoAlignment:p=!0,...f}=_r(t,e),m=h!==void 0||d===BS?Y3(h||null,p,d):d,g=await za(e,f),y=((n=o.autoPlacement)==null?void 0:n.index)||0,b=m[y];if(b==null)return{};const T=pA(b,s,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(a!==b)return{reset:{placement:m[0]}};const S=[g[Yn(b)],g[T[0]],g[T[1]]],w=[...((r=o.autoPlacement)==null?void 0:r.overflows)||[],{placement:b,overflows:S}],A=m[y+1];if(A)return{data:{index:y+1,overflows:w},reset:{placement:A}};const C=w.map($=>{const I=wr($.placement);return[$.placement,I&&u?$.overflows.slice(0,2).reduce((L,Z)=>L+Z,0):$.overflows[0],$.overflows]}).sort(($,I)=>$[1]-I[1]),N=((i=C.filter($=>$[2].slice(0,wr($[0])?2:3).every(I=>I<=0))[0])==null?void 0:i[0])||C[0][0];return N!==a?{data:{index:y+1,overflows:w},reset:{placement:N}}:{}}}},J3=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=_r(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Yn(i),b=vr(a),T=Yn(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=d||(T||!m?[Jd(a)]:V3(a)),A=f!=="none";!d&&A&&w.push(...q3(a,m,f,S));const C=[a,...w],N=await za(e,g),$=[];let I=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&$.push(N[y]),h){const j=pA(i,o,S);$.push(N[j[0]],N[j[1]])}if(I=[...I,{placement:i,overflows:$}],!$.every(j=>j<=0)){var L,Z;const j=(((L=s.flip)==null?void 0:L.index)||0)+1,U=C[j];if(U&&(!(h==="alignment"&&b!==vr(U))||I.every(fe=>vr(fe.placement)===b?fe.overflows[0]>0:!0)))return{data:{index:j,overflows:I},reset:{placement:U}};let J=(Z=I.filter(fe=>fe.overflows[0]<=0).sort((fe,z)=>fe.overflows[1]-z.overflows[1])[0])==null?void 0:Z.placement;if(!J)switch(p){case"bestFit":{var B;const fe=(B=I.filter(z=>{if(A){const ne=vr(z.placement);return ne===b||ne==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(ne=>ne>0).reduce((ne,Oe)=>ne+Oe,0)]).sort((z,ne)=>z[1]-ne[1])[0])==null?void 0:B[0];fe&&(J=fe);break}case"initialPlacement":J=a;break}if(i!==J)return{reset:{placement:J}}}return{}}}};function US(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function HS(t){return dA.some(e=>t[e]>=0)}const e5=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=_r(t,e);switch(r){case"referenceHidden":{const s=await za(e,{...i,elementContext:"reference"}),o=US(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:HS(o)}}}case"escaped":{const s=await za(e,{...i,altBoundary:!0}),o=US(s,n.floating);return{data:{escapedOffsets:o,escaped:HS(o)}}}default:return{}}}}};function fA(t){const e=kr(...t.map(s=>s.left)),n=kr(...t.map(s=>s.top)),r=dn(...t.map(s=>s.right)),i=dn(...t.map(s=>s.bottom));return{x:e,y:n,width:r-e,height:i-n}}function t5(t){const e=t.slice().sort((i,s)=>i.y-s.y),n=[];let r=null;for(let i=0;i<e.length;i++){const s=e[i];!r||s.y-r.y>r.height/2?n.push([s]):n[n.length-1].push(s),r=s}return n.map(i=>ja(fA(i)))}const n5=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:r,rects:i,platform:s,strategy:o}=e,{padding:a=2,x:l,y:c}=_r(t,e),u=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(r.reference))||[]),h=t5(u),d=ja(fA(u)),p=TE(a);function f(){if(h.length===2&&h[0].left>h[1].right&&l!=null&&c!=null)return h.find(g=>l>g.left-p.left&&l<g.right+p.right&&c>g.top-p.top&&c<g.bottom+p.bottom)||d;if(h.length>=2){if(vr(n)==="y"){const I=h[0],L=h[h.length-1],Z=Yn(n)==="top",B=I.top,j=L.bottom,U=Z?I.left:L.left,J=Z?I.right:L.right,fe=J-U,z=j-B;return{top:B,bottom:j,left:U,right:J,width:fe,height:z,x:U,y:B}}const g=Yn(n)==="left",y=dn(...h.map(I=>I.right)),b=kr(...h.map(I=>I.left)),T=h.filter(I=>g?I.left===b:I.right===y),S=T[0].top,w=T[T.length-1].bottom,A=b,C=y,N=C-A,$=w-S;return{top:S,bottom:w,left:A,right:C,width:N,height:$,x:A,y:S}}return d}const m=await s.getElementRects({reference:{getBoundingClientRect:f},floating:r.floating,strategy:o});return i.reference.x!==m.reference.x||i.reference.y!==m.reference.y||i.reference.width!==m.reference.width||i.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}},mA=new Set(["left","top"]);async function r5(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Yn(n),a=wr(n),l=vr(n)==="y",c=mA.has(o)?-1:1,u=s&&l?-1:1,h=_r(e,t);let{mainAxis:d,crossAxis:p,alignmentAxis:f}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof f=="number"&&(p=a==="end"?f*-1:f),l?{x:p*u,y:d*c}:{x:d*c,y:p*u}}const i5=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=e,l=await r5(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},s5=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:y,y:b}=g;return{x:y,y:b}}},...l}=_r(t,e),c={x:n,y:r},u=await za(e,l),h=vr(Yn(i)),d=bE(h);let p=c[d],f=c[h];if(s){const g=d==="y"?"top":"left",y=d==="y"?"bottom":"right",b=p+u[g],T=p-u[y];p=ey(b,p,T)}if(o){const g=h==="y"?"top":"left",y=h==="y"?"bottom":"right",b=f+u[g],T=f-u[y];f=ey(b,f,T)}const m=a.fn({...e,[d]:p,[h]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[d]:s,[h]:o}}}}}},o5=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=_r(t,e),u={x:n,y:r},h=vr(i),d=bE(h);let p=u[d],f=u[h];const m=_r(a,e),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const T=d==="y"?"height":"width",S=s.reference[d]-s.floating[T]+g.mainAxis,w=s.reference[d]+s.reference[T]-g.mainAxis;p<S?p=S:p>w&&(p=w)}if(c){var y,b;const T=d==="y"?"width":"height",S=mA.has(Yn(i)),w=s.reference[h]-s.floating[T]+(S&&((y=o.offset)==null?void 0:y[h])||0)+(S?0:g.crossAxis),A=s.reference[h]+s.reference[T]+(S?0:((b=o.offset)==null?void 0:b[h])||0)-(S?g.crossAxis:0);f<w?f=w:f>A&&(f=A)}return{[d]:p,[h]:f}}}},a5=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:o,elements:a}=e,{apply:l=()=>{},...c}=_r(t,e),u=await za(e,c),h=Yn(i),d=wr(i),p=vr(i)==="y",{width:f,height:m}=s.floating;let g,y;h==="top"||h==="bottom"?(g=h,y=d===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(y=h,g=d==="end"?"top":"bottom");const b=m-u.top-u.bottom,T=f-u.left-u.right,S=kr(m-u[g],b),w=kr(f-u[y],T),A=!e.middlewareData.shift;let C=S,N=w;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(N=T),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(C=b),A&&!d){const I=dn(u.left,0),L=dn(u.right,0),Z=dn(u.top,0),B=dn(u.bottom,0);p?N=f-2*(I!==0||L!==0?I+L:dn(u.left,u.right)):C=m-2*(Z!==0||B!==0?Z+B:dn(u.top,u.bottom))}await l({...e,availableWidth:N,availableHeight:C});const $=await o.getDimensions(a.floating);return f!==$.width||m!==$.height?{reset:{rects:!0}}:{}}}};function Df(){return typeof window<"u"}function fl(t){return gA(t)?(t.nodeName||"").toLowerCase():"#document"}function Zn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function pi(t){var e;return(e=(gA(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function gA(t){return Df()?t instanceof Node||t instanceof Zn(t).Node:!1}function xr(t){return Df()?t instanceof Element||t instanceof Zn(t).Element:!1}function ci(t){return Df()?t instanceof HTMLElement||t instanceof Zn(t).HTMLElement:!1}function XS(t){return!Df()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Zn(t).ShadowRoot}const l5=new Set(["inline","contents"]);function Mu(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Cr(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!l5.has(i)}const c5=new Set(["table","td","th"]);function u5(t){return c5.has(fl(t))}const h5=[":popover-open",":modal"];function Af(t){return h5.some(e=>{try{return t.matches(e)}catch{return!1}})}const d5=["transform","translate","scale","rotate","perspective"],p5=["transform","translate","scale","rotate","perspective","filter"],f5=["paint","layout","strict","content"];function SE(t){const e=wE(),n=xr(t)?Cr(t):t;return d5.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||p5.some(r=>(n.willChange||"").includes(r))||f5.some(r=>(n.contain||"").includes(r))}function m5(t){let e=Us(t);for(;ci(e)&&!Va(e);){if(SE(e))return e;if(Af(e))return null;e=Us(e)}return null}function wE(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const g5=new Set(["html","body","#document"]);function Va(t){return g5.has(fl(t))}function Cr(t){return Zn(t).getComputedStyle(t)}function Pf(t){return xr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Us(t){if(fl(t)==="html")return t;const e=t.assignedSlot||t.parentNode||XS(t)&&t.host||pi(t);return XS(e)?e.host:e}function OA(t){const e=Us(t);return Va(e)?t.ownerDocument?t.ownerDocument.body:t.body:ci(e)&&Mu(e)?e:OA(e)}function Uc(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=OA(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=Zn(i);if(s){const a=ty(o);return e.concat(o,o.visualViewport||[],Mu(i)?i:[],a&&n?Uc(a):[])}return e.concat(i,Uc(i,[],n))}function ty(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function yA(t){const e=Cr(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=ci(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,a=Yd(n)!==s||Yd(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function kE(t){return xr(t)?t:t.contextElement}function Da(t){const e=kE(t);if(!ci(e))return si(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=yA(e);let o=(s?Yd(n.width):n.width)/r,a=(s?Yd(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const O5=si(0);function bA(t){const e=Zn(t);return!wE()||!e.visualViewport?O5:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function y5(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Zn(t)?!1:e}function Ro(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=kE(t);let o=si(1);e&&(r?xr(r)&&(o=Da(r)):o=Da(t));const a=y5(s,n,r)?bA(s):si(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,h=i.height/o.y;if(s){const d=Zn(s),p=r&&xr(r)?Zn(r):r;let f=d,m=ty(f);for(;m&&r&&p!==f;){const g=Da(m),y=m.getBoundingClientRect(),b=Cr(m),T=y.left+(m.clientLeft+parseFloat(b.paddingLeft))*g.x,S=y.top+(m.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,h*=g.y,l+=T,c+=S,f=Zn(m),m=ty(f)}}return ja({width:u,height:h,x:l,y:c})}function Nf(t,e){const n=Pf(t).scrollLeft;return e?e.left+n:Ro(pi(t)).left+n}function EA(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-Nf(t,n),i=n.top+e.scrollTop;return{x:r,y:i}}function b5(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",o=pi(r),a=e?Af(e.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=si(1);const u=si(0),h=ci(r);if((h||!h&&!s)&&((fl(r)!=="body"||Mu(o))&&(l=Pf(r)),ci(r))){const p=Ro(r);c=Da(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const d=o&&!h&&!s?EA(o,l):si(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}}function E5(t){return Array.from(t.getClientRects())}function v5(t){const e=pi(t),n=Pf(t),r=t.ownerDocument.body,i=dn(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=dn(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Nf(t);const a=-n.scrollTop;return Cr(r).direction==="rtl"&&(o+=dn(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}const qS=25;function T5(t,e){const n=Zn(t),r=pi(t),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=wE();(!u||u&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=Nf(r);if(c<=0){const u=r.ownerDocument,h=u.body,d=getComputedStyle(h),p=u.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,f=Math.abs(r.clientWidth-h.clientWidth-p);f<=qS&&(s-=f)}else c<=qS&&(s+=c);return{width:s,height:o,x:a,y:l}}const S5=new Set(["absolute","fixed"]);function w5(t,e){const n=Ro(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=ci(t)?Da(t):si(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:o,height:a,x:l,y:c}}function ZS(t,e,n){let r;if(e==="viewport")r=T5(t,n);else if(e==="document")r=v5(pi(t));else if(xr(e))r=w5(e,n);else{const i=bA(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return ja(r)}function vA(t,e){const n=Us(t);return n===e||!xr(n)||Va(n)?!1:Cr(n).position==="fixed"||vA(n,e)}function k5(t,e){const n=e.get(t);if(n)return n;let r=Uc(t,[],!1).filter(a=>xr(a)&&fl(a)!=="body"),i=null;const s=Cr(t).position==="fixed";let o=s?Us(t):t;for(;xr(o)&&!Va(o);){const a=Cr(o),l=SE(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&i&&S5.has(i.position)||Mu(o)&&!l&&vA(t,o))?r=r.filter(c=>c!==o):i=a,o=Us(o)}return e.set(t,r),r}function _5(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const s=[...n==="clippingAncestors"?Af(e)?[]:k5(e,this._c):[].concat(n),r],o=s[0],a=s.reduce((l,c)=>{const u=ZS(e,c,i);return l.top=dn(u.top,l.top),l.right=kr(u.right,l.right),l.bottom=kr(u.bottom,l.bottom),l.left=dn(u.left,l.left),l},ZS(e,o,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function x5(t){const{width:e,height:n}=yA(t);return{width:e,height:n}}function C5(t,e,n){const r=ci(e),i=pi(e),s=n==="fixed",o=Ro(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=si(0);function c(){l.x=Nf(i)}if(r||!r&&!s)if((fl(e)!=="body"||Mu(i))&&(a=Pf(e)),r){const p=Ro(e,!0,s,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}else i&&c();s&&!r&&i&&c();const u=i&&!r&&!s?EA(i,a):si(0),h=o.left+a.scrollLeft-l.x-u.x,d=o.top+a.scrollTop-l.y-u.y;return{x:h,y:d,width:o.width,height:o.height}}function sg(t){return Cr(t).position==="static"}function WS(t,e){if(!ci(t)||Cr(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return pi(t)===n&&(n=n.ownerDocument.body),n}function TA(t,e){const n=Zn(t);if(Af(t))return n;if(!ci(t)){let i=Us(t);for(;i&&!Va(i);){if(xr(i)&&!sg(i))return i;i=Us(i)}return n}let r=WS(t,e);for(;r&&u5(r)&&sg(r);)r=WS(r,e);return r&&Va(r)&&sg(r)&&!SE(r)?n:r||m5(t)||n}const D5=async function(t){const e=this.getOffsetParent||TA,n=this.getDimensions,r=await n(t.floating);return{reference:C5(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function A5(t){return Cr(t).direction==="rtl"}const P5={convertOffsetParentRelativeRectToViewportRelativeRect:b5,getDocumentElement:pi,getClippingRect:_5,getOffsetParent:TA,getElementRects:D5,getClientRects:E5,getDimensions:x5,getScale:Da,isElement:xr,isRTL:A5};function SA(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function N5(t,e){let n=null,r;const i=pi(t);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=t.getBoundingClientRect(),{left:u,top:h,width:d,height:p}=c;if(a||e(),!d||!p)return;const f=yh(h),m=yh(i.clientWidth-(u+d)),g=yh(i.clientHeight-(h+p)),y=yh(u),b={rootMargin:-f+"px "+-m+"px "+-g+"px "+-y+"px",threshold:dn(0,kr(1,l))||1};let T=!0;function S(w){const A=w[0].intersectionRatio;if(A!==l){if(!T)return o();A?o(!1,A):r=setTimeout(()=>{o(!1,1e-7)},1e3)}A===1&&!SA(c,t.getBoundingClientRect())&&o(),T=!1}try{n=new IntersectionObserver(S,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(t)}return o(!0),s}function R5(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=kE(t),u=i||s?[...c?Uc(c):[],...Uc(e)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const h=c&&a?N5(c,n):null;let d=-1,p=null;o&&(p=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var T;(T=p)==null||T.observe(e)})),n()}),c&&!l&&p.observe(c),p.observe(e));let f,m=l?Ro(t):null;l&&g();function g(){const y=Ro(t);m&&!SA(m,y)&&n(),m=y,f=requestAnimationFrame(g)}return n(),()=>{var y;u.forEach(b=>{i&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),h==null||h(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(f)}}const wA=i5,M5=K3,kA=s5,_A=J3,xA=a5,CA=e5,ny=G3,I5=n5,L5=o5,DA=(t,e,n)=>{const r=new Map,i={platform:P5,...n},s={...i.platform,_c:r};return W3(t,e,{...i,platform:s})};var Q5=typeof document<"u",$5=function(){},bd=Q5?v.useLayoutEffect:$5;function ep(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!ep(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&t.$$typeof)&&!ep(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function AA(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function GS(t,e){const n=AA(t);return Math.round(e*n)/n}function og(t){const e=v.useRef(t);return bd(()=>{e.current=t}),e}function F5(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,h]=v.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[d,p]=v.useState(r);ep(d,r)||p(r);const[f,m]=v.useState(null),[g,y]=v.useState(null),b=v.useCallback(z=>{z!==A.current&&(A.current=z,m(z))},[]),T=v.useCallback(z=>{z!==C.current&&(C.current=z,y(z))},[]),S=s||f,w=o||g,A=v.useRef(null),C=v.useRef(null),N=v.useRef(u),$=l!=null,I=og(l),L=og(i),Z=og(c),B=v.useCallback(()=>{if(!A.current||!C.current)return;const z={placement:e,strategy:n,middleware:d};L.current&&(z.platform=L.current),DA(A.current,C.current,z).then(ne=>{const Oe={...ne,isPositioned:Z.current!==!1};j.current&&!ep(N.current,Oe)&&(N.current=Oe,pl.flushSync(()=>{h(Oe)}))})},[d,e,n,L,Z]);bd(()=>{c===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,h(z=>({...z,isPositioned:!1})))},[c]);const j=v.useRef(!1);bd(()=>(j.current=!0,()=>{j.current=!1}),[]),bd(()=>{if(S&&(A.current=S),w&&(C.current=w),S&&w){if(I.current)return I.current(S,w,B);B()}},[S,w,B,I,$]);const U=v.useMemo(()=>({reference:A,floating:C,setReference:b,setFloating:T}),[b,T]),J=v.useMemo(()=>({reference:S,floating:w}),[S,w]),fe=v.useMemo(()=>{const z={position:n,left:0,top:0};if(!J.floating)return z;const ne=GS(J.floating,u.x),Oe=GS(J.floating,u.y);return a?{...z,transform:"translate("+ne+"px, "+Oe+"px)",...AA(J.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ne,top:Oe}},[n,a,J.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:B,refs:U,elements:J,floatingStyles:fe}),[u,B,U,J,fe])}const B5=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:i}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?ny({element:r.current,padding:i}).fn(n):{}:r?ny({element:r,padding:i}).fn(n):{}}}},j5=(t,e)=>({...wA(t),options:[t,e]}),z5=(t,e)=>({...kA(t),options:[t,e]}),V5=(t,e)=>({...L5(t),options:[t,e]}),U5=(t,e)=>({..._A(t),options:[t,e]}),H5=(t,e)=>({...xA(t),options:[t,e]}),X5=(t,e)=>({...CA(t),options:[t,e]}),q5=(t,e)=>({...B5(t),options:[t,e]});var Z5="Arrow",PA=v.forwardRef((t,e)=>{const{children:n,width:r=10,height:i=5,...s}=t;return E.jsx(pt.svg,{...s,ref:e,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});PA.displayName=Z5;var W5=PA;function G5(t){const[e,n]=v.useState(void 0);return Vs(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;n({width:o,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var _E="Popper",[NA,ml]=Ys(_E),[Y5,RA]=NA(_E),MA=t=>{const{__scopePopper:e,children:n}=t,[r,i]=v.useState(null);return E.jsx(Y5,{scope:e,anchor:r,onAnchorChange:i,children:n})};MA.displayName=_E;var IA="PopperAnchor",LA=v.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...i}=t,s=RA(IA,n),o=v.useRef(null),a=_t(e,o),l=v.useRef(null);return v.useEffect(()=>{const c=l.current;l.current=(r==null?void 0:r.current)||o.current,c!==l.current&&s.onAnchorChange(l.current)}),r?null:E.jsx(pt.div,{...i,ref:a})});LA.displayName=IA;var xE="PopperContent",[K5,J5]=NA(xE),QA=v.forwardRef((t,e)=>{var Ge,Qr,mt,Jn,ls,bi;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:d=!1,updatePositionStrategy:p="optimized",onPlaced:f,...m}=t,g=RA(xE,n),[y,b]=v.useState(null),T=_t(e,so=>b(so)),[S,w]=v.useState(null),A=G5(S),C=(A==null?void 0:A.width)??0,N=(A==null?void 0:A.height)??0,$=r+(s!=="center"?"-"+s:""),I=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},L=Array.isArray(c)?c:[c],Z=L.length>0,B={padding:I,boundary:L.filter(t0),altBoundary:Z},{refs:j,floatingStyles:U,placement:J,isPositioned:fe,middlewareData:z}=F5({strategy:"fixed",placement:$,whileElementsMounted:(...so)=>R5(...so,{animationFrame:p==="always"}),elements:{reference:g.anchor},middleware:[j5({mainAxis:i+N,alignmentAxis:o}),l&&z5({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?V5():void 0,...B}),l&&U5({...B}),H5({...B,apply:({elements:so,rects:Vm,availableWidth:Um,availableHeight:Hm})=>{const{width:Xm,height:qm}=Vm.reference,oo=so.floating.style;oo.setProperty("--radix-popper-available-width",`${Um}px`),oo.setProperty("--radix-popper-available-height",`${Hm}px`),oo.setProperty("--radix-popper-anchor-width",`${Xm}px`),oo.setProperty("--radix-popper-anchor-height",`${qm}px`)}}),S&&q5({element:S,padding:a}),n0({arrowWidth:C,arrowHeight:N}),d&&X5({strategy:"referenceHidden",...B})]}),[ne,Oe]=BA(J),He=Wi(f);Vs(()=>{fe&&(He==null||He())},[fe,He]);const it=(Ge=z.arrow)==null?void 0:Ge.x,Le=(Qr=z.arrow)==null?void 0:Qr.y,Xe=((mt=z.arrow)==null?void 0:mt.centerOffset)!==0,[vt,An]=v.useState();return Vs(()=>{y&&An(window.getComputedStyle(y).zIndex)},[y]),E.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:fe?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:vt,"--radix-popper-transform-origin":[(Jn=z.transformOrigin)==null?void 0:Jn.x,(ls=z.transformOrigin)==null?void 0:ls.y].join(" "),...((bi=z.hide)==null?void 0:bi.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:E.jsx(K5,{scope:n,placedSide:ne,onArrowChange:w,arrowX:it,arrowY:Le,shouldHideArrow:Xe,children:E.jsx(pt.div,{"data-side":ne,"data-align":Oe,...m,ref:T,style:{...m.style,animation:fe?void 0:"none"}})})})});QA.displayName=xE;var $A="PopperArrow",e0={top:"bottom",right:"left",bottom:"top",left:"right"},FA=v.forwardRef(function(t,e){const{__scopePopper:n,...r}=t,i=J5($A,n),s=e0[i.placedSide];return E.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:E.jsx(W5,{...r,ref:e,style:{...r.style,display:"block"}})})});FA.displayName=$A;function t0(t){return t!==null}var n0=t=>({name:"transformOrigin",options:t,fn(e){var m,g,y;const{placement:n,rects:r,middlewareData:i}=e,s=((m=i.arrow)==null?void 0:m.centerOffset)!==0,o=s?0:t.arrowWidth,a=s?0:t.arrowHeight,[l,c]=BA(n),u={start:"0%",center:"50%",end:"100%"}[c],h=(((g=i.arrow)==null?void 0:g.x)??0)+o/2,d=(((y=i.arrow)==null?void 0:y.y)??0)+a/2;let p="",f="";return l==="bottom"?(p=s?u:`${h}px`,f=`${-a}px`):l==="top"?(p=s?u:`${h}px`,f=`${r.floating.height+a}px`):l==="right"?(p=`${-a}px`,f=s?u:`${d}px`):l==="left"&&(p=`${r.floating.width+a}px`,f=s?u:`${d}px`),{data:{x:p,y:f}}}});function BA(t){const[e,n="center"]=t.split("-");return[e,n]}var CE=MA,Rf=LA,DE=QA,AE=FA,r0="Portal",PE=v.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[i,s]=v.useState(!1);Vs(()=>s(!0),[]);const o=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?iA.createPortal(E.jsx(pt.div,{...r,ref:e}),o):null});PE.displayName=r0;function i0(t,e){return v.useReducer((n,r)=>e[n][r]??n,t)}var fi=t=>{const{present:e,children:n}=t,r=s0(e),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),s=_t(r.ref,o0(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:s}):null};fi.displayName="Presence";function s0(t){const[e,n]=v.useState(),r=v.useRef(null),i=v.useRef(t),s=v.useRef("none"),o=t?"mounted":"unmounted",[a,l]=i0(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const c=bh(r.current);s.current=a==="mounted"?c:"none"},[a]),Vs(()=>{const c=r.current,u=i.current;if(u!==t){const h=s.current,d=bh(c);t?l("MOUNT"):d==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&h!==d?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),Vs(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,h=p=>{const f=bh(r.current).includes(CSS.escape(p.animationName));if(p.target===e&&f&&(l("ANIMATION_END"),!i.current)){const m=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=m)})}},d=p=>{p.target===e&&(s.current=bh(r.current))};return e.addEventListener("animationstart",d),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",d),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:v.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function bh(t){return(t==null?void 0:t.animationName)||"none"}function o0(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var a0=sA[" useInsertionEffect ".trim().toString()]||Vs;function Iu({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[i,s,o]=l0({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:i;{const u=v.useRef(t!==void 0);v.useEffect(()=>{const h=u.current;h!==a&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}const c=v.useCallback(u=>{var h;if(a){const d=c0(u)?u(t):u;d!==t&&((h=o.current)==null||h.call(o,d))}else s(u)},[a,t,s,o]);return[l,c]}function l0({defaultProp:t,onChange:e}){const[n,r]=v.useState(t),i=v.useRef(n),s=v.useRef(e);return a0(()=>{s.current=e},[e]),v.useEffect(()=>{var o;i.current!==n&&((o=s.current)==null||o.call(s,n),i.current=n)},[n,i]),[n,r,s]}function c0(t){return typeof t=="function"}var u0=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},aa=new WeakMap,Eh=new WeakMap,vh={},ag=0,jA=function(t){return t&&(t.host||jA(t.parentNode))},h0=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=jA(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},d0=function(t,e,n,r){var i=h0(e,Array.isArray(t)?t:[t]);vh[n]||(vh[n]=new WeakMap);var s=vh[n],o=[],a=new Set,l=new Set(i),c=function(h){!h||a.has(h)||(a.add(h),c(h.parentNode))};i.forEach(c);var u=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(d){if(a.has(d))u(d);else try{var p=d.getAttribute(r),f=p!==null&&p!=="false",m=(aa.get(d)||0)+1,g=(s.get(d)||0)+1;aa.set(d,m),s.set(d,g),o.push(d),m===1&&f&&Eh.set(d,!0),g===1&&d.setAttribute(n,"true"),f||d.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",d,y)}})};return u(e),a.clear(),ag++,function(){o.forEach(function(h){var d=aa.get(h)-1,p=s.get(h)-1;aa.set(h,d),s.set(h,p),d||(Eh.has(h)||h.removeAttribute(r),Eh.delete(h)),p||h.removeAttribute(n)}),ag--,ag||(aa=new WeakMap,aa=new WeakMap,Eh=new WeakMap,vh={})}},NE=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=u0(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),d0(r,i,n,"aria-hidden")):function(){return null}},Jr=function(){return Jr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Jr.apply(this,arguments)};function zA(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function p0(t,e,n){for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}var Ed="right-scroll-bar-position",vd="width-before-scroll-bar",f0="with-scroll-bars-hidden",m0="--removed-body-scroll-bar-size";function lg(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function g0(t,e){var n=v.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}var O0=typeof window<"u"?v.useLayoutEffect:v.useEffect,YS=new WeakMap;function y0(t,e){var n=g0(null,function(r){return t.forEach(function(i){return lg(i,r)})});return O0(function(){var r=YS.get(n);if(r){var i=new Set(r),s=new Set(t),o=n.current;i.forEach(function(a){s.has(a)||lg(a,null)}),s.forEach(function(a){i.has(a)||lg(a,o)})}YS.set(n,t)},[t]),n}function b0(t){return t}function E0(t,e){e===void 0&&(e=b0);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(s){var o=e(s,r);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(s){for(r=!0;n.length;){var o=n;n=[],o.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(s),o=n}var l=function(){var u=o;o=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){o.push(u),c()},filter:function(u){return o=o.filter(u),n}}}};return i}function v0(t){t===void 0&&(t={});var e=E0(null);return e.options=Jr({async:!0,ssr:!1},t),e}var VA=function(t){var e=t.sideCar,n=zA(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,Jr({},n))};VA.isSideCarExport=!0;function T0(t,e){return t.useMedium(e),VA}var UA=v0(),cg=function(){},Mf=v.forwardRef(function(t,e){var n=v.useRef(null),r=v.useState({onScrollCapture:cg,onWheelCapture:cg,onTouchMoveCapture:cg}),i=r[0],s=r[1],o=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,u=t.enabled,h=t.shards,d=t.sideCar,p=t.noRelative,f=t.noIsolation,m=t.inert,g=t.allowPinchZoom,y=t.as,b=y===void 0?"div":y,T=t.gapMode,S=zA(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=d,A=y0([n,e]),C=Jr(Jr({},S),i);return v.createElement(v.Fragment,null,u&&v.createElement(w,{sideCar:UA,removeScrollBar:c,shards:h,noRelative:p,noIsolation:f,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:T}),o?v.cloneElement(v.Children.only(a),Jr(Jr({},C),{ref:A})):v.createElement(b,Jr({},C,{className:l,ref:A}),a))});Mf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Mf.classNames={fullWidth:vd,zeroRight:Ed};var S0=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function w0(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=S0();return e&&t.setAttribute("nonce",e),t}function k0(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function _0(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var x0=function(){var t=0,e=null;return{add:function(n){t==0&&(e=w0())&&(k0(e,n),_0(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},C0=function(){var t=x0();return function(e,n){v.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},HA=function(){var t=C0(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},D0={left:0,top:0,right:0,gap:0},ug=function(t){return parseInt(t||"",10)||0},A0=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[ug(n),ug(r),ug(i)]},P0=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return D0;var e=A0(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},N0=HA(),Aa="data-scroll-locked",R0=function(t,e,n,r){var i=t.left,s=t.top,o=t.right,a=t.gap;return n===void 0&&(n="margin"),`
.`.concat(f0,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(a,"px ").concat(r,`;
}
body[`).concat(Aa,`] {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(i,`px;
padding-top: `).concat(s,`px;
padding-right: `).concat(o,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(a,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(Ed,` {
right: `).concat(a,"px ").concat(r,`;
}
.`).concat(vd,` {
margin-right: `).concat(a,"px ").concat(r,`;
}
.`).concat(Ed," .").concat(Ed,` {
right: 0 `).concat(r,`;
}
.`).concat(vd," .").concat(vd,` {
margin-right: 0 `).concat(r,`;
}
body[`).concat(Aa,`] {
`).concat(m0,": ").concat(a,`px;
}
`)},KS=function(){var t=parseInt(document.body.getAttribute(Aa)||"0",10);return isFinite(t)?t:0},M0=function(){v.useEffect(function(){return document.body.setAttribute(Aa,(KS()+1).toString()),function(){var t=KS()-1;t<=0?document.body.removeAttribute(Aa):document.body.setAttribute(Aa,t.toString())}},[])},I0=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;M0();var s=v.useMemo(function(){return P0(i)},[i]);return v.createElement(N0,{styles:R0(s,!e,i,n?"":"!important")})},ry=!1;if(typeof window<"u")try{var Th=Object.defineProperty({},"passive",{get:function(){return ry=!0,!0}});window.addEventListener("test",Th,Th),window.removeEventListener("test",Th,Th)}catch{ry=!1}var la=ry?{passive:!1}:!1,L0=function(t){return t.tagName==="TEXTAREA"},XA=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!L0(t)&&n[e]==="visible")},Q0=function(t){return XA(t,"overflowY")},$0=function(t){return XA(t,"overflowX")},JS=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=qA(t,r);if(i){var s=ZA(t,r),o=s[1],a=s[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},F0=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},B0=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},qA=function(t,e){return t==="v"?Q0(e):$0(e)},ZA=function(t,e){return t==="v"?F0(e):B0(e)},j0=function(t,e){return t==="h"&&e==="rtl"?-1:1},z0=function(t,e,n,r,i){var s=j0(t,window.getComputedStyle(e).direction),o=s*r,a=n.target,l=e.contains(a),c=!1,u=o>0,h=0,d=0;do{if(!a)break;var p=ZA(t,a),f=p[0],m=p[1],g=p[2],y=m-g-s*f;(f||y)&&qA(t,a)&&(h+=y,d+=f);var b=a.parentNode;a=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&Math.abs(h)<1||!u&&Math.abs(d)<1)&&(c=!0),c},Sh=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},ew=function(t){return[t.deltaX,t.deltaY]},tw=function(t){return t&&"current"in t?t.current:t},V0=function(t,e){return t[0]===e[0]&&t[1]===e[1]},U0=function(t){return`
.block-interactivity-`.concat(t,` {pointer-events: none;}
.allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},H0=0,ca=[];function X0(t){var e=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(H0++)[0],s=v.useState(HA)[0],o=v.useRef(t);v.useEffect(function(){o.current=t},[t]),v.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var m=p0([t.lockRef.current],(t.shards||[]).map(tw)).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=v.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var y=Sh(m),b=n.current,T="deltaX"in m?m.deltaX:b[0]-y[0],S="deltaY"in m?m.deltaY:b[1]-y[1],w,A=m.target,C=Math.abs(T)>Math.abs(S)?"h":"v";if("touches"in m&&C==="h"&&A.type==="range")return!1;var N=JS(C,A);if(!N)return!0;if(N?w=C:(w=C==="v"?"h":"v",N=JS(C,A)),!N)return!1;if(!r.current&&"changedTouches"in m&&(T||S)&&(r.current=w),!w)return!0;var $=r.current||w;return z0($,g,m,$==="h"?T:S)},[]),l=v.useCallback(function(m){var g=m;if(!(!ca.length||ca[ca.length-1]!==s)){var y="deltaY"in g?ew(g):Sh(g),b=e.current.filter(function(w){return w.name===g.type&&(w.target===g.target||g.target===w.shadowParent)&&V0(w.delta,y)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var T=(o.current.shards||[]).map(tw).filter(Boolean).filter(function(w){return w.contains(g.target)}),S=T.length>0?a(g,T[0]):!o.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),c=v.useCallback(function(m,g,y,b){var T={name:m,delta:g,target:y,should:b,shadowParent:q0(y)};e.current.push(T),setTimeout(function(){e.current=e.current.filter(function(S){return S!==T})},1)},[]),u=v.useCallback(function(m){n.current=Sh(m),r.current=void 0},[]),h=v.useCallback(function(m){c(m.type,ew(m),m.target,a(m,t.lockRef.current))},[]),d=v.useCallback(function(m){c(m.type,Sh(m),m.target,a(m,t.lockRef.current))},[]);v.useEffect(function(){return ca.push(s),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:d}),document.addEventListener("wheel",l,la),document.addEventListener("touchmove",l,la),document.addEventListener("touchstart",u,la),function(){ca=ca.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,la),document.removeEventListener("touchmove",l,la),document.removeEventListener("touchstart",u,la)}},[]);var p=t.removeScrollBar,f=t.inert;return v.createElement(v.Fragment,null,f?v.createElement(s,{styles:U0(i)}):null,p?v.createElement(I0,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function q0(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const Z0=T0(UA,X0);var If=v.forwardRef(function(t,e){return v.createElement(Mf,Jr({},t,{ref:e,sideCar:Z0}))});If.classNames=Mf.classNames;var Lf="Popover",[WA]=Ys(Lf,[ml]),Lu=ml(),[W0,Yo]=WA(Lf),GA=t=>{const{__scopePopover:e,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:o=!1}=t,a=Lu(e),l=v.useRef(null),[c,u]=v.useState(!1),[h,d]=Iu({prop:r,defaultProp:i??!1,onChange:s,caller:Lf});return E.jsx(CE,{...a,children:E.jsx(W0,{scope:e,contentId:Is(),triggerRef:l,open:h,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(p=>!p),[d]),hasCustomAnchor:c,onCustomAnchorAdd:v.useCallback(()=>u(!0),[]),onCustomAnchorRemove:v.useCallback(()=>u(!1),[]),modal:o,children:n})})};GA.displayName=Lf;var YA="PopoverAnchor",G0=v.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=Yo(YA,n),s=Lu(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:a}=i;return v.useEffect(()=>(o(),()=>a()),[o,a]),E.jsx(Rf,{...s,...r,ref:e})});G0.displayName=YA;var KA="PopoverTrigger",JA=v.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=Yo(KA,n),s=Lu(n),o=_t(e,i.triggerRef),a=E.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":rP(i.open),...r,ref:o,onClick:ve(t.onClick,i.onOpenToggle)});return i.hasCustomAnchor?a:E.jsx(Rf,{asChild:!0,...s,children:a})});JA.displayName=KA;var Y0="PopoverPortal",[rye,K0]=WA(Y0,{forceMount:void 0}),Ua="PopoverContent",eP=v.forwardRef((t,e)=>{const n=K0(Ua,t.__scopePopover),{forceMount:r=n.forceMount,...i}=t,s=Yo(Ua,t.__scopePopover);return E.jsx(fi,{present:r||s.open,children:s.modal?E.jsx(ej,{...i,ref:e}):E.jsx(tj,{...i,ref:e})})});eP.displayName=Ua;var J0=Ba("PopoverContent.RemoveScroll"),ej=v.forwardRef((t,e)=>{const n=Yo(Ua,t.__scopePopover),r=v.useRef(null),i=_t(e,r),s=v.useRef(!1);return v.useEffect(()=>{const o=r.current;if(o)return NE(o)},[]),E.jsx(If,{as:J0,allowPinchZoom:!0,children:E.jsx(tP,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ve(t.onCloseAutoFocus,o=>{var a;o.preventDefault(),s.current||((a=n.triggerRef.current)==null||a.focus())}),onPointerDownOutside:ve(t.onPointerDownOutside,o=>{const a=o.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;s.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:ve(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),tj=v.forwardRef((t,e)=>{const n=Yo(Ua,t.__scopePopover),r=v.useRef(!1),i=v.useRef(!1);return E.jsx(tP,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,s),s.defaultPrevented||(r.current||((a=n.triggerRef.current)==null||a.focus()),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var a,l;(a=t.onInteractOutside)==null||a.call(t,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=s.target;(l=n.triggerRef.current)!=null&&l.contains(o)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),tP=v.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...h}=t,d=Yo(Ua,n),p=Lu(n);return yE(),E.jsx(Cf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:E.jsx(Ru,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>d.onOpenChange(!1),children:E.jsx(DE,{"data-state":rP(d.open),role:"dialog",id:d.contentId,...p,...h,ref:e,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),nP="PopoverClose",Qf=v.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=Yo(nP,n);return E.jsx(pt.button,{type:"button",...r,ref:e,onClick:ve(t.onClick,()=>i.onOpenChange(!1))})});Qf.displayName=nP;var nj="PopoverArrow",rj=v.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=Lu(n);return E.jsx(AE,{...i,...r,ref:e})});rj.displayName=nj;function rP(t){return t?"open":"closed"}var ij=GA,sj=JA,iP=eP,oj=Qf;const aj=7,lj=5,cj=({onCreate:t})=>{const[e,n]=v.useState({cols:1,rows:1}),r=(s,o)=>s<e.rows&&o<e.cols,i=v.useMemo(()=>Array.from({length:lj},(s,o)=>E.jsx("div",{className:"rte-tb__row",children:Array.from({length:aj},(a,l)=>E.jsx("div",{className:bn("rte-tb__cell",r(o,l)&&"rte-tb__cell--active"),onMouseMove:()=>n({cols:l+1,rows:o+1}),onClick:()=>t==null?void 0:t(e)},`col-${l}`))},`row-${o}`)),[e]);return E.jsxs("div",{className:"rte-tb__builder",children:[E.jsx(Qf,{asChild:!0,children:E.jsx("div",{className:"rte-tb__grid",children:i})}),E.jsxs("div",{style:{textAlign:"center",marginBlock:3},children:[e.rows," x ",e.cols]})]})};function $f(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var nw={exports:{}},hg={},rw;function uj(){if(rw)return hg;rw=1;var t=Ne;function e(h,d){return h===d&&(h!==0||1/h===1/d)||h!==h&&d!==d}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,i=t.useEffect,s=t.useLayoutEffect,o=t.useDebugValue;function a(h,d){var p=d(),f=r({inst:{value:p,getSnapshot:d}}),m=f[0].inst,g=f[1];return s(function(){m.value=p,m.getSnapshot=d,l(m)&&g({inst:m})},[h,p,d]),i(function(){return l(m)&&g({inst:m}),h(function(){l(m)&&g({inst:m})})},[h]),o(p),p}function l(h){var d=h.getSnapshot;h=h.value;try{var p=d();return!n(h,p)}catch{return!0}}function c(h,d){return d()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return hg.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:u,hg}var iw;function sP(){return iw||(iw=1,nw.exports=uj()),nw.exports}var oP=sP();function Kt(t){this.content=t}Kt.prototype={constructor:Kt,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),s=r.content.slice();return i==-1?s.push(n||t,e):(s[i+1]=e,n&&(s[i]=n)),new Kt(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Kt(n)},addToStart:function(t,e){return new Kt([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Kt(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),s=r.find(t);return i.splice(s==-1?i.length:s,0,e,n),new Kt(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Kt.from(t),t.size?new Kt(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Kt.from(t),t.size?new Kt(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Kt.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};Kt.from=function(t){if(t instanceof Kt)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Kt(e)};function aP(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),s=e.child(r);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)n++;return n}if(i.content.size||s.content.size){let o=aP(i.content,s.content,n+1);if(o!=null)return o}n+=i.nodeSize}}function lP(t,e,n,r){for(let i=t.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:n,b:r};let o=t.child(--i),a=e.child(--s),l=o.nodeSize;if(o==a){n-=l,r-=l;continue}if(!o.sameMarkup(a))return{a:n,b:r};if(o.isText&&o.text!=a.text){let c=0,u=Math.min(o.text.length,a.text.length);for(;c<u&&o.text[o.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(o.content.size||a.content.size){let c=lP(o.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}}class X{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,s){for(let o=0,a=0;a<n;o++){let l=this.content[o],c=a+l.nodeSize;if(c>e&&r(l,i+a,s||null,o)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,n-u),r,i+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let s="",o=!0;return this.nodesBetween(e,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new X(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let s=0,o=0;o<n;s++){let a=this.content[s],l=o+a.nodeSize;l>e&&((o<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-o),Math.min(a.text.length,n-o)):a=a.cut(Math.max(0,e-o-1),Math.min(a.content.size,n-o-1))),r.push(a),i+=a.nodeSize),o=l}return new X(r,i)}cutByIndex(e,n){return e==n?X.empty:e==0&&n==this.content.length?this:new X(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new X(i,s)}addToStart(e){return new X([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new X(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return aP(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return lP(this,e,n,r)}findIndex(e){if(e==0)return wh(0,e);if(e==this.size)return wh(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),s=r+i.nodeSize;if(s>=e)return s==e?wh(n+1,s):wh(n,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return X.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new X(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return X.empty;let n,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(n||(n=e.slice(0,i)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new X(n||e,r)}static from(e){if(!e)return X.empty;if(e instanceof X)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new X([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}X.empty=new X([],0);const dg={index:0,offset:0};function wh(t,e){return dg.index=t,dg.offset=e,dg}function tp(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!tp(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!tp(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let tt=class iy{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))n||(n=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&tp(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return iy.none;if(e instanceof iy)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};tt.none=[];class np extends Error{}class te{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=uP(this.content,e+this.openStart,n);return r&&new te(r,this.openStart,this.openEnd)}removeBetween(e,n){return new te(cP(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return te.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new te(X.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new te(e,r,i)}}te.empty=new te(X.empty,0,0);function cP(t,e,n){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r),{index:o,offset:a}=t.findIndex(n);if(i==e||s.isText){if(a!=n&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(cP(s.content,e-i-1,n-i-1)))}function uP(t,e,n,r){let{index:i,offset:s}=t.findIndex(e),o=t.maybeChild(i);if(s==e||o.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=uP(o.content,e-s-1,n,o);return a&&t.replaceChild(i,o.copy(a))}function hj(t,e,n){if(n.openStart>t.depth)throw new np("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new np("Inconsistent open depths");return hP(t,e,n,0)}function hP(t,e,n,r){let i=t.index(r),s=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let o=hP(t,e,n,r+1);return s.copy(s.content.replaceChild(i,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let o=t.parent,a=o.content;return Co(o,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:o,end:a}=dj(n,t);return Co(s,pP(t,o,a,e,r))}else return Co(s,rp(t,e,r))}function dP(t,e){if(!e.type.compatibleContent(t.type))throw new np("Cannot join "+e.type.name+" onto "+t.type.name)}function sy(t,e,n){let r=t.node(n);return dP(r,e.node(n)),r}function xo(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function mc(t,e,n,r){let i=(e||t).node(n),s=0,o=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&(xo(t.nodeAfter,r),s++));for(let a=s;a<o;a++)xo(i.child(a),r);e&&e.depth==n&&e.textOffset&&xo(e.nodeBefore,r)}function Co(t,e){return t.type.checkContent(e),t.copy(e)}function pP(t,e,n,r,i){let s=t.depth>i&&sy(t,e,i+1),o=r.depth>i&&sy(n,r,i+1),a=[];return mc(null,t,i,a),s&&o&&e.index(i)==n.index(i)?(dP(s,o),xo(Co(s,pP(t,e,n,r,i+1)),a)):(s&&xo(Co(s,rp(t,e,i+1)),a),mc(e,n,i,a),o&&xo(Co(o,rp(n,r,i+1)),a)),mc(r,null,i,a),new X(a)}function rp(t,e,n){let r=[];if(mc(null,t,n,r),t.depth>n){let i=sy(t,e,n+1);xo(Co(i,rp(t,e,n+1)),r)}return mc(e,null,n,r),new X(r)}function dj(t,e){let n=e.depth-t.openStart,r=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)r=e.node(i).copy(X.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}class Hc{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return tt.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let a=r;r=i,i=a}let s=r.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new ip(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,s=n;for(let o=e;;){let{index:a,offset:l}=o.content.findIndex(s),c=s-l;if(r.push(o,a,i+l),!c||(o=o.child(a),o.isText))break;s=c-1,i+=l+1}return new Hc(n,r,s)}static resolveCached(e,n){let r=sw.get(e);if(r)for(let s=0;s<r.elts.length;s++){let o=r.elts[s];if(o.pos==n)return o}else sw.set(e,r=new pj);let i=r.elts[r.i]=Hc.resolve(e,n);return r.i=(r.i+1)%fj,i}}class pj{constructor(){this.elts=[],this.i=0}}const fj=12,sw=new WeakMap;class ip{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const mj=Object.create(null);let Ls=class oy{constructor(e,n,r,i=tt.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||X.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&tp(this.attrs,n||e.defaultAttrs||mj)&&tt.sameSet(this.marks,r||tt.none)}copy(e=null){return e==this.content?this:new oy(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new oy(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return te.empty;let i=this.resolve(e),s=this.resolve(n),o=r?0:i.sharedDepth(n),a=i.start(o),l=i.node(o).content.cut(i.pos-a,s.pos-a);return new te(l,i.depth-o,s.depth-o)}replace(e,n,r){return hj(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Hc.resolveCached(this,e)}resolveNoCache(e){return Hc.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),fP(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=X.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),a=o&&o.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;l<s;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),o=s&&s.matchFragment(this.content,n);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=tt.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!tt.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=X.fromJSON(e,n.content),s=e.nodeType(n.type).create(n.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};Ls.prototype.text=void 0;let gj=class ay extends Ls{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):fP(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new ay(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ay(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function fP(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Mo{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new Oj(e,n);if(r.next==null)return Mo.empty;let i=mP(r);r.next&&r.err("Unexpected trailing text");let s=wj(Sj(i));return kj(s,r),s}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let s=n;i&&s<r;s++)i=i.matchType(e.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function s(o,a){let l=o.matchFragment(e,r);if(l&&(!n||l.validEnd))return X.from(a.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:h}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(h)==-1){i.push(h);let d=s(h,a.concat(u));if(d)return d}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let o=[];for(let a=i;a.type;a=a.via)o.push(a.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:a,next:l}=s.next[o];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)s+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return s}).join(`
`)}}Mo.empty=new Mo(!0);class Oj{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function mP(t){let e=[];do e.push(yj(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function yj(t){let e=[];do e.push(bj(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function bj(t){let e=Tj(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=Ej(t,e);else break;return e}function ow(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function Ej(t,e){let n=ow(t),r=n;return t.eat(",")&&(t.next!="}"?r=ow(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function vj(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let s in n){let o=n[s];o.isInGroup(e)&&i.push(o)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function Tj(t){if(t.eat("(")){let e=mP(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=vj(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Sj(t){let e=[[]];return i(s(t,0),n()),e;function n(){return e.push([])-1}function r(o,a,l){let c={term:l,to:a};return e[o].push(c),c}function i(o,a){o.forEach(l=>l.to=a)}function s(o,a){if(o.type=="choice")return o.exprs.reduce((l,c)=>l.concat(s(c,a)),[]);if(o.type=="seq")for(let l=0;;l++){let c=s(o.exprs[l],a);if(l==o.exprs.length-1)return c;i(c,a=n())}else if(o.type=="star"){let l=n();return r(a,l),i(s(o.expr,l),l),[r(l)]}else if(o.type=="plus"){let l=n();return i(s(o.expr,a),l),i(s(o.expr,l),l),[r(l)]}else{if(o.type=="opt")return[r(a)].concat(s(o.expr,a));if(o.type=="range"){let l=a;for(let c=0;c<o.min;c++){let u=n();i(s(o.expr,l),u),l=u}if(o.max==-1)i(s(o.expr,l),l);else for(let c=o.min;c<o.max;c++){let u=n();r(l,u),i(s(o.expr,l),u),l=u}return[r(l)]}else{if(o.type=="name")return[r(a,void 0,o.value)];throw new Error("Unknown expr type")}}}}function gP(t,e){return e-t}function aw(t,e){let n=[];return r(e),n.sort(gP);function r(i){let s=t[i];if(s.length==1&&!s[0].term)return r(s[0].to);n.push(i);for(let o=0;o<s.length;o++){let{term:a,to:l}=s[o];!a&&n.indexOf(l)==-1&&r(l)}}}function wj(t){let e=Object.create(null);return n(aw(t,0));function n(r){let i=[];r.forEach(o=>{t[o].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u<i.length;u++)i[u][0]==a&&(c=i[u][1]);aw(t,l).forEach(u=>{c||i.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let s=e[r.join(",")]=new Mo(r.indexOf(t.length-1)>-1);for(let o=0;o<i.length;o++){let a=i[o][1].sort(gP);s.next.push({type:i[o][0],next:e[a.join(",")]||n(a)})}return s}}function kj(t,e){for(let n=0,r=[t];n<r.length;n++){let i=r[n],s=!i.validEnd,o=[];for(let a=0;a<i.next.length;a++){let{type:l,next:c}=i.next[a];o.push(l.name),s&&!(l.isText||l.hasRequiredAttrs())&&(s=!1),r.indexOf(c)==-1&&r.push(c)}s&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function OP(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function yP(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let s=t[r];if(s.hasDefault)i=s.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function bP(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in t){let s=t[i];s.validate&&s.validate(e[i])}}function EP(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new xj(t,r,e[r]);return n}let lw=class vP{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=EP(e,r.attrs),this.defaultAttrs=OP(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Mo.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:yP(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Ls(this,this.computeAttrs(e),X.from(n),tt.setFrom(r))}createChecked(e=null,n,r){return n=X.from(n),this.checkContent(n),new Ls(this,this.computeAttrs(e),n,tt.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=X.from(n),n.size){let o=this.contentMatch.fillBefore(n);if(!o)return null;n=o.append(n)}let i=this.contentMatch.matchFragment(n),s=i&&i.fillBefore(X.empty,!0);return s?new Ls(this,e,n.append(s),tt.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){bP(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:tt.none:e}static compile(e,n){let r=Object.create(null);e.forEach((s,o)=>r[s]=new vP(s,n,o));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function _j(t,e,n){let r=n.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${s}`)}}let xj=class{constructor(t,e,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?_j(t,e,n.validate):n.validate}get isRequired(){return!this.hasDefault}};class Ff{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=EP(e,i.attrs),this.excluded=null;let s=OP(this.attrs);this.instance=s?new tt(this,s):null}create(e=null){return!e&&this.instance?this.instance:new tt(this,yP(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((s,o)=>r[s]=new Ff(s,i++,n,o)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){bP(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}let TP=class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let e=this.spec={};for(let r in t)e[r]=t[r];e.nodes=Kt.from(t.nodes),e.marks=Kt.from(t.marks||{}),this.nodes=lw.compile(this.spec.nodes,this),this.marks=Ff.compile(this.spec.marks,this);let n=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let i=this.nodes[r],s=i.spec.content||"",o=i.spec.marks;if(i.contentMatch=n[s]||(n[s]=Mo.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=o=="_"?null:o?cw(this,o.split(" ")):o==""||!i.inlineContent?[]:null}for(let r in this.marks){let i=this.marks[r],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:cw(this,s.split(" "))}this.nodeFromJSON=r=>Ls.fromJSON(this,r),this.markFromJSON=r=>tt.fromJSON(this,r),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,r){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof lw){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(e,n,r)}text(t,e){let n=this.nodes.text;return new gj(n,n.defaultAttrs,t,tt.setFrom(e))}mark(t,e){return typeof t=="string"&&(t=this.marks[t]),t.create(e)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}};function cw(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],s=t.marks[i],o=s;if(s)n.push(s);else for(let a in t.marks){let l=t.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function Cj(t){return t.tag!=null}function Dj(t){return t.style!=null}class Qs{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(Cj(i))this.tags.push(i);else if(Dj(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,n={}){let r=new hw(this,n,!1);return r.addAll(e,tt.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new hw(this,n,!0);return r.addAll(e,tt.none,n.from,n.to),te.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let s=this.tags[i];if(Nj(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||n.matchesContext(s.context))){if(s.getAttrs){let o=s.getAttrs(e);if(o===!1)continue;s.attrs=o||void 0}return s}}}matchStyle(e,n,r,i){for(let s=i?this.styles.indexOf(i)+1:0;s<this.styles.length;s++){let o=this.styles[s],a=o.style;if(!(a.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(o.getAttrs){let l=o.getAttrs(n);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(e){let n=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o<n.length;o++){let a=n[o];if((a.priority==null?50:a.priority)<s)break}n.splice(o,0,i)}for(let i in e.marks){let s=e.marks[i].spec.parseDOM;s&&s.forEach(o=>{r(o=dw(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=dw(o)),o.node||o.ignore||o.mark||(o.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Qs(e,Qs.schemaRules(e)))}}const SP={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Aj={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},wP={ol:!0,ul:!0},Xc=1,ly=2,gc=4;function uw(t,e,n){return e!=null?(e?Xc:0)|(e==="full"?ly:0):t&&t.whitespace=="pre"?Xc|ly:n&~gc}class kh{constructor(e,n,r,i,s,o){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=o,this.content=[],this.activeMarks=tt.none,this.match=s||(o&gc?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(X.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Xc)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let n=X.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(X.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!SP.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}let hw=class{constructor(t,e,n){this.parser=t,this.options=e,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=e.topNode,i,s=uw(null,e.preserveWhitespace,0)|(n?gc:0);r?i=new kh(r.type,r.attrs,tt.none,!0,e.topMatch||r.type.contentMatch,s):n?i=new kh(null,null,tt.none,!0,null,s):i=new kh(t.schema.topNodeType,null,tt.none,!0,null,s),this.nodes=[i],this.find=e.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,e){t.nodeType==3?this.addTextNode(t,e):t.nodeType==1&&this.addElement(t,e)}addTextNode(t,e){let n=t.nodeValue,r=this.top,i=r.options&ly?"full":this.localPreserveWS||(r.options&Xc)>0,{schema:s}=this.parser;if(i==="full"||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(i)if(i==="full")n=n.replace(/\r\n?/g,`
`);else if(s.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(s.linebreakReplacement.create())){let o=n.split(/\r?\n|\r/);for(let a=0;a<o.length;a++)a&&this.insertNode(s.linebreakReplacement.create(),e,!0),o[a]&&this.insertNode(s.text(o[a]),e,!/\S/.test(o[a]));n=""}else n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let o=r.content[r.content.length-1],a=t.previousSibling;(!o||a&&a.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(n=n.slice(1))}n&&this.insertNode(s.text(n),e,!/\S/.test(n)),this.findInText(t)}else this.findInside(t)}addElement(t,e,n){let r=this.localPreserveWS,i=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let s=t.nodeName.toLowerCase(),o;wP.hasOwnProperty(s)&&this.parser.normalizeLists&&Pj(t);let a=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(o=this.parser.matchTag(t,this,n));e:if(a?a.ignore:Aj.hasOwnProperty(s))this.findInside(t),this.ignoreFallback(t,e);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(t=a.skip);let l,c=this.needsBlock;if(SP.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),l=!0,i.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,e);break e}let u=a&&a.skip?e:this.readStyles(t,e);u&&this.addAll(t,u),l&&this.sync(i),this.needsBlock=c}else{let l=this.readStyles(t,e);l&&this.addElementByRule(t,a,l,a.consuming===!1?o:void 0)}this.localPreserveWS=r}leafFallback(t,e){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
`),e)}ignoreFallback(t,e){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),e,!0)}readStyles(t,e){let n=t.style;if(n&&n.length)for(let r=0;r<this.parser.matchedStyles.length;r++){let i=this.parser.matchedStyles[r],s=n.getPropertyValue(i);if(s)for(let o=void 0;;){let a=this.parser.matchStyle(i,s,this,o);if(!a)break;if(a.ignore)return null;if(a.clearMark?e=e.filter(l=>!a.clearMark(l)):e=e.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)o=a;else break}}return e}addElementByRule(t,e,n,r){let i,s;if(e.node)if(s=this.parser.schema.nodes[e.node],s.isLeaf)this.insertNode(s.create(e.attrs),n,t.nodeName=="BR")||this.leafFallback(t,n);else{let a=this.enter(s,e.attrs||null,n,e.preserveWhitespace);a&&(i=!0,n=a)}else{let a=this.parser.schema.marks[e.mark];n=n.concat(a.create(e.attrs))}let o=this.top;if(s&&s.isLeaf)this.findInside(t);else if(r)this.addElement(t,n,r);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach(a=>this.insertNode(a,n,!1));else{let a=t;typeof e.contentElement=="string"?a=t.querySelector(e.contentElement):typeof e.contentElement=="function"?a=e.contentElement(t):e.contentElement&&(a=e.contentElement),this.findAround(t,a,!0),this.addAll(a,n),this.findAround(t,a,!1)}i&&this.sync(o)&&this.open--}addAll(t,e,n,r){let i=n||0;for(let s=n?t.childNodes[n]:t.firstChild,o=r==null?null:t.childNodes[r];s!=o;s=s.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(s,e);this.findAtPoint(t,i)}findPlace(t,e,n){let r,i;for(let s=this.open,o=0;s>=0;s--){let a=this.nodes[s],l=a.findWrapping(t);if(l&&(!r||r.length>l.length+o)&&(r=l,i=a,!l.length))break;if(a.solid){if(n)break;o+=2}}if(!r)return null;this.sync(i);for(let s=0;s<r.length;s++)e=this.enterInner(r[s],null,e,!1);return e}insertNode(t,e,n){if(t.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(e=this.enterInner(i,null,e))}let r=this.findPlace(t,e,n);if(r){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(t.type));let s=tt.none;for(let o of r.concat(t.marks))(i.type?i.type.allowsMarkType(o.type):pw(o.type,t.type))&&(s=o.addToSet(s));return i.content.push(t.mark(s)),!0}return!1}enter(t,e,n,r){let i=this.findPlace(t.create(e),n,!1);return i&&(i=this.enterInner(t,e,n,!0,r)),i}enterInner(t,e,n,r=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(t);let o=uw(t,i,s.options);s.options&gc&&s.content.length==0&&(o|=gc);let a=tt.none;return n=n.filter(l=>(s.type?s.type.allowsMarkType(l.type):pw(l.type,t))?(a=l.addToSet(a),!1):!0),this.nodes.push(new kh(t,e,a,r,null,o)),this.open++,n}closeExtra(t=!1){let e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let e=this.open;e>=0;e--){if(this.nodes[e]==t)return this.open=e,!0;this.localPreserveWS&&(this.nodes[e].options|=Xc)}return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let n=this.nodes[e].content;for(let r=n.length-1;r>=0;r--)t+=n[r].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&this.find[n].offset==e&&(this.find[n].pos=this.currentPos)}findInside(t){if(this.find)for(let e=0;e<this.find.length;e++)this.find[e].pos==null&&t.nodeType==1&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)}findAround(t,e,n){if(t!=e&&this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&t.nodeType==1&&t.contains(this.find[r].node)&&e.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(t){if(this.find)for(let e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+(r?0:1),s=(o,a)=>{for(;o>=0;o--){let l=e[o];if(l==""){if(o==e.length-1||o==0)continue;for(;a>=i;a--)if(s(o-1,a))return!0;return!1}else{let c=a>0||a==0&&r?this.nodes[a].type:n&&a>=i?n.node(a-i).type:null;if(!c||c.name!=l&&!c.isInGroup(l))return!1;a--}}return!0};return s(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let n=this.parser.schema.nodes[e];if(n.isTextblock&&n.defaultAttrs)return n}}};function Pj(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&wP.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function Nj(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function dw(t){let e={};for(let n in t)e[n]=t[n];return e}function pw(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let s=[],o=a=>{s.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==e||s.indexOf(u)<0&&o(u))return!0}};if(o(i.contentMatch))return!0}}class Ks{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=pg(n).createDocumentFragment());let i=r,s=[];return e.forEach(o=>{if(s.length||o.marks.length){let a=0,l=0;for(;a<s.length&&l<o.marks.length;){let c=o.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(s[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<s.length;)i=s.pop()[1];for(;l<o.marks.length;){let c=o.marks[l++],u=this.serializeMark(c,o.isInline,n);u&&(s.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(o,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:i}=Td(pg(n),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,n);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&Td(pg(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return Td(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Ks(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=fw(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return fw(e.marks)}}function fw(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function pg(t){return t.document||window.document}const mw=new WeakMap;function Rj(t){let e=mw.get(t);return e===void 0&&mw.set(t,e=Mj(t)),e}function Mj(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(t),e}function Td(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],s;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(s=Rj(r))&&s.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(n=i.slice(0,o),i=i.slice(o+1));let a,l=n?t.createElementNS(n,i):t.createElement(i),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let h in c)if(c[h]!=null){let d=h.indexOf(" ");d>0?l.setAttributeNS(h.slice(0,d),h.slice(d+1),c[h]):h=="style"&&l.style?l.style.cssText=c[h]:l.setAttribute(h,c[h])}}for(let h=u;h<e.length;h++){let d=e[h];if(d===0){if(h<e.length-1||h>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:p,contentDOM:f}=Td(t,d,n,r);if(l.appendChild(p),f){if(a)throw new RangeError("Multiple content holes");a=f}}}return{dom:l,contentDOM:a}}const kP=65535,_P=Math.pow(2,16);function Ij(t,e){return t+e*_P}function gw(t){return t&kP}function Lj(t){return(t-(t&kP))/_P}const xP=1,CP=2,Sd=4,DP=8;class cy{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&DP)>0}get deletedBefore(){return(this.delInfo&(xP|Sd))>0}get deletedAfter(){return(this.delInfo&(CP|Sd))>0}get deletedAcross(){return(this.delInfo&Sd)>0}}class Xn{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Xn.empty)return Xn.empty}recover(e){let n=0,r=gw(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+Lj(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let c=this.ranges[a+s],u=this.ranges[a+o],h=l+c;if(e<=h){let d=c?e==l?-1:e==h?1:n:n,p=l+i+(d<0?0:u);if(r)return p;let f=e==(n<0?l:h)?null:Ij(a/3,e-l),m=e==l?CP:e==h?xP:Sd;return(n<0?e!=l:e!=h)&&(m|=DP),new cy(p,m,f)}i+=u-c}return r?e+i:new cy(e+i,0,null)}touches(e,n){let r=0,i=gw(n),s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[a+s],u=l+c;if(e<=u&&a==i*3)return!0;r+=this.ranges[a+o]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i<this.ranges.length;i+=3){let o=this.ranges[i],a=o-(this.inverted?s:0),l=o+(this.inverted?0:s),c=this.ranges[i+n],u=this.ranges[i+r];e(a,a+c,l,l+u),s+=u-c}}invert(){return new Xn(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Xn.empty:new Xn(e<0?[0,-e,0]:[0,0,e])}}Xn.empty=new Xn([]);class qc{constructor(e,n,r=0,i=e?e.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new qc(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let i=e.getMirror(n);this.appendMap(e._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new qc;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let s=this.from;s<this.to;s++){let o=this._maps[s],a=o.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(s);if(l!=null&&l>s&&l<this.to){s=l,e=this._maps[l].recover(a.recover);continue}}i|=a.delInfo,e=a.pos}return r?e:new cy(e,i,null)}}const fg=Object.create(null);class En{getMap(){return Xn.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=fg[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in fg)throw new RangeError("Duplicate use of step JSON ID "+e);return fg[e]=n,n.prototype.jsonID=e,n}}class Nt{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Nt(e,null)}static fail(e){return new Nt(null,e)}static fromReplace(e,n,r,i){try{return Nt.ok(e.replace(n,r,i))}catch(s){if(s instanceof np)return Nt.fail(s.message);throw s}}}function RE(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let s=t.child(i);s.content.size&&(s=s.copy(RE(s.content,e,s))),s.isInline&&(s=e(s,n,i)),r.push(s)}return X.fromArray(r)}class xs extends En{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),s=new te(RE(n.content,(o,a)=>!o.isAtom||!a.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),n.openStart,n.openEnd);return Nt.fromReplace(e,this.from,this.to,s)}invert(){return new Tr(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new xs(n.pos,r.pos,this.mark)}merge(e){return e instanceof xs&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new xs(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new xs(n.from,n.to,e.markFromJSON(n.mark))}}En.jsonID("addMark",xs);class Tr extends En{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new te(RE(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return Nt.fromReplace(e,this.from,this.to,r)}invert(){return new xs(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Tr(n.pos,r.pos,this.mark)}merge(e){return e instanceof Tr&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Tr(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Tr(n.from,n.to,e.markFromJSON(n.mark))}}En.jsonID("removeMark",Tr);class Cs extends En{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Nt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Nt.fromReplace(e,this.pos,this.pos+1,new te(X.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new Cs(this.pos,n.marks[i]);return new Cs(this.pos,this.mark)}}return new Io(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Cs(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Cs(n.pos,e.markFromJSON(n.mark))}}En.jsonID("addNodeMark",Cs);class Io extends En{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Nt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Nt.fromReplace(e,this.pos,this.pos+1,new te(X.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Cs(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Io(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Io(n.pos,e.markFromJSON(n.mark))}}En.jsonID("removeNodeMark",Io);class Xt extends En{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&uy(e,this.from,this.to)?Nt.fail("Structure replace would overwrite content"):Nt.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Xn([this.from,this.to-this.from,this.slice.size])}invert(e){return new Xt(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new Xt(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Xt)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?te.empty:new te(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Xt(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?te.empty:new te(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Xt(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Xt(n.from,n.to,te.fromJSON(e,n.slice),!!n.structure)}}En.jsonID("replace",Xt);class Wt extends En{constructor(e,n,r,i,s,o,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=s,this.insert=o,this.structure=a}apply(e){if(this.structure&&(uy(e,this.from,this.gapFrom)||uy(e,this.gapTo,this.to)))return Nt.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Nt.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Nt.fromReplace(e,this.from,this.to,r):Nt.fail("Content does not fit in gap")}getMap(){return new Xn([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new Wt(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),s=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||s>r.pos?null:new Wt(n.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Wt(n.from,n.to,n.gapFrom,n.gapTo,te.fromJSON(e,n.slice),n.insert,!!n.structure)}}En.jsonID("replaceAround",Wt);function uy(t,e,n){let r=t.resolve(e),i=n-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let o=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function Qj(t,e,n,r){let i=[],s=[],o,a;t.doc.nodesBetween(e,n,(l,c,u)=>{if(!l.isInline)return;let h=l.marks;if(!r.isInSet(h)&&u.type.allowsMarkType(r.type)){let d=Math.max(c,e),p=Math.min(c+l.nodeSize,n),f=r.addToSet(h);for(let m=0;m<h.length;m++)h[m].isInSet(f)||(o&&o.to==d&&o.mark.eq(h[m])?o.to=p:i.push(o=new Tr(d,p,h[m])));a&&a.to==d?a.to=p:s.push(a=new xs(d,p,r))}}),i.forEach(l=>t.step(l)),s.forEach(l=>t.step(l))}function $j(t,e,n,r){let i=[],s=0;t.doc.nodesBetween(e,n,(o,a)=>{if(!o.isInline)return;s++;let l=null;if(r instanceof Ff){let c=o.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(l=[r]):l=o.marks;if(l&&l.length){let c=Math.min(a+o.nodeSize,n);for(let u=0;u<l.length;u++){let h=l[u],d;for(let p=0;p<i.length;p++){let f=i[p];f.step==s-1&&h.eq(i[p].style)&&(d=f)}d?(d.to=c,d.step=s):i.push({style:h,from:Math.max(a,e),to:c,step:s})}}}),i.forEach(o=>t.step(new Tr(o.from,o.to,o.style)))}function ME(t,e,n,r=n.contentMatch,i=!0){let s=t.doc.nodeAt(e),o=[],a=e+1;for(let l=0;l<s.childCount;l++){let c=s.child(l),u=a+c.nodeSize,h=r.matchType(c.type);if(!h)o.push(new Xt(a,u,te.empty));else{r=h;for(let d=0;d<c.marks.length;d++)n.allowsMarkType(c.marks[d].type)||t.step(new Tr(a,u,c.marks[d]));if(i&&c.isText&&n.whitespace!="pre"){let d,p=/\r?\n|\r/g,f;for(;d=p.exec(c.text);)f||(f=new te(X.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),o.push(new Xt(a+d.index,a+d.index+d[0].length,f))}}a=u}if(!r.validEnd){let l=r.fillBefore(X.empty,!0);t.replace(a,a,new te(l,0,0))}for(let l=o.length-1;l>=0;l--)t.step(o[l])}function Fj(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function gl(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth,r=0,i=0;;--n){let s=t.$from.node(n),o=t.$from.index(n)+r,a=t.$to.indexAfter(n)-i;if(n<t.depth&&s.canReplace(o,a,e))return n;if(n==0||s.type.spec.isolating||!Fj(s,o,a))break;o&&(r=1),a<s.childCount&&(i=1)}return null}function Bj(t,e,n){let{$from:r,$to:i,depth:s}=e,o=r.before(s+1),a=i.after(s+1),l=o,c=a,u=X.empty,h=0;for(let f=s,m=!1;f>n;f--)m||r.index(f)>0?(m=!0,u=X.from(r.node(f).copy(u)),h++):l--;let d=X.empty,p=0;for(let f=s,m=!1;f>n;f--)m||i.after(f+1)<i.end(f)?(m=!0,d=X.from(i.node(f).copy(d)),p++):c++;t.step(new Wt(l,c,o,a,new te(u.append(d),h,p),u.size-h,!0))}function IE(t,e,n=null,r=t){let i=jj(t,e),s=i&&zj(r,e);return s?i.map(Ow).concat({type:e,attrs:n}).concat(s.map(Ow)):null}function Ow(t){return{type:t,attrs:null}}function jj(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.contentMatchAt(r).findWrapping(e);if(!s)return null;let o=s.length?s[0]:e;return n.canReplaceWith(r,i,o)?s:null}function zj(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.child(r),o=e.contentMatch.findWrapping(s.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let l=r;a&&l<i;l++)a=a.matchType(n.child(l).type);return!a||!a.validEnd?null:o}function Vj(t,e,n){let r=X.empty;for(let o=n.length-1;o>=0;o--){if(r.size){let a=n[o].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=X.from(n[o].type.create(n[o].attrs,r))}let i=e.start,s=e.end;t.step(new Wt(i,s,i,s,new te(r,0,0),n.length,!0))}function Uj(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,(o,a)=>{let l=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(r,l)&&Hj(t.doc,t.mapping.slice(s).map(a),r)){let c=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",f=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!f?c=!1:!p&&f&&(c=!0)}c===!1&&PP(t,o,a,s),ME(t,t.mapping.slice(s).map(a,1),r,void 0,c===null);let u=t.mapping.slice(s),h=u.map(a,1),d=u.map(a+o.nodeSize,1);return t.step(new Wt(h,d,h+1,d-1,new te(X.from(r.create(l,null,o.marks)),0,0),1,!0)),c===!0&&AP(t,o,a,s),!1}})}function AP(t,e,n,r){e.forEach((i,s)=>{if(i.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(i.text);){let l=t.mapping.slice(r).map(n+1+s+o.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function PP(t,e,n,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=t.mapping.slice(r).map(n+1+s);t.replaceWith(o,o+1,e.type.schema.text(`
`))}})}function Hj(t,e,n){let r=t.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function Xj(t,e,n,r,i){let s=t.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let o=n.create(r,null,i||s.marks);if(s.isLeaf)return t.replaceWith(e,e+s.nodeSize,o);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new Wt(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new te(X.from(o),0,0),1,!0))}function ji(t,e,n=1,r){let i=t.resolve(e),s=i.depth-n,o=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,u=n-2;c>s;c--,u--){let h=i.node(c),d=i.index(c);if(h.type.spec.isolating)return!1;let p=h.content.cutByIndex(d,h.childCount),f=r&&r[u+1];f&&(p=p.replaceChild(0,f.type.create(f.attrs)));let m=r&&r[u]||h;if(!h.canReplace(d+1,h.childCount)||!m.type.validContent(p))return!1}let a=i.indexAfter(s),l=r&&r[0];return i.node(s).canReplaceWith(a,a,l?l.type:i.node(s+1).type)}function qj(t,e,n=1,r){let i=t.doc.resolve(e),s=X.empty,o=X.empty;for(let a=i.depth,l=i.depth-n,c=n-1;a>l;a--,c--){s=X.from(i.node(a).copy(s));let u=r&&r[c];o=X.from(u?u.type.create(u.attrs,o):i.node(a).copy(o))}t.step(new Xt(e,e,new te(s.append(o),n,n),!0))}function Js(t,e){let n=t.resolve(e),r=n.index();return NP(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Zj(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let i=0;i<e.childCount;i++){let s=e.child(i),o=s.type==r?t.type.schema.nodes.text:s.type;if(n=n.matchType(o),!n||!t.type.allowsMarks(s.marks))return!1}return n.validEnd}function NP(t,e){return!!(t&&e&&!t.isLeaf&&Zj(t,e))}function Bf(t,e,n=-1){let r=t.resolve(e);for(let i=r.depth;;i--){let s,o,a=r.index(i);if(i==r.depth?(s=r.nodeBefore,o=r.nodeAfter):n>0?(s=r.node(i+1),a++,o=r.node(i).maybeChild(a)):(s=r.node(i).maybeChild(a-1),o=r.node(i+1)),s&&!s.isTextblock&&NP(s,o)&&r.node(i).canReplace(a,a+1))return e;if(i==0)break;e=n<0?r.before(i):r.after(i)}}function Wj(t,e,n){let r=null,{linebreakReplacement:i}=t.doc.type.schema,s=t.doc.resolve(e-n),o=s.node().type;if(i&&o.inlineContent){let u=o.whitespace=="pre",h=!!o.contentMatch.matchType(i);u&&!h?r=!1:!u&&h&&(r=!0)}let a=t.steps.length;if(r===!1){let u=t.doc.resolve(e+n);PP(t,u.node(),u.before(),a)}o.inlineContent&&ME(t,e+n-1,o,s.node().contentMatchAt(s.index()),r==null);let l=t.mapping.slice(a),c=l.map(e-n);if(t.step(new Xt(c,l.map(e+n,-1),te.empty,!0)),r===!0){let u=t.doc.resolve(c);AP(t,u.node(),u.before(),t.steps.length)}return t}function Gj(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let s=r.index(i);if(r.node(i).canReplaceWith(s,s,n))return r.before(i+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let s=r.indexAfter(i);if(r.node(i).canReplaceWith(s,s,n))return r.after(i+1);if(s<r.node(i).childCount)return null}return null}function RP(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let i=n.content;for(let s=0;s<n.openStart;s++)i=i.firstChild.content;for(let s=1;s<=(n.openStart==0&&n.size?2:1);s++)for(let o=r.depth;o>=0;o--){let a=o==r.depth?0:r.pos<=(r.start(o+1)+r.end(o+1))/2?-1:1,l=r.index(o)+(a>0?1:0),c=r.node(o),u=!1;if(s==1)u=c.canReplace(l,l,i);else{let h=c.contentMatchAt(l).findWrapping(i.firstChild.type);u=h&&c.canReplaceWith(l,l,h[0])}if(u)return a==0?r.pos:a<0?r.before(o+1):r.after(o+1)}return null}function jf(t,e,n=e,r=te.empty){if(e==n&&!r.size)return null;let i=t.resolve(e),s=t.resolve(n);return MP(i,s,r)?new Xt(e,n,r):new Yj(i,s,r).fit()}function MP(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class Yj{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=X.empty;for(let i=0;i<=e.depth;i++){let s=e.node(i);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=X.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let s=this.placed,o=r.depth,a=i.depth;for(;o&&a&&s.childCount==1;)s=s.firstChild.content,o--,a--;let l=new te(s,o,a);return e>-1?new Wt(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new Xt(r.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<e;r++){let s=n.firstChild;if(n.childCount>1&&(i=0),s.type.spec.isolating&&i<=r){e=r;break}n=s.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let i,s=null;r?(s=mg(this.unplaced.content,r-1).firstChild,i=s.content):i=this.unplaced.content;let o=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],u,h=null;if(n==1&&(o?c.matchType(o.type)||(h=c.fillBefore(X.from(o),!1)):s&&l.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:a,parent:s,inject:h};if(n==2&&o&&(u=c.findWrapping(o.type)))return{sliceDepth:r,frontierDepth:a,parent:s,wrap:u};if(s&&c.matchType(s.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=mg(e,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new te(e,n+1,Math.max(r,i.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=mg(e,n);if(i.childCount<=1&&n>0){let s=e.size-n<=n+i.size;this.unplaced=new te(Kl(e,n-1,1),n-1,s?n-1:r)}else this.unplaced=new te(Kl(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:i,wrap:s}){for(;this.depth>n;)this.closeFrontierNode();if(s)for(let m=0;m<s.length;m++)this.openFrontierNode(s[m]);let o=this.unplaced,a=r?r.content:o.content,l=o.openStart-e,c=0,u=[],{match:h,type:d}=this.frontier[n];if(i){for(let m=0;m<i.childCount;m++)u.push(i.child(m));h=h.matchFragment(i)}let p=a.size+e-(o.content.size-o.openEnd);for(;c<a.childCount;){let m=a.child(c),g=h.matchType(m.type);if(!g)break;c++,(c>1||l==0||m.content.size)&&(h=g,u.push(IP(m.mark(d.allowedMarks(m.marks)),c==1?l:0,c==a.childCount?p:-1)))}let f=c==a.childCount;f||(p=-1),this.placed=Jl(this.placed,n,X.from(u)),this.frontier[n].match=h,f&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,g=a;m<p;m++){let y=g.lastChild;this.frontier.push({type:y.type,match:y.contentMatchAt(y.childCount)}),g=y.content}this.unplaced=f?e==0?te.empty:new te(Kl(o.content,e-1,1),e-1,p<0?o.openEnd:e-1):new te(Kl(o.content,e,c),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!gg(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],s=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),o=gg(e,n,i,r,s);if(o){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],u=gg(e,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:o,move:s?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Jl(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let i=e.node(r),s=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,s)}return e}openFrontierNode(e,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Jl(this.placed,this.depth,X.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(X.empty,!0);e.childCount&&(this.placed=Jl(this.placed,this.frontier.length,e))}}function Kl(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Kl(t.firstChild.content,e-1,n)))}function Jl(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Jl(t.lastChild.content,e-1,n)))}function mg(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function IP(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,IP(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(X.empty,!0)))),t.copy(r)}function gg(t,e,n,r,i){let s=t.node(e),o=i?t.indexAfter(e):t.index(e);if(o==s.childCount&&!n.compatibleContent(s.type))return null;let a=r.fillBefore(s.content,!0,o);return a&&!Kj(n,s.content,o)?a:null}function Kj(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function Jj(t){return t.spec.defining||t.spec.definingForContent}function ez(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let i=t.doc.resolve(e),s=t.doc.resolve(n);if(MP(i,s,r))return t.step(new Xt(e,n,r));let o=QP(i,s);o[o.length-1]==0&&o.pop();let a=-(i.depth+1);o.unshift(a);for(let d=i.depth,p=i.pos-1;d>0;d--,p--){let f=i.node(d).type.spec;if(f.defining||f.definingAsContext||f.isolating)break;o.indexOf(d)>-1?a=d:i.before(d)==p&&o.splice(1,0,-d)}let l=o.indexOf(a),c=[],u=r.openStart;for(let d=r.content,p=0;;p++){let f=d.firstChild;if(c.push(f),p==r.openStart)break;d=f.content}for(let d=u-1;d>=0;d--){let p=c[d],f=Jj(p.type);if(f&&!p.sameMarkup(i.node(Math.abs(a)-1)))u=d;else if(f||!p.type.isTextblock)break}for(let d=r.openStart;d>=0;d--){let p=(d+u+1)%(r.openStart+1),f=c[p];if(f)for(let m=0;m<o.length;m++){let g=o[(m+l)%o.length],y=!0;g<0&&(y=!1,g=-g);let b=i.node(g-1),T=i.index(g-1);if(b.canReplaceWith(T,T,f.type,f.marks))return t.replace(i.before(g),y?s.after(g):n,new te(LP(r.content,0,r.openStart,p),p,r.openEnd))}}let h=t.steps.length;for(let d=o.length-1;d>=0&&(t.replace(e,n,r),!(t.steps.length>h));d--){let p=o[d];p<0||(e=i.before(p),n=s.after(p))}}function LP(t,e,n,r,i){if(e<n){let s=t.firstChild;t=t.replaceChild(0,s.copy(LP(s.content,e+1,n,r,s)))}if(e>r){let s=i.contentMatchAt(0),o=s.fillBefore(t).append(t);t=o.append(s.matchFragment(o).fillBefore(X.empty,!0))}return t}function tz(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let i=Gj(t.doc,e,r.type);i!=null&&(e=n=i)}t.replaceRange(e,n,new te(X.from(r),0,0))}function nz(t,e,n){let r=t.doc.resolve(e),i=t.doc.resolve(n),s=QP(r,i);for(let o=0;o<s.length;o++){let a=s[o],l=o==s.length-1;if(l&&a==0||r.node(a).type.contentMatch.validEnd)return t.delete(r.start(a),i.end(a));if(a>0&&(l||r.node(a-1).canReplace(r.index(a-1),i.indexAfter(a-1))))return t.delete(r.before(a),i.after(a))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(e-r.start(o)==r.depth-o&&n>r.end(o)&&i.end(o)-n!=i.depth-o&&r.start(o-1)==i.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),i.index(o-1)))return t.delete(r.before(o),n);t.delete(e,n)}function QP(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let i=r;i>=0;i--){let s=t.start(i);if(s<t.pos-(t.depth-i)||e.end(i)>e.pos+(e.depth-i)||t.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(s==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==s-1)&&n.push(i)}return n}class Pa extends En{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return Nt.fail("No node at attribute step's position");let r=Object.create(null);for(let s in n.attrs)r[s]=n.attrs[s];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return Nt.fromReplace(e,this.pos,this.pos+1,new te(X.from(i),0,n.isLeaf?0:1))}getMap(){return Xn.empty}invert(e){return new Pa(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Pa(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Pa(n.pos,n.attr,n.value)}}En.jsonID("attr",Pa);class Zc extends En{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let i in e.attrs)n[i]=e.attrs[i];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return Nt.ok(r)}getMap(){return Xn.empty}invert(e){return new Zc(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Zc(n.attr,n.value)}}En.jsonID("docAttr",Zc);let Ha=class extends Error{};Ha=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};Ha.prototype=Object.create(Error.prototype);Ha.prototype.constructor=Ha;Ha.prototype.name="TransformError";class LE{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new qc}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Ha(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=te.empty){let i=jf(this.doc,e,n,r);return i&&this.step(i),this}replaceWith(e,n,r){return this.replace(e,n,new te(X.from(r),0,0))}delete(e,n){return this.replace(e,n,te.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return ez(this,e,n,r),this}replaceRangeWith(e,n,r){return tz(this,e,n,r),this}deleteRange(e,n){return nz(this,e,n),this}lift(e,n){return Bj(this,e,n),this}join(e,n=1){return Wj(this,e,n),this}wrap(e,n){return Vj(this,e,n),this}setBlockType(e,n=e,r,i=null){return Uj(this,e,n,r,i),this}setNodeMarkup(e,n,r=null,i){return Xj(this,e,n,r,i),this}setNodeAttribute(e,n,r){return this.step(new Pa(e,n,r)),this}setDocAttribute(e,n){return this.step(new Zc(e,n)),this}addNodeMark(e,n){return this.step(new Cs(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof tt)n.isInSet(r.marks)&&this.step(new Io(e,n));else{let i=r.marks,s,o=[];for(;s=n.isInSet(i);)o.push(new Io(e,s)),i=s.removeFromSet(i);for(let a=o.length-1;a>=0;a--)this.step(o[a])}return this}split(e,n=1,r){return qj(this,e,n,r),this}addMark(e,n,r){return Qj(this,e,n,r),this}removeMark(e,n,r){return $j(this,e,n,r),this}clearIncompatible(e,n,r){return ME(this,e,n,r),this}}const Og=Object.create(null);let Te=class{constructor(t,e,n){this.$anchor=t,this.$head=e,this.ranges=n||[new $P(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e<t.length;e++)if(t[e].$from.pos!=t[e].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,e=te.empty){let n=e.content.lastChild,r=null;for(let o=0;o<e.openEnd;o++)r=n,n=n.lastChild;let i=t.steps.length,s=this.ranges;for(let o=0;o<s.length;o++){let{$from:a,$to:l}=s[o],c=t.mapping.slice(i);t.replaceRange(c.map(a.pos),c.map(l.pos),o?te.empty:e),o==0&&Ew(t,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(t,e){let n=t.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:s,$to:o}=r[i],a=t.mapping.slice(n),l=a.map(s.pos),c=a.map(o.pos);i?t.deleteRange(l,c):(t.replaceRangeWith(l,c,e),Ew(t,n,e.isInline?-1:1))}}static findFrom(t,e,n=!1){let r=t.parent.inlineContent?new de(t):Oa(t.node(0),t.parent,t.pos,t.index(),e,n);if(r)return r;for(let i=t.depth-1;i>=0;i--){let s=e<0?Oa(t.node(0),t.node(i),t.before(i+1),t.index(i),e,n):Oa(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,e,n);if(s)return s}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new Wn(t.node(0))}static atStart(t){return Oa(t,t,0,0,1)||new Wn(t)}static atEnd(t){return Oa(t,t,t.content.size,t.childCount,-1)||new Wn(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=Og[e.type];if(!n)throw new RangeError(`No selection type ${e.type} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in Og)throw new RangeError("Duplicate use of selection JSON ID "+t);return Og[t]=e,e.prototype.jsonID=t,e}getBookmark(){return de.between(this.$anchor,this.$head).getBookmark()}};Te.prototype.visible=!0;let $P=class{constructor(t,e){this.$from=t,this.$to=e}},yw=!1;function bw(t){!yw&&!t.parent.inlineContent&&(yw=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class de extends Te{constructor(e,n=e){bw(e),bw(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return Te.near(r);let i=e.resolve(n.map(this.anchor));return new de(i.parent.inlineContent?i:r,r)}replace(e,n=te.empty){if(super.replace(e,n),n==te.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof de&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new zf(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new de(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let i=e.resolve(n);return new this(i,r==n?i:e.resolve(r))}static between(e,n,r){let i=e.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let s=Te.findFrom(n,r,!0)||Te.findFrom(n,-r,!0);if(s)n=s.$head;else return Te.near(n,r)}return e.parent.inlineContent||(i==0?e=n:(e=(Te.findFrom(e,-r,!0)||Te.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=i<0&&(e=n))),new de(e,n)}}Te.jsonID("text",de);class zf{constructor(e,n){this.anchor=e,this.head=n}map(e){return new zf(e.map(this.anchor),e.map(this.head))}resolve(e){return de.between(e.resolve(this.anchor),e.resolve(this.head))}}class pe extends Te{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),s=e.resolve(i);return r?Te.near(s):new pe(s)}content(){return new te(X.from(this.node),0,0)}eq(e){return e instanceof pe&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new QE(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new pe(e.resolve(n.anchor))}static create(e,n){return new pe(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}pe.prototype.visible=!1;Te.jsonID("node",pe);class QE{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new zf(r,r):new QE(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&pe.isSelectable(r)?new pe(n):Te.near(n)}}class Wn extends Te{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=te.empty){if(n==te.empty){e.delete(0,e.doc.content.size);let r=Te.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Wn(e)}map(e){return new Wn(e)}eq(e){return e instanceof Wn}getBookmark(){return rz}}Te.jsonID("all",Wn);const rz={map(){return this},resolve(t){return new Wn(t)}};function Oa(t,e,n,r,i,s=!1){if(e.inlineContent)return de.create(t,n);for(let o=r-(i>0?0:1);i>0?o<e.childCount:o>=0;o+=i){let a=e.child(o);if(a.isAtom){if(!s&&pe.isSelectable(a))return pe.create(t,n-(i<0?a.nodeSize:0))}else{let l=Oa(t,a,n+i,i<0?a.childCount:0,i,s);if(l)return l}n+=a.nodeSize*i}return null}function Ew(t,e,n){let r=t.steps.length-1;if(r<e)return;let i=t.steps[r];if(!(i instanceof Xt||i instanceof Wt))return;let s=t.mapping.maps[r],o;s.forEach((a,l,c,u)=>{o==null&&(o=u)}),t.setSelection(Te.near(t.doc.resolve(o),n))}const vw=1,_h=2,Tw=4;let iz=class extends LE{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(this.updated|vw)&~_h,this.storedMarks=null,this}get selectionSet(){return(this.updated&vw)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=_h,this}ensureMarks(t){return tt.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&_h)>0}addStep(t,e){super.addStep(t,e),this.updated=this.updated&~_h,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let n=this.selection;return e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||tt.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,n){let r=this.doc.type.schema;if(e==null)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(n==null&&(n=e),!t)return this.deleteRange(e,n);let i=this.storedMarks;if(!i){let s=this.doc.resolve(e);i=n==e?s.marks():s.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,i)),!this.selection.empty&&this.selection.to==e+t.length&&this.setSelection(Te.near(this.selection.$to)),this}}setMeta(t,e){return this.meta[typeof t=="string"?t:t.key]=e,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Tw,this}get scrolledIntoView(){return(this.updated&Tw)>0}};function Sw(t,e){return!e||!t?t:t.bind(e)}class ec{constructor(e,n,r){this.name=e,this.init=Sw(n.init,r),this.apply=Sw(n.apply,r)}}const sz=[new ec("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new ec("selection",{init(t,e){return t.selection||Te.atStart(e.doc)},apply(t){return t.selection}}),new ec("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new ec("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];let yg=class{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=sz.slice(),e&&e.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new ec(n.key,n.spec.state,n))})}},oz=class tc{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),i=null;for(;;){let s=!1;for(let o=0;o<this.config.plugins.length;o++){let a=this.config.plugins[o];if(a.spec.appendTransaction){let l=i?i[o].n:0,c=i?i[o].state:this,u=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,c,r);if(u&&r.filterTransaction(u,o)){if(u.setMeta("appendedTransaction",e),!i){i=[];for(let h=0;h<this.config.plugins.length;h++)i.push(h<o?{state:r,n:n.length}:{state:this,n:0})}n.push(u),r=r.applyInner(u),s=!0}i&&(i[o]={state:r,n:n.length})}}if(!s)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new tc(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let s=r[i];n[s.name]=s.apply(e,this[s.name],this,n)}return n}get tr(){return new iz(this)}static create(e){let n=new yg(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new tc(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(e,r);return r}reconfigure(e){let n=new yg(this.schema,e.plugins),r=n.fields,i=new tc(n);for(let s=0;s<r.length;s++){let o=r[s].name;i[o]=this.hasOwnProperty(o)?this[o]:r[s].init(e,i)}return i}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],s=i.spec.state;s&&s.toJSON&&(n[r]=s.toJSON.call(i,this[i.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new yg(e.schema,e.plugins),s=new tc(i);return i.fields.forEach(o=>{if(o.name=="doc")s.doc=Ls.fromJSON(e.schema,n.doc);else if(o.name=="selection")s.selection=Te.fromJSON(s.doc,n.selection);else if(o.name=="storedMarks")n.storedMarks&&(s.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],c=l.spec.state;if(l.key==o.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){s[o.name]=c.fromJSON.call(l,e,n[a],s);return}}s[o.name]=o.init(e,s)}}),s}};function FP(t,e,n){for(let r in t){let i=t[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=FP(i,e,{})),n[r]=i}return n}class ze{constructor(e){this.spec=e,this.props={},e.props&&FP(e.props,this,this.props),this.key=e.key?e.key.key:BP("plugin")}getState(e){return e[this.key]}}const bg=Object.create(null);function BP(t){return t in bg?t+"$"+ ++bg[t]:(bg[t]=0,t+"$")}class rt{constructor(e="key"){this.key=BP(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const $E=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function jP(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const zP=(t,e,n)=>{let r=jP(t,n);if(!r)return!1;let i=FE(r);if(!i){let o=r.blockRange(),a=o&&gl(o);return a==null?!1:(e&&e(t.tr.lift(o,a).scrollIntoView()),!0)}let s=i.nodeBefore;if(YP(t,i,e,-1))return!0;if(r.parent.content.size==0&&(Xa(s,"end")||pe.isSelectable(s)))for(let o=r.depth;;o--){let a=jf(t.doc,r.before(o),r.after(o),te.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection(Xa(s,"end")?Te.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):pe.create(l.doc,i.pos-s.nodeSize)),e(l.scrollIntoView())}return!0}if(o==1||r.node(o-1).childCount>1)break}return s.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos-s.nodeSize,i.pos).scrollIntoView()),!0):!1},az=(t,e,n)=>{let r=jP(t,n);if(!r)return!1;let i=FE(r);return i?VP(t,i,e):!1},lz=(t,e,n)=>{let r=HP(t,n);if(!r)return!1;let i=BE(r);return i?VP(t,i,e):!1};function VP(t,e,n){let r=e.nodeBefore,i=r,s=e.pos-1;for(;!i.isTextblock;s--){if(i.type.spec.isolating)return!1;let u=i.lastChild;if(!u)return!1;i=u}let o=e.nodeAfter,a=o,l=e.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let u=a.firstChild;if(!u)return!1;a=u}let c=jf(t.doc,s,l,te.empty);if(!c||c.from!=s||c instanceof Xt&&c.slice.size>=l-s)return!1;if(n){let u=t.tr.step(c);u.setSelection(de.create(u.doc,s)),n(u.scrollIntoView())}return!0}function Xa(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const UP=(t,e,n)=>{let{$head:r,empty:i}=t.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;s=FE(r)}let o=s&&s.nodeBefore;return!o||!pe.isSelectable(o)?!1:(e&&e(t.tr.setSelection(pe.create(t.doc,s.pos-o.nodeSize)).scrollIntoView()),!0)};function FE(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function HP(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const XP=(t,e,n)=>{let r=HP(t,n);if(!r)return!1;let i=BE(r);if(!i)return!1;let s=i.nodeAfter;if(YP(t,i,e,1))return!0;if(r.parent.content.size==0&&(Xa(s,"start")||pe.isSelectable(s))){let o=jf(t.doc,r.before(),r.after(),te.empty);if(o&&o.slice.size<o.to-o.from){if(e){let a=t.tr.step(o);a.setSelection(Xa(s,"start")?Te.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):pe.create(a.doc,a.mapping.map(i.pos))),e(a.scrollIntoView())}return!0}}return s.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos,i.pos+s.nodeSize).scrollIntoView()),!0):!1},qP=(t,e,n)=>{let{$head:r,empty:i}=t.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;s=BE(r)}let o=s&&s.nodeAfter;return!o||!pe.isSelectable(o)?!1:(e&&e(t.tr.setSelection(pe.create(t.doc,s.pos)).scrollIntoView()),!0)};function BE(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const cz=(t,e)=>{let n=t.selection,r=n instanceof pe,i;if(r){if(n.node.isTextblock||!Js(t.doc,n.from))return!1;i=n.from}else if(i=Bf(t.doc,n.from,-1),i==null)return!1;if(e){let s=t.tr.join(i);r&&s.setSelection(pe.create(s.doc,i-t.doc.resolve(i).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},uz=(t,e)=>{let n=t.selection,r;if(n instanceof pe){if(n.node.isTextblock||!Js(t.doc,n.to))return!1;r=n.to}else if(r=Bf(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},hz=(t,e)=>{let{$from:n,$to:r}=t.selection,i=n.blockRange(r),s=i&&gl(i);return s==null?!1:(e&&e(t.tr.lift(i,s).scrollIntoView()),!0)},ZP=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
`).scrollIntoView()),!0)};function jE(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const dz=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),s=n.indexAfter(-1),o=jE(i.contentMatchAt(s));if(!o||!i.canReplaceWith(s,s,o))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,o.createAndFill());l.setSelection(Te.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},WP=(t,e)=>{let n=t.selection,{$from:r,$to:i}=n;if(n instanceof Wn||r.parent.inlineContent||i.parent.inlineContent)return!1;let s=jE(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let o=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=t.tr.insert(o,s.createAndFill());a.setSelection(de.create(a.doc,o+1)),e(a.scrollIntoView())}return!0},GP=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let s=n.before();if(ji(t.doc,s))return e&&e(t.tr.split(s).scrollIntoView()),!0}let r=n.blockRange(),i=r&&gl(r);return i==null?!1:(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)};function pz(t){return(e,n)=>{let{$from:r,$to:i}=e.selection;if(e.selection instanceof pe&&e.selection.node.isBlock)return!r.parentOffset||!ji(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let s=[],o,a,l=!1,c=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){l=r.end(p)==r.pos+(r.depth-p),c=r.start(p)==r.pos-(r.depth-p),a=jE(r.node(p-1).contentMatchAt(r.indexAfter(p-1))),s.unshift(l&&a?{type:a}:null),o=p;break}else{if(p==1)return!1;s.unshift(null)}let u=e.tr;(e.selection instanceof de||e.selection instanceof Wn)&&u.deleteSelection();let h=u.mapping.map(r.pos),d=ji(u.doc,h,s.length,s);if(d||(s[0]=a?{type:a}:null,d=ji(u.doc,h,s.length,s)),!d)return!1;if(u.split(h,s.length,s),!l&&c&&r.node(o).type!=a){let p=u.mapping.map(r.before(o)),f=u.doc.resolve(p);a&&r.node(o-1).canReplaceWith(f.index(),f.index()+1,a)&&u.setNodeMarkup(u.mapping.map(r.before(o)),a)}return n&&n(u.scrollIntoView()),!0}}const fz=pz(),mz=(t,e)=>{let{$from:n,to:r}=t.selection,i,s=n.sharedDepth(r);return s==0?!1:(i=n.before(s),e&&e(t.tr.setSelection(pe.create(t.doc,i))),!0)};function gz(t,e,n){let r=e.nodeBefore,i=e.nodeAfter,s=e.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&e.parent.canReplace(s-1,s)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(i.isTextblock||Js(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function YP(t,e,n,r){let i=e.nodeBefore,s=e.nodeAfter,o,a,l=i.type.spec.isolating||s.type.spec.isolating;if(!l&&gz(t,e,n))return!0;let c=!l&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(o=(a=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&a.matchType(o[0]||s.type).validEnd){if(n){let p=e.pos+s.nodeSize,f=X.empty;for(let y=o.length-1;y>=0;y--)f=X.from(o[y].create(null,f));f=X.from(i.copy(f));let m=t.tr.step(new Wt(e.pos-1,p,e.pos,p,new te(f,1,0),o.length,!0)),g=m.doc.resolve(p+2*o.length);g.nodeAfter&&g.nodeAfter.type==i.type&&Js(m.doc,g.pos)&&m.join(g.pos),n(m.scrollIntoView())}return!0}let u=s.type.spec.isolating||r>0&&l?null:Te.findFrom(e,1),h=u&&u.$from.blockRange(u.$to),d=h&&gl(h);if(d!=null&&d>=e.depth)return n&&n(t.tr.lift(h,d).scrollIntoView()),!0;if(c&&Xa(s,"start",!0)&&Xa(i,"end")){let p=i,f=[];for(;f.push(p),!p.isTextblock;)p=p.lastChild;let m=s,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(p.canReplace(p.childCount,p.childCount,m.content)){if(n){let y=X.empty;for(let T=f.length-1;T>=0;T--)y=X.from(f[T].copy(y));let b=t.tr.step(new Wt(e.pos-f.length,e.pos+s.nodeSize,e.pos+g,e.pos+s.nodeSize-g,new te(y,f.length,0),0,!0));n(b.scrollIntoView())}return!0}}return!1}function KP(t){return function(e,n){let r=e.selection,i=t<0?r.$from:r.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return i.node(s).isTextblock?(n&&n(e.tr.setSelection(de.create(e.doc,t<0?i.start(s):i.end(s)))),!0):!1}}const Oz=KP(-1),yz=KP(1);function bz(t,e=null){return function(n,r){let{$from:i,$to:s}=n.selection,o=i.blockRange(s),a=o&&IE(o,t,e);return a?(r&&r(n.tr.wrap(o,a).scrollIntoView()),!0):!1}}function ww(t,e=null){return function(n,r){let i=!1;for(let s=0;s<n.selection.ranges.length&&!i;s++){let{$from:{pos:o},$to:{pos:a}}=n.selection.ranges[s];n.doc.nodesBetween(o,a,(l,c)=>{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)i=!0;else{let u=n.doc.resolve(c),h=u.index();i=u.parent.canReplaceWith(h,h+1,t)}})}if(!i)return!1;if(r){let s=n.tr;for(let o=0;o<n.selection.ranges.length;o++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[o];s.setBlockType(a,l,t,e)}r(s.scrollIntoView())}return!0}}function zE(...t){return function(e,n,r){for(let i=0;i<t.length;i++)if(t[i](e,n,r))return!0;return!1}}zE($E,zP,UP);zE($E,XP,qP);zE(ZP,WP,GP,fz);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function Ez(t,e=null){return function(n,r){let{$from:i,$to:s}=n.selection,o=i.blockRange(s);if(!o)return!1;let a=r?n.tr:null;return vz(a,o,t,e)?(r&&r(a.scrollIntoView()),!0):!1}}function vz(t,e,n,r=null){let i=!1,s=e,o=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=o.resolve(e.start-2);s=new ip(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new ip(e.$from,o.resolve(e.$to.end(e.depth)),e.depth)),i=!0}let a=IE(s,n,r,e);return a?(t&&Tz(t,e,a,i,n),!0):!1}function Tz(t,e,n,r,i){let s=X.empty;for(let u=n.length-1;u>=0;u--)s=X.from(n[u].type.create(n[u].attrs,s));t.step(new Wt(e.start-(r?2:0),e.end,e.start,e.end,new te(s,0,0),n.length,!0));let o=0;for(let u=0;u<n.length;u++)n[u].type==i&&(o=u+1);let a=n.length-o,l=e.start+n.length-(r?2:0),c=e.parent;for(let u=e.startIndex,h=e.endIndex,d=!0;u<h;u++,d=!1)!d&&ji(t.doc,l,a)&&(t.split(l,a),l+=2*a),l+=c.child(u).nodeSize;return t}function Sz(t){return function(e,n){let{$from:r,$to:i}=e.selection,s=r.blockRange(i,o=>o.childCount>0&&o.firstChild.type==t);return s?n?r.node(s.depth-1).type==t?wz(e,n,t,s):kz(e,n,s):!0:!1}}function wz(t,e,n,r){let i=t.tr,s=r.end,o=r.$to.end(r.depth);s<o&&(i.step(new Wt(s-1,o,s,o,new te(X.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new ip(i.doc.resolve(r.$from.pos),i.doc.resolve(o),r.depth));const a=gl(r);if(a==null)return!1;i.lift(r,a);let l=i.doc.resolve(i.mapping.map(s,-1)-1);return Js(i.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&i.join(l.pos),e(i.scrollIntoView()),!0}function kz(t,e,n){let r=t.tr,i=n.parent;for(let p=n.end,f=n.endIndex-1,m=n.startIndex;f>m;f--)p-=i.child(f).nodeSize,r.delete(p-1,p+1);let s=r.doc.resolve(n.start),o=s.nodeAfter;if(r.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==i.childCount,c=s.node(-1),u=s.index(-1);if(!c.canReplace(u+(a?0:1),u+1,o.content.append(l?X.empty:X.from(i))))return!1;let h=s.pos,d=h+o.nodeSize;return r.step(new Wt(h-(a?1:0),d+(l?1:0),h+1,d-1,new te((a?X.empty:X.from(i.copy(X.empty))).append(l?X.empty:X.from(i.copy(X.empty))),a?0:1,l?0:1),a?0:1)),e(r.scrollIntoView()),!0}function _z(t){return function(e,n){let{$from:r,$to:i}=e.selection,s=r.blockRange(i,c=>c.childCount>0&&c.firstChild.type==t);if(!s)return!1;let o=s.startIndex;if(o==0)return!1;let a=s.parent,l=a.child(o-1);if(l.type!=t)return!1;if(n){let c=l.lastChild&&l.lastChild.type==a.type,u=X.from(c?t.create():null),h=new te(X.from(t.create(null,X.from(a.type.create(null,u)))),c?3:1,0),d=s.start,p=s.end;n(e.tr.step(new Wt(d-(c?3:1),p,d,p,h,1,!0)).scrollIntoView())}return!0}}const en=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},qa=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let hy=null;const Ai=function(t,e,n){let r=hy||(hy=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},xz=function(){hy=null},Lo=function(t,e,n,r){return n&&(kw(t,e,n,r,-1)||kw(t,e,n,r,1))},Cz=/^(img|br|input|textarea|hr)$/i;function kw(t,e,n,r,i){for(var s;;){if(t==n&&e==r)return!0;if(e==(i<0?0:lr(t))){let o=t.parentNode;if(!o||o.nodeType!=1||Qu(t)||Cz.test(t.nodeName)||t.contentEditable=="false")return!1;e=en(t)+(i<0?0:1),t=o}else if(t.nodeType==1){let o=t.childNodes[e+(i<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((s=o.pmViewDesc)===null||s===void 0)&&s.ignoreForSelection)e+=i;else return!1;else t=o,e=i<0?lr(t):0}else return!1}}function lr(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Dz(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=lr(t)}else if(t.parentNode&&!Qu(t))e=en(t),t=t.parentNode;else return null}}function Az(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!Qu(t))e=en(t)+1,t=t.parentNode;else return null}}function Pz(t,e,n){for(let r=e==0,i=e==lr(t);r||i;){if(t==n)return!0;let s=en(t);if(t=t.parentNode,!t)return!1;r=r&&s==0,i=i&&s==lr(t)}}function Qu(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Vf=function(t){return t.focusNode&&Lo(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function yo(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function Nz(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Rz(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(lr(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(lr(r.startContainer),r.startOffset)}}}const ui=typeof navigator<"u"?navigator:null,_w=typeof document<"u"?document:null,eo=ui&&ui.userAgent||"",dy=/Edge\/(\d+)/.exec(eo),JP=/MSIE \d/.exec(eo),py=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(eo),Ln=!!(JP||py||dy),$s=JP?document.documentMode:py?+py[1]:dy?+dy[1]:0,hr=!Ln&&/gecko\/(\d+)/i.test(eo);hr&&+(/Firefox\/(\d+)/.exec(eo)||[0,0])[1];const fy=!Ln&&/Chrome\/(\d+)/.exec(eo),gn=!!fy,eN=fy?+fy[1]:0,_n=!Ln&&!!ui&&/Apple Computer/.test(ui.vendor),Za=_n&&(/Mobile\/\w+/.test(eo)||!!ui&&ui.maxTouchPoints>2),ir=Za||(ui?/Mac/.test(ui.platform):!1),Mz=ui?/Win/.test(ui.platform):!1,Qi=/Android \d/.test(eo),$u=!!_w&&"webkitFontSmoothing"in _w.documentElement.style,Iz=$u?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Lz(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Ti(t,e){return typeof t=="number"?t:t[e]}function Qz(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function xw(t,e,n){let r=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,s=t.dom.ownerDocument;for(let o=n||t.dom;o;){if(o.nodeType!=1){o=qa(o);continue}let a=o,l=a==s.body,c=l?Lz(s):Qz(a),u=0,h=0;if(e.top<c.top+Ti(r,"top")?h=-(c.top-e.top+Ti(i,"top")):e.bottom>c.bottom-Ti(r,"bottom")&&(h=e.bottom-e.top>c.bottom-c.top?e.top+Ti(i,"top")-c.top:e.bottom-c.bottom+Ti(i,"bottom")),e.left<c.left+Ti(r,"left")?u=-(c.left-e.left+Ti(i,"left")):e.right>c.right-Ti(r,"right")&&(u=e.right-c.right+Ti(i,"right")),u||h)if(l)s.defaultView.scrollBy(u,h);else{let p=a.scrollLeft,f=a.scrollTop;h&&(a.scrollTop+=h),u&&(a.scrollLeft+=u);let m=a.scrollLeft-p,g=a.scrollTop-f;e={left:e.left-m,top:e.top-g,right:e.right-m,bottom:e.bottom-g}}let d=l?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(d))break;o=d=="absolute"?o.offsetParent:qa(o)}}function $z(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,i;for(let s=(e.left+e.right)/2,o=n+1;o<Math.min(innerHeight,e.bottom);o+=5){let a=t.root.elementFromPoint(s,o);if(!a||a==t.dom||!t.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){r=a,i=l.top;break}}return{refDOM:r,refTop:i,stack:tN(t.dom)}}function tN(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=qa(r));return e}function Fz({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;nN(n,r==0?0:r-e)}function nN(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:i,left:s}=t[n];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=s&&(r.scrollLeft=s)}}let ua=null;function Bz(t){if(t.setActive)return t.setActive();if(ua)return t.focus(ua);let e=tN(t);t.focus(ua==null?{get preventScroll(){return ua={preventScroll:!0},!0}}:void 0),ua||(ua=!1,nN(e,0))}function rN(t,e){let n,r=2e8,i,s=0,o=e.top,a=e.top,l,c;for(let u=t.firstChild,h=0;u;u=u.nextSibling,h++){let d;if(u.nodeType==1)d=u.getClientRects();else if(u.nodeType==3)d=Ai(u).getClientRects();else continue;for(let p=0;p<d.length;p++){let f=d[p];if(f.top<=o&&f.bottom>=a){o=Math.max(f.bottom,o),a=Math.min(f.top,a);let m=f.left>e.left?f.left-e.left:f.right<e.left?e.left-f.right:0;if(m<r){n=u,r=m,i=m&&n.nodeType==3?{left:f.right<e.left?f.right:f.left,top:e.top}:e,u.nodeType==1&&m&&(s=h+(e.left>=(f.left+f.right)/2?1:0));continue}}else f.top>e.top&&!l&&f.left<=e.left&&f.right>=e.left&&(l=u,c={left:Math.max(f.left,Math.min(f.right,e.left)),top:f.top});!n&&(e.left>=f.right&&e.top>=f.top||e.left>=f.left&&e.top>=f.bottom)&&(s=h+1)}}return!n&&l&&(n=l,i=c,r=0),n&&n.nodeType==3?jz(n,i):!n||r&&n.nodeType==1?{node:t,offset:s}:rN(n,i)}function jz(t,e){let n=t.nodeValue.length,r=document.createRange();for(let i=0;i<n;i++){r.setEnd(t,i+1),r.setStart(t,i);let s=ms(r,1);if(s.top!=s.bottom&&VE(e,s))return{node:t,offset:i+(e.left>=(s.left+s.right)/2?1:0)}}return{node:t,offset:0}}function VE(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function zz(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function Vz(t,e,n){let{node:r,offset:i}=rN(e,n),s=-1;if(r.nodeType==1&&!r.firstChild){let o=r.getBoundingClientRect();s=o.left!=o.right&&n.left>(o.left+o.right)/2?1:-1}return t.docView.posFromDOM(r,i,s)}function Uz(t,e,n,r){let i=-1;for(let s=e,o=!1;s!=t.dom;){let a=t.docView.nearestDesc(s,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!o&&l.left>r.left||l.top>r.top?i=a.posBefore:(!o&&l.right<r.left||l.bottom<r.top)&&(i=a.posAfter),o=!0),!a.contentDOM&&i<0&&!a.node.isText))return(a.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?a.posBefore:a.posAfter;s=a.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,n,-1)}function iN(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),s=i;;){let o=t.childNodes[s];if(o.nodeType==1){let a=o.getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(VE(e,c))return iN(o,e,c)}}if((s=(s+1)%r)==i)break}return t}function Hz(t,e){let n=t.dom.ownerDocument,r,i=0,s=Rz(n,e.left,e.top);s&&({node:r,offset:i}=s);let o=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),a;if(!o||!t.dom.contains(o.nodeType!=1?o.parentNode:o)){let c=t.dom.getBoundingClientRect();if(!VE(e,c)||(o=iN(t.dom,e,c),!o))return null}if(_n)for(let c=o;r&&c;c=qa(c))c.draggable&&(r=void 0);if(o=zz(o,e),r){if(hr&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let u=r.childNodes[i],h;u.nodeName=="IMG"&&(h=u.getBoundingClientRect()).right<=e.left&&h.bottom>e.top&&i++}let c;$u&&i&&r.nodeType==1&&(c=r.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&i--,r==t.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(a=Uz(t,r,i,e))}a==null&&(a=Vz(t,o,e));let l=t.docView.nearestDesc(o,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function Cw(t){return t.top<t.bottom||t.left<t.right}function ms(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(Cw(r))return r}return Array.prototype.find.call(n,Cw)||t.getBoundingClientRect()}const Xz=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function sN(t,e,n){let{node:r,offset:i,atom:s}=t.docView.domFromPos(e,n<0?-1:1),o=$u||hr;if(r.nodeType==3)if(o&&(Xz.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let a=ms(Ai(r,i,i),n);if(hr&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let l=ms(Ai(r,i-1,i-1),-1);if(l.top==a.top){let c=ms(Ai(r,i,i+1),-1);if(c.top!=a.top)return Rl(c,c.left<l.left)}}return a}else{let a=i,l=i,c=n<0?1:-1;return n<0&&!i?(l++,c=-1):n>=0&&i==r.nodeValue.length?(a--,c=1):n<0?a--:l++,Rl(ms(Ai(r,a,l),c),c<0)}if(!t.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&i&&(n<0||i==lr(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return Eg(a.getBoundingClientRect(),!1)}if(s==null&&i<lr(r)){let a=r.childNodes[i];if(a.nodeType==1)return Eg(a.getBoundingClientRect(),!0)}return Eg(r.getBoundingClientRect(),n>=0)}if(s==null&&i&&(n<0||i==lr(r))){let a=r.childNodes[i-1],l=a.nodeType==3?Ai(a,lr(a)-(o?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(l)return Rl(ms(l,1),!1)}if(s==null&&i<lr(r)){let a=r.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let l=a?a.nodeType==3?Ai(a,0,o?0:1):a.nodeType==1?a:null:null;if(l)return Rl(ms(l,-1),!0)}return Rl(ms(r.nodeType==3?Ai(r):r,-n),n>=0)}function Rl(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Eg(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function oN(t,e,n){let r=t.state,i=t.root.activeElement;r!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),i!=t.dom&&i&&i.focus()}}function qz(t,e,n){let r=e.selection,i=n=="up"?r.$from:r.$to;return oN(t,e,()=>{let{node:s}=t.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(s,!0);if(!a)break;if(a.node.isBlock){s=a.contentDOM||a.dom;break}s=a.dom.parentNode}let o=sN(t,i.pos,1);for(let a=s.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=Ai(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;c<l.length;c++){let u=l[c];if(u.bottom>u.top+1&&(n=="up"?o.top-u.top>(u.bottom-o.top)*2:u.bottom-o.bottom>(o.bottom-u.top)*2))return!1}}return!0})}const Zz=/[\u0590-\u08ac]/;function Wz(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,s=!i,o=i==r.parent.content.size,a=t.domSelection();return a?!Zz.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?s:o:oN(t,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:h}=t.domSelectionRange(),d=a.caretBidiLevel;a.modify("move",n,"character");let p=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:f,focusOffset:m}=t.domSelectionRange(),g=f&&!p.contains(f.nodeType==1?f:f.parentNode)||l==f&&c==m;try{a.collapse(u,h),l&&(l!=u||c!=h)&&a.extend&&a.extend(l,c)}catch{}return d!=null&&(a.caretBidiLevel=d),g}):r.pos==r.start()||r.pos==r.end()}let Dw=null,Aw=null,Pw=!1;function Gz(t,e,n){return Dw==e&&Aw==n?Pw:(Dw=e,Aw=n,Pw=n=="up"||n=="down"?qz(t,e,n):Wz(t,e,n))}const dr=0,Nw=1,vo=2,hi=3;class Fu{constructor(e,n,r,i){this.parent=e,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=dr,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let i=this.children[n];if(i==e)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let s,o;if(e==this.contentDOM)s=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.previousSibling}for(;s&&!((o=s.pmViewDesc)&&o.parent==this);)s=s.previousSibling;return s?this.posBeforeChild(o)+o.size:this.posAtStart}else{let s,o;if(e==this.contentDOM)s=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.nextSibling}for(;s&&!((o=s.pmViewDesc)&&o.parent==this);)s=s.nextSibling;return s?this.posBeforeChild(o):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=n>en(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&n==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,i=e;i;i=i.parentNode){let s=this.getDesc(i),o;if(s&&(!n||s.node))if(r&&(o=s.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))r=!1;else return s}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let i=e;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],s=r+i.size;if(r==e&&s!=r){for(;!i.border&&i.children.length;)for(let o=0;o<i.children.length;o++){let a=i.children[o];if(a.size){i=a;break}}return i}if(e<s)return i.descAt(e-r-i.border);r=s}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,i=0;for(let s=0;r<this.children.length;r++){let o=this.children[r],a=s+o.size;if(a>e||o instanceof lN){i=e-s;break}s=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let s;r&&!(s=this.children[r-1]).size&&s instanceof aN&&s.side>=0;r--);if(n<=0){let s,o=!0;for(;s=r?this.children[r-1]:null,!(!s||s.dom.parentNode==this.contentDOM);r--,o=!1);return s&&n&&o&&!s.border&&!s.domAtom?s.domFromPos(s.size,n):{node:this.contentDOM,offset:s?en(s.dom)+1:0}}else{let s,o=!0;for(;s=r<this.children.length?this.children[r]:null,!(!s||s.dom.parentNode==this.contentDOM);r++,o=!1);return s&&o&&!s.border&&!s.domAtom?s.domFromPos(0,n):{node:this.contentDOM,offset:s?en(s.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,s=-1;for(let o=r,a=0;;a++){let l=this.children[a],c=o+l.size;if(i==-1&&e<=c){let u=o+l.border;if(e>=u&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,u);e=o;for(let h=a;h>0;h--){let d=this.children[h-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){i=en(d.dom)+1;break}e-=d.size}i==-1&&(i=0)}if(i>-1&&(c>n||a==this.children.length-1)){n=c;for(let u=a+1;u<this.children.length;u++){let h=this.children[u];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(-1)){s=en(h.dom);break}n+=h.size}s==-1&&(s=this.contentDOM.childNodes.length);break}o=c}return{node:this.contentDOM,from:e,to:n,fromOffset:i,toOffset:s}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,i=!1){let s=Math.min(e,n),o=Math.max(e,n);for(let p=0,f=0;p<this.children.length;p++){let m=this.children[p],g=f+m.size;if(s>f&&o<g)return m.setSelection(e-f-m.border,n-f-m.border,r,i);f=g}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),c=r.root.getSelection(),u=r.domSelectionRange(),h=!1;if((hr||_n)&&e==n){let{node:p,offset:f}=a;if(p.nodeType==3){if(h=!!(f&&p.nodeValue[f-1]==`
`),h&&f==p.nodeValue.length)for(let m=p,g;m;m=m.parentNode){if(g=m.nextSibling){g.nodeName=="BR"&&(a=l={node:g.parentNode,offset:en(g)+1});break}let y=m.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let m=p.childNodes[f-1];h=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(hr&&u.focusNode&&u.focusNode!=l.node&&u.focusNode.nodeType==1){let p=u.focusNode.childNodes[u.focusOffset];p&&p.contentEditable=="false"&&(i=!0)}if(!(i||h&&_n)&&Lo(a.node,a.offset,u.anchorNode,u.anchorOffset)&&Lo(l.node,l.offset,u.focusNode,u.focusOffset))return;let d=!1;if((c.extend||e==n)&&!(h&&hr)){c.collapse(a.node,a.offset);try{e!=n&&c.extend(l.node,l.offset),d=!0}catch{}}if(!d){if(e>n){let f=a;a=l,l=f}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(p)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,i=0;i<this.children.length;i++){let s=this.children[i],o=r+s.size;if(r==o?e<=o&&n>=r:e<o&&n>r){let a=r+s.border,l=o-s.border;if(e>=a&&n<=l){this.dirty=e==r||n==o?vo:Nw,e==a&&n==l&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=hi:s.markDirty(e-a,n-a);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?vo:hi}r=o}this.dirty=vo}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?vo:Nw;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class aN extends Fu{constructor(e,n,r,i){let s,o=n.type.toDOM;if(typeof o=="function"&&(o=o(r,()=>{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!n.type.spec.raw){if(o.nodeType!=1){let a=document.createElement("span");a.appendChild(o),o=a}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=n,this.widget=n,s=this}matchesWidget(e){return this.dirty==dr&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class Yz extends Fu{constructor(e,n,r,i){super(e,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Qo extends Fu{constructor(e,n,r,i,s){super(e,[],r,i),this.mark=n,this.spec=s}static create(e,n,r,i){let s=i.nodeViews[n.type.name],o=s&&s(n,i,r);return(!o||!o.dom)&&(o=Ks.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Qo(e,n,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&hi||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=hi&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=dr){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=dr}}slice(e,n,r){let i=Qo.create(this.parent,this.mark,!0,r),s=this.children,o=this.size;n<o&&(s=gy(s,n,o,r)),e>0&&(s=gy(s,0,e,r));for(let a=0;a<s.length;a++)s[a].parent=i;return i.children=s,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Fs extends Fu{constructor(e,n,r,i,s,o,a,l,c){super(e,[],s,o),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(e,n,r,i,s,o){let a=s.nodeViews[n.type.name],l,c=a&&a(n,s,()=>{if(!l)return o;if(l.parent)return l.parent.posBeforeChild(l)},r,i),u=c&&c.dom,h=c&&c.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:h}=Ks.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!h&&!n.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let d=u;return u=hN(u,r,n),c?l=new Kz(e,n,r,i,u,h||null,d,c,s,o+1):n.isText?new Uf(e,n,r,i,u,d,s):new Fs(e,n,r,i,u,h||null,d,s,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>X.empty)}return e}matchesNode(e,n,r){return this.dirty==dr&&e.eq(this.node)&&sp(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,i=n,s=e.composing?this.localCompositionInfo(e,n):null,o=s&&s.pos>-1?s:null,a=s&&s.pos<0,l=new eV(this,o&&o.node,e);rV(this.node,this.innerDeco,(c,u,h)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,e):c.type.side>=0&&!h&&l.syncToMarks(u==this.node.childCount?tt.none:this.node.child(u).marks,r,e),l.placeWidget(c,e,i)},(c,u,h,d)=>{l.syncToMarks(c.marks,r,e);let p;l.findNodeMatch(c,u,h,d)||a&&e.state.selection.from>i&&e.state.selection.to<i+c.nodeSize&&(p=l.findIndexWithChild(s.node))>-1&&l.updateNodeAt(c,u,h,p,e)||l.updateNextNode(c,u,h,e,d,i)||l.addNode(c,u,h,e,i),i+=c.nodeSize}),l.syncToMarks([],r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==vo)&&(o&&this.protectLocalComposition(e,o),cN(this.contentDOM,this.children,e),Za&&iV(this.dom))}localCompositionInfo(e,n){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof de)||r<n||i>n+this.node.content.size)return null;let s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let o=s.nodeValue,a=sV(this.node.content,o,r-n,i-n);return a<0?null:{node:s,pos:a,text:o}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let s=n;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let o=new Yz(this,s,n,i);e.input.compositionNodes.push(o),this.children=gy(this.children,r,r+i.length,e,o)}update(e,n,r,i){return this.dirty==hi||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,i),!0)}updateInner(e,n,r,i){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=dr}updateOuterDeco(e){if(sp(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=uN(this.dom,this.nodeDOM,my(this.outerDeco,this.node,n),my(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Rw(t,e,n,r,i){hN(r,e,t);let s=new Fs(void 0,t,e,n,r,r,r,i,0);return s.contentDOM&&s.updateChildren(i,0),s}class Uf extends Fs{constructor(e,n,r,i,s,o,a){super(e,n,r,i,s,null,o,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,i){return this.dirty==hi||this.dirty!=dr&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=dr||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=dr,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let i=this.node.cut(e,n),s=document.createTextNode(i.text);return new Uf(this.parent,i,this.outerDeco,this.innerDeco,s,s,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=hi)}get domAtom(){return!1}isText(e){return this.node.text==e}}class lN extends Fu{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==dr&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Kz extends Fs{constructor(e,n,r,i,s,o,a,l,c,u){super(e,n,r,i,s,o,a,c,u),this.spec=l}update(e,n,r,i){if(this.dirty==hi)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let s=this.spec.update(e,n,r);return s&&this.updateInner(e,n,r,i),s}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,i){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function cN(t,e,n){let r=t.firstChild,i=!1;for(let s=0;s<e.length;s++){let o=e[s],a=o.dom;if(a.parentNode==t){for(;a!=r;)r=Mw(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(a,r);if(o instanceof Qo){let l=r?r.previousSibling:t.lastChild;cN(o.contentDOM,o.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=Mw(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const Oc=function(t){t&&(this.nodeName=t)};Oc.prototype=Object.create(null);const To=[new Oc];function my(t,e,n){if(t.length==0)return To;let r=n?To[0]:new Oc,i=[r];for(let s=0;s<t.length;s++){let o=t[s].type.attrs;if(o){o.nodeName&&i.push(r=new Oc(o.nodeName));for(let a in o){let l=o[a];l!=null&&(n&&i.length==1&&i.push(r=new Oc(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return i}function uN(t,e,n,r){if(n==To&&r==To)return e;let i=e;for(let s=0;s<r.length;s++){let o=r[s],a=n[s];if(s){let l;a&&a.nodeName==o.nodeName&&i!=t&&(l=i.parentNode)&&l.nodeName.toLowerCase()==o.nodeName||(l=document.createElement(o.nodeName),l.pmIsDeco=!0,l.appendChild(i),a=To[0]),i=l}Jz(i,a||To[0],o)}return i}function Jz(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let s=0;s<r.length;s++)i.indexOf(r[s])==-1&&t.classList.remove(r[s]);for(let s=0;s<i.length;s++)r.indexOf(i[s])==-1&&t.classList.add(i[s]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=r.exec(e.style);)t.style.removeProperty(i[1])}n.style&&(t.style.cssText+=n.style)}}function hN(t,e,n){return uN(t,t,To,my(e,n,t.nodeType!=1))}function sp(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function Mw(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class eV{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=tV(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r){let i=0,s=this.stack.length>>1,o=Math.min(s,e.length);for(;i<o&&(i==s-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<s;)this.destroyRest(),this.top.dirty=dr,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<e.length;){this.stack.push(this.top,this.index+1);let a=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let c=this.top.children[l];if(c.matchesMark(e[s])&&!this.isLocked(c.dom)){a=l;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=Qo.create(this.top,e[s],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,s++}}findNodeMatch(e,n,r,i){let s=-1,o;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(e,n,r))s=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let c=this.top.children[a];if(c.matchesNode(e,n,r)&&!this.preMatch.matched.has(c)){s=a;break}}return s<0?!1:(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(e,n,r,i,s){let o=this.top.children[i];return o.dirty==hi&&o.dom==o.contentDOM&&(o.dirty=vo),o.update(e,n,r,s)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}e=n}}updateNextNode(e,n,r,i,s,o){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof Fs){let c=this.preMatch.matched.get(l);if(c!=null&&c!=s)return!1;let u=l.dom,h,d=this.isLocked(u)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=hi&&sp(n,l.outerDeco));if(!d&&l.update(e,n,r,i))return this.destroyBetween(this.index,a),l.dom!=u&&(this.changed=!0),this.index++,!0;if(!d&&(h=this.recreateWrapper(l,e,n,r,i,o)))return this.destroyBetween(this.index,a),this.top.children[this.index]=h,h.contentDOM&&(h.dirty=vo,h.updateChildren(i,o+1),h.dirty=dr),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,i,s,o){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!sp(r,e.outerDeco)||!i.eq(e.innerDeco))return null;let a=Fs.create(this.top,n,r,i,s,o);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,r,i,s){let o=Fs.create(this.top,e,n,r,i,s);o.contentDOM&&o.updateChildren(i,s+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(e,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(e)&&(e==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let s=new aN(this.top,e,n,r);this.top.children.splice(this.index++,0,s),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof Qo;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Uf)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((_n||gn)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new lN(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function tV(t,e){let n=e,r=n.children.length,i=t.childCount,s=new Map,o=[];e:for(;i>0;){let a;for(;;)if(r){let c=n.children[r-1];if(c instanceof Qo)n=c,r=c.children.length;else{a=c,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(i-1))break;--i,s.set(a,i),o.push(a)}}return{index:i,matched:s,matches:o.reverse()}}function nV(t,e){return t.type.side-e.type.side}function rV(t,e,n,r){let i=e.locals(t),s=0;if(i.length==0){for(let c=0;c<t.childCount;c++){let u=t.child(c);r(u,i,e.forChild(s,u),c),s+=u.nodeSize}return}let o=0,a=[],l=null;for(let c=0;;){let u,h;for(;o<i.length&&i[o].to==s;){let g=i[o++];g.widget&&(u?(h||(h=[u])).push(g):u=g)}if(u)if(h){h.sort(nV);for(let g=0;g<h.length;g++)n(h[g],c,!!l)}else n(u,c,!!l);let d,p;if(l)p=-1,d=l,l=null;else if(c<t.childCount)p=c,d=t.child(c++);else break;for(let g=0;g<a.length;g++)a[g].to<=s&&a.splice(g--,1);for(;o<i.length&&i[o].from<=s&&i[o].to>s;)a.push(i[o++]);let f=s+d.nodeSize;if(d.isText){let g=f;o<i.length&&i[o].from<g&&(g=i[o].from);for(let y=0;y<a.length;y++)a[y].to<g&&(g=a[y].to);g<f&&(l=d.cut(g-s),d=d.cut(0,g-s),f=g,p=-1)}else for(;o<i.length&&i[o].to<f;)o++;let m=d.isInline&&!d.isLeaf?a.filter(g=>!g.inline):a.slice();r(d,m,e.forChild(s,d),p),s=f}}function iV(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function sV(t,e,n,r){for(let i=0,s=0;i<t.childCount&&s<=r;){let o=t.child(i++),a=s;if(s+=o.nodeSize,!o.isText)continue;let l=o.text;for(;i<t.childCount;){let c=t.child(i++);if(s+=c.nodeSize,!c.isText)break;l+=c.text}if(s>=n){if(s>=r&&l.slice(r-e.length-a,r-a)==e)return r-e.length;let c=a<r?l.lastIndexOf(e,r-a-1):-1;if(c>=0&&c+e.length+a>=n)return a+c;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}function gy(t,e,n,r,i){let s=[];for(let o=0,a=0;o<t.length;o++){let l=t[o],c=a,u=a+=l.size;c>=n||u<=e?s.push(l):(c<e&&s.push(l.slice(0,e-c,r)),i&&(s.push(i),i=void 0),u>n&&s.push(l.slice(n-c,l.size,r)))}return s}function UE(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),s=i&&i.size==0,o=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(o<0)return null;let a=r.resolve(o),l,c;if(Vf(n)){for(l=o;i&&!i.node;)i=i.parent;let h=i.node;if(i&&h.isAtom&&pe.isSelectable(h)&&i.parent&&!(h.isInline&&Pz(n.focusNode,n.focusOffset,i.dom))){let d=i.posBefore;c=new pe(o==d?a:r.resolve(d))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let h=o,d=o;for(let p=0;p<n.rangeCount;p++){let f=n.getRangeAt(p);h=Math.min(h,t.docView.posFromDOM(f.startContainer,f.startOffset,1)),d=Math.max(d,t.docView.posFromDOM(f.endContainer,f.endOffset,-1))}if(h<0)return null;[l,o]=d==t.state.selection.anchor?[d,h]:[h,d],a=r.resolve(o)}else l=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let u=r.resolve(l);if(!c){let h=e=="pointer"||t.state.selection.head<a.pos&&!s?1:-1;c=HE(t,u,a,h)}return c}function dN(t){return t.editable?t.hasFocus():fN(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function zi(t,e=!1){let n=t.state.selection;if(pN(t,n),!!dN(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&gn){let r=t.domSelectionRange(),i=t.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&Lo(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)aV(t);else{let{anchor:r,head:i}=n,s,o;Iw&&!(n instanceof de)&&(n.$from.parent.inlineContent||(s=Lw(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(o=Lw(t,n.to))),t.docView.setSelection(r,i,t,e),Iw&&(s&&Qw(s),o&&Qw(o)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&oV(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Iw=_n||gn&&eN<63;function Lw(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),i=r<n.childNodes.length?n.childNodes[r]:null,s=r?n.childNodes[r-1]:null;if(_n&&i&&i.contentEditable=="false")return vg(i);if((!i||i.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(i)return vg(i);if(s)return vg(s)}}function vg(t){return t.contentEditable="true",_n&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function Qw(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function oV(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!dN(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function aV(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,en(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&Ln&&$s<=11&&(n.disabled=!0,n.disabled=!1)}function pN(t,e){if(e instanceof pe){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&($w(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else $w(t)}function $w(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function HE(t,e,n,r){return t.someProp("createSelectionBetween",i=>i(t,e,n))||de.between(e,n,r)}function Fw(t){return t.editable&&!t.hasFocus()?!1:fN(t)}function fN(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function lV(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return Lo(e.node,e.offset,n.anchorNode,n.anchorOffset)}function Oy(t,e){let{$anchor:n,$head:r}=t.selection,i=e>0?n.max(r):n.min(r),s=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return s&&Te.findFrom(s,e)}function ys(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Bw(t,e,n){let r=t.state.selection;if(r instanceof de)if(n.indexOf("s")>-1){let{$head:i}=r,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let o=t.state.doc.resolve(i.pos+s.nodeSize*(e<0?-1:1));return ys(t,new de(r.$anchor,o))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let i=Oy(t.state,e);return i&&i instanceof pe?ys(t,i):!1}else if(!(ir&&n.indexOf("m")>-1)){let i=r.$head,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,o;if(!s||s.isText)return!1;let a=e<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(o=t.docView.descAt(a))&&!o.contentDOM?pe.isSelectable(s)?ys(t,new pe(e<0?t.state.doc.resolve(i.pos-s.nodeSize):i)):$u?ys(t,new de(t.state.doc.resolve(e<0?a:a+s.nodeSize))):!1:!1}}else return!1;else{if(r instanceof pe&&r.node.isInline)return ys(t,new de(e>0?r.$to:r.$from));{let i=Oy(t.state,e);return i?ys(t,i):!1}}}function op(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function yc(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function ha(t,e){return e<0?cV(t):uV(t)}function cV(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i,s,o=!1;for(hr&&n.nodeType==1&&r<op(n)&&yc(n.childNodes[r],-1)&&(o=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(yc(a,-1))i=n,s=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(mN(n))break;{let a=n.previousSibling;for(;a&&yc(a,-1);)i=n.parentNode,s=en(a),a=a.previousSibling;if(a)n=a,r=op(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}o?yy(t,n,r):i&&yy(t,i,s)}function uV(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i=op(n),s,o;for(;;)if(r<i){if(n.nodeType!=1)break;let a=n.childNodes[r];if(yc(a,1))s=n,o=++r;else break}else{if(mN(n))break;{let a=n.nextSibling;for(;a&&yc(a,1);)s=a.parentNode,o=en(a)+1,a=a.nextSibling;if(a)n=a,r=0,i=op(n);else{if(n=n.parentNode,n==t.dom)break;r=i=0}}}s&&yy(t,s,o)}function mN(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function hV(t,e){for(;t&&e==t.childNodes.length&&!Qu(t);)e=en(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function dV(t,e){for(;t&&!e&&!Qu(t);)e=en(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function yy(t,e,n){if(e.nodeType!=3){let s,o;(o=hV(e,n))?(e=o,n=0):(s=dV(e,n))&&(e=s,n=s.nodeValue.length)}let r=t.domSelection();if(!r)return;if(Vf(r)){let s=document.createRange();s.setEnd(e,n),s.setStart(e,n),r.removeAllRanges(),r.addRange(s)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&zi(t)},50)}function jw(t,e){let n=t.state.doc.resolve(e);if(!(gn||Mz)&&n.parent.inlineContent){let r=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),s=(i.top+i.bottom)/2;if(s>r.top&&s<r.bottom&&Math.abs(i.left-r.left)>1)return i.left<r.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),s=(i.top+i.bottom)/2;if(s>r.top&&s<r.bottom&&Math.abs(i.left-r.left)>1)return i.left>r.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function zw(t,e,n){let r=t.state.selection;if(r instanceof de&&!r.empty||n.indexOf("s")>-1||ir&&n.indexOf("m")>-1)return!1;let{$from:i,$to:s}=r;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let o=Oy(t.state,e);if(o&&o instanceof pe)return ys(t,o)}if(!i.parent.inlineContent){let o=e<0?i:s,a=r instanceof Wn?Te.near(o,e):Te.findFrom(o,e);return a?ys(t,a):!1}return!1}function Vw(t,e){if(!(t.state.selection instanceof de))return!0;let{$head:n,$anchor:r,empty:i}=t.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let o=t.state.tr;return e<0?o.delete(n.pos-s.nodeSize,n.pos):o.delete(n.pos,n.pos+s.nodeSize),t.dispatch(o),!0}return!1}function Uw(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function pV(t){if(!_n||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;Uw(t,r,"true"),setTimeout(()=>Uw(t,r,"false"),20)}return!1}function fV(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function mV(t,e){let n=e.keyCode,r=fV(e);if(n==8||ir&&n==72&&r=="c")return Vw(t,-1)||ha(t,-1);if(n==46&&!e.shiftKey||ir&&n==68&&r=="c")return Vw(t,1)||ha(t,1);if(n==13||n==27)return!0;if(n==37||ir&&n==66&&r=="c"){let i=n==37?jw(t,t.state.selection.from)=="ltr"?-1:1:-1;return Bw(t,i,r)||ha(t,i)}else if(n==39||ir&&n==70&&r=="c"){let i=n==39?jw(t,t.state.selection.from)=="ltr"?1:-1:1;return Bw(t,i,r)||ha(t,i)}else{if(n==38||ir&&n==80&&r=="c")return zw(t,-1,r)||ha(t,-1);if(n==40||ir&&n==78&&r=="c")return pV(t)||zw(t,1,r)||ha(t,1);if(r==(ir?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function XE(t,e){t.someProp("transformCopied",p=>{e=p(e,t)});let n=[],{content:r,openStart:i,openEnd:s}=e;for(;i>1&&s>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,s--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let o=t.someProp("clipboardSerializer")||Ks.fromSchema(t.state.schema),a=vN(),l=a.createElement("div");l.appendChild(o.serializeFragment(r,{document:a}));let c=l.firstChild,u,h=0;for(;c&&c.nodeType==1&&(u=EN[c.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let f=a.createElement(u[p]);for(;l.firstChild;)f.appendChild(l.firstChild);l.appendChild(f),h++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${s}${h?` -${h}`:""} ${JSON.stringify(n)}`);let d=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,`
`);return{dom:l,text:d,slice:e}}function gN(t,e,n,r,i){let s=i.parent.type.spec.code,o,a;if(!n&&!e)return null;let l=!!e&&(r||s||!n);if(l){if(t.someProp("transformPastedText",d=>{e=d(e,s||r,t)}),s)return a=new te(X.from(t.state.schema.text(e.replace(/\r\n?/g,`
`))),0,0),t.someProp("transformPasted",d=>{a=d(a,t,!0)}),a;let h=t.someProp("clipboardTextParser",d=>d(e,i,r,t));if(h)a=h;else{let d=i.marks(),{schema:p}=t.state,f=Ks.fromSchema(p);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=o.appendChild(document.createElement("p"));m&&g.appendChild(f.serializeNode(p.text(m,d)))})}}else t.someProp("transformPastedHTML",h=>{n=h(n,t)}),o=bV(n),$u&&EV(o);let c=o&&o.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let h=+u[3];h>0;h--){let d=o.firstChild;for(;d&&d.nodeType!=1;)d=d.nextSibling;if(!d)break;o=d}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||Qs.fromSchema(t.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||u),context:i,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!gV.test(h.parentNode.nodeName)?{ignore:!0}:null}})),u)a=vV(Hw(a,+u[1],+u[2]),u[4]);else if(a=te.maxOpen(OV(a.content,i),!0),a.openStart||a.openEnd){let h=0,d=0;for(let p=a.content.firstChild;h<a.openStart&&!p.type.spec.isolating;h++,p=p.firstChild);for(let p=a.content.lastChild;d<a.openEnd&&!p.type.spec.isolating;d++,p=p.lastChild);a=Hw(a,h,d)}return t.someProp("transformPasted",h=>{a=h(a,t,l)}),a}const gV=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function OV(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.index(n)),i,s=[];if(t.forEach(o=>{if(!s)return;let a=r.findWrapping(o.type),l;if(!a)return s=null;if(l=s.length&&i.length&&yN(a,i,o,s[s.length-1],0))s[s.length-1]=l;else{s.length&&(s[s.length-1]=bN(s[s.length-1],i.length));let c=ON(o,a);s.push(c),r=r.matchType(c.type),i=a}}),s)return X.from(s)}return t}function ON(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,X.from(t));return t}function yN(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let s=yN(t,e,n,r.lastChild,i+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(i==t.length-1?n.type:t[i+1]))return r.copy(r.content.append(X.from(ON(n,t,i+1))))}}function bN(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,bN(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(X.empty,!0);return t.copy(n.append(r))}function by(t,e,n,r,i,s){let o=e<0?t.firstChild:t.lastChild,a=o.content;return t.childCount>1&&(s=0),i<r-1&&(a=by(a,e,n,r,i+1,s)),i>=n&&(a=e<0?o.contentMatchAt(0).fillBefore(a,s<=i).append(a):a.append(o.contentMatchAt(o.childCount).fillBefore(X.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,o.copy(a))}function Hw(t,e,n){return e<t.openStart&&(t=new te(by(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new te(by(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const EN={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Xw=null;function vN(){return Xw||(Xw=document.implementation.createHTMLDocument("title"))}let Tg=null;function yV(t){let e=window.trustedTypes;return e?(Tg||(Tg=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Tg.createHTML(t)):t}function bV(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=vN().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),i;if((i=r&&EN[r[1].toLowerCase()])&&(t=i.map(s=>"<"+s+">").join("")+t+i.map(s=>"</"+s+">").reverse().join("")),n.innerHTML=yV(t),i)for(let s=0;s<i.length;s++)n=n.querySelector(i[s])||n;return n}function EV(t){let e=t.querySelectorAll(gn?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function vV(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:i,openStart:s,openEnd:o}=t;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;i=X.from(l.create(r[a+1],i)),s++,o++}return new te(i,s,o)}const xn={},Cn={},TV={touchstart:!0,touchmove:!0};let SV=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function wV(t){for(let e in xn){let n=xn[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{_V(t,r)&&!qE(t,r)&&(t.editable||!(r.type in Cn))&&n(t,r)},TV[e]?{passive:!0}:void 0)}_n&&t.dom.addEventListener("input",()=>null),Ey(t)}function Ds(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function kV(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function Ey(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>qE(t,r))})}function qE(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function _V(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function xV(t,e){!qE(t,e)&&xn[e.type]&&(t.editable||!(e.type in Cn))&&xn[e.type](t,e)}Cn.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!SN(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Qi&&gn&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),Za&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",i=>i(t,yo(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||mV(t,n)?n.preventDefault():Ds(t,"key")};Cn.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Cn.keypress=(t,e)=>{let n=e;if(SN(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||ir&&n.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof de)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode),s=()=>t.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!t.someProp("handleTextInput",o=>o(t,r.$from.pos,r.$to.pos,i,s))&&t.dispatch(s()),n.preventDefault()}};function Hf(t){return{left:t.clientX,top:t.clientY}}function CV(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function ZE(t,e,n,r,i){if(r==-1)return!1;let s=t.state.doc.resolve(r);for(let o=s.depth+1;o>0;o--)if(t.someProp(e,a=>o>s.depth?a(t,n,s.nodeAfter,s.before(o),i,!0):a(t,n,s.node(o),s.before(o),i,!1)))return!0;return!1}function Na(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function DV(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&pe.isSelectable(r)?(Na(t,new pe(n)),!0):!1}function AV(t,e){if(e==-1)return!1;let n=t.state.selection,r,i;n instanceof pe&&(r=n.node);let s=t.state.doc.resolve(e);for(let o=s.depth+1;o>0;o--){let a=o>s.depth?s.nodeAfter:s.node(o);if(pe.isSelectable(a)){r&&n.$from.depth>0&&o>=n.$from.depth&&s.before(n.$from.depth+1)==n.$from.pos?i=s.before(n.$from.depth):i=s.before(o);break}}return i!=null?(Na(t,pe.create(t.state.doc,i)),!0):!1}function PV(t,e,n,r,i){return ZE(t,"handleClickOn",e,n,r)||t.someProp("handleClick",s=>s(t,e,r))||(i?AV(t,n):DV(t,n))}function NV(t,e,n,r){return ZE(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",i=>i(t,e,r))}function RV(t,e,n,r){return ZE(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",i=>i(t,e,r))||MV(t,n,r)}function MV(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(Na(t,de.create(r,0,r.content.size)),!0):!1;let i=r.resolve(e);for(let s=i.depth+1;s>0;s--){let o=s>i.depth?i.nodeAfter:i.node(s),a=i.before(s);if(o.inlineContent)Na(t,de.create(r,a+1,a+1+o.content.size));else if(pe.isSelectable(o))Na(t,pe.create(r,a));else continue;return!0}}function WE(t){return ap(t)}const TN=ir?"metaKey":"ctrlKey";xn.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=WE(t),i=Date.now(),s="singleClick";i-t.input.lastClick.time<500&&CV(n,t.input.lastClick)&&!n[TN]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?s="doubleClick":t.input.lastClick.type=="doubleClick"&&(s="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:s,button:n.button};let o=t.posAtCoords(Hf(n));o&&(s=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new IV(t,o,n,!!r)):(s=="doubleClick"?NV:RV)(t,o.pos,o.inside,n)?n.preventDefault():Ds(t,"pointer"))};class IV{constructor(e,n,r,i){this.view=e,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[TN],this.allowDefault=r.shiftKey;let s,o;if(n.inside>-1)s=e.state.doc.nodeAt(n.inside),o=n.inside;else{let u=e.state.doc.resolve(n.pos);s=u.parent,o=u.depth?u.before():0}const a=i?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:c}=e.state;(r.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||c instanceof pe&&c.from<=o&&c.to>o)&&(this.mightDrag={node:s,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&hr&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Ds(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>zi(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Hf(e))),this.updateAllowDefault(e),this.allowDefault||!n?Ds(this.view,"pointer"):PV(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||_n&&this.mightDrag&&!this.mightDrag.node.isAtom||gn&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(Na(this.view,Te.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):Ds(this.view,"pointer")}move(e){this.updateAllowDefault(e),Ds(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}xn.touchstart=t=>{t.input.lastTouch=Date.now(),WE(t),Ds(t,"pointer")};xn.touchmove=t=>{t.input.lastTouch=Date.now(),Ds(t,"pointer")};xn.contextmenu=t=>WE(t);function SN(t,e){return t.composing?!0:_n&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const LV=Qi?5e3:-1;Cn.compositionstart=Cn.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof de&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),ap(t,!0),t.markCursor=null;else if(ap(t,!e.selection.empty),hr&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let i=r.focusNode,s=r.focusOffset;i&&i.nodeType==1&&s!=0;){let o=s<0?i.lastChild:i.childNodes[s-1];if(!o)break;if(o.nodeType==3){let a=t.domSelection();a&&a.collapse(o,o.nodeValue.length);break}else i=o,s=-1}}t.input.composing=!0}wN(t,LV)};Cn.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,wN(t,20))};function wN(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>ap(t),e))}function kN(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=$V());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function QV(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=Dz(e.focusNode,e.focusOffset),r=Az(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,s=t.domObserver.lastChangedTextNode;if(n==s||r==s)return s;if(!i||!i.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let o=n.pmViewDesc;if(!(!o||!o.isText(n.nodeValue)))return r}}return n||r}function $V(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function ap(t,e=!1){if(!(Qi&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),kN(t),e||t.docView&&t.docView.dirty){let n=UE(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function FV(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const Wc=Ln&&$s<15||Za&&Iz<604;xn.copy=Cn.cut=(t,e)=>{let n=e,r=t.state.selection,i=n.type=="cut";if(r.empty)return;let s=Wc?null:n.clipboardData,o=r.content(),{dom:a,text:l}=XE(t,o);s?(n.preventDefault(),s.clearData(),s.setData("text/html",a.innerHTML),s.setData("text/plain",l)):FV(t,a),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function BV(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function jV(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Gc(t,r.value,null,i,e):Gc(t,r.textContent,r.innerHTML,i,e)},50)}function Gc(t,e,n,r,i){let s=gN(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,i,s||te.empty)))return!0;if(!s)return!1;let o=BV(s),a=o?t.state.tr.replaceSelectionWith(o,r):t.state.tr.replaceSelection(s);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function _N(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Cn.paste=(t,e)=>{let n=e;if(t.composing&&!Qi)return;let r=Wc?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Gc(t,_N(r),r.getData("text/html"),i,n)?n.preventDefault():jV(t,n)};class xN{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const zV=ir?"altKey":"ctrlKey";function CN(t,e){return t.someProp("dragCopies",r=>!r(e))??!e[zV]}xn.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=t.state.selection,s=i.empty?null:t.posAtCoords(Hf(n)),o;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof pe?i.to-1:i.to))){if(r&&r.mightDrag)o=pe.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let h=t.docView.nearestDesc(n.target,!0);h&&h.node.type.spec.draggable&&h!=t.docView&&(o=pe.create(t.state.doc,h.posBefore))}}let a=(o||t.state.selection).content(),{dom:l,text:c,slice:u}=XE(t,a);(!n.dataTransfer.files.length||!gn||eN>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Wc?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Wc||n.dataTransfer.setData("text/plain",c),t.dragging=new xN(u,CN(t,n),o)};xn.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Cn.dragover=Cn.dragenter=(t,e)=>e.preventDefault();Cn.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let i=t.posAtCoords(Hf(n));if(!i)return;let s=t.state.doc.resolve(i.pos),o=r&&r.slice;o?t.someProp("transformPasted",f=>{o=f(o,t,!1)}):o=gN(t,_N(n.dataTransfer),Wc?null:n.dataTransfer.getData("text/html"),!1,s);let a=!!(r&&CN(t,n));if(t.someProp("handleDrop",f=>f(t,n,o||te.empty,a))){n.preventDefault();return}if(!o)return;n.preventDefault();let l=o?RP(t.state.doc,s.pos,o):s.pos;l==null&&(l=s.pos);let c=t.state.tr;if(a){let{node:f}=r;f?f.replace(c):c.deleteSelection()}let u=c.mapping.map(l),h=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,d=c.doc;if(h?c.replaceRangeWith(u,u,o.content.firstChild):c.replaceRange(u,u,o),c.doc.eq(d))return;let p=c.doc.resolve(u);if(h&&pe.isSelectable(o.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(o.content.firstChild))c.setSelection(new pe(p));else{let f=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,g,y,b)=>f=b),c.setSelection(HE(t,p,c.doc.resolve(f)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))};xn.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&zi(t)},20))};xn.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};xn.beforeinput=(t,e)=>{if(gn&&Qi&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:n}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=n||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,yo(8,"Backspace")))))return;let{$cursor:r}=t.state.selection;r&&r.pos>0&&t.dispatch(t.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let t in Cn)xn[t]=Cn[t];function Yc(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}let qw=class DN{constructor(e,n){this.toDOM=e,this.spec=n||Do,this.side=this.spec.side||0}map(e,n,r,i){let{pos:s,deleted:o}=e.mapResult(n.from+i,this.side<0?-1:1);return o?null:new sn(s-r,s-r,this)}valid(){return!0}eq(e){return this==e||e instanceof DN&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Yc(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}};class Bs{constructor(e,n){this.attrs=e,this.spec=n||Do}map(e,n,r,i){let s=e.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,o=e.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return s>=o?null:new sn(s,o,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Bs&&Yc(this.attrs,e.attrs)&&Yc(this.spec,e.spec)}static is(e){return e.type instanceof Bs}destroy(){}}let VV=class AN{constructor(e,n){this.attrs=e,this.spec=n||Do}map(e,n,r,i){let s=e.mapResult(n.from+i,1);if(s.deleted)return null;let o=e.mapResult(n.to+i,-1);return o.deleted||o.pos<=s.pos?null:new sn(s.pos-r,o.pos-r,this)}valid(e,n){let{index:r,offset:i}=e.content.findIndex(n.from),s;return i==n.from&&!(s=e.child(r)).isText&&i+s.nodeSize==n.to}eq(e){return this==e||e instanceof AN&&Yc(this.attrs,e.attrs)&&Yc(this.spec,e.spec)}destroy(){}},sn=class nc{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new nc(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new nc(e,e,new qw(n,r))}static inline(e,n,r,i){return new nc(e,n,new Bs(r,i))}static node(e,n,r,i){return new nc(e,n,new VV(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Bs}get widget(){return this.type instanceof qw}};const ya=[],Do={};class je{constructor(e,n){this.local=e.length?e:ya,this.children=n.length?n:ya}static create(e,n){return n.length?lp(n,e,0,Do):un}find(e,n,r){let i=[];return this.findInner(e??0,n??1e9,i,0,r),i}findInner(e,n,r,i,s){for(let o=0;o<this.local.length;o++){let a=this.local[o];a.from<=n&&a.to>=e&&(!s||s(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<n&&this.children[o+1]>e){let a=this.children[o]+1;this.children[o+2].findInner(e-a,n-a,r,i+a,s)}}map(e,n,r){return this==un||e.maps.length==0?this:this.mapInner(e,n,0,0,r||Do)}mapInner(e,n,r,i,s){let o;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,r,i);l&&l.type.valid(n,l)?(o||(o=[])).push(l):s.onRemove&&s.onRemove(this.local[a].spec)}return this.children.length?UV(this.children,o||[],e,n,r,i,s):o?new je(o.sort(Ao),ya):un}add(e,n){return n.length?this==un?je.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let i,s=0;e.forEach((a,l)=>{let c=l+r,u;if(u=NN(n,a,c)){for(i||(i=this.children.slice());s<i.length&&i[s]<l;)s+=3;i[s]==l?i[s+2]=i[s+2].addInner(a,u,c+1):i.splice(s,0,l,l+a.nodeSize,lp(u,a,c+1,Do)),s+=3}});let o=PN(s?RN(n):n,-r);for(let a=0;a<o.length;a++)o[a].type.valid(e,o[a])||o.splice(a--,1);return new je(o.length?this.local.concat(o).sort(Ao):this.local,i||this.children)}remove(e){return e.length==0||this==un?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,i=this.local;for(let s=0;s<r.length;s+=3){let o,a=r[s]+n,l=r[s+1]+n;for(let u=0,h;u<e.length;u++)(h=e[u])&&h.from>a&&h.to<l&&(e[u]=null,(o||(o=[])).push(h));if(!o)continue;r==this.children&&(r=this.children.slice());let c=r[s+2].removeInner(o,a+1);c!=un?r[s+2]=c:(r.splice(s,3),s-=3)}if(i.length){for(let s=0,o;s<e.length;s++)if(o=e[s])for(let a=0;a<i.length;a++)i[a].eq(o,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new je(i,r):un}forChild(e,n){if(this==un)return this;if(n.isLeaf)return je.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let s=e+1,o=s+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<o&&l.to>s&&l.type instanceof Bs){let c=Math.max(s,l.from)-s,u=Math.min(o,l.to)-s;c<u&&(i||(i=[])).push(l.copy(c,u))}}if(i){let a=new je(i.sort(Ao),ya);return r?new Ss([a,r]):a}return r||un}eq(e){if(this==e)return!0;if(!(e instanceof je)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return GE(this.localsInner(e))}localsInner(e){if(this==un)return ya;if(e.inlineContent||!this.local.some(Bs.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Bs||n.push(this.local[r]);return n}forEachSet(e){e(this)}}je.empty=new je([],[]);je.removeOverlap=GE;const un=je.empty;class Ss{constructor(e){this.members=e}map(e,n){const r=this.members.map(i=>i.map(e,n,Do));return Ss.from(r)}forChild(e,n){if(n.isLeaf)return je.empty;let r=[];for(let i=0;i<this.members.length;i++){let s=this.members[i].forChild(e,n);s!=un&&(s instanceof Ss?r=r.concat(s.members):r.push(s))}return Ss.from(r)}eq(e){if(!(e instanceof Ss)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let i=0;i<this.members.length;i++){let s=this.members[i].localsInner(e);if(s.length)if(!n)n=s;else{r&&(n=n.slice(),r=!1);for(let o=0;o<s.length;o++)n.push(s[o])}}return n?GE(r?n:n.sort(Ao)):ya}static from(e){switch(e.length){case 0:return un;case 1:return e[0];default:return new Ss(e.every(n=>n instanceof je)?e:e.reduce((n,r)=>n.concat(r instanceof je?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function UV(t,e,n,r,i,s,o){let a=t.slice();for(let c=0,u=s;c<n.maps.length;c++){let h=0;n.maps[c].forEach((d,p,f,m)=>{let g=m-f-(p-d);for(let y=0;y<a.length;y+=3){let b=a[y+1];if(b<0||d>b+u-h)continue;let T=a[y]+u-h;p>=T?a[y+1]=d<=T?-2:-1:d>=u&&g&&(a[y]+=g,a[y+1]+=g)}h+=g}),u=n.maps[c].map(u,-1)}let l=!1;for(let c=0;c<a.length;c+=3)if(a[c+1]<0){if(a[c+1]==-2){l=!0,a[c+1]=-1;continue}let u=n.map(t[c]+s),h=u-i;if(h<0||h>=r.content.size){l=!0;continue}let d=n.map(t[c+1]+s,-1),p=d-i,{index:f,offset:m}=r.content.findIndex(h),g=r.maybeChild(f);if(g&&m==h&&m+g.nodeSize==p){let y=a[c+2].mapInner(n,g,u+1,t[c]+s+1,o);y!=un?(a[c]=h,a[c+1]=p,a[c+2]=y):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=HV(a,t,e,n,i,s,o),u=lp(c,r,0,o);e=u.local;for(let h=0;h<a.length;h+=3)a[h+1]<0&&(a.splice(h,3),h-=3);for(let h=0,d=0;h<u.children.length;h+=3){let p=u.children[h];for(;d<a.length&&a[d]<p;)d+=3;a.splice(d,0,u.children[h],u.children[h+1],u.children[h+2])}}return new je(e.sort(Ao),a)}function PN(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let i=t[r];n.push(new sn(i.from+e,i.to+e,i.type))}return n}function HV(t,e,n,r,i,s,o){function a(l,c){for(let u=0;u<l.local.length;u++){let h=l.local[u].map(r,i,c);h?n.push(h):o.onRemove&&o.onRemove(l.local[u].spec)}for(let u=0;u<l.children.length;u+=3)a(l.children[u+2],l.children[u]+c+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&a(t[l+2],e[l]+s+1);return n}function NN(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,i=null;for(let s=0,o;s<t.length;s++)(o=t[s])&&o.from>n&&o.to<r&&((i||(i=[])).push(o),t[s]=null);return i}function RN(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function lp(t,e,n,r){let i=[],s=!1;e.forEach((a,l)=>{let c=NN(t,a,l+n);if(c){s=!0;let u=lp(c,a,n+l+1,r);u!=un&&i.push(l,l+a.nodeSize,u)}});let o=PN(s?RN(t):t,-n).sort(Ao);for(let a=0;a<o.length;a++)o[a].type.valid(e,o[a])||(r.onRemove&&r.onRemove(o[a].spec),o.splice(a--,1));return o.length||i.length?new je(o,i):un}function Ao(t,e){return t.from-e.from||t.to-e.to}function GE(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let i=n+1;i<e.length;i++){let s=e[i];if(s.from==r.from){s.to!=r.to&&(e==t&&(e=t.slice()),e[i]=s.copy(s.from,r.to),Zw(e,i+1,s.copy(r.to,s.to)));continue}else{s.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,s.from),Zw(e,i,r.copy(s.from,r.to)));break}}}return e}function Zw(t,e,n){for(;e<t.length&&Ao(n,t[e])>0;)e++;t.splice(e,0,n)}function Sg(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=un&&e.push(r)}),t.cursorWrapper&&e.push(je.create(t.state.doc,[t.cursorWrapper.deco])),Ss.from(e)}const XV={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},qV=Ln&&$s<=11;class ZV{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}let WV=class{constructor(t,e){this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new ZV,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(n=>{for(let r=0;r<n.length;r++)this.queue.push(n[r]);Ln&&$s<=11&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),qV&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,XV)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let e=0;e<t.length;e++)this.queue.push(t[e]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Fw(this.view)){if(this.suppressingSelectionUpdates)return zi(this.view);if(Ln&&$s<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Lo(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let e=new Set,n;for(let i=t.focusNode;i;i=qa(i))e.add(i);for(let i=t.anchorNode;i;i=qa(i))if(e.has(i)){n=i;break}let r=n&&this.view.docView.nearestDesc(n);if(r&&r.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let e=this.pendingRecords();e.length&&(this.queue=[]);let n=t.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Fw(t)&&!this.ignoreSelectionChange(n),i=-1,s=-1,o=!1,a=[];if(t.editable)for(let c=0;c<e.length;c++){let u=this.registerMutation(e[c],a);u&&(i=i<0?u.from:Math.min(u.from,i),s=s<0?u.to:Math.max(u.to,s),u.typeOver&&(o=!0))}if(hr&&a.length){let c=a.filter(u=>u.nodeName=="BR");if(c.length==2){let[u,h]=c;u.parentNode&&u.parentNode.parentNode==h.parentNode?h.remove():u.remove()}else{let{focusNode:u}=this.currentSelection;for(let h of c){let d=h.parentNode;d&&d.nodeName=="LI"&&(!u||KV(t,u)!=d)&&h.remove()}}}let l=null;i<0&&r&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&Vf(n)&&(l=UE(t))&&l.eq(Te.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,zi(t),this.currentSelection.set(n),t.scrollToSelection()):(i>-1||r)&&(i>-1&&(t.docView.markDirty(i,s),GV(t)),this.handleDOMChange(i,s,o,a),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(n)||zi(t),this.currentSelection.set(n))}registerMutation(t,e){if(e.indexOf(t.target)>-1)return null;let n=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(n==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!n||n.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;c<t.addedNodes.length;c++){let u=t.addedNodes[c];e.push(u),u.nodeType==3&&(this.lastChangedTextNode=u)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(t.target))return{from:n.posBefore,to:n.posAfter};let r=t.previousSibling,i=t.nextSibling;if(Ln&&$s<=11&&t.addedNodes.length)for(let c=0;c<t.addedNodes.length;c++){let{previousSibling:u,nextSibling:h}=t.addedNodes[c];(!u||Array.prototype.indexOf.call(t.addedNodes,u)<0)&&(r=u),(!h||Array.prototype.indexOf.call(t.addedNodes,h)<0)&&(i=h)}let s=r&&r.parentNode==t.target?en(r)+1:0,o=n.localPosFromDOM(t.target,s,-1),a=i&&i.parentNode==t.target?en(i):t.target.childNodes.length,l=n.localPosFromDOM(t.target,a,1);return{from:o,to:l}}else return t.type=="attributes"?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=t.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}},Ww=new WeakMap,Gw=!1;function GV(t){if(!Ww.has(t)&&(Ww.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=hr,Gw)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),Gw=!0}}function Yw(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,o=t.domAtPos(t.state.selection.anchor);return Lo(o.node,o.offset,i,s)&&([n,r,i,s]=[i,s,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}}function YV(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return Yw(t,i)}let n;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?Yw(t,n):null}function KV(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function JV(t,e,n){let{node:r,fromOffset:i,toOffset:s,from:o,to:a}=t.docView.parseRange(e,n),l=t.domSelectionRange(),c,u=l.anchorNode;if(u&&t.dom.contains(u.nodeType==1?u:u.parentNode)&&(c=[{node:u,offset:l.anchorOffset}],Vf(l)||c.push({node:l.focusNode,offset:l.focusOffset})),gn&&t.input.lastKeyCode===8)for(let g=s;g>i;g--){let y=r.childNodes[g-1],b=y.pmViewDesc;if(y.nodeName=="BR"&&!b){s=g;break}if(!b||b.size)break}let h=t.state.doc,d=t.someProp("domParser")||Qs.fromSchema(t.state.schema),p=h.resolve(o),f=null,m=d.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:s,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:eU,context:p});if(c&&c[0].pos!=null){let g=c[0].pos,y=c[1]&&c[1].pos;y==null&&(y=g),f={anchor:g+o,head:y+o}}return{doc:m,sel:f,from:o,to:a}}function eU(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(_n&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||_n&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const tU=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function nU(t,e,n,r,i){let s=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let C=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,N=UE(t,C);if(N&&!t.state.selection.eq(N)){if(gn&&Qi&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",I=>I(t,yo(13,"Enter"))))return;let $=t.state.tr.setSelection(N);C=="pointer"?$.setMeta("pointer",!0):C=="key"&&$.scrollIntoView(),s&&$.setMeta("composition",s),t.dispatch($)}return}let o=t.state.doc.resolve(e),a=o.sharedDepth(n);e=o.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l=t.state.selection,c=JV(t,e,n),u=t.state.doc,h=u.slice(c.from,c.to),d,p;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(d=t.state.selection.to,p="end"):(d=t.state.selection.from,p="start"),t.input.lastKeyCode=null;let f=sU(h.content,c.doc.content,c.from,d,p);if(f&&t.input.domChangeCount++,(Za&&t.input.lastIOSEnter>Date.now()-225||Qi)&&i.some(C=>C.nodeType==1&&!tU.test(C.nodeName))&&(!f||f.endA>=f.endB)&&t.someProp("handleKeyDown",C=>C(t,yo(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!f)if(r&&l instanceof de&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))f={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let C=Kw(t,t.state.doc,c.sel);if(C&&!C.eq(t.state.selection)){let N=t.state.tr.setSelection(C);s&&N.setMeta("composition",s),t.dispatch(N)}}return}t.state.selection.from<t.state.selection.to&&f.start==f.endB&&t.state.selection instanceof de&&(f.start>t.state.selection.from&&f.start<=t.state.selection.from+2&&t.state.selection.from>=c.from?f.start=t.state.selection.from:f.endA<t.state.selection.to&&f.endA>=t.state.selection.to-2&&t.state.selection.to<=c.to&&(f.endB+=t.state.selection.to-f.endA,f.endA=t.state.selection.to)),Ln&&$s<=11&&f.endB==f.start+1&&f.endA==f.start&&f.start>c.from&&c.doc.textBetween(f.start-c.from-1,f.start-c.from+1)=="  "&&(f.start--,f.endA--,f.endB--);let m=c.doc.resolveNoCache(f.start-c.from),g=c.doc.resolveNoCache(f.endB-c.from),y=u.resolve(f.start),b=m.sameParent(g)&&m.parent.inlineContent&&y.end()>=f.endA;if((Za&&t.input.lastIOSEnter>Date.now()-225&&(!b||i.some(C=>C.nodeName=="DIV"||C.nodeName=="P"))||!b&&m.pos<c.doc.content.size&&(!m.sameParent(g)||!m.parent.inlineContent)&&m.pos<g.pos&&!/\S/.test(c.doc.textBetween(m.pos,g.pos,"","")))&&t.someProp("handleKeyDown",C=>C(t,yo(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>f.start&&iU(u,f.start,f.endA,m,g)&&t.someProp("handleKeyDown",C=>C(t,yo(8,"Backspace")))){Qi&&gn&&t.domObserver.suppressSelectionUpdates();return}gn&&f.endB==f.start&&(t.input.lastChromeDelete=Date.now()),Qi&&!b&&m.start()!=g.start()&&g.parentOffset==0&&m.depth==g.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==f.endA&&(f.endB-=2,g=c.doc.resolveNoCache(f.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(C){return C(t,yo(13,"Enter"))})},20));let T=f.start,S=f.endA,w=C=>{let N=C||t.state.tr.replace(T,S,c.doc.slice(f.start-c.from,f.endB-c.from));if(c.sel){let $=Kw(t,N.doc,c.sel);$&&!(gn&&t.composing&&$.empty&&(f.start!=f.endB||t.input.lastChromeDelete<Date.now()-100)&&($.head==T||$.head==N.mapping.map(S)-1)||Ln&&$.empty&&$.head==T)&&N.setSelection($)}return s&&N.setMeta("composition",s),N.scrollIntoView()},A;if(b)if(m.pos==g.pos){Ln&&$s<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>zi(t),20));let C=w(t.state.tr.delete(T,S)),N=u.resolve(f.start).marksAcross(u.resolve(f.endA));N&&C.ensureMarks(N),t.dispatch(C)}else if(f.endA==f.endB&&(A=rU(m.parent.content.cut(m.parentOffset,g.parentOffset),y.parent.content.cut(y.parentOffset,f.endA-y.start())))){let C=w(t.state.tr);A.type=="add"?C.addMark(T,S,A.mark):C.removeMark(T,S,A.mark),t.dispatch(C)}else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let C=m.parent.textBetween(m.parentOffset,g.parentOffset),N=()=>w(t.state.tr.insertText(C,T,S));t.someProp("handleTextInput",$=>$(t,T,S,C,N))||t.dispatch(N())}else t.dispatch(w());else t.dispatch(w())}function Kw(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:HE(t,e.resolve(n.anchor),e.resolve(n.head))}function rU(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,i=n,s=r,o,a,l;for(let u=0;u<r.length;u++)i=r[u].removeFromSet(i);for(let u=0;u<n.length;u++)s=n[u].removeFromSet(s);if(i.length==1&&s.length==0)a=i[0],o="add",l=u=>u.mark(a.addToSet(u.marks));else if(i.length==0&&s.length==1)a=s[0],o="remove",l=u=>u.mark(a.removeFromSet(u.marks));else return null;let c=[];for(let u=0;u<e.childCount;u++)c.push(l(e.child(u)));if(X.from(c).eq(t))return{mark:a,type:o}}function iU(t,e,n,r,i){if(n-e<=i.pos-r.pos||wg(r,!0,!1)<i.pos)return!1;let s=t.resolve(e);if(!r.parent.isTextblock){let a=s.nodeAfter;return a!=null&&n==e+a.nodeSize}if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1;let o=t.resolve(wg(s,!0,!0));return!o.parent.isTextblock||o.pos>n||wg(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function wg(t,e,n){let r=t.depth,i=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,i++,e=!1;if(n){let s=t.node(r).maybeChild(t.indexAfter(r));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function sU(t,e,n,r,i){let s=t.findDiffStart(e,n);if(s==null)return null;let{a:o,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if(i=="end"){let l=Math.max(0,s-Math.min(o,a));r-=o+l-s}if(o<s&&t.size<e.size){let l=r<=s&&r>=o?s-r:0;s-=l,s&&s<e.size&&Jw(e.textBetween(s-1,s+1))&&(s+=l?1:-1),a=s+(a-o),o=s}else if(a<s){let l=r<=s&&r>=a?s-r:0;s-=l,s&&s<t.size&&Jw(t.textBetween(s-1,s+1))&&(s+=l?1:-1),o=s+(o-a),a=s}return{start:s,endA:o,endB:a}}function Jw(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}let MN=class{constructor(t,e){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new SV,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(ik),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=nk(this),tk(this),this.nodeViews=rk(this),this.docView=Rw(this.state.doc,ek(this),Sg(this),this.dom,this),this.domObserver=new WV(this,(n,r,i,s)=>nU(this,n,r,i,s)),this.domObserver.start(),wV(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let e in t)this._props[e]=t[e];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&Ey(this);let e=this._props;this._props=t,t.plugins&&(t.plugins.forEach(ik),this.directPlugins=t.plugins),this.updateStateInner(t.state,e)}setProps(t){let e={};for(let n in this._props)e[n]=this._props[n];e.state=this.state;for(let n in t)e[n]=t[n];this.update(e)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,e){var n;let r=this.state,i=!1,s=!1;t.storedMarks&&this.composing&&(kN(this),s=!0),this.state=t;let o=r.plugins!=t.plugins||this._props.plugins!=e.plugins;if(o||this._props.plugins!=e.plugins||this._props.nodeViews!=e.nodeViews){let d=rk(this);aU(d,this.nodeViews)&&(this.nodeViews=d,i=!0)}(o||e.handleDOMEvents!=this._props.handleDOMEvents)&&Ey(this),this.editable=nk(this),tk(this);let a=Sg(this),l=ek(this),c=r.plugins!=t.plugins&&!r.doc.eq(t.doc)?"reset":t.scrollToSelection>r.scrollToSelection?"to selection":"preserve",u=i||!this.docView.matchesNode(t.doc,l,a);(u||!t.selection.eq(r.selection))&&(s=!0);let h=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&$z(this);if(s){this.domObserver.stop();let d=u&&(Ln||gn)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&oU(r.selection,t.selection);if(u){let p=gn?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=QV(this)),(i||!this.docView.update(t.doc,l,a,this))&&(this.docView.updateOuterDeco(l),this.docView.destroy(),this.docView=Rw(t.doc,l,a,this.dom,this)),p&&!this.trackWrites&&(d=!0)}d||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&lV(this))?zi(this,d):(pN(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),!((n=this.dragging)===null||n===void 0)&&n.node&&!r.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,r),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():h&&Fz(h)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))&&!this.someProp("handleScrollToSelection",e=>e(this)))if(this.state.selection instanceof pe){let e=this.docView.domAfterPos(this.state.selection.from);e.nodeType==1&&xw(this,e.getBoundingClientRect(),t)}else xw(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let n=this.directPlugins[e];n.spec.view&&this.pluginViews.push(n.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let n=this.state.plugins[e];n.spec.view&&this.pluginViews.push(n.spec.view(this))}}else for(let e=0;e<this.pluginViews.length;e++){let n=this.pluginViews[e];n.update&&n.update(this,t)}}updateDraggedNode(t,e){let n=t.node,r=-1;if(this.state.doc.nodeAt(n.from)==n.node)r=n.from;else{let i=n.from+(this.state.doc.content.size-e.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==n.node&&(r=i)}this.dragging=new xN(t.slice,t.move,r<0?void 0:pe.create(this.state.doc,r))}someProp(t,e){let n=this._props&&this._props[t],r;if(n!=null&&(r=e?e(n):n))return r;for(let s=0;s<this.directPlugins.length;s++){let o=this.directPlugins[s].props[t];if(o!=null&&(r=e?e(o):o))return r}let i=this.state.plugins;if(i)for(let s=0;s<i.length;s++){let o=i[s].props[t];if(o!=null&&(r=e?e(o):o))return r}}hasFocus(){if(Ln){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if(t.contentEditable=="false")return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&Bz(this.dom),zi(this),this.domObserver.start()}get root(){let t=this._root;if(t==null){for(let e=this.dom.parentNode;e;e=e.parentNode)if(e.nodeType==9||e.nodeType==11&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e}return t||document}updateRoot(){this._root=null}posAtCoords(t){return Hz(this,t)}coordsAtPos(t,e=1){return sN(this,t,e)}domAtPos(t,e=0){return this.docView.domFromPos(t,e)}nodeDOM(t){let e=this.docView.descAt(t);return e?e.nodeDOM:null}posAtDOM(t,e,n=-1){let r=this.docView.posFromDOM(t,e,n);if(r==null)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(t,e){return Gz(this,e||this.state,t)}pasteHTML(t,e){return Gc(this,"",t,!1,e||new ClipboardEvent("paste"))}pasteText(t,e){return Gc(this,t,null,!0,e||new ClipboardEvent("paste"))}serializeForClipboard(t){return XE(this,t)}destroy(){this.docView&&(kV(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Sg(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,xz())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return xV(this,t)}domSelectionRange(){let t=this.domSelection();return t?_n&&this.root.nodeType===11&&Nz(this.dom.ownerDocument)==this.dom&&YV(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};MN.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function ek(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[sn.node(0,t.state.doc.content.size,e)]}function tk(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:sn.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function nk(t){return!t.someProp("editable",e=>e(t.state)===!1)}function oU(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function rk(t){let e=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function aU(t,e){let n=0,r=0;for(let i in t){if(t[i]!=e[i])return!0;n++}for(let i in e)r++;return n!=r}function ik(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Gi={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:"'"},Kc={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},lU=typeof navigator<"u"&&/Mac/.test(navigator.platform),cU=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var tn=0;tn<10;tn++)Gi[48+tn]=Gi[96+tn]=String(tn);for(var tn=1;tn<=24;tn++)Gi[tn+111]="F"+tn;for(var tn=65;tn<=90;tn++)Gi[tn]=String.fromCharCode(tn+32),Kc[tn]=String.fromCharCode(tn);for(var kg in Gi)Kc.hasOwnProperty(kg)||(Kc[kg]=Gi[kg]);function IN(t){var e=lU&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||cU&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Kc:Gi)[t.keyCode]||t.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}const uU=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),hU=typeof navigator<"u"&&/Win/.test(navigator.platform);function dU(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,i,s,o;for(let a=0;a<e.length-1;a++){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))s=!0;else if(/^mod$/i.test(l))uU?o=!0:i=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),o&&(n="Meta-"+n),s&&(n="Shift-"+n),n}function pU(t){let e=Object.create(null);for(let n in t)e[dU(n)]=t[n];return e}function _g(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function fU(t){return new ze({props:{handleKeyDown:YE(t)}})}function YE(t){let e=pU(t);return function(n,r){let i=IN(r),s,o=e[_g(i,r)];if(o&&o(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let a=e[_g(i,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(hU&&r.ctrlKey&&r.altKey)&&(s=Gi[r.keyCode])&&s!=i){let a=e[_g(s,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var mU=Object.defineProperty,KE=(t,e)=>{for(var n in e)mU(t,n,{get:e[n],enumerable:!0})};function Xf(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:i}=n,{storedMarks:s}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,s=n.storedMarks,n}}}var qf=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:i}=n,s=this.buildProps(i);return Object.fromEntries(Object.entries(t).map(([o,a])=>[o,(...l)=>{const c=a(...l)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(i),c}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:i}=this,{view:s}=r,o=[],a=!!t,l=t||i.tr,c=()=>(!a&&e&&!l.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(l),o.every(h=>h===!0)),u={...Object.fromEntries(Object.entries(n).map(([h,d])=>[h,(...p)=>{const f=this.buildProps(l,e),m=d(...p)(f);return o.push(m),u}])),run:c};return u}createCan(t){const{rawCommands:e,state:n}=this,r=!1,i=t||n.tr,s=this.buildProps(i,r);return{...Object.fromEntries(Object.entries(e).map(([o,a])=>[o,(...l)=>a(...l)({...s,dispatch:void 0})])),chain:()=>this.createChain(i,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:i}=this,{view:s}=r,o={tr:t,editor:r,view:s,state:Xf({state:i,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([a,l])=>[a,(...c)=>l(...c)(o)]))}};return o}},LN={};KE(LN,{blur:()=>gU,clearContent:()=>OU,clearNodes:()=>yU,command:()=>bU,createParagraphNear:()=>EU,cut:()=>vU,deleteCurrentNode:()=>TU,deleteNode:()=>SU,deleteRange:()=>wU,deleteSelection:()=>kU,enter:()=>_U,exitCode:()=>xU,extendMarkRange:()=>CU,first:()=>DU,focus:()=>PU,forEach:()=>NU,insertContent:()=>RU,insertContentAt:()=>LU,joinBackward:()=>FU,joinDown:()=>$U,joinForward:()=>BU,joinItemBackward:()=>jU,joinItemForward:()=>zU,joinTextblockBackward:()=>VU,joinTextblockForward:()=>UU,joinUp:()=>QU,keyboardShortcut:()=>XU,lift:()=>qU,liftEmptyBlock:()=>ZU,liftListItem:()=>WU,newlineInCode:()=>GU,resetAttributes:()=>YU,scrollIntoView:()=>KU,selectAll:()=>JU,selectNodeBackward:()=>eH,selectNodeForward:()=>tH,selectParentNode:()=>nH,selectTextblockEnd:()=>rH,selectTextblockStart:()=>iH,setContent:()=>sH,setMark:()=>SH,setMeta:()=>wH,setNode:()=>kH,setNodeSelection:()=>_H,setTextDirection:()=>xH,setTextSelection:()=>CH,sinkListItem:()=>DH,splitBlock:()=>AH,splitListItem:()=>PH,toggleList:()=>NH,toggleMark:()=>RH,toggleNode:()=>MH,toggleWrap:()=>IH,undoInputRule:()=>LH,unsetAllMarks:()=>QH,unsetMark:()=>$H,unsetTextDirection:()=>FH,updateAttributes:()=>BH,wrapIn:()=>jH,wrapInList:()=>zH});var gU=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window==null?void 0:window.getSelection())==null||n.removeAllRanges())}),!0),OU=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),yU=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:i}=r;return n&&i.forEach(({$from:s,$to:o})=>{t.doc.nodesBetween(s.pos,o.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:u}=e,h=c.resolve(u.map(l)),d=c.resolve(u.map(l+a.nodeSize)),p=h.blockRange(d);if(!p)return;const f=gl(p);if(a.type.isTextblock){const{defaultType:m}=h.parent.contentMatchAt(h.index());e.setNodeMarkup(p.start,m)}(f||f===0)&&e.lift(p,f)})}),!0},bU=t=>e=>t(e),EU=()=>({state:t,dispatch:e})=>WP(t,e),vU=(t,e)=>({editor:n,tr:r})=>{const{state:i}=n,s=i.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const o=r.mapping.map(e);return r.insert(o,s.content),r.setSelection(new de(r.doc.resolve(Math.max(o-1,0)))),!0},TU=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const i=t.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===r.type){if(e){const o=i.before(s),a=i.after(s);t.delete(o,a).scrollIntoView()}return!0}return!1};function Rt(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var SU=t=>({tr:e,state:n,dispatch:r})=>{const i=Rt(t,n.schema),s=e.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===i){if(r){const a=s.before(o),l=s.after(o);e.delete(a,l).scrollIntoView()}return!0}return!1},wU=t=>({tr:e,dispatch:n})=>{const{from:r,to:i}=t;return n&&e.delete(r,i),!0},kU=()=>({state:t,dispatch:e})=>$E(t,e),_U=()=>({commands:t})=>t.keyboardShortcut("Enter"),xU=()=>({state:t,dispatch:e})=>dz(t,e);function JE(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function cp(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(i=>n.strict?e[i]===t[i]:JE(e[i])?e[i].test(t[i]):e[i]===t[i]):!0}function QN(t,e,n={}){return t.find(r=>r.type===e&&cp(Object.fromEntries(Object.keys(n).map(i=>[i,r.attrs[i]])),n))}function sk(t,e,n={}){return!!QN(t,e,n)}function Jc(t,e,n){var r;if(!t||!e)return;let i=t.parent.childAfter(t.parentOffset);if((!i.node||!i.node.marks.some(c=>c.type===e))&&(i=t.parent.childBefore(t.parentOffset)),!i.node||!i.node.marks.some(c=>c.type===e)||(n=n||((r=i.node.marks[0])==null?void 0:r.attrs),!QN([...i.node.marks],e,n)))return;let s=i.index,o=t.start()+i.offset,a=s+1,l=o+i.node.nodeSize;for(;s>0&&sk([...t.parent.child(s-1).marks],e,n);)s-=1,o-=t.parent.child(s).nodeSize;for(;a<t.parent.childCount&&sk([...t.parent.child(a).marks],e,n);)l+=t.parent.child(a).nodeSize,a+=1;return{from:o,to:l}}function es(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var CU=(t,e={})=>({tr:n,state:r,dispatch:i})=>{const s=es(t,r.schema),{doc:o,selection:a}=n,{$from:l,from:c,to:u}=a;if(i){const h=Jc(l,s,e);if(h&&h.from<=c&&h.to>=u){const d=de.create(o,h.from,h.to);n.setSelection(d)}}return!0},DU=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function ev(t){return t instanceof de}function $i(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function $N(t,e=null){if(!e)return null;const n=Te.atStart(t),r=Te.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const i=n.from,s=r.to;return e==="all"?de.create(t,$i(0,i,s),$i(t.content.size,i,s)):de.create(t,$i(e,i,s),$i(e,i,s))}function AU(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function tv(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}var PU=(t=null,e={})=>({editor:n,view:r,tr:i,dispatch:s})=>{e={scrollIntoView:!0,...e};const o=()=>{(tv()||AU())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&t===null||t===!1)return!0;if(s&&t===null&&!ev(n.state.selection))return o(),!0;const a=$N(i.doc,t)||n.state.selection,l=n.state.selection.eq(a);return s&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},NU=(t,e)=>n=>t.every((r,i)=>e(r,{...n,index:i})),RU=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),FN=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&FN(r)}return t};function xh(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return FN(n)}function eu(t,e,n){if(t instanceof Ls||t instanceof X)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,i=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return X.fromArray(t.map(o=>e.nodeFromJSON(o)));const s=e.nodeFromJSON(t);return n.errorOnInvalidContent&&s.check(),s}catch(s){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",s),eu("",e,n)}if(i){if(n.errorOnInvalidContent){let o=!1,a="";const l=new TP({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(o=!0,a=typeof c=="string"?c:c.outerHTML,null)}]}})});if(n.slice?Qs.fromSchema(l).parseSlice(xh(t),n.parseOptions):Qs.fromSchema(l).parse(xh(t),n.parseOptions),n.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const s=Qs.fromSchema(e);return n.slice?s.parseSlice(xh(t),n.parseOptions).content:s.parse(xh(t),n.parseOptions)}return eu("",e,n)}function MU(t,e,n){const r=t.steps.length-1;if(r<e)return;const i=t.steps[r];if(!(i instanceof Xt||i instanceof Wt))return;const s=t.mapping.maps[r];let o=0;s.forEach((a,l,c,u)=>{o===0&&(o=u)}),t.setSelection(Te.near(t.doc.resolve(o),n))}var IU=t=>!("type"in t),LU=(t,e,n)=>({tr:r,dispatch:i,editor:s})=>{var o;if(i){n={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a;const l=m=>{s.emit("contentError",{editor:s,error:m,disableCollaboration:()=>{"collaboration"in s.storage&&typeof s.storage.collaboration=="object"&&s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}})},c={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!s.options.enableContentCheck&&s.options.emitContentError)try{eu(e,s.schema,{parseOptions:c,errorOnInvalidContent:!0})}catch(m){l(m)}try{a=eu(e,s.schema,{parseOptions:c,errorOnInvalidContent:(o=n.errorOnInvalidContent)!=null?o:s.options.enableContentCheck})}catch(m){return l(m),!1}let{from:u,to:h}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},d=!0,p=!0;if((IU(a)?a:[a]).forEach(m=>{m.check(),d=d?m.isText&&m.marks.length===0:!1,p=p?m.isBlock:!1}),u===h&&p){const{parent:m}=r.doc.resolve(u);m.isTextblock&&!m.type.spec.code&&!m.childCount&&(u-=1,h+=1)}let f;if(d){if(Array.isArray(e))f=e.map(m=>m.text||"").join("");else if(e instanceof X){let m="";e.forEach(g=>{g.text&&(m+=g.text)}),f=m}else typeof e=="object"&&e&&e.text?f=e.text:f=e;r.insertText(f,u,h)}else{f=a;const m=r.doc.resolve(u),g=m.node(),y=m.parentOffset===0,b=g.isText||g.isTextblock,T=g.content.size>0;y&&b&&T&&(u=Math.max(0,u-1)),r.replaceWith(u,h,f)}n.updateSelection&&MU(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:u,text:f}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:u,text:f})}return!0},QU=()=>({state:t,dispatch:e})=>cz(t,e),$U=()=>({state:t,dispatch:e})=>uz(t,e),FU=()=>({state:t,dispatch:e})=>zP(t,e),BU=()=>({state:t,dispatch:e})=>XP(t,e),jU=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Bf(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},zU=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Bf(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},VU=()=>({state:t,dispatch:e})=>az(t,e),UU=()=>({state:t,dispatch:e})=>lz(t,e);function BN(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function HU(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,i,s,o;for(let a=0;a<e.length-1;a+=1){const l=e[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))s=!0;else if(/^mod$/i.test(l))tv()||BN()?o=!0:i=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),o&&(n=`Meta-${n}`),s&&(n=`Shift-${n}`),n}var XU=t=>({editor:e,view:n,tr:r,dispatch:i})=>{const s=HU(t).split(/-(?!$)/),o=s.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,a))});return l==null||l.steps.forEach(c=>{const u=c.map(r.mapping);u&&i&&r.maybeStep(u)}),!0};function Dr(t,e,n={}){const{from:r,to:i,empty:s}=t.selection,o=e?Rt(e,t.schema):null,a=[];t.doc.nodesBetween(r,i,(u,h)=>{if(u.isText)return;const d=Math.max(r,h),p=Math.min(i,h+u.nodeSize);a.push({node:u,from:d,to:p})});const l=i-r,c=a.filter(u=>o?o.name===u.node.type.name:!0).filter(u=>cp(u.node.attrs,n,{strict:!1}));return s?!!c.length:c.reduce((u,h)=>u+h.to-h.from,0)>=l}var qU=(t,e={})=>({state:n,dispatch:r})=>{const i=Rt(t,n.schema);return Dr(n,i,e)?hz(n,r):!1},ZU=()=>({state:t,dispatch:e})=>GP(t,e),WU=t=>({state:e,dispatch:n})=>{const r=Rt(t,e.schema);return Sz(r)(e,n)},GU=()=>({state:t,dispatch:e})=>ZP(t,e);function Zf(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function ok(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,i)=>(n.includes(i)||(r[i]=t[i]),r),{})}var YU=(t,e)=>({tr:n,state:r,dispatch:i})=>{let s=null,o=null;const a=Zf(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(s=Rt(t,r.schema)),a==="mark"&&(o=es(t,r.schema));let l=!1;return n.selection.ranges.forEach(c=>{r.doc.nodesBetween(c.$from.pos,c.$to.pos,(u,h)=>{s&&s===u.type&&(l=!0,i&&n.setNodeMarkup(h,void 0,ok(u.attrs,e))),o&&u.marks.length&&u.marks.forEach(d=>{o===d.type&&(l=!0,i&&n.addMark(h,h+u.nodeSize,o.create(ok(d.attrs,e))))})})}),l},KU=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),JU=()=>({tr:t,dispatch:e})=>{if(e){const n=new Wn(t.doc);t.setSelection(n)}return!0},eH=()=>({state:t,dispatch:e})=>UP(t,e),tH=()=>({state:t,dispatch:e})=>qP(t,e),nH=()=>({state:t,dispatch:e})=>mz(t,e),rH=()=>({state:t,dispatch:e})=>yz(t,e),iH=()=>({state:t,dispatch:e})=>Oz(t,e);function vy(t,e,n={},r={}){return eu(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var sH=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:i,tr:s,dispatch:o,commands:a})=>{const{doc:l}=s;if(r.preserveWhitespace!=="full"){const c=vy(t,i.schema,r,{errorOnInvalidContent:e??i.options.enableContentCheck});return o&&s.replaceWith(0,l.content.size,c).setMeta("preventUpdate",!n),!0}return o&&s.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:l.content.size},t,{parseOptions:r,errorOnInvalidContent:e??i.options.enableContentCheck})};function jN(t,e){const n=es(e,t.schema),{from:r,to:i,empty:s}=t.selection,o=[];s?(t.storedMarks&&o.push(...t.storedMarks),o.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,i,l=>{o.push(...l.marks)});const a=o.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function zN(t,e){const n=new LE(t);return e.forEach(r=>{r.steps.forEach(i=>{n.step(i)})}),n}function oH(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function As(t,e){const n=[];return t.descendants((r,i)=>{e(r)&&n.push({node:r,pos:i})}),n}function aH(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(i,s)=>{n(i)&&r.push({node:i,pos:s})}),r}function VN(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function Wf(t){return e=>VN(e.$from,t)}function ge(t,e,n){return t.config[e]===void 0&&t.parent?ge(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?ge(t.parent,e,n):null}):t.config[e]}function nv(t){return t.map(e=>{const n={name:e.name,options:e.options,storage:e.storage},r=ge(e,"addExtensions",n);return r?[e,...nv(r())]:e}).flat(10)}function rv(t,e){const n=Ks.fromSchema(e).serializeFragment(t),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}function UN(t){return typeof t=="function"}function qe(t,e=void 0,...n){return UN(t)?e?t.bind(e)(...n):t(...n):t}function lH(t={}){return Object.keys(t).length===0&&t.constructor===Object}function Wa(t){const e=t.filter(i=>i.type==="extension"),n=t.filter(i=>i.type==="node"),r=t.filter(i=>i.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function HN(t){const e=[],{nodeExtensions:n,markExtensions:r}=Wa(t),i=[...n,...r],s={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage,extensions:i},l=ge(o,"addGlobalAttributes",a);l&&l().forEach(c=>{c.types.forEach(u=>{Object.entries(c.attributes).forEach(([h,d])=>{e.push({type:u,name:h,attribute:{...s,...d}})})})})}),i.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage},l=ge(o,"addAttributes",a);if(!l)return;const c=l();Object.entries(c).forEach(([u,h])=>{const d={...s,...h};typeof(d==null?void 0:d.default)=="function"&&(d.default=d.default()),d!=null&&d.isRequired&&(d==null?void 0:d.default)===void 0&&delete d.default,e.push({type:o.name,name:u,attribute:d})})}),e}function Be(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([i,s])=>{if(!r[i]){r[i]=s;return}if(i==="class"){const o=s?String(s).split(" "):[],a=r[i]?r[i].split(" "):[],l=o.filter(c=>!a.includes(c));r[i]=[...a,...l].join(" ")}else if(i==="style"){const o=s?s.split(";").map(c=>c.trim()).filter(Boolean):[],a=r[i]?r[i].split(";").map(c=>c.trim()).filter(Boolean):[],l=new Map;a.forEach(c=>{const[u,h]=c.split(":").map(d=>d.trim());l.set(u,h)}),o.forEach(c=>{const[u,h]=c.split(":").map(d=>d.trim());l.set(u,h)}),r[i]=Array.from(l.entries()).map(([c,u])=>`${c}: ${u}`).join("; ")}else r[i]=s}),r},{})}function up(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>Be(n,r),{})}function cH(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function ak(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const i=e.reduce((s,o)=>{const a=o.attribute.parseHTML?o.attribute.parseHTML(n):cH(n.getAttribute(o.name));return a==null?s:{...s,[o.name]:a}},{});return{...r,...i}}}}function lk(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&lH(n)?!1:n!=null))}function ck(t){var e,n;const r={};return!((e=t==null?void 0:t.attribute)!=null&&e.isRequired)&&"default"in((t==null?void 0:t.attribute)||{})&&(r.default=t.attribute.default),((n=t==null?void 0:t.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=t.attribute.validate),[t.name,r]}function uH(t,e){var n;const r=HN(t),{nodeExtensions:i,markExtensions:s}=Wa(t),o=(n=i.find(c=>ge(c,"topNode")))==null?void 0:n.name,a=Object.fromEntries(i.map(c=>{const u=r.filter(y=>y.type===c.name),h={name:c.name,options:c.options,storage:c.storage,editor:e},d=t.reduce((y,b)=>{const T=ge(b,"extendNodeSchema",h);return{...y,...T?T(c):{}}},{}),p=lk({...d,content:qe(ge(c,"content",h)),marks:qe(ge(c,"marks",h)),group:qe(ge(c,"group",h)),inline:qe(ge(c,"inline",h)),atom:qe(ge(c,"atom",h)),selectable:qe(ge(c,"selectable",h)),draggable:qe(ge(c,"draggable",h)),code:qe(ge(c,"code",h)),whitespace:qe(ge(c,"whitespace",h)),linebreakReplacement:qe(ge(c,"linebreakReplacement",h)),defining:qe(ge(c,"defining",h)),isolating:qe(ge(c,"isolating",h)),attrs:Object.fromEntries(u.map(ck))}),f=qe(ge(c,"parseHTML",h));f&&(p.parseDOM=f.map(y=>ak(y,u)));const m=ge(c,"renderHTML",h);m&&(p.toDOM=y=>m({node:y,HTMLAttributes:up(y,u)}));const g=ge(c,"renderText",h);return g&&(p.toText=g),[c.name,p]})),l=Object.fromEntries(s.map(c=>{const u=r.filter(g=>g.type===c.name),h={name:c.name,options:c.options,storage:c.storage,editor:e},d=t.reduce((g,y)=>{const b=ge(y,"extendMarkSchema",h);return{...g,...b?b(c):{}}},{}),p=lk({...d,inclusive:qe(ge(c,"inclusive",h)),excludes:qe(ge(c,"excludes",h)),group:qe(ge(c,"group",h)),spanning:qe(ge(c,"spanning",h)),code:qe(ge(c,"code",h)),attrs:Object.fromEntries(u.map(ck))}),f=qe(ge(c,"parseHTML",h));f&&(p.parseDOM=f.map(g=>ak(g,u)));const m=ge(c,"renderHTML",h);return m&&(p.toDOM=g=>m({mark:g,HTMLAttributes:up(g,u)})),[c.name,p]}));return new TP({topNode:o,nodes:a,marks:l})}function hH(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function iv(t){return t.sort((e,n)=>{const r=ge(e,"priority")||100,i=ge(n,"priority")||100;return r>i?-1:r<i?1:0})}function XN(t){const e=iv(nv(t)),n=hH(e.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function qN(t,e,n){const{from:r,to:i}=e,{blockSeparator:s=`
`,textSerializers:o={}}=n||{};let a="";return t.nodesBetween(r,i,(l,c,u,h)=>{var d;l.isBlock&&c>r&&(a+=s);const p=o==null?void 0:o[l.type.name];if(p)return u&&(a+=p({node:l,pos:c,parent:u,index:h,range:e})),!1;l.isText&&(a+=(d=l==null?void 0:l.text)==null?void 0:d.slice(Math.max(r,c)-c,i-c))}),a}function dH(t,e){const n={from:0,to:t.content.size};return qN(t,n,e)}function ZN(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function pH(t,e){const n=Rt(e,t.schema),{from:r,to:i}=t.selection,s=[];t.doc.nodesBetween(r,i,a=>{s.push(a)});const o=s.reverse().find(a=>a.type.name===n.name);return o?{...o.attrs}:{}}function WN(t,e){const n=Zf(typeof e=="string"?e:e.name,t.schema);return n==="node"?pH(t,e):n==="mark"?jN(t,e):{}}function fH(t,e=JSON.stringify){const n={};return t.filter(r=>{const i=e(r);return Object.prototype.hasOwnProperty.call(n,i)?!1:n[i]=!0})}function mH(t){const e=fH(t);return e.length===1?e:e.filter((n,r)=>!e.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function GN(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((i,s)=>{const o=[];if(i.ranges.length)i.forEach((a,l)=>{o.push({from:a,to:l})});else{const{from:a,to:l}=n[s];if(a===void 0||l===void 0)return;o.push({from:a,to:l})}o.forEach(({from:a,to:l})=>{const c=e.slice(s).map(a,-1),u=e.slice(s).map(l),h=e.invert().map(c,-1),d=e.invert().map(u);r.push({oldRange:{from:h,to:d},newRange:{from:c,to:u}})})}),mH(r)}function sv(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(i=>{const s=n.resolve(t),o=Jc(s,i.type);o&&r.push({mark:i,...o})}):n.nodesBetween(t,e,(i,s)=>{!i||(i==null?void 0:i.nodeSize)===void 0||r.push(...i.marks.map(o=>({from:s,to:s+i.nodeSize,mark:o})))}),r}var gH=(t,e,n,r=20)=>{const i=t.doc.resolve(n);let s=r,o=null;for(;s>0&&o===null;){const a=i.node(s);(a==null?void 0:a.type.name)===e?o=a:s-=1}return[o,s]};function xg(t,e){return e.nodes[t]||e.marks[t]||null}function wd(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=t.find(s=>s.type===e&&s.name===r);return i?i.attribute.keepOnSplit:!1}))}var OH=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(i,s,o,a)=>{var l,c;const u=((c=(l=i.type.spec).toText)==null?void 0:c.call(l,{node:i,pos:s,parent:o,index:a}))||i.textContent||"%leaf%";n+=i.isAtom&&!i.isText?u:u.slice(0,Math.max(0,r-s))}),n};function Ty(t,e,n={}){const{empty:r,ranges:i}=t.selection,s=e?es(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(u=>s?s.name===u.type.name:!0).find(u=>cp(u.attrs,n,{strict:!1}));let o=0;const a=[];if(i.forEach(({$from:u,$to:h})=>{const d=u.pos,p=h.pos;t.doc.nodesBetween(d,p,(f,m)=>{if(!f.isText&&!f.marks.length)return;const g=Math.max(d,m),y=Math.min(p,m+f.nodeSize),b=y-g;o+=b,a.push(...f.marks.map(T=>({mark:T,from:g,to:y})))})}),o===0)return!1;const l=a.filter(u=>s?s.name===u.mark.type.name:!0).filter(u=>cp(u.mark.attrs,n,{strict:!1})).reduce((u,h)=>u+h.to-h.from,0),c=a.filter(u=>s?u.mark.type!==s&&u.mark.type.excludes(s):!0).reduce((u,h)=>u+h.to-h.from,0);return(l>0?l+c:l)>=o}function yH(t,e,n={}){if(!e)return Dr(t,null,n)||Ty(t,null,n);const r=Zf(e,t.schema);return r==="node"?Dr(t,e,n):r==="mark"?Ty(t,e,n):!1}var bH=(t,e)=>{const{$from:n,$to:r,$anchor:i}=t.selection;if(e){const s=Wf(a=>a.type.name===e)(t.selection);if(!s)return!1;const o=t.doc.resolve(s.pos+1);return i.pos+1===o.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},EH=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function uk(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function hk(t,e){const{nodeExtensions:n}=Wa(e),r=n.find(o=>o.name===t);if(!r)return!1;const i={name:r.name,options:r.options,storage:r.storage},s=qe(ge(r,"group",i));return typeof s!="string"?!1:s.split(" ").includes("list")}function Gf(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let i=!0;return t.content.forEach(s=>{i!==!1&&(Gf(s,{ignoreWhitespace:n,checkChildren:e})||(i=!1))}),i}return!1}function YN(t){return t instanceof pe}function vH(t,e,n){const r=t.state.doc.content.size,i=$i(e,0,r),s=$i(n,0,r),o=t.coordsAtPos(i),a=t.coordsAtPos(s,-1),l=Math.min(o.top,a.top),c=Math.max(o.bottom,a.bottom),u=Math.min(o.left,a.left),h=Math.max(o.right,a.right),d=h-u,p=c-l,f={top:l,bottom:c,left:u,right:h,width:d,height:p,x:u,y:l};return{...f,toJSON:()=>f}}function TH(t,e,n){var r;const{selection:i}=e;let s=null;if(ev(i)&&(s=i.$cursor),s){const a=(r=t.storedMarks)!=null?r:s.marks();return s.parent.type.allowsMarkType(n)&&(!!n.isInSet(a)||!a.some(l=>l.type.excludes(n)))}const{ranges:o}=i;return o.some(({$from:a,$to:l})=>{let c=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(a.pos,l.pos,(u,h,d)=>{if(c)return!1;if(u.isInline){const p=!d||d.type.allowsMarkType(n),f=!!n.isInSet(u.marks)||!u.marks.some(m=>m.type.excludes(n));c=p&&f}return!c}),c})}var SH=(t,e={})=>({tr:n,state:r,dispatch:i})=>{const{selection:s}=n,{empty:o,ranges:a}=s,l=es(t,r.schema);if(i)if(o){const c=jN(r,l);n.addStoredMark(l.create({...c,...e}))}else a.forEach(c=>{const u=c.$from.pos,h=c.$to.pos;r.doc.nodesBetween(u,h,(d,p)=>{const f=Math.max(p,u),m=Math.min(p+d.nodeSize,h);d.marks.find(g=>g.type===l)?d.marks.forEach(g=>{l===g.type&&n.addMark(f,m,l.create({...g.attrs,...e}))}):n.addMark(f,m,l.create(e))})});return TH(r,n,l)},wH=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),kH=(t,e={})=>({state:n,dispatch:r,chain:i})=>{const s=Rt(t,n.schema);let o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),s.isTextblock?i().command(({commands:a})=>ww(s,{...o,...e})(n)?!0:a.clearNodes()).command(({state:a})=>ww(s,{...o,...e})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},_H=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,i=$i(t,0,r.content.size),s=pe.create(r,i);e.setSelection(s)}return!0},xH=(t,e)=>({tr:n,state:r,dispatch:i})=>{const{selection:s}=r;let o,a;return typeof e=="number"?(o=e,a=e):e&&"from"in e&&"to"in e?(o=e.from,a=e.to):(o=s.from,a=s.to),i&&n.doc.nodesBetween(o,a,(l,c)=>{l.isText||n.setNodeMarkup(c,void 0,{...l.attrs,dir:t})}),!0},CH=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:i,to:s}=typeof t=="number"?{from:t,to:t}:t,o=de.atStart(r).from,a=de.atEnd(r).to,l=$i(i,o,a),c=$i(s,o,a),u=de.create(r,l,c);e.setSelection(u)}return!0},DH=t=>({state:e,dispatch:n})=>{const r=Rt(t,e.schema);return _z(r)(e,n)};function dk(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(i=>e==null?void 0:e.includes(i.type.name));t.tr.ensureMarks(r)}}var AH=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:i})=>{const{selection:s,doc:o}=e,{$from:a,$to:l}=s,c=i.extensionManager.attributes,u=wd(c,a.node().type.name,a.node().attrs);if(s instanceof pe&&s.node.isBlock)return!a.parentOffset||!ji(o,a.pos)?!1:(r&&(t&&dk(n,i.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const h=l.parentOffset===l.parent.content.size,d=a.depth===0?void 0:oH(a.node(-1).contentMatchAt(a.indexAfter(-1)));let p=h&&d?[{type:d,attrs:u}]:void 0,f=ji(e.doc,e.mapping.map(a.pos),1,p);if(!p&&!f&&ji(e.doc,e.mapping.map(a.pos),1,d?[{type:d}]:void 0)&&(f=!0,p=d?[{type:d,attrs:u}]:void 0),r){if(f&&(s instanceof de&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,p),d&&!h&&!a.parentOffset&&a.parent.type!==d)){const m=e.mapping.map(a.before()),g=e.doc.resolve(m);a.node(-1).canReplaceWith(g.index(),g.index()+1,d)&&e.setNodeMarkup(e.mapping.map(a.before()),d)}t&&dk(n,i.extensionManager.splittableMarks),e.scrollIntoView()}return f},PH=(t,e={})=>({tr:n,state:r,dispatch:i,editor:s})=>{var o;const a=Rt(t,r.schema),{$from:l,$to:c}=r.selection,u=r.selection.node;if(u&&u.isBlock||l.depth<2||!l.sameParent(c))return!1;const h=l.node(-1);if(h.type!==a)return!1;const d=s.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(i){let y=X.empty;const b=l.index(-1)?1:l.index(-2)?2:3;for(let N=l.depth-b;N>=l.depth-3;N-=1)y=X.from(l.node(N).copy(y));const T=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,S={...wd(d,l.node().type.name,l.node().attrs),...e},w=((o=a.contentMatch.defaultType)==null?void 0:o.createAndFill(S))||void 0;y=y.append(X.from(a.createAndFill(null,w)||void 0));const A=l.before(l.depth-(b-1));n.replace(A,l.after(-T),new te(y,4-b,0));let C=-1;n.doc.nodesBetween(A,n.doc.content.size,(N,$)=>{if(C>-1)return!1;N.isTextblock&&N.content.size===0&&(C=$+1)}),C>-1&&n.setSelection(de.near(n.doc.resolve(C))),n.scrollIntoView()}return!0}const p=c.pos===l.end()?h.contentMatchAt(0).defaultType:null,f={...wd(d,h.type.name,h.attrs),...e},m={...wd(d,l.node().type.name,l.node().attrs),...e};n.delete(l.pos,c.pos);const g=p?[{type:a,attrs:f},{type:p,attrs:m}]:[{type:a,attrs:f}];if(!ji(n.doc,l.pos,2))return!1;if(i){const{selection:y,storedMarks:b}=r,{splittableMarks:T}=s.extensionManager,S=b||y.$to.parentOffset&&y.$from.marks();if(n.split(l.pos,2,g).scrollIntoView(),!S||!i)return!0;const w=S.filter(A=>T.includes(A.type.name));n.ensureMarks(w)}return!0},Cg=(t,e)=>{const n=Wf(s=>s.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const i=t.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&Js(t.doc,n.pos)&&t.join(n.pos),!0},Dg=(t,e)=>{const n=Wf(s=>s.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const i=t.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&Js(t.doc,r)&&t.join(r),!0},NH=(t,e,n,r={})=>({editor:i,tr:s,state:o,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:h,splittableMarks:d}=i.extensionManager,p=Rt(t,o.schema),f=Rt(e,o.schema),{selection:m,storedMarks:g}=o,{$from:y,$to:b}=m,T=y.blockRange(b),S=g||m.$to.parentOffset&&m.$from.marks();if(!T)return!1;const w=Wf(A=>hk(A.type.name,h))(m);if(T.depth>=1&&w&&T.depth-w.depth<=1){if(w.node.type===p)return c.liftListItem(f);if(hk(w.node.type.name,h)&&p.validContent(w.node.content)&&a)return l().command(()=>(s.setNodeMarkup(w.pos,p),!0)).command(()=>Cg(s,p)).command(()=>Dg(s,p)).run()}return!n||!S||!a?l().command(()=>u().wrapInList(p,r)?!0:c.clearNodes()).wrapInList(p,r).command(()=>Cg(s,p)).command(()=>Dg(s,p)).run():l().command(()=>{const A=u().wrapInList(p,r),C=S.filter(N=>d.includes(N.type.name));return s.ensureMarks(C),A?!0:c.clearNodes()}).wrapInList(p,r).command(()=>Cg(s,p)).command(()=>Dg(s,p)).run()},RH=(t,e={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:s=!1}=n,o=es(t,r.schema);return Ty(r,o,e)?i.unsetMark(o,{extendEmptyMarkRange:s}):i.setMark(o,e)},MH=(t,e,n={})=>({state:r,commands:i})=>{const s=Rt(t,r.schema),o=Rt(e,r.schema),a=Dr(r,s,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?i.setNode(o,l):i.setNode(s,{...l,...n})},IH=(t,e={})=>({state:n,commands:r})=>{const i=Rt(t,n.schema);return Dr(n,i,e)?r.lift(i):r.wrapIn(i,e)},LH=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const i=n[r];let s;if(i.spec.isInputRules&&(s=i.getState(t))){if(e){const o=t.tr,a=s.transform;for(let l=a.steps.length-1;l>=0;l-=1)o.step(a.steps[l].invert(a.docs[l]));if(s.text){const l=o.doc.resolve(s.from).marks();o.replaceWith(s.from,s.to,t.schema.text(s.text,l))}else o.delete(s.from,s.to)}return!0}}return!1},QH=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:i}=n;return r||e&&i.forEach(s=>{t.removeMark(s.$from.pos,s.$to.pos)}),!0},$H=(t,e={})=>({tr:n,state:r,dispatch:i})=>{var s;const{extendEmptyMarkRange:o=!1}=e,{selection:a}=n,l=es(t,r.schema),{$from:c,empty:u,ranges:h}=a;if(!i)return!0;if(u&&o){let{from:d,to:p}=a;const f=(s=c.marks().find(g=>g.type===l))==null?void 0:s.attrs,m=Jc(c,l,f);m&&(d=m.from,p=m.to),n.removeMark(d,p,l)}else h.forEach(d=>{n.removeMark(d.$from.pos,d.$to.pos,l)});return n.removeStoredMark(l),!0},FH=t=>({tr:e,state:n,dispatch:r})=>{const{selection:i}=n;let s,o;return typeof t=="number"?(s=t,o=t):t&&"from"in t&&"to"in t?(s=t.from,o=t.to):(s=i.from,o=i.to),r&&e.doc.nodesBetween(s,o,(a,l)=>{if(a.isText)return;const c={...a.attrs};delete c.dir,e.setNodeMarkup(l,void 0,c)}),!0},BH=(t,e={})=>({tr:n,state:r,dispatch:i})=>{let s=null,o=null;const a=Zf(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(s=Rt(t,r.schema)),a==="mark"&&(o=es(t,r.schema));let l=!1;return n.selection.ranges.forEach(c=>{const u=c.$from.pos,h=c.$to.pos;let d,p,f,m;n.selection.empty?r.doc.nodesBetween(u,h,(g,y)=>{s&&s===g.type&&(l=!0,f=Math.max(y,u),m=Math.min(y+g.nodeSize,h),d=y,p=g)}):r.doc.nodesBetween(u,h,(g,y)=>{y<u&&s&&s===g.type&&(l=!0,f=Math.max(y,u),m=Math.min(y+g.nodeSize,h),d=y,p=g),y>=u&&y<=h&&(s&&s===g.type&&(l=!0,i&&n.setNodeMarkup(y,void 0,{...g.attrs,...e})),o&&g.marks.length&&g.marks.forEach(b=>{if(o===b.type&&(l=!0,i)){const T=Math.max(y,u),S=Math.min(y+g.nodeSize,h);n.addMark(T,S,o.create({...b.attrs,...e}))}}))}),p&&(d!==void 0&&i&&n.setNodeMarkup(d,void 0,{...p.attrs,...e}),o&&p.marks.length&&p.marks.forEach(g=>{o===g.type&&i&&n.addMark(f,m,o.create({...g.attrs,...e}))}))}),l},jH=(t,e={})=>({state:n,dispatch:r})=>{const i=Rt(t,n.schema);return bz(i,e)(n,r)},zH=(t,e={})=>({state:n,dispatch:r})=>{const i=Rt(t,n.schema);return Ez(i,e)(n,r)},VH=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach(r=>r.apply(this,e)),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(r=>r!==e):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}},Yf=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},UH=(t,e)=>{if(JE(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function Ch(t){var e;const{editor:n,from:r,to:i,text:s,rules:o,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(e=c.nodeBefore||c.nodeAfter)!=null&&e.marks.find(d=>d.type.spec.code))return!1;let u=!1;const h=OH(c)+s;return o.forEach(d=>{if(u)return;const p=UH(h,d.find);if(!p)return;const f=l.state.tr,m=Xf({state:l.state,transaction:f}),g={from:r-(p[0].length-s.length),to:i},{commands:y,chain:b,can:T}=new qf({editor:n,state:m});d.handler({state:m,range:g,match:p,commands:y,chain:b,can:T})===null||!f.steps.length||(d.undoable&&f.setMeta(a,{transform:f,from:r,to:i,text:s}),l.dispatch(f),u=!0)}),u}function HH(t){const{editor:e,rules:n}=t,r=new ze({state:{init(){return null},apply(i,s,o){const a=i.getMeta(r);if(a)return a;const l=i.getMeta("applyInputRules");return l&&setTimeout(()=>{let{text:c}=l;typeof c=="string"?c=c:c=rv(X.from(c),o.schema);const{from:u}=l,h=u+c.length;Ch({editor:e,from:u,to:h,text:c,rules:n,plugin:r})}),i.selectionSet||i.docChanged?null:s}},props:{handleTextInput(i,s,o,a){return Ch({editor:e,from:s,to:o,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:s}=i.state.selection;s&&Ch({editor:e,from:s.pos,to:s.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(i,s){if(s.key!=="Enter")return!1;const{$cursor:o}=i.state.selection;return o?Ch({editor:e,from:o.pos,to:o.pos,text:`
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function XH(t){return Object.prototype.toString.call(t).slice(8,-1)}function Dh(t){return XH(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function KN(t,e){const n={...t};return Dh(t)&&Dh(e)&&Object.keys(e).forEach(r=>{Dh(e[r])&&Dh(t[r])?n[r]=KN(t[r],e[r]):n[r]=e[r]}),n}var ov=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...qe(ge(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...qe(ge(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>KN(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},Rr=class JN extends ov{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n=typeof e=="function"?e():e;return new JN(n)}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,i=e.state.selection.$from;if(i.pos===i.end()){const s=i.marks();if(!s.find(a=>(a==null?void 0:a.type.name)===n.name))return!1;const o=s.find(a=>(a==null?void 0:a.type.name)===n.name);return o&&r.removeStoredMark(o),r.insertText(" ",i.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function qH(t){return typeof t=="number"}var ZH=class{constructor(t){this.find=t.find,this.handler=t.handler}},WH=(t,e,n)=>{if(JE(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(i=>{const s=[i.text];return s.index=i.index,s.input=t,s.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(i.replaceWith)),s}):[]};function GH(t){const{editor:e,state:n,from:r,to:i,rule:s,pasteEvent:o,dropEvent:a}=t,{commands:l,chain:c,can:u}=new qf({editor:e,state:n}),h=[];return n.doc.nodesBetween(r,i,(d,p)=>{var f,m,g,y,b;if((m=(f=d.type)==null?void 0:f.spec)!=null&&m.code||!(d.isText||d.isTextblock||d.isInline))return;const T=(b=(y=(g=d.content)==null?void 0:g.size)!=null?y:d.nodeSize)!=null?b:0,S=Math.max(r,p),w=Math.min(i,p+T);if(S>=w)return;const A=d.isText?d.text||"":d.textBetween(S-p,w-p,void 0,"");WH(A,s.find,o).forEach(C=>{if(C.index===void 0)return;const N=S+C.index+1,$=N+C[0].length,I={from:n.tr.mapping.map(N),to:n.tr.mapping.map($)},L=s.handler({state:n,range:I,match:C,commands:l,chain:c,can:u,pasteEvent:o,dropEvent:a});h.push(L)})}),h.every(d=>d!==null)}var Ah=null,YH=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function KH(t){const{editor:e,rules:n}=t;let r=null,i=!1,s=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:c,from:u,to:h,rule:d,pasteEvt:p})=>{const f=c.tr,m=Xf({state:c,transaction:f});if(!(!GH({editor:e,state:m,from:Math.max(u-1,0),to:h.b-1,rule:d,pasteEvent:p,dropEvent:a})||!f.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,f}};return n.map(c=>new ze({view(u){const h=p=>{var f;r=(f=u.dom.parentElement)!=null&&f.contains(p.target)?u.dom.parentElement:null,r&&(Ah=e)},d=()=>{Ah&&(Ah=null)};return window.addEventListener("dragstart",h),window.addEventListener("dragend",d),{destroy(){window.removeEventListener("dragstart",h),window.removeEventListener("dragend",d)}}},props:{handleDOMEvents:{drop:(u,h)=>{if(s=r===u.dom.parentElement,a=h,!s){const d=Ah;d!=null&&d.isEditable&&setTimeout(()=>{const p=d.state.selection;p&&d.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(u,h)=>{var d;const p=(d=h.clipboardData)==null?void 0:d.getData("text/html");return o=h,i=!!(p!=null&&p.includes("data-pm-slice")),!1}}},appendTransaction:(u,h,d)=>{const p=u[0],f=p.getMeta("uiEvent")==="paste"&&!i,m=p.getMeta("uiEvent")==="drop"&&!s,g=p.getMeta("applyPasteRules"),y=!!g;if(!f&&!m&&!y)return;if(y){let{text:S}=g;typeof S=="string"?S=S:S=rv(X.from(S),d.schema);const{from:w}=g,A=w+S.length,C=YH(S);return l({rule:c,state:d,from:w,to:{b:A},pasteEvt:C})}const b=h.doc.content.findDiffStart(d.doc.content),T=h.doc.content.findDiffEnd(d.doc.content);if(!(!qH(b)||!T||b===T.b))return l({rule:c,state:d,from:b,to:T,pasteEvt:o})}}))}var Kf=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=XN(t),this.schema=uH(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:xg(e.name,this.schema)},r=ge(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this;return iv([...this.extensions].reverse()).flatMap(e=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:t,type:xg(e.name,this.schema)},r=[],i=ge(e,"addKeyboardShortcuts",n);let s={};if(e.type==="mark"&&ge(e,"exitable",n)&&(s.ArrowRight=()=>Rr.handleExit({editor:t,mark:e})),i){const u=Object.fromEntries(Object.entries(i()).map(([h,d])=>[h,()=>d({editor:t})]));s={...s,...u}}const o=fU(s);r.push(o);const a=ge(e,"addInputRules",n);if(uk(e,t.options.enableInputRules)&&a){const u=a();if(u&&u.length){const h=HH({editor:t,rules:u}),d=Array.isArray(h)?h:[h];r.push(...d)}}const l=ge(e,"addPasteRules",n);if(uk(e,t.options.enablePasteRules)&&l){const u=l();if(u&&u.length){const h=KH({editor:t,rules:u});r.push(...h)}}const c=ge(e,"addProseMirrorPlugins",n);if(c){const u=c();r.push(...u)}return r})}get attributes(){return HN(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=Wa(this.extensions);return Object.fromEntries(e.filter(n=>!!ge(n,"addNodeView")).map(n=>{const r=this.attributes.filter(l=>l.type===n.name),i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Rt(n.name,this.schema)},s=ge(n,"addNodeView",i);if(!s)return[];const o=s();if(!o)return[];const a=(l,c,u,h,d)=>{const p=up(l,r);return o({node:l,view:c,getPos:u,decorations:h,innerDecorations:d,editor:t,extension:n,HTMLAttributes:p})};return[n.name,a]}))}get markViews(){const{editor:t}=this,{markExtensions:e}=Wa(this.extensions);return Object.fromEntries(e.filter(n=>!!ge(n,"addMarkView")).map(n=>{const r=this.attributes.filter(a=>a.type===n.name),i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:es(n.name,this.schema)},s=ge(n,"addMarkView",i);if(!s)return[];const o=(a,l,c)=>{const u=up(a,r);return s()({mark:a,view:l,inline:c,editor:t,extension:n,HTMLAttributes:u,updateAttributes:h=>{pX(a,t,h)}})};return[n.name,o]}))}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{var n;const r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:xg(e.name,this.schema)};e.type==="mark"&&((n=qe(ge(e,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(e.name);const i=ge(e,"onBeforeCreate",r),s=ge(e,"onCreate",r),o=ge(e,"onUpdate",r),a=ge(e,"onSelectionUpdate",r),l=ge(e,"onTransaction",r),c=ge(e,"onFocus",r),u=ge(e,"onBlur",r),h=ge(e,"onDestroy",r);i&&this.editor.on("beforeCreate",i),s&&this.editor.on("create",s),o&&this.editor.on("update",o),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),u&&this.editor.on("blur",u),h&&this.editor.on("destroy",h)})}};Kf.resolve=XN;Kf.sort=iv;Kf.flatten=nv;var JH={};KE(JH,{ClipboardTextSerializer:()=>tR,Commands:()=>nR,Delete:()=>rR,Drop:()=>iR,Editable:()=>sR,FocusEvents:()=>aR,Keymap:()=>lR,Paste:()=>cR,Tabindex:()=>uR,TextDirection:()=>hR,focusEventsPluginKey:()=>oR});var Ve=class eR extends ov{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n=typeof e=="function"?e():e;return new eR(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},tR=Ve.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new ze({key:new rt("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:i}=e,{ranges:s}=i,o=Math.min(...s.map(c=>c.$from.pos)),a=Math.max(...s.map(c=>c.$to.pos)),l=ZN(n);return qN(r,{from:o,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),nR=Ve.create({name:"commands",addCommands(){return{...LN}}}),rR=Ve.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r,i;const s=()=>{var o,a,l,c;if((c=(l=(a=(o=this.editor.options.coreExtensionOptions)==null?void 0:o.delete)==null?void 0:a.filterTransaction)==null?void 0:l.call(a,t))!=null?c:t.getMeta("y-sync$"))return;const u=zN(t.before,[t,...e]);GN(u).forEach(d=>{u.mapping.mapResult(d.oldRange.from).deletedAfter&&u.mapping.mapResult(d.oldRange.to).deletedBefore&&u.before.nodesBetween(d.oldRange.from,d.oldRange.to,(p,f)=>{const m=f+p.nodeSize-2,g=d.oldRange.from<=f&&m<=d.oldRange.to;this.editor.emit("delete",{type:"node",node:p,from:f,to:m,newFrom:u.mapping.map(f),newTo:u.mapping.map(m),deletedRange:d.oldRange,newRange:d.newRange,partial:!g,editor:this.editor,transaction:t,combinedTransform:u})})});const h=u.mapping;u.steps.forEach((d,p)=>{var f,m;if(d instanceof Tr){const g=h.slice(p).map(d.from,-1),y=h.slice(p).map(d.to),b=h.invert().map(g,-1),T=h.invert().map(y),S=(f=u.doc.nodeAt(g-1))==null?void 0:f.marks.some(A=>A.eq(d.mark)),w=(m=u.doc.nodeAt(y))==null?void 0:m.marks.some(A=>A.eq(d.mark));this.editor.emit("delete",{type:"mark",mark:d.mark,from:d.from,to:d.to,deletedRange:{from:b,to:T},newRange:{from:g,to:y},partial:!!(w||S),editor:this.editor,transaction:t,combinedTransform:u})}})};(i=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||i?setTimeout(s,0):s()}}),iR=Ve.create({name:"drop",addProseMirrorPlugins(){return[new ze({key:new rt("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),sR=Ve.create({name:"editable",addProseMirrorPlugins(){return[new ze({key:new rt("editable"),props:{editable:()=>this.editor.options.editable}})]}}),oR=new rt("focusEvents"),aR=Ve.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new ze({key:oR,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),lR=Ve.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:o})=>{const{selection:a,doc:l}=o,{empty:c,$anchor:u}=a,{pos:h,parent:d}=u,p=u.parent.isTextblock&&h>0?o.doc.resolve(h-1):u,f=p.parent.type.spec.isolating,m=u.pos-u.parentOffset,g=f&&p.parent.childCount===1?m===u.pos:Te.atStart(l).from===h;return!c||!d.type.isTextblock||d.textContent.length||!g||g&&u.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},i={...n,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return tv()||BN()?i:r},addProseMirrorPlugins(){return[new ze({key:new rt("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(p=>p.getMeta("composition")))return;const r=t.some(p=>p.docChanged)&&!e.doc.eq(n.doc),i=t.some(p=>p.getMeta("preventClearDocument"));if(!r||i)return;const{empty:s,from:o,to:a}=e.selection,l=Te.atStart(e.doc).from,c=Te.atEnd(e.doc).to;if(s||!(o===l&&a===c)||!Gf(n.doc))return;const u=n.tr,h=Xf({state:n,transaction:u}),{commands:d}=new qf({editor:this.editor,state:h});if(d.clearNodes(),!!u.steps.length)return u}})]}}),cR=Ve.create({name:"paste",addProseMirrorPlugins(){return[new ze({key:new rt("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),uR=Ve.create({name:"tabindex",addProseMirrorPlugins(){return[new ze({key:new rt("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),hR=Ve.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=Wa(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const n=e.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new ze({key:new rt("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}}),eX=class ba{constructor(e,n,r=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=i}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You cant set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new ba(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new ba(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new ba(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const i=n.isBlock&&!n.isTextblock,s=n.isAtom&&!n.isText,o=this.pos+r+(s?0:1);if(o<0||o>this.resolvedPos.doc.nodeSize-2)return;const a=this.resolvedPos.doc.resolve(o);if(!i&&a.depth<=this.depth)return;const l=new ba(a,this.editor,i,i?n:null);i&&(l.actualDepth=this.depth+1),e.push(new ba(a,this.editor,i,i?n:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,i=this.parent;for(;i&&!r;){if(i.node.type.name===e)if(Object.keys(n).length>0){const s=i.node.attrs,o=Object.keys(n);for(let a=0;a<o.length;a+=1){const l=o[a];if(s[l]!==n[l])break}}else r=i;i=i.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let i=[];if(!this.children||this.children.length===0)return i;const s=Object.keys(n);return this.children.forEach(o=>{r&&i.length>0||(o.node.type.name===e&&s.every(a=>n[a]===o.node.attrs[a])&&i.push(o),!(r&&i.length>0)&&(i=i.concat(o.querySelectorAll(e,n,r))))}),i}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}},tX=`.ProseMirror {
position: relative;
}
.ProseMirror {
word-wrap: break-word;
white-space: pre-wrap;
white-space: break-spaces;
-webkit-font-variant-ligatures: none;
font-variant-ligatures: none;
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
}
.ProseMirror [contenteditable="false"] {
white-space: normal;
}
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
white-space: pre-wrap;
}
.ProseMirror pre {
white-space: pre-wrap;
}
img.ProseMirror-separator {
display: inline !important;
border: none !important;
margin: 0 !important;
width: 0 !important;
height: 0 !important;
}
.ProseMirror-gapcursor {
display: none;
pointer-events: none;
position: absolute;
margin: 0;
}
.ProseMirror-gapcursor:after {
content: "";
display: block;
position: absolute;
top: -2px;
width: 20px;
border-top: 1px solid black;
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
}
@keyframes ProseMirror-cursor-blink {
to {
visibility: hidden;
}
}
.ProseMirror-hideselection *::selection {
background: transparent;
}
.ProseMirror-hideselection *::-moz-selection {
background: transparent;
}
.ProseMirror-hideselection * {
caret-color: transparent;
}
.ProseMirror-focused .ProseMirror-gapcursor {
display: block;
}`;function nX(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute("data-tiptap-style",""),i.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(i),i}var rX=class extends VH{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:i,moved:s})=>this.options.onDrop(r,i,s)),this.on("paste",({event:r,slice:i})=>this.options.onPaste(r,i)),this.on("delete",this.options.onDelete);const e=this.createDoc(),n=$N(e,this.options.autofocus);this.editorState=oz.create({doc:e,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(t){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const t=this.editorView.dom;t!=null&&t.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=nX(tX,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){const n=UN(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let n=e;if([].concat(t).forEach(i=>{const s=typeof i=="string"?`${i}$`:i.key;n=n.filter(o=>!o.key.startsWith(s))}),e.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e;const n=[...this.options.enableCoreExtensions?[sR,tR.configure({blockSeparator:(e=(t=this.options.coreExtensionOptions)==null?void 0:t.clipboardTextSerializer)==null?void 0:e.blockSeparator}),nR,aR,lR,uR,iR,cR,rR,hR.configure({direction:this.options.textDirection})].filter(r=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[r.name]!==!1:!0):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(r==null?void 0:r.type));this.extensionManager=new Kf(n,this)}createCommandManager(){this.commandManager=new qf({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=vy(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),t=vy(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return t}createView(t){var e;this.editorView=new MN(t,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)==null?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.prependClass(),this.injectCSS();const r=this.view.dom;r.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(c=>{var u;return(u=this.capturedTransaction)==null?void 0:u.step(c)});return}const{state:e,transactions:n}=this.state.applyTransaction(t),r=!this.state.selection.eq(e.selection),i=n.includes(t),s=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),!i)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const o=n.findLast(c=>c.getMeta("focus")||c.getMeta("blur")),a=o==null?void 0:o.getMeta("focus"),l=o==null?void 0:o.getMeta("blur");a&&this.emit("focus",{editor:this,event:a.event,transaction:o}),l&&this.emit("blur",{editor:this,event:l.event,transaction:o}),!(t.getMeta("preventUpdate")||!n.some(c=>c.docChanged)||s.doc.eq(e.doc))&&this.emit("update",{editor:this,transaction:t,appendedTransactions:n.slice(1)})}getAttributes(t){return WN(this.state,t)}isActive(t,e){const n=typeof t=="string"?t:null,r=typeof t=="string"?e:t;return yH(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return rv(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e=`
`,textSerializers:n={}}=t||{};return dH(this.state.doc,{blockSeparator:e,textSerializers:{...ZN(this.schema),...n}})}get isEmpty(){return Gf(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var t,e;return(e=(t=this.editorView)==null?void 0:t.isDestroyed)!=null?e:!0}$node(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t);return new eX(e,this)}get $doc(){return this.$pos(0)}};function $o(t){return new Yf({find:t.find,handler:({state:e,range:n,match:r})=>{const i=qe(t.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:s}=e,o=r[r.length-1],a=r[0];if(o){const l=a.search(/\S/),c=n.from+a.indexOf(o),u=c+o.length;if(sv(n.from,n.to,e.doc).filter(d=>d.mark.type.excluded.find(p=>p===t.type&&p!==d.mark.type)).filter(d=>d.to>c).length)return null;u<n.to&&s.delete(u,n.to),c>n.from&&s.delete(n.from+l,c);const h=n.from+l+o.length;s.addMark(n.from+l,h,t.type.create(i||{})),s.removeStoredMark(t.type)}},undoable:t.undoable})}function dR(t){return new Yf({find:t.find,handler:({state:e,range:n,match:r})=>{const i=qe(t.getAttributes,void 0,r)||{},{tr:s}=e,o=n.from;let a=n.to;const l=t.type.create(i);if(r[1]){const c=r[0].lastIndexOf(r[1]);let u=o+c;u>a?u=a:a=u+r[1].length;const h=r[0][r[0].length-1];s.insertText(h,o+r[0].length-1),s.replaceWith(u,a,l)}else if(r[0]){const c=t.type.isInline?o:o-1;s.insert(c,t.type.create(i)).delete(s.mapping.map(o),s.mapping.map(a))}s.scrollIntoView()},undoable:t.undoable})}function tu(t){return new Yf({find:t.find,handler:({state:e,range:n,match:r})=>{const i=e.doc.resolve(n.from),s=qe(t.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,s)},undoable:t.undoable})}function Ga(t){return new Yf({find:t.find,handler:({state:e,range:n,match:r,chain:i})=>{const s=qe(t.getAttributes,void 0,r)||{},o=e.tr.delete(n.from,n.to),a=o.doc.resolve(n.from).blockRange(),l=a&&IE(a,t.type,s);if(!l)return null;if(o.wrap(a,l),t.keepMarks&&t.editor){const{selection:u,storedMarks:h}=e,{splittableMarks:d}=t.editor.extensionManager,p=h||u.$to.parentOffset&&u.$from.marks();if(p){const f=p.filter(m=>d.includes(m.type.name));o.ensureMarks(f)}}if(t.keepAttributes){const u=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(u,s).run()}const c=o.doc.resolve(n.from-1).nodeBefore;c&&c.type===t.type&&Js(o.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,c))&&o.join(n.from-1)},undoable:t.undoable})}var iX=t=>"touches"in t,sX=class{constructor(t){this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.handleMouseMove=o=>{if(!this.isResizing||!this.activeHandle)return;const a=o.clientX-this.startX,l=o.clientY-this.startY;this.handleResize(a,l)},this.handleTouchMove=o=>{if(!this.isResizing||!this.activeHandle)return;const a=o.touches[0];if(!a)return;const l=a.clientX-this.startX,c=a.clientY-this.startY;this.handleResize(l,c)},this.handleMouseUp=()=>{if(!this.isResizing)return;const o=this.element.offsetWidth,a=this.element.offsetHeight;this.onCommit(o,a),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=o=>{o.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=o=>{o.key==="Shift"&&(this.isShiftKeyPressed=!1)};var e,n,r,i,s;this.node=t.node,this.element=t.element,this.contentElement=t.contentElement,this.getPos=t.getPos,this.onResize=t.onResize,this.onCommit=t.onCommit,this.onUpdate=t.onUpdate,(e=t.options)!=null&&e.min&&(this.minSize={...this.minSize,...t.options.min}),(n=t.options)!=null&&n.max&&(this.maxSize=t.options.max),(r=t==null?void 0:t.options)!=null&&r.directions&&(this.directions=t.options.directions),(i=t.options)!=null&&i.preserveAspectRatio&&(this.preserveAspectRatio=t.options.preserveAspectRatio),(s=t.options)!=null&&s.className&&(this.classNames={container:t.options.className.container||"",wrapper:t.options.className.wrapper||"",handle:t.options.className.handle||"",resizing:t.options.className.resizing||""}),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles()}get dom(){return this.container}get contentDOM(){return this.contentElement}update(t,e,n){return t.type!==this.node.type?!1:(this.node=t,this.onUpdate?this.onUpdate(t,e,n):!0)}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.container.remove()}createContainer(){const t=document.createElement("div");return t.dataset.resizeContainer="",t.dataset.node=this.node.type.name,t.style.display="flex",t.style.justifyContent="flex-start",t.style.alignItems="flex-start",this.classNames.container&&(t.className=this.classNames.container),t.appendChild(this.wrapper),t}createWrapper(){const t=document.createElement("div");return t.style.position="relative",t.style.display="block",t.dataset.resizeWrapper="",this.classNames.wrapper&&(t.className=this.classNames.wrapper),t.appendChild(this.element),t}createHandle(t){const e=document.createElement("div");return e.dataset.resizeHandle=t,e.style.position="absolute",this.classNames.handle&&(e.className=this.classNames.handle),e}positionHandle(t,e){const n=e.includes("top"),r=e.includes("bottom"),i=e.includes("left"),s=e.includes("right");n&&(t.style.top="0"),r&&(t.style.bottom="0"),i&&(t.style.left="0"),s&&(t.style.right="0"),(e==="top"||e==="bottom")&&(t.style.left="0",t.style.right="0"),(e==="left"||e==="right")&&(t.style.top="0",t.style.bottom="0")}attachHandles(){this.directions.forEach(t=>{const e=this.createHandle(t);this.positionHandle(e,t),e.addEventListener("mousedown",n=>this.handleResizeStart(n,t)),e.addEventListener("touchstart",n=>this.handleResizeStart(n,t)),this.wrapper.appendChild(e)})}applyInitialSize(){const t=this.node.attrs.width,e=this.node.attrs.height;t?(this.element.style.width=`${t}px`,this.initialWidth=t):this.initialWidth=this.element.offsetWidth,e?(this.element.style.height=`${e}px`,this.initialHeight=e):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(t,e){t.preventDefault(),t.stopPropagation(),this.isResizing=!0,this.activeHandle=e,iX(t)?(this.startX=t.touches[0].clientX,this.startY=t.touches[0].clientY):(this.startX=t.clientX,this.startY=t.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight),this.getPos(),this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(t,e){if(!this.activeHandle)return;const n=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:i}=this.calculateNewDimensions(this.activeHandle,t,e),s=this.applyConstraints(r,i,n);this.element.style.width=`${s.width}px`,this.element.style.height=`${s.height}px`,this.onResize&&this.onResize(s.width,s.height)}calculateNewDimensions(t,e,n){let r=this.startWidth,i=this.startHeight;const s=t.includes("right"),o=t.includes("left"),a=t.includes("bottom"),l=t.includes("top");return s?r=this.startWidth+e:o&&(r=this.startWidth-e),a?i=this.startHeight+n:l&&(i=this.startHeight-n),(t==="right"||t==="left")&&(r=this.startWidth+(s?e:-e)),(t==="top"||t==="bottom")&&(i=this.startHeight+(a?n:-n)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(r,i,t):{width:r,height:i}}applyConstraints(t,e,n){var r,i,s,o;if(!n){let c=Math.max(this.minSize.width,t),u=Math.max(this.minSize.height,e);return(r=this.maxSize)!=null&&r.width&&(c=Math.min(this.maxSize.width,c)),(i=this.maxSize)!=null&&i.height&&(u=Math.min(this.maxSize.height,u)),{width:c,height:u}}let a=t,l=e;return a<this.minSize.width&&(a=this.minSize.width,l=a/this.aspectRatio),l<this.minSize.height&&(l=this.minSize.height,a=l*this.aspectRatio),(s=this.maxSize)!=null&&s.width&&a>this.maxSize.width&&(a=this.maxSize.width,l=a/this.aspectRatio),(o=this.maxSize)!=null&&o.height&&l>this.maxSize.height&&(l=this.maxSize.height,a=l*this.aspectRatio),{width:a,height:l}}applyAspectRatio(t,e,n){return n==="left"||n==="right"?{width:t,height:t/this.aspectRatio}:n==="top"||n==="bottom"?{width:e*this.aspectRatio,height:e}:{width:t,height:t/this.aspectRatio}}};function oX(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof pe){const s=r.index();return r.parent.canReplaceWith(s,s+1,e)}let i=r.depth;for(;i>=0;){const s=r.index(i);if(r.node(i).contentMatchAt(s).matchType(e))return!0;i-=1}return!1}var aX={};KE(aX,{createAtomBlockMarkdownSpec:()=>lX,createBlockMarkdownSpec:()=>cX,createInlineMarkdownSpec:()=>dX,parseAttributes:()=>av,parseIndentedBlocks:()=>Sy,renderNestedMarkdownContent:()=>cv,serializeAttributes:()=>lv});function av(t){if(!(t!=null&&t.trim()))return{};const e={},n=[],r=t.replace(/["']([^"']*)["']/g,l=>(n.push(l),`__QUOTED_${n.length-1}__`)),i=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(i){const l=i.map(c=>c.trim().slice(1));e.class=l.join(" ")}const s=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);s&&(e.id=s[1]);const o=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(o)).forEach(([,l,c])=>{var u;const h=parseInt(((u=c.match(/__QUOTED_(\d+)__/))==null?void 0:u[1])||"0",10),d=n[h];d&&(e[l]=d.slice(1,-1))});const a=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return a&&a.split(/\s+/).filter(Boolean).forEach(l=>{l.match(/^[a-zA-Z][\w-]*$/)&&(e[l]=!0)}),e}function lv(t){if(!t||Object.keys(t).length===0)return"";const e=[];return t.class&&String(t.class).split(/\s+/).filter(Boolean).forEach(n=>e.push(`.${n}`)),t.id&&e.push(`#${t.id}`),Object.entries(t).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?e.push(n):r!==!1&&r!=null&&e.push(`${n}="${String(r)}"`))}),e.join(" ")}function lX(t){const{nodeName:e,name:n,parseAttributes:r=av,serializeAttributes:i=lv,defaultAttributes:s={},requiredAttributes:o=[],allowedAttributes:a}=t,l=n||e,c=u=>{if(!a)return u;const h={};return a.forEach(d=>{d in u&&(h[d]=u[d])}),h};return{parseMarkdown:(u,h)=>{const d={...s,...u.attributes};return h.createNode(e,d,[])},markdownTokenizer:{name:e,level:"block",start(u){var h;const d=new RegExp(`^:::${l}(?:\\s|$)`,"m"),p=(h=u.match(d))==null?void 0:h.index;return p!==void 0?p:-1},tokenize(u,h,d){const p=new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),f=u.match(p);if(!f)return;const m=f[1]||"",g=r(m);if(!o.find(y=>!(y in g)))return{type:e,raw:f[0],attributes:g}}},renderMarkdown:u=>{const h=c(u.attrs||{}),d=i(h),p=d?` {${d}}`:"";return`:::${l}${p} :::`}}}function cX(t){const{nodeName:e,name:n,getContent:r,parseAttributes:i=av,serializeAttributes:s=lv,defaultAttributes:o={},content:a="block",allowedAttributes:l}=t,c=n||e,u=h=>{if(!l)return h;const d={};return l.forEach(p=>{p in h&&(d[p]=h[p])}),d};return{parseMarkdown:(h,d)=>{let p;if(r){const m=r(h);p=typeof m=="string"?[{type:"text",text:m}]:m}else a==="block"?p=d.parseChildren(h.tokens||[]):p=d.parseInline(h.tokens||[]);const f={...o,...h.attributes};return d.createNode(e,f,p)},markdownTokenizer:{name:e,level:"block",start(h){var d;const p=new RegExp(`^:::${c}`,"m"),f=(d=h.match(p))==null?void 0:d.index;return f!==void 0?f:-1},tokenize(h,d,p){var f;const m=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),g=h.match(m);if(!g)return;const[y,b=""]=g,T=i(b);let S=1;const w=y.length;let A="";const C=/^:::([\w-]*)(\s.*)?/gm,N=h.slice(w);for(C.lastIndex=0;;){const $=C.exec(N);if($===null)break;const I=$.index,L=$[1];if(!((f=$[2])!=null&&f.endsWith(":::"))){if(L)S+=1;else if(S-=1,S===0){const Z=N.slice(0,I);A=Z.trim();const B=h.slice(0,w+I+$[0].length);let j=[];if(A)if(a==="block")for(j=p.blockTokens(Z),j.forEach(U=>{U.text&&(!U.tokens||U.tokens.length===0)&&(U.tokens=p.inlineTokens(U.text))});j.length>0;){const U=j[j.length-1];if(U.type==="paragraph"&&(!U.text||U.text.trim()===""))j.pop();else break}else j=p.inlineTokens(A);return{type:e,raw:B,attributes:T,content:A,tokens:j}}}}}},renderMarkdown:(h,d)=>{const p=u(h.attrs||{}),f=s(p),m=f?` {${f}}`:"",g=d.renderChildren(h.content||[],`
`);return`:::${c}${m}
${g}
:::`}}}function uX(t){if(!t.trim())return{};const e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(t);for(;r!==null;){const[,i,s,o]=r;e[i]=s||o,r=n.exec(t)}return e}function hX(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>`${e}="${n}"`).join(" ")}function dX(t){const{nodeName:e,name:n,getContent:r,parseAttributes:i=uX,serializeAttributes:s=hX,defaultAttributes:o={},selfClosing:a=!1,allowedAttributes:l}=t,c=n||e,u=d=>{if(!l)return d;const p={};return l.forEach(f=>{f in d&&(p[f]=d[f])}),p},h=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(d,p)=>{const f={...o,...d.attributes};if(a)return p.createNode(e,f);const m=r?r(d):d.content||"";return m?p.createNode(e,f,[p.createTextNode(m)]):p.createNode(e,f,[])},markdownTokenizer:{name:e,level:"inline",start(d){const p=a?new RegExp(`\\[${h}\\s*[^\\]]*\\]`):new RegExp(`\\[${h}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${h}\\]`),f=d.match(p),m=f==null?void 0:f.index;return m!==void 0?m:-1},tokenize(d,p,f){const m=a?new RegExp(`^\\[${h}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${h}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${h}\\]`),g=d.match(m);if(!g)return;let y="",b="";if(a){const[,S]=g;b=S}else{const[,S,w]=g;b=S,y=w||""}const T=i(b.trim());return{type:e,raw:g[0],content:y.trim(),attributes:T}}},renderMarkdown:d=>{let p="";r?p=r(d):d.content&&d.content.length>0&&(p=d.content.filter(y=>y.type==="text").map(y=>y.text).join(""));const f=u(d.attrs||{}),m=s(f),g=m?` ${m}`:"";return a?`[${c}${g}]`:`[${c}${g}]${p}[/${c}]`}}}function Sy(t,e,n){var r,i,s,o;const a=t.split(`
`),l=[];let c="",u=0;const h=e.baseIndentSize||2;for(;u<a.length;){const d=a[u],p=d.match(e.itemPattern);if(!p){if(l.length>0)break;if(d.trim()===""){u+=1,c=`${c}${d}
`;continue}else return}const f=e.extractItemData(p),{indentLevel:m,mainContent:g}=f;c=`${c}${d}
`;const y=[g];for(u+=1;u<a.length;){const w=a[u];if(w.trim()===""){const A=a.slice(u+1).findIndex(C=>C.trim()!=="");if(A===-1)break;if((((i=(r=a[u+1+A].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:i.length)||0)>m){y.push(w),c=`${c}${w}
`,u+=1;continue}else break}if((((o=(s=w.match(/^(\s*)/))==null?void 0:s[1])==null?void 0:o.length)||0)>m)y.push(w),c=`${c}${w}
`,u+=1;else break}let b;const T=y.slice(1);if(T.length>0){const w=T.map(A=>A.slice(m+h)).join(`
`);w.trim()&&(e.customNestedParser?b=e.customNestedParser(w):b=n.blockTokens(w))}const S=e.createToken(f,b);l.push(S)}if(l.length!==0)return{items:l,raw:c}}function cv(t,e,n,r){if(!t||!Array.isArray(t.content))return"";const i=typeof n=="function"?n(r):n,[s,...o]=t.content,a=e.renderChildren([s]),l=[`${i}${a}`];return o&&o.length>0&&o.forEach(c=>{const u=e.renderChildren([c]);if(u){const h=u.split(`
`).map(d=>d?e.indent(d):"").join(`
`);l.push(h)}}),l.join(`
`)}function pX(t,e,n={}){const{state:r}=e,{doc:i,tr:s}=r,o=t;i.descendants((a,l)=>{const c=s.mapping.map(l),u=s.mapping.map(l)+a.nodeSize;let h=null;if(a.marks.forEach(p=>{if(p!==o)return!1;h=p}),!h)return;let d=!1;if(Object.keys(n).forEach(p=>{n[p]!==h.attrs[p]&&(d=!0)}),d){const p=t.type.create({...t.attrs,...n});s.removeMark(c,u,t.type),s.addMark(c,u,p)}}),s.docChanged&&e.view.dispatch(s)}var xt=class pR extends ov{constructor(){super(...arguments),this.type="node"}static create(e={}){const n=typeof e=="function"?e():e;return new pR(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function Hs(t){return new ZH({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:i})=>{const s=qe(t.getAttributes,void 0,r,i);if(s===!1||s===null)return null;const{tr:o}=e,a=r[r.length-1],l=r[0];let c=n.to;if(a){const u=l.search(/\S/),h=n.from+l.indexOf(a),d=h+a.length;if(sv(n.from,n.to,e.doc).filter(p=>p.mark.type.excluded.find(f=>f===t.type&&f!==p.mark.type)).filter(p=>p.to>h).length)return null;d<n.to&&o.delete(d,n.to),h>n.from&&o.delete(n.from+u,h),c=n.from+u+a.length,o.addMark(n.from+u,c,t.type.create(s||{})),o.removeStoredMark(t.type)}}})}var pk,fk;function fX(){return fk||(fk=1,pk=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,s;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(i of e.entries())if(!n.has(i[0]))return!1;for(i of e.entries())if(!t(i[1],n.get(i[0])))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(i of e.entries())if(!n.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(e[i]!==n[i])return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;i--!==0;){var o=s[i];if(!(o==="_owner"&&e.$$typeof)&&!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n}),pk}var mX=fX();const gX=$f(mX);var mk={exports:{}},Ag={},gk;function OX(){if(gk)return Ag;gk=1;var t=Ne,e=sP();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,i=e.useSyncExternalStore,s=t.useRef,o=t.useEffect,a=t.useMemo,l=t.useDebugValue;return Ag.useSyncExternalStoreWithSelector=function(c,u,h,d,p){var f=s(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=a(function(){function y(A){if(!b){if(b=!0,T=A,A=d(A),p!==void 0&&m.hasValue){var C=m.value;if(p(C,A))return S=C}return S=A}if(C=S,r(T,A))return C;var N=d(A);return p!==void 0&&p(C,N)?(T=A,C):(T=A,S=N)}var b=!1,T,S,w=h===void 0?null:h;return[function(){return y(u())},w===null?void 0:function(){return y(w())}]},[u,h,d,p]);var g=i(c,f[0],f[1]);return o(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},Ag}var Ok;function yX(){return Ok||(Ok=1,mk.exports=OX()),mk.exports}var bX=yX(),EX=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},vX=({contentComponent:t})=>{const e=oP.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return E.jsx(E.Fragment,{children:Object.values(e)})};function TX(){const t=new Set;let e={};return{subscribe(n){return t.add(n),()=>{t.delete(n)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(n,r){e={...e,[n]:iA.createPortal(r.reactElement,r.element,n)},t.forEach(i=>i())},removeRenderer(n){const r={...e};delete r[n],e=r,t.forEach(i=>i())}}}var SX=class extends Ne.Component{constructor(t){var e;super(t),this.editorContentRef=Ne.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((e=t.editor)!=null&&e.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const t=this.props.editor;if(t&&!t.isDestroyed&&t.options.element){if(t.contentComponent)return;const e=this.editorContentRef.current;e.append(t.view.dom),t.setOptions({element:e}),t.contentComponent=TX(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(n=>n.hasContentComponentInitialized?n:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var t;const e=this.props.editor;if(e){this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null;try{if(!((t=e.view.dom)!=null&&t.firstChild))return;const n=document.createElement("div");n.append(e.view.dom),e.setOptions({element:n})}catch{}}}render(){const{editor:t,innerRef:e,...n}=this.props;return E.jsxs(E.Fragment,{children:[E.jsx("div",{ref:EX(e,this.editorContentRef),...n}),(t==null?void 0:t.contentComponent)&&E.jsx(vX,{contentComponent:t.contentComponent})]})}},wX=v.forwardRef((t,e)=>{const n=Ne.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return Ne.createElement(SX,{key:n,innerRef:e,...t})}),kX=Ne.memo(wX),_X=typeof window<"u"?v.useLayoutEffect:v.useEffect,xX=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){const e=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",e),()=>{n.off("transaction",e)}}}};function Ue(t){var e;const[n]=v.useState(()=>new xX(t.editor)),r=bX.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!=null?e:gX);return _X(()=>n.watch(t.editor),[t.editor,n]),v.useDebugValue(r),r}var CX=!1,wy=typeof window>"u",DX=wy||!!(typeof window<"u"&&window.next),AX=class fR{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){return this.options.current.immediatelyRender===void 0?wy||DX?null:this.createEditor():(this.options.current.immediatelyRender,this.options.current.immediatelyRender?this.createEditor():null)}createEditor(){const e={...this.options.current,onBeforeCreate:(...n)=>{var r,i;return(i=(r=this.options.current).onBeforeCreate)==null?void 0:i.call(r,...n)},onBlur:(...n)=>{var r,i;return(i=(r=this.options.current).onBlur)==null?void 0:i.call(r,...n)},onCreate:(...n)=>{var r,i;return(i=(r=this.options.current).onCreate)==null?void 0:i.call(r,...n)},onDestroy:(...n)=>{var r,i;return(i=(r=this.options.current).onDestroy)==null?void 0:i.call(r,...n)},onFocus:(...n)=>{var r,i;return(i=(r=this.options.current).onFocus)==null?void 0:i.call(r,...n)},onSelectionUpdate:(...n)=>{var r,i;return(i=(r=this.options.current).onSelectionUpdate)==null?void 0:i.call(r,...n)},onTransaction:(...n)=>{var r,i;return(i=(r=this.options.current).onTransaction)==null?void 0:i.call(r,...n)},onUpdate:(...n)=>{var r,i;return(i=(r=this.options.current).onUpdate)==null?void 0:i.call(r,...n)},onContentError:(...n)=>{var r,i;return(i=(r=this.options.current).onContentError)==null?void 0:i.call(r,...n)},onDrop:(...n)=>{var r,i;return(i=(r=this.options.current).onDrop)==null?void 0:i.call(r,...n)},onPaste:(...n)=>{var r,i;return(i=(r=this.options.current).onPaste)==null?void 0:i.call(r,...n)},onDelete:(...n)=>{var r,i;return(i=(r=this.options.current).onDelete)==null?void 0:i.call(r,...n)}};return new rX(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((i,s)=>{var o;return i===((o=n.extensions)==null?void 0:o[s])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?fR.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((n,r)=>n===e[r]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function PX(t={},e=[]){const n=v.useRef(t);n.current=t;const[r]=v.useState(()=>new AX(n)),i=oP.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return v.useDebugValue(i),v.useEffect(r.onRender(e)),Ue({editor:i,selector:({transactionNumber:s})=>t.shouldRerenderOnTransaction===!1||t.shouldRerenderOnTransaction===void 0?null:t.immediatelyRender&&s===0?0:s+1}),i}var NX=v.createContext({editor:null});NX.Consumer;var RX=v.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),MX=()=>v.useContext(RX);Ne.forwardRef((t,e)=>{const{onDragStart:n}=MX(),r=t.as||"div";return E.jsx(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});Ne.createContext({markViewContentRef:()=>{}});const Vi=Ne.forwardRef(({className:t,children:e,type:n="button",variant:r="primary",iconOnly:i,slotBefore:s,slotAfter:o,...a},l)=>{const c=bn("rte-button",`rte-button--${r}`,i&&"rte-button--icon-only",t);return E.jsxs("button",{ref:l,type:n,className:c,...a,children:[!i&&s,e&&(i||!o&&!s?e:E.jsx("span",{className:"rte-button__text",children:e})),!i&&o]})});Vi.displayName="Button";function mR(t){const e=t+"CollectionProvider",[n,r]=Ys(e),[i,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:g,children:y}=m,b=Ne.useRef(null),T=Ne.useRef(new Map).current;return E.jsx(i,{scope:g,itemMap:T,collectionRef:b,children:y})};o.displayName=e;const a=t+"CollectionSlot",l=Ba(a),c=Ne.forwardRef((m,g)=>{const{scope:y,children:b}=m,T=s(a,y),S=_t(g,T.collectionRef);return E.jsx(l,{ref:S,children:b})});c.displayName=a;const u=t+"CollectionItemSlot",h="data-radix-collection-item",d=Ba(u),p=Ne.forwardRef((m,g)=>{const{scope:y,children:b,...T}=m,S=Ne.useRef(null),w=_t(g,S),A=s(u,y);return Ne.useEffect(()=>(A.itemMap.set(S,{ref:S,...T}),()=>void A.itemMap.delete(S))),E.jsx(d,{[h]:"",ref:w,children:b})});p.displayName=u;function f(m){const g=s(t+"CollectionConsumer",m);return Ne.useCallback(()=>{const y=g.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${h}]`));return Array.from(g.itemMap.values()).sort((T,S)=>b.indexOf(T.ref.current)-b.indexOf(S.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:o,Slot:c,ItemSlot:p},f,r]}var IX=v.createContext(void 0);function gR(t){const e=v.useContext(IX);return t||e||"ltr"}var Pg="rovingFocusGroup.onEntryFocus",LX={bubbles:!1,cancelable:!0},Bu="RovingFocusGroup",[ky,OR,QX]=mR(Bu),[$X,yR]=Ys(Bu,[QX]),[FX,BX]=$X(Bu),bR=v.forwardRef((t,e)=>E.jsx(ky.Provider,{scope:t.__scopeRovingFocusGroup,children:E.jsx(ky.Slot,{scope:t.__scopeRovingFocusGroup,children:E.jsx(jX,{...t,ref:e})})}));bR.displayName=Bu;var jX=v.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...h}=t,d=v.useRef(null),p=_t(e,d),f=gR(s),[m,g]=Iu({prop:o,defaultProp:a??null,onChange:l,caller:Bu}),[y,b]=v.useState(!1),T=Wi(c),S=OR(n),w=v.useRef(!1),[A,C]=v.useState(0);return v.useEffect(()=>{const N=d.current;if(N)return N.addEventListener(Pg,T),()=>N.removeEventListener(Pg,T)},[T]),E.jsx(FX,{scope:n,orientation:r,dir:f,loop:i,currentTabStopId:m,onItemFocus:v.useCallback(N=>g(N),[g]),onItemShiftTab:v.useCallback(()=>b(!0),[]),onFocusableItemAdd:v.useCallback(()=>C(N=>N+1),[]),onFocusableItemRemove:v.useCallback(()=>C(N=>N-1),[]),children:E.jsx(pt.div,{tabIndex:y||A===0?-1:0,"data-orientation":r,...h,ref:p,style:{outline:"none",...t.style},onMouseDown:ve(t.onMouseDown,()=>{w.current=!0}),onFocus:ve(t.onFocus,N=>{const $=!w.current;if(N.target===N.currentTarget&&$&&!y){const I=new CustomEvent(Pg,LX);if(N.currentTarget.dispatchEvent(I),!I.defaultPrevented){const L=S().filter(U=>U.focusable),Z=L.find(U=>U.active),B=L.find(U=>U.id===m),j=[Z,B,...L].filter(Boolean).map(U=>U.ref.current);TR(j,u)}}w.current=!1}),onBlur:ve(t.onBlur,()=>b(!1))})})}),ER="RovingFocusGroupItem",vR=v.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,children:o,...a}=t,l=Is(),c=s||l,u=BX(ER,n),h=u.currentTabStopId===c,d=OR(n),{onFocusableItemAdd:p,onFocusableItemRemove:f,currentTabStopId:m}=u;return v.useEffect(()=>{if(r)return p(),()=>f()},[r,p,f]),E.jsx(ky.ItemSlot,{scope:n,id:c,focusable:r,active:i,children:E.jsx(pt.span,{tabIndex:h?0:-1,"data-orientation":u.orientation,...a,ref:e,onMouseDown:ve(t.onMouseDown,g=>{r?u.onItemFocus(c):g.preventDefault()}),onFocus:ve(t.onFocus,()=>u.onItemFocus(c)),onKeyDown:ve(t.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const y=UX(g,u.orientation,u.dir);if(y!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let b=d().filter(T=>T.focusable).map(T=>T.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const T=b.indexOf(g.currentTarget);b=u.loop?HX(b,T+1):b.slice(T+1)}setTimeout(()=>TR(b))}}),children:typeof o=="function"?o({isCurrentTabStop:h,hasTabStop:m!=null}):o})})});vR.displayName=ER;var zX={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function VX(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function UX(t,e,n){const r=VX(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return zX[r]}function TR(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function HX(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var XX=bR,qX=vR,_y=["Enter"," "],ZX=["ArrowDown","PageUp","Home"],SR=["ArrowUp","PageDown","End"],WX=[...ZX,...SR],GX={ltr:[..._y,"ArrowRight"],rtl:[..._y,"ArrowLeft"]},YX={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ju="Menu",[nu,KX,JX]=mR(ju),[Ko,wR]=Ys(ju,[JX,ml,yR]),Jf=ml(),kR=yR(),[e4,Ol]=Ko(ju),[t4,zu]=Ko(ju),_R=t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:i,onOpenChange:s,modal:o=!0}=t,a=Jf(e),[l,c]=v.useState(null),u=v.useRef(!1),h=Wi(s),d=gR(i);return v.useEffect(()=>{const p=()=>{u.current=!0,document.addEventListener("pointerdown",f,{capture:!0,once:!0}),document.addEventListener("pointermove",f,{capture:!0,once:!0})},f=()=>u.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",f,{capture:!0}),document.removeEventListener("pointermove",f,{capture:!0})}},[]),E.jsx(CE,{...a,children:E.jsx(e4,{scope:e,open:n,onOpenChange:h,content:l,onContentChange:c,children:E.jsx(t4,{scope:e,onClose:v.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:u,dir:d,modal:o,children:r})})})};_R.displayName=ju;var n4="MenuAnchor",uv=v.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,i=Jf(n);return E.jsx(Rf,{...i,...r,ref:e})});uv.displayName=n4;var r4="MenuPortal",[iye,xR]=Ko(r4,{forceMount:void 0}),pr="MenuContent",[i4,hv]=Ko(pr),CR=v.forwardRef((t,e)=>{const n=xR(pr,t.__scopeMenu),{forceMount:r=n.forceMount,...i}=t,s=Ol(pr,t.__scopeMenu),o=zu(pr,t.__scopeMenu);return E.jsx(nu.Provider,{scope:t.__scopeMenu,children:E.jsx(fi,{present:r||s.open,children:E.jsx(nu.Slot,{scope:t.__scopeMenu,children:o.modal?E.jsx(s4,{...i,ref:e}):E.jsx(o4,{...i,ref:e})})})})}),s4=v.forwardRef((t,e)=>{const n=Ol(pr,t.__scopeMenu),r=v.useRef(null),i=_t(e,r);return v.useEffect(()=>{const s=r.current;if(s)return NE(s)},[]),E.jsx(dv,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ve(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),o4=v.forwardRef((t,e)=>{const n=Ol(pr,t.__scopeMenu);return E.jsx(dv,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),a4=Ba("MenuContent.ScrollLock"),dv=v.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:d,onDismiss:p,disableOutsideScroll:f,...m}=t,g=Ol(pr,n),y=zu(pr,n),b=Jf(n),T=kR(n),S=KX(n),[w,A]=v.useState(null),C=v.useRef(null),N=_t(e,C,g.onContentChange),$=v.useRef(0),I=v.useRef(""),L=v.useRef(0),Z=v.useRef(null),B=v.useRef("right"),j=v.useRef(0),U=f?If:v.Fragment,J=f?{as:a4,allowPinchZoom:!0}:void 0,fe=ne=>{var Ge,Qr;const Oe=I.current+ne,He=S().filter(mt=>!mt.disabled),it=document.activeElement,Le=(Ge=He.find(mt=>mt.ref.current===it))==null?void 0:Ge.textValue,Xe=He.map(mt=>mt.textValue),vt=b4(Xe,Oe,Le),An=(Qr=He.find(mt=>mt.textValue===vt))==null?void 0:Qr.ref.current;(function mt(Jn){I.current=Jn,window.clearTimeout($.current),Jn!==""&&($.current=window.setTimeout(()=>mt(""),1e3))})(Oe),An&&setTimeout(()=>An.focus())};v.useEffect(()=>()=>window.clearTimeout($.current),[]),yE();const z=v.useCallback(ne=>{var Oe,He;return B.current===((Oe=Z.current)==null?void 0:Oe.side)&&v4(ne,(He=Z.current)==null?void 0:He.area)},[]);return E.jsx(i4,{scope:n,searchRef:I,onItemEnter:v.useCallback(ne=>{z(ne)&&ne.preventDefault()},[z]),onItemLeave:v.useCallback(ne=>{var Oe;z(ne)||((Oe=C.current)==null||Oe.focus(),A(null))},[z]),onTriggerLeave:v.useCallback(ne=>{z(ne)&&ne.preventDefault()},[z]),pointerGraceTimerRef:L,onPointerGraceIntentChange:v.useCallback(ne=>{Z.current=ne},[]),children:E.jsx(U,{...J,children:E.jsx(Cf,{asChild:!0,trapped:i,onMountAutoFocus:ve(s,ne=>{var Oe;ne.preventDefault(),(Oe=C.current)==null||Oe.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:E.jsx(Ru,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:d,onDismiss:p,children:E.jsx(XX,{asChild:!0,...T,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:w,onCurrentTabStopIdChange:A,onEntryFocus:ve(l,ne=>{y.isUsingKeyboardRef.current||ne.preventDefault()}),preventScrollOnEntryFocus:!0,children:E.jsx(DE,{role:"menu","aria-orientation":"vertical","data-state":UR(g.open),"data-radix-menu-content":"",dir:y.dir,...b,...m,ref:N,style:{outline:"none",...m.style},onKeyDown:ve(m.onKeyDown,ne=>{const Oe=ne.target.closest("[data-radix-menu-content]")===ne.currentTarget,He=ne.ctrlKey||ne.altKey||ne.metaKey,it=ne.key.length===1;Oe&&(ne.key==="Tab"&&ne.preventDefault(),!He&&it&&fe(ne.key));const Le=C.current;if(ne.target!==Le||!WX.includes(ne.key))return;ne.preventDefault();const Xe=S().filter(vt=>!vt.disabled).map(vt=>vt.ref.current);SR.includes(ne.key)&&Xe.reverse(),O4(Xe)}),onBlur:ve(t.onBlur,ne=>{ne.currentTarget.contains(ne.target)||(window.clearTimeout($.current),I.current="")}),onPointerMove:ve(t.onPointerMove,ru(ne=>{const Oe=ne.target,He=j.current!==ne.clientX;if(ne.currentTarget.contains(Oe)&&He){const it=ne.clientX>j.current?"right":"left";B.current=it,j.current=ne.clientX}}))})})})})})})});CR.displayName=pr;var l4="MenuGroup",pv=v.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return E.jsx(pt.div,{role:"group",...r,ref:e})});pv.displayName=l4;var c4="MenuLabel",DR=v.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return E.jsx(pt.div,{...r,ref:e})});DR.displayName=c4;var hp="MenuItem",yk="menu.itemSelect",em=v.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...i}=t,s=v.useRef(null),o=zu(hp,t.__scopeMenu),a=hv(hp,t.__scopeMenu),l=_t(e,s),c=v.useRef(!1),u=()=>{const h=s.current;if(!n&&h){const d=new CustomEvent(yk,{bubbles:!0,cancelable:!0});h.addEventListener(yk,p=>r==null?void 0:r(p),{once:!0}),lA(h,d),d.defaultPrevented?c.current=!1:o.onClose()}};return E.jsx(AR,{...i,ref:l,disabled:n,onClick:ve(t.onClick,u),onPointerDown:h=>{var d;(d=t.onPointerDown)==null||d.call(t,h),c.current=!0},onPointerUp:ve(t.onPointerUp,h=>{var d;c.current||((d=h.currentTarget)==null||d.click())}),onKeyDown:ve(t.onKeyDown,h=>{const d=a.searchRef.current!=="";n||d&&h.key===" "||_y.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});em.displayName=hp;var AR=v.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...s}=t,o=hv(hp,n),a=kR(n),l=v.useRef(null),c=_t(e,l),[u,h]=v.useState(!1),[d,p]=v.useState("");return v.useEffect(()=>{const f=l.current;f&&p((f.textContent??"").trim())},[s.children]),E.jsx(nu.ItemSlot,{scope:n,disabled:r,textValue:i??d,children:E.jsx(qX,{asChild:!0,...a,focusable:!r,children:E.jsx(pt.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:c,onPointerMove:ve(t.onPointerMove,ru(f=>{r?o.onItemLeave(f):(o.onItemEnter(f),f.defaultPrevented||f.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ve(t.onPointerLeave,ru(f=>o.onItemLeave(f))),onFocus:ve(t.onFocus,()=>h(!0)),onBlur:ve(t.onBlur,()=>h(!1))})})})}),u4="MenuCheckboxItem",PR=v.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:r,...i}=t;return E.jsx(LR,{scope:t.__scopeMenu,checked:n,children:E.jsx(em,{role:"menuitemcheckbox","aria-checked":dp(n)?"mixed":n,...i,ref:e,"data-state":mv(n),onSelect:ve(i.onSelect,()=>r==null?void 0:r(dp(n)?!0:!n),{checkForDefaultPrevented:!1})})})});PR.displayName=u4;var NR="MenuRadioGroup",[h4,d4]=Ko(NR,{value:void 0,onValueChange:()=>{}}),RR=v.forwardRef((t,e)=>{const{value:n,onValueChange:r,...i}=t,s=Wi(r);return E.jsx(h4,{scope:t.__scopeMenu,value:n,onValueChange:s,children:E.jsx(pv,{...i,ref:e})})});RR.displayName=NR;var MR="MenuRadioItem",IR=v.forwardRef((t,e)=>{const{value:n,...r}=t,i=d4(MR,t.__scopeMenu),s=n===i.value;return E.jsx(LR,{scope:t.__scopeMenu,checked:s,children:E.jsx(em,{role:"menuitemradio","aria-checked":s,...r,ref:e,"data-state":mv(s),onSelect:ve(r.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,n)},{checkForDefaultPrevented:!1})})})});IR.displayName=MR;var fv="MenuItemIndicator",[LR,p4]=Ko(fv,{checked:!1}),QR=v.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:r,...i}=t,s=p4(fv,n);return E.jsx(fi,{present:r||dp(s.checked)||s.checked===!0,children:E.jsx(pt.span,{...i,ref:e,"data-state":mv(s.checked)})})});QR.displayName=fv;var f4="MenuSeparator",$R=v.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return E.jsx(pt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:e})});$R.displayName=f4;var m4="MenuArrow",FR=v.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,i=Jf(n);return E.jsx(AE,{...i,...r,ref:e})});FR.displayName=m4;var g4="MenuSub",[sye,BR]=Ko(g4),rc="MenuSubTrigger",jR=v.forwardRef((t,e)=>{const n=Ol(rc,t.__scopeMenu),r=zu(rc,t.__scopeMenu),i=BR(rc,t.__scopeMenu),s=hv(rc,t.__scopeMenu),o=v.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=s,c={__scopeMenu:t.__scopeMenu},u=v.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return v.useEffect(()=>u,[u]),v.useEffect(()=>{const h=a.current;return()=>{window.clearTimeout(h),l(null)}},[a,l]),E.jsx(uv,{asChild:!0,...c,children:E.jsx(AR,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":UR(n.open),...t,ref:xf(e,i.onTriggerChange),onClick:h=>{var d;(d=t.onClick)==null||d.call(t,h),!(t.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ve(t.onPointerMove,ru(h=>{s.onItemEnter(h),!h.defaultPrevented&&!t.disabled&&!n.open&&!o.current&&(s.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:ve(t.onPointerLeave,ru(h=>{var p,f;u();const d=(p=n.content)==null?void 0:p.getBoundingClientRect();if(d){const m=(f=n.content)==null?void 0:f.dataset.side,g=m==="right",y=g?-5:5,b=d[g?"left":"right"],T=d[g?"right":"left"];s.onPointerGraceIntentChange({area:[{x:h.clientX+y,y:h.clientY},{x:b,y:d.top},{x:T,y:d.top},{x:T,y:d.bottom},{x:b,y:d.bottom}],side:m}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(h),h.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:ve(t.onKeyDown,h=>{var p;const d=s.searchRef.current!=="";t.disabled||d&&h.key===" "||GX[r.dir].includes(h.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),h.preventDefault())})})})});jR.displayName=rc;var zR="MenuSubContent",VR=v.forwardRef((t,e)=>{const n=xR(pr,t.__scopeMenu),{forceMount:r=n.forceMount,...i}=t,s=Ol(pr,t.__scopeMenu),o=zu(pr,t.__scopeMenu),a=BR(zR,t.__scopeMenu),l=v.useRef(null),c=_t(e,l);return E.jsx(nu.Provider,{scope:t.__scopeMenu,children:E.jsx(fi,{present:r||s.open,children:E.jsx(nu.Slot,{scope:t.__scopeMenu,children:E.jsx(dv,{id:a.contentId,"aria-labelledby":a.triggerId,...i,ref:c,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var h;o.isUsingKeyboardRef.current&&((h=l.current)==null||h.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:ve(t.onFocusOutside,u=>{u.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:ve(t.onEscapeKeyDown,u=>{o.onClose(),u.preventDefault()}),onKeyDown:ve(t.onKeyDown,u=>{var p;const h=u.currentTarget.contains(u.target),d=YX[o.dir].includes(u.key);h&&d&&(s.onOpenChange(!1),(p=a.trigger)==null||p.focus(),u.preventDefault())})})})})})});VR.displayName=zR;function UR(t){return t?"open":"closed"}function dp(t){return t==="indeterminate"}function mv(t){return dp(t)?"indeterminate":t?"checked":"unchecked"}function O4(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function y4(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function b4(t,e,n){const r=e.length>1&&Array.from(e).every(a=>a===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let s=y4(t,Math.max(i,0));r.length===1&&(s=s.filter(a=>a!==n));const o=s.find(a=>a.toLowerCase().startsWith(r.toLowerCase()));return o!==n?o:void 0}function E4(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const a=e[s],l=e[o],c=a.x,u=a.y,h=l.x,d=l.y;u>r!=d>r&&n<(h-c)*(r-u)/(d-u)+c&&(i=!i)}return i}function v4(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return E4(n,e)}function ru(t){return e=>e.pointerType==="mouse"?t(e):void 0}var T4=_R,S4=uv,w4=CR,k4=pv,_4=DR,x4=em,C4=PR,D4=RR,A4=IR,P4=QR,N4=$R,R4=FR,M4=jR,I4=VR,tm="DropdownMenu",[L4]=Ys(tm,[wR]),$n=wR(),[Q4,HR]=L4(tm),XR=t=>{const{__scopeDropdownMenu:e,children:n,dir:r,open:i,defaultOpen:s,onOpenChange:o,modal:a=!0}=t,l=$n(e),c=v.useRef(null),[u,h]=Iu({prop:i,defaultProp:s??!1,onChange:o,caller:tm});return E.jsx(Q4,{scope:e,triggerId:Is(),triggerRef:c,contentId:Is(),open:u,onOpenChange:h,onOpenToggle:v.useCallback(()=>h(d=>!d),[h]),modal:a,children:E.jsx(T4,{...l,open:u,onOpenChange:h,dir:r,modal:a,children:n})})};XR.displayName=tm;var qR="DropdownMenuTrigger",ZR=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=t,s=HR(qR,n),o=$n(n);return E.jsx(S4,{asChild:!0,...o,children:E.jsx(pt.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:xf(e,s.triggerRef),onPointerDown:ve(t.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:ve(t.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});ZR.displayName=qR;var WR="DropdownMenuContent",GR=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=HR(WR,n),s=$n(n),o=v.useRef(!1);return E.jsx(w4,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...r,ref:e,onCloseAutoFocus:ve(t.onCloseAutoFocus,a=>{var l;o.current||((l=i.triggerRef.current)==null||l.focus()),o.current=!1,a.preventDefault()}),onInteractOutside:ve(t.onInteractOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;(!i.modal||u)&&(o.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});GR.displayName=WR;var $4="DropdownMenuGroup",F4=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=$n(n);return E.jsx(k4,{...i,...r,ref:e})});F4.displayName=$4;var B4="DropdownMenuLabel",j4=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=$n(n);return E.jsx(_4,{...i,...r,ref:e})});j4.displayName=B4;var z4="DropdownMenuItem",YR=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=$n(n);return E.jsx(x4,{...i,...r,ref:e})});YR.displayName=z4;var V4="DropdownMenuCheckboxItem",KR=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=$n(n);return E.jsx(C4,{...i,...r,ref:e})});KR.displayName=V4;var U4="DropdownMenuRadioGroup",H4=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=$n(n);return E.jsx(D4,{...i,...r,ref:e})});H4.displayName=U4;var X4="DropdownMenuRadioItem",q4=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=$n(n);return E.jsx(A4,{...i,...r,ref:e})});q4.displayName=X4;var Z4="DropdownMenuItemIndicator",JR=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=$n(n);return E.jsx(P4,{...i,...r,ref:e})});JR.displayName=Z4;var W4="DropdownMenuSeparator",eM=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=$n(n);return E.jsx(N4,{...i,...r,ref:e})});eM.displayName=W4;var G4="DropdownMenuArrow",Y4=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=$n(n);return E.jsx(R4,{...i,...r,ref:e})});Y4.displayName=G4;var K4="DropdownMenuSubTrigger",J4=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=$n(n);return E.jsx(M4,{...i,...r,ref:e})});J4.displayName=K4;var e8="DropdownMenuSubContent",t8=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=$n(n);return E.jsx(I4,{...i,...r,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});t8.displayName=e8;var n8=XR,r8=ZR,tM=GR,nM=YR,rM=KR,i8=JR,iM=eM;const s8=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o8=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase()),bk=t=>{const e=o8(t);return e.charAt(0).toUpperCase()+e.slice(1)},sM=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim(),a8=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var l8={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const c8=v.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>v.createElement("svg",{ref:l,...l8,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:sM("lucide",i),...!s&&!a8(a)&&{"aria-hidden":"true"},...a},[...o.map(([c,u])=>v.createElement(c,u)),...Array.isArray(s)?s:[s]])),Se=(t,e)=>{const n=v.forwardRef(({className:r,...i},s)=>v.createElement(c8,{ref:s,iconNode:e,className:sM(`lucide-${s8(bk(t))}`,`lucide-${t}`,r),...i}));return n.displayName=bk(t),n},u8=[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],h8=Se("ban",u8),d8=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],p8=Se("bold",d8),f8=[["rect",{width:"18",height:"14",x:"3",y:"5",rx:"2",ry:"2",key:"12ruh7"}],["path",{d:"M7 15h4M15 15h2M7 11h2M13 11h4",key:"1ueiar"}]],m8=Se("captions",f8),g8=[["path",{d:"m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16",key:"d5nyq2"}],["path",{d:"M22 9v7",key:"pvm9v3"}],["path",{d:"M3.304 13h6.392",key:"1q3zxz"}],["circle",{cx:"18.5",cy:"12.5",r:"3.5",key:"z97x68"}]],O8=Se("case-sensitive",g8),y8=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],oM=Se("check",y8),b8=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],E8=Se("chevron-down",b8),v8=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],aM=Se("clipboard",v8),T8=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Ek=Se("code",T8),S8=[["path",{d:"M14 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1",key:"1l7d7l"}],["path",{d:"M19 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1",key:"9955pe"}],["path",{d:"m7 15 3 3",key:"4hkfgk"}],["path",{d:"m7 21 3-3H5a2 2 0 0 1-2-2v-2",key:"1xljwe"}],["rect",{x:"14",y:"14",width:"7",height:"7",rx:"1",key:"1cdgtw"}],["rect",{x:"3",y:"3",width:"7",height:"7",rx:"1",key:"zi3rio"}]],w8=Se("combine",S8),k8=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],_8=Se("download",k8),x8=[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]],C8=Se("eraser",x8),D8=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],A8=Se("external-link",D8),P8=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],N8=Se("file-code",P8),R8=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],M8=Se("file-text",R8),I8=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],L8=Se("image",I8),Q8=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],$8=Se("italic",Q8),F8=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],B8=Se("link",F8),j8=[["path",{d:"M21 5H11",key:"us1j55"}],["path",{d:"M21 12H11",key:"wd7e0v"}],["path",{d:"M21 19H11",key:"saa85w"}],["path",{d:"m7 8-4 4 4 4",key:"o5hrat"}]],z8=Se("list-indent-decrease",j8),V8=[["path",{d:"M21 5H11",key:"us1j55"}],["path",{d:"M21 12H11",key:"wd7e0v"}],["path",{d:"M21 19H11",key:"saa85w"}],["path",{d:"m3 8 4 4-4 4",key:"1a3j6y"}]],U8=Se("list-indent-increase",V8),H8=[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]],X8=Se("list-ordered",H8),q8=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],Z8=Se("list-todo",q8),W8=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],G8=Se("list",W8),Y8=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],K8=Se("maximize",Y8),J8=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]],eq=Se("minimize",J8),tq=[["path",{d:"M5 12h14",key:"1ays0h"}]],nq=Se("minus",tq),rq=[["path",{d:"m18 8 4 4-4 4",key:"1ak13k"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}]],iq=Se("move-horizontal",rq),sq=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],vk=Se("palette",sq),oq=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],aq=Se("plus",oq),lq=[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]],cq=Se("redo",lq),uq=[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]],hq=Se("ruler",uq),dq=[["path",{d:"m16 16-4 4-4-4",key:"3dv8je"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"m8 8 4-4 4 4",key:"2bscm2"}]],pq=Se("separator-horizontal",dq),fq=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],mq=Se("square-pen",fq),gq=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],Oq=Se("strikethrough",gq),yq=[["path",{d:"m4 5 8 8",key:"1eunvl"}],["path",{d:"m12 5-8 8",key:"1ah0jp"}],["path",{d:"M20 19h-4c0-1.5.44-2 1.5-2.5S20 15.33 20 14c0-.47-.17-.93-.48-1.29a2.11 2.11 0 0 0-2.62-.44c-.42.24-.74.62-.9 1.07",key:"e8ta8j"}]],bq=Se("subscript",yq),Eq=[["path",{d:"m4 19 8-8",key:"hr47gm"}],["path",{d:"m12 19-8-8",key:"1dhhmo"}],["path",{d:"M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06",key:"1dfcux"}]],vq=Se("superscript",Eq),Tq=[["path",{d:"M14 14v2",key:"w2a1xv"}],["path",{d:"M14 20v2",key:"1lq872"}],["path",{d:"M14 2v2",key:"6buw04"}],["path",{d:"M14 8v2",key:"i67w9a"}],["path",{d:"M2 15h8",key:"82wtch"}],["path",{d:"M2 3h6a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H2",key:"up0l64"}],["path",{d:"M2 9h8",key:"yelfik"}],["path",{d:"M22 15h-4",key:"1es58f"}],["path",{d:"M22 3h-2a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h2",key:"pdjoqf"}],["path",{d:"M22 9h-4",key:"1luja7"}],["path",{d:"M5 3v18",key:"14hmio"}]],Tk=Se("table-columns-split",Tq),Sq=[["path",{d:"M15 3v18",key:"14nvp0"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],da=Se("table-properties",Sq),wq=[["path",{d:"M14 10h2",key:"1lstlu"}],["path",{d:"M15 22v-8",key:"1fwwgm"}],["path",{d:"M15 2v4",key:"1044rn"}],["path",{d:"M2 10h2",key:"1r8dkt"}],["path",{d:"M20 10h2",key:"1ug425"}],["path",{d:"M3 19h18",key:"awlh7x"}],["path",{d:"M3 22v-6a2 2 135 0 1 2-2h14a2 2 45 0 1 2 2v6",key:"ibqhof"}],["path",{d:"M3 2v2a2 2 45 0 0 2 2h14a2 2 135 0 0 2-2V2",key:"1uenja"}],["path",{d:"M8 10h2",key:"66od0"}],["path",{d:"M9 22v-8",key:"fmnu31"}],["path",{d:"M9 2v4",key:"j1yeou"}]],Sk=Se("table-rows-split",wq),kq=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]],_q=Se("table",kq),xq=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],Cq=Se("text-align-center",xq),Dq=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],Aq=Se("text-align-end",Dq),Pq=[["path",{d:"M3 5h18",key:"1u36vt"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 19h18",key:"awlh7x"}]],Nq=Se("text-align-justify",Pq),Rq=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],Mq=Se("text-align-start",Rq),Iq=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Lq=Se("trash",Iq),Qq=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],$q=Se("underline",Qq),Fq=[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]],Bq=Se("undo",Fq),jq=[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]],zq=Se("unlink",jq),Vq=[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]],Uq=Se("youtube",Vq),Hq=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],lM=Se("x",Hq),cM=v.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,...r},i)=>E.jsx("svg",{ref:i,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:t,stroke:"none",...r,children:E.jsx("path",{d:"M15 .5A2.5 2.5 0 0 0 12.5 3v9.5H3a2.5 2.5 0 0 0 0 5h12a2.5 2.5 0 0 0 2.5-2.5V3A2.5 2.5 0 0 0 15 .5z"})}));cM.displayName="IconCorner";const uM=v.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,...r},i)=>E.jsxs("svg",{ref:i,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"none",stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:n,...r,children:[E.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),E.jsx("path",{d:"M8 6.5l-5.5 5.5l5.5 5.5"}),E.jsx("path",{d:"M16 6.5l5.5 5.5l-5.5 5.5"})]}));uM.displayName="IconInlineCode";const hM=v.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,...r},i)=>E.jsxs("svg",{ref:i,viewBox:"0 0 24 24",fill:t,xmlns:"http://www.w3.org/2000/svg",width:e,height:e,...r,children:[E.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),E.jsx("path",{d:"M9 5a2 2 0 0 1 2 2v6c0 3.13 -1.65 5.193 -4.757 5.97a1 1 0 1 1 -.486 -1.94c2.227 -.557 3.243 -1.827 3.243 -4.03v-1h-3a2 2 0 0 1 -1.995 -1.85l-.005 -.15v-3a2 2 0 0 1 2 -2z"}),E.jsx("path",{d:"M18 5a2 2 0 0 1 2 2v6c0 3.13 -1.65 5.193 -4.757 5.97a1 1 0 1 1 -.486 -1.94c2.227 -.557 3.243 -1.827 3.243 -4.03v-1h-3a2 2 0 0 1 -1.995 -1.85l-.005 -.15v-3a2 2 0 0 1 2 -2z"})]}));hM.displayName="IconQuote";const dM=v.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,...r},i)=>E.jsx("svg",{ref:i,viewBox:"0 0 24 24",fill:t,xmlns:"http://www.w3.org/2000/svg",width:e,height:e,...r,children:E.jsx("path",{d:"M11.1 1.65 4.17 19.25H7.03L8.68 14.96H15.72L17.37 19.25H20.23L13.3 1.65H11.1ZM9.56 12.32 12.2 5.28 14.84 12.32H9.56Z",transform:"scale(0.9) translate(0.5,0)"})}));dM.displayName="IconTextColor";const pM=v.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,...r},i)=>E.jsxs("svg",{ref:i,viewBox:"0 0 24 24",fill:t,xmlns:"http://www.w3.org/2000/svg",width:e,height:e,...r,children:[E.jsx("path",{d:"M20.9278 11.1274 10.8774 1.0203l-.1521.1504C9.9678.4215 8.9665 0 7.9017 0H7.9008C6.8259 0 5.8155.4189 4.9563 1.1782c-.7618.76-1.1807 1.7703-1.1807 2.8452 0 1.0649.4147 2.0667 1.164 2.8244L2.4378 9.3496c-.3433.3432-.5328.7998-.5328 1.2836 0 .4855.1878.9404.5293 1.2803l5.4518 5.4972c.3424.3424.7983.5302 1.2807.5302.4858 0 .9416-.1895 1.2849-.5336l6.2994-6.2807 4.1767-.0009v.0017ZM5.0038 4.0285c0-.7724.3012-1.499.85-2.0477.547-.5462 1.273-.8279 2.047-.8279h.0009c.7643 0 1.4792.297 2.0246.8313L5.847 6.0651c-.5369-.5443-.8432-1.2684-.8432-2.0366Zm10.0343 7.3047H3.5344l-.208-.2108c-.1291-.128-.1997-.298-.1997-.479 0-.1827.0715-.3527.2014-.4826l7.5323-7.5323 7.3304 7.3864-1.8442.0008-1.3085 1.3175Z",strokeWidth:"0.3",transform:"translate(0,0)",stroke:t}),E.jsx("path",{d:"M20.2574 13.4086c.3793.5669 1.6379 2.5006 1.6379 3.475 0 1.2034-.979 2.1843-2.1824 2.1843-1.2034 0-2.1824-.979-2.1824-2.1824 0-.9781 1.3012-2.9155 1.6984-3.4844l.5207-.7454.5078.7528Z",transform:"translate(1,1)"})]}));pM.displayName="IconTextHighlight";const Xq={Bold:p8,Italic:$8,Underline:$q,Strike:Oq,Code:Ek,SourceCode:N8,Subscript:bq,Superscript:vq,BulletList:G8,OrderedList:X8,TaskList:Z8,CodeBlock:Ek,CodeInline:uM,Link:B8,Unlink:zq,Edit:mq,ExternalLink:A8,Redo:cq,Undo:Bq,AlignLeft:Mq,AlignRight:Aq,AlignJustify:Nq,AlignCenter:Cq,Eraser:C8,ChevronDown:E8,Maximize:K8,Minimize:eq,HorizontalRule:nq,Indent:U8,Outdent:z8,Clipboard:aM,Check:oM,Quote:hM,Corner:cM,LetterCase:O8,Trash:Lq,Image:L8,ImageCaption:m8,ImageAltText:M8,Download:_8,Youtube:Uq,Close:lM,Ruler:hq,TextHighlight:pM,TextColor:dM,Palette:vk,PaletteOff:vk,Ban:h8,Plus:aq,Table:_q,Stretch:iq,HeaderRow:Sk,HeaderCol:Tk,ColInsertLeft:da,ColInsertRight:da,ColRemove:da,ColHeader:Tk,RowInsertTop:da,RowInsertBottom:da,RowRemove:da,RowHeader:Sk,MergeCell:w8,SplitCell:pq},iu=({name:t,className:e,size:n=20,...r})=>{const i=Xq[t];return E.jsx(i,{size:n,className:bn("rte-icon",e),...r})},qq=n8,Zq=r8,fM=Ne.forwardRef(({className:t,align:e="start",sideOffset:n=4,...r},i)=>E.jsx(tM,{ref:i,align:e,sideOffset:n,className:bn("rte-dropdown",t),...r}));fM.displayName=tM.displayName;const gv=Ne.forwardRef(({className:t,inset:e,...n},r)=>E.jsx(nM,{ref:r,className:bn("rte-dropdown__item",e&&"rte-dropdown-item-inset",t),...n}));gv.displayName=nM.displayName;const Wq=Ne.forwardRef(({className:t,children:e,checked:n,...r},i)=>E.jsxs(rM,{ref:i,className:bn("rte-dropdown__item",t),checked:n,...r,children:[e,E.jsx(i8,{className:"rte-dropdown__icon",children:E.jsx(iu,{name:"Check",size:16})})]}));Wq.displayName=rM.displayName;const Gq=Ne.forwardRef(({className:t,...e},n)=>E.jsx(iM,{ref:n,className:bn("rte-dropdown__separator",t),...e}));Gq.displayName=iM.displayName;const Yq=ij,Kq=sj,Ov=oj,mM=v.forwardRef(({className:t,align:e="start",sideOffset:n=4,...r},i)=>E.jsx(iP,{ref:i,align:e,sideOffset:n,className:bn("rte-popover",t),...r}));mM.displayName=iP.displayName;var Jq=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),eZ="VisuallyHidden",gM=v.forwardRef((t,e)=>E.jsx(pt.span,{...t,ref:e,style:{...Jq,...t.style}}));gM.displayName=eZ;var tZ=gM,[nm]=Ys("Tooltip",[ml]),rm=ml(),OM="TooltipProvider",nZ=700,xy="tooltip.open",[rZ,yv]=nm(OM),yM=t=>{const{__scopeTooltip:e,delayDuration:n=nZ,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=t,o=v.useRef(!0),a=v.useRef(!1),l=v.useRef(0);return v.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),E.jsx(rZ,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:v.useCallback(c=>{a.current=c},[]),disableHoverableContent:i,children:s})};yM.displayName=OM;var su="Tooltip",[iZ,Vu]=nm(su),bM=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:i,onOpenChange:s,disableHoverableContent:o,delayDuration:a}=t,l=yv(su,t.__scopeTooltip),c=rm(e),[u,h]=v.useState(null),d=Is(),p=v.useRef(0),f=o??l.disableHoverableContent,m=a??l.delayDuration,g=v.useRef(!1),[y,b]=Iu({prop:r,defaultProp:i??!1,onChange:C=>{C?(l.onOpen(),document.dispatchEvent(new CustomEvent(xy))):l.onClose(),s==null||s(C)},caller:su}),T=v.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),S=v.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,b(!0)},[b]),w=v.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b(!1)},[b]),A=v.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,b(!0),p.current=0},m)},[m,b]);return v.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),E.jsx(CE,{...c,children:E.jsx(iZ,{scope:e,contentId:d,open:y,stateAttribute:T,trigger:u,onTriggerChange:h,onTriggerEnter:v.useCallback(()=>{l.isOpenDelayedRef.current?A():S()},[l.isOpenDelayedRef,A,S]),onTriggerLeave:v.useCallback(()=>{f?w():(window.clearTimeout(p.current),p.current=0)},[w,f]),onOpen:S,onClose:w,disableHoverableContent:f,children:n})})};bM.displayName=su;var Cy="TooltipTrigger",EM=v.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,i=Vu(Cy,n),s=yv(Cy,n),o=rm(n),a=v.useRef(null),l=_t(e,a,i.onTriggerChange),c=v.useRef(!1),u=v.useRef(!1),h=v.useCallback(()=>c.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),E.jsx(Rf,{asChild:!0,...o,children:E.jsx(pt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:ve(t.onPointerMove,d=>{d.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),u.current=!0)}),onPointerLeave:ve(t.onPointerLeave,()=>{i.onTriggerLeave(),u.current=!1}),onPointerDown:ve(t.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:ve(t.onFocus,()=>{c.current||i.onOpen()}),onBlur:ve(t.onBlur,i.onClose),onClick:ve(t.onClick,i.onClose)})})});EM.displayName=Cy;var bv="TooltipPortal",[sZ,oZ]=nm(bv,{forceMount:void 0}),vM=t=>{const{__scopeTooltip:e,forceMount:n,children:r,container:i}=t,s=Vu(bv,e);return E.jsx(sZ,{scope:e,forceMount:n,children:E.jsx(fi,{present:n||s.open,children:E.jsx(PE,{asChild:!0,container:i,children:r})})})};vM.displayName=bv;var Ya="TooltipContent",TM=v.forwardRef((t,e)=>{const n=oZ(Ya,t.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...s}=t,o=Vu(Ya,t.__scopeTooltip);return E.jsx(fi,{present:r||o.open,children:o.disableHoverableContent?E.jsx(SM,{side:i,...s,ref:e}):E.jsx(aZ,{side:i,...s,ref:e})})}),aZ=v.forwardRef((t,e)=>{const n=Vu(Ya,t.__scopeTooltip),r=yv(Ya,t.__scopeTooltip),i=v.useRef(null),s=_t(e,i),[o,a]=v.useState(null),{trigger:l,onClose:c}=n,u=i.current,{onPointerInTransitChange:h}=r,d=v.useCallback(()=>{a(null),h(!1)},[h]),p=v.useCallback((f,m)=>{const g=f.currentTarget,y={x:f.clientX,y:f.clientY},b=dZ(y,g.getBoundingClientRect()),T=pZ(y,b),S=fZ(m.getBoundingClientRect()),w=gZ([...T,...S]);a(w),h(!0)},[h]);return v.useEffect(()=>()=>d(),[d]),v.useEffect(()=>{if(l&&u){const f=g=>p(g,u),m=g=>p(g,l);return l.addEventListener("pointerleave",f),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",f),u.removeEventListener("pointerleave",m)}}},[l,u,p,d]),v.useEffect(()=>{if(o){const f=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},b=(l==null?void 0:l.contains(g))||(u==null?void 0:u.contains(g)),T=!mZ(y,o);b?d():T&&(d(),c())};return document.addEventListener("pointermove",f),()=>document.removeEventListener("pointermove",f)}},[l,u,o,c,d]),E.jsx(SM,{...t,ref:s})}),[lZ,cZ]=nm(su,{isInside:!1}),uZ=y3("TooltipContent"),SM=v.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:o,...a}=t,l=Vu(Ya,n),c=rm(n),{onClose:u}=l;return v.useEffect(()=>(document.addEventListener(xy,u),()=>document.removeEventListener(xy,u)),[u]),v.useEffect(()=>{if(l.trigger){const h=d=>{var p;(p=d.target)!=null&&p.contains(l.trigger)&&u()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[l.trigger,u]),E.jsx(Ru,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:u,children:E.jsxs(DE,{"data-state":l.stateAttribute,...c,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[E.jsx(uZ,{children:r}),E.jsx(lZ,{scope:n,isInside:!0,children:E.jsx(tZ,{id:l.contentId,role:"tooltip",children:i||r})})]})})});TM.displayName=Ya;var wM="TooltipArrow",hZ=v.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,i=rm(n);return cZ(wM,n).isInside?null:E.jsx(AE,{...i,...r,ref:e})});hZ.displayName=wM;function dZ(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function pZ(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function fZ(t){const{top:e,right:n,bottom:r,left:i}=t;return[{x:i,y:e},{x:n,y:e},{x:n,y:r},{x:i,y:r}]}function mZ(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const a=e[s],l=e[o],c=a.x,u=a.y,h=l.x,d=l.y;u>r!=d>r&&n<(h-c)*(r-u)/(d-u)+c&&(i=!i)}return i}function gZ(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),OZ(e)}function OZ(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const i=t[r];for(;e.length>=2;){const s=e[e.length-1],o=e[e.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))e.pop();else break}e.push(i)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const i=t[r];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}const Ev=Ne.forwardRef(({children:t,content:e,portal:n=!1,options:r,...i},s)=>{const o=n?vM:Ne.Fragment;return E.jsx(yM,{delayDuration:500,skipDelayDuration:0,disableHoverableContent:!1,children:E.jsxs(bM,{children:[E.jsx(EM,{ref:s,asChild:!0,...i,children:t}),E.jsx(o,{children:E.jsx(TM,{className:"rte-tooltip",side:"top",align:"center",...r,children:e})})]})})});Ev.displayName="Tooltip";const yZ=t=>{const e=/macintosh|mac os x/gi.test(navigator.userAgent);return t==="Mod"?e?"⌘":"Ctrl":t==="Shift"?e?"⇧":t:t==="Alt"&&e?"⌥":t},kM=1024;let bZ=0,ur=class{constructor(t,e){this.from=t,this.to=e}};class Qe{constructor(e={}){this.id=bZ++,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)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}Qe.closedBy=new Qe({deserialize:t=>t.split(" ")});Qe.openedBy=new Qe({deserialize:t=>t.split(" ")});Qe.group=new Qe({deserialize:t=>t.split(" ")});Qe.isolate=new Qe({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Qe.contextHash=new Qe({perNode:!0});Qe.lookAhead=new Qe({perNode:!0});Qe.mounted=new Qe({perNode:!0});class ou{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[Qe.mounted.id]}}const EZ=Object.create(null);class Dn{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):EZ,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Dn(e.name||"",n,e.id,r);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(i)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}return i}prop(e){return this.props[e.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(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Qe.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(Qe.group),s=-1;s<(i?i.length:0);s++){let o=n[s<0?r.name:i[s]];if(o)return o}}}}Dn.none=new Dn("",Object.create(null),0,8);class vv{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let s of e){let o=s(r);if(o){i||(i=Object.assign({},r.props));let a=o[1],l=o[0];l.combine&&l.id in i&&(a=l.combine(i[l.id],a)),i[l.id]=a}}n.push(i?new Dn(r.name,i,r.id,r.flags):r)}return new vv(n)}}const Ph=new WeakMap,wk=new WeakMap;var ct;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(ct||(ct={}));class ft{constructor(e,n,r,i,s){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,a]of s)this.props[typeof o=="number"?o:o.id]=a}}toString(){let e=ou.get(this);if(e&&!e.overlay)return e.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(e=0){return new pp(this.topNode,e)}cursorAt(e,n=0,r=0){let i=Ph.get(this)||this.topNode,s=new pp(i);return s.moveTo(e,n),Ph.set(this,s._tree),s}get topNode(){return new On(this,0,0,null)}resolve(e,n=0){let r=au(Ph.get(this)||this.topNode,e,n,!1);return Ph.set(this,r),r}resolveInner(e,n=0){let r=au(wk.get(this)||this.topNode,e,n,!0);return wk.set(this,r),r}resolveStack(e,n=0){return SZ(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:s=this.length}=e,o=e.mode||0,a=(o&ct.IncludeAnonymous)>0;for(let l=this.cursor(o|ct.IncludeAnonymous);;){let c=!1;if(l.from<=s&&l.to>=i&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&r&&(a||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:wv(Dn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new ft(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new ft(Dn.none,n,r,i)))}static build(e){return wZ(e)}}ft.empty=new ft(Dn.none,[],[],0);class Tv{constructor(e,n){this.buffer=e,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 Tv(this.buffer,this.index)}}class Xs{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return Dn.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],s=i.name;if(/\W/.test(s)&&!i.isError&&(s=JSON.stringify(s)),e+=4,r==e)return s;let o=[];for(;e<r;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,n,r,i,s){let{buffer:o}=this,a=-1;for(let l=e;l!=n&&!(_M(s,i,o[l+1],o[l+2])&&(a=l,r>0));l=o[l+3]);return a}slice(e,n,r){let i=this.buffer,s=new Uint16Array(n-e),o=0;for(let a=e,l=0;a<n;){s[l++]=i[a++],s[l++]=i[a++]-r;let c=s[l++]=i[a++]-r;s[l++]=i[a++]-e,o=Math.max(o,c)}return new Xs(s,o,this.set)}}function _M(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function au(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let o=!r&&t instanceof On&&t.index<0?null:t.parent;if(!o)return t;t=o}let s=r?0:ct.IgnoreOverlays;if(r)for(let o=t,a=o.parent;a;o=a,a=o.parent)o instanceof On&&o.index<0&&((i=a.enter(e,n,s))===null||i===void 0?void 0:i.from)!=o.from&&(t=a);for(;;){let o=t.enter(e,n,s);if(!o)return t;t=o}}class xM{cursor(e=0){return new pp(this,e)}getChild(e,n=null,r=null){let i=kk(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return kk(this,e,n,r)}resolve(e,n=0){return au(this,e,n,!1)}resolveInner(e,n=0){return au(this,e,n,!0)}matchContext(e){return Dy(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}class On extends xM{constructor(e,n,r,i){super(),this._tree=e,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(e,n,r,i,s=0){for(let o=this;;){for(let{children:a,positions:l}=o._tree,c=n>0?a.length:-1;e!=c;e+=n){let u=a[e],h=l[e]+o.from;if(_M(i,r,h,h+u.length)){if(u instanceof Xs){if(s&ct.ExcludeBuffers)continue;let d=u.findChild(0,u.buffer.length,n,r-h,i);if(d>-1)return new ni(new vZ(o,u,e,h),null,d)}else if(s&ct.IncludeAnonymous||!u.type.isAnonymous||Sv(u)){let d;if(!(s&ct.IgnoreMounts)&&(d=ou.get(u))&&!d.overlay)return new On(d.tree,h,e,o);let p=new On(u,h,e,o);return s&ct.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(n<0?u.children.length-1:0,n,r,i)}}}if(s&ct.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+n:e=n<0?-1:o._parent._tree.children.length,o=o._parent,!o))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(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,r=0){let i;if(!(r&ct.IgnoreOverlays)&&(i=ou.get(this._tree))&&i.overlay){let s=e-this.from;for(let{from:o,to:a}of i.overlay)if((n>0?o<=s:o<s)&&(n<0?a>=s:a>s))return new On(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}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 kk(t,e,n,r){let i=t.cursor(),s=[];if(!i.firstChild())return s;if(n!=null){for(let o=!1;!o;)if(o=i.type.is(n),!i.nextSibling())return s}for(;;){if(r!=null&&i.type.is(r))return s;if(i.type.is(e)&&s.push(i.node),!i.nextSibling())return r==null?s:[]}}function Dy(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class vZ{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class ni extends xM{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(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return s<0?null:new ni(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,r=0){if(r&ct.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return s<0?null:new ni(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new ni(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new ni(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,s=r.buffer[this.index+3];if(s>i){let o=r.buffer[this.index+1];e.push(r.slice(i,s,o)),n.push(0)}return new ft(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function CM(t){if(!t.length)return null;let e=0,n=t[0];for(let s=1;s<t.length;s++){let o=t[s];(o.from>n.from||o.to<n.to)&&(n=o,e=s)}let r=n instanceof On&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new TZ(i,n)}class TZ{constructor(e,n){this.heads=e,this.node=n}get next(){return CM(this.heads)}}function SZ(t,e,n){let r=t.resolveInner(e,n),i=null;for(let s=r instanceof On?r:r.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(i||(i=[r])).push(o.resolve(e,n)),s=o}else{let o=ou.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let a=new On(o.tree,o.overlay[0].from+s.from,-1,s);(i||(i=[r])).push(au(a,e,n,!1))}}return i?CM(i):r}class pp{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof On)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.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,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof On?(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,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}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,n,r=this.mode){return this.buffer?r&ct.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&ct.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&ct.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:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<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 n,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(i.buffer.buffer[s+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let s=n+e,o=e<0?-1:r._tree.children.length;s!=o;s+=e){let a=r._tree.children[s];if(this.mode&ct.IncludeAnonymous||a instanceof Xs||!a.type.isAnonymous||Sv(a))return!1}return!0}move(e,n){if(n&&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,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;n=o,r=s+1;break e}i=this.stack[--s]}for(let i=r;i<this.stack.length;i++)n=new ni(this.buffer,n,this.stack[i]);return this.bufferNode=new ni(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&n&&n(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return Dy(this.node.parent,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return Dy(this._tree,e,i);let o=r[n.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function Sv(t){return t.children.some(e=>e instanceof Xs||!e.type.isAnonymous||Sv(e))}function wZ(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=kM,reused:s=[],minRepeatType:o=r.types.length}=t,a=Array.isArray(n)?new Tv(n,n.length):n,l=r.types,c=0,u=0;function h(w,A,C,N,$,I){let{id:L,start:Z,end:B,size:j}=a,U=u,J=c;if(j<0)if(a.next(),j==-1){let He=s[L];C.push(He),N.push(Z-w);return}else if(j==-3){c=L;return}else if(j==-4){u=L;return}else throw new RangeError(`Unrecognized record size: ${j}`);let fe=l[L],z,ne,Oe=Z-w;if(B-Z<=i&&(ne=g(a.pos-A,$))){let He=new Uint16Array(ne.size-ne.skip),it=a.pos-ne.size,Le=He.length;for(;a.pos>it;)Le=y(ne.start,He,Le);z=new Xs(He,B-ne.start,r),Oe=ne.start-w}else{let He=a.pos-j;a.next();let it=[],Le=[],Xe=L>=o?L:-1,vt=0,An=B;for(;a.pos>He;)Xe>=0&&a.id==Xe&&a.size>=0?(a.end<=An-i&&(f(it,Le,Z,vt,a.end,An,Xe,U,J),vt=it.length,An=a.end),a.next()):I>2500?d(Z,He,it,Le):h(Z,He,it,Le,Xe,I+1);if(Xe>=0&&vt>0&&vt<it.length&&f(it,Le,Z,vt,Z,An,Xe,U,J),it.reverse(),Le.reverse(),Xe>-1&&vt>0){let Ge=p(fe,J);z=wv(fe,it,Le,0,it.length,0,B-Z,Ge,Ge)}else z=m(fe,it,Le,B-Z,U-B,J)}C.push(z),N.push(Oe)}function d(w,A,C,N){let $=[],I=0,L=-1;for(;a.pos>A;){let{id:Z,start:B,end:j,size:U}=a;if(U>4)a.next();else{if(L>-1&&B<L)break;L<0&&(L=j-i),$.push(Z,B,j),I++,a.next()}}if(I){let Z=new Uint16Array(I*4),B=$[$.length-2];for(let j=$.length-3,U=0;j>=0;j-=3)Z[U++]=$[j],Z[U++]=$[j+1]-B,Z[U++]=$[j+2]-B,Z[U++]=U;C.push(new Xs(Z,$[2]-B,r)),N.push(B-w)}}function p(w,A){return(C,N,$)=>{let I=0,L=C.length-1,Z,B;if(L>=0&&(Z=C[L])instanceof ft){if(!L&&Z.type==w&&Z.length==$)return Z;(B=Z.prop(Qe.lookAhead))&&(I=N[L]+Z.length+B)}return m(w,C,N,$,I,A)}}function f(w,A,C,N,$,I,L,Z,B){let j=[],U=[];for(;w.length>N;)j.push(w.pop()),U.push(A.pop()+C-$);w.push(m(r.types[L],j,U,I-$,Z-I,B)),A.push($-C)}function m(w,A,C,N,$,I,L){if(I){let Z=[Qe.contextHash,I];L=L?[Z].concat(L):[Z]}if($>25){let Z=[Qe.lookAhead,$];L=L?[Z].concat(L):[Z]}return new ft(w,A,C,N,L)}function g(w,A){let C=a.fork(),N=0,$=0,I=0,L=C.end-i,Z={size:0,start:0,skip:0};e:for(let B=C.pos-w;C.pos>B;){let j=C.size;if(C.id==A&&j>=0){Z.size=N,Z.start=$,Z.skip=I,I+=4,N+=4,C.next();continue}let U=C.pos-j;if(j<0||U<B||C.start<L)break;let J=C.id>=o?4:0,fe=C.start;for(C.next();C.pos>U;){if(C.size<0)if(C.size==-3)J+=4;else break e;else C.id>=o&&(J+=4);C.next()}$=fe,N+=j,I+=J}return(A<0||N==w)&&(Z.size=N,Z.start=$,Z.skip=I),Z.size>4?Z:void 0}function y(w,A,C){let{id:N,start:$,end:I,size:L}=a;if(a.next(),L>=0&&N<o){let Z=C;if(L>4){let B=a.pos-(L-4);for(;a.pos>B;)C=y(w,A,C)}A[--C]=Z,A[--C]=I-w,A[--C]=$-w,A[--C]=N}else L==-3?c=N:L==-4&&(u=N);return C}let b=[],T=[];for(;a.pos>0;)h(t.start||0,t.bufferStart||0,b,T,-1,0);let S=(e=t.length)!==null&&e!==void 0?e:b.length?T[0]+b[0].length:0;return new ft(l[t.topID],b.reverse(),T.reverse(),S)}const _k=new WeakMap;function kd(t,e){if(!t.isAnonymous||e instanceof Xs||e.type!=t)return 1;let n=_k.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof ft)){n=1;break}n+=kd(t,r)}_k.set(e,n)}return n}function wv(t,e,n,r,i,s,o,a,l){let c=0;for(let f=r;f<i;f++)c+=kd(t,e[f]);let u=Math.ceil(c*1.5/8),h=[],d=[];function p(f,m,g,y,b){for(let T=g;T<y;){let S=T,w=m[T],A=kd(t,f[T]);for(T++;T<y;T++){let C=kd(t,f[T]);if(A+C>=u)break;A+=C}if(T==S+1){if(A>u){let C=f[S];p(C.children,C.positions,0,C.children.length,m[S]+b);continue}h.push(f[S])}else{let C=m[T-1]+f[T-1].length-w;h.push(wv(t,f,m,S,T,w,C,null,l))}d.push(w+b-s)}}return p(e,n,r,i,0),(a||l)(h,d,o)}class DM{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof ni?this.setBuffer(e.context.buffer,e.index,n):e instanceof On&&this.map.set(e.tree,n)}get(e){return e instanceof ni?this.getBuffer(e.context.buffer,e.index):e instanceof On?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Ui{constructor(e,n,r,i,s=!1,o=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new Ui(0,e.length,e,0,!1,r)];for(let s of n)s.to>e.length&&i.push(s);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],s=1,o=e.length?e[0]:null;for(let a=0,l=0,c=0;;a++){let u=a<n.length?n[a]:null,h=u?u.fromA:1e9;if(h-l>=r)for(;o&&o.from<h;){let d=o;if(l>=d.from||h<=d.to||c){let p=Math.max(d.from,l)-c,f=Math.min(d.to,h)-c;d=p>=f?null:new Ui(p,f,d.tree,d.offset+c,a>0,!!u)}if(d&&i.push(d),o.to>h)break;o=s<e.length?e[s++]:null}if(!u)break;l=u.toA,c=u.toA-u.toB}return i}}let AM=class{startParse(t,e,n){return typeof t=="string"&&(t=new kZ(t)),n=n?n.length?n.map(r=>new ur(r.from,r.to)):[new ur(0,0)]:[new ur(0,t.length)],this.createParse(t,e||[],n)}parse(t,e,n){let r=this.startParse(t,e,n);for(;;){let i=r.advance();if(i)return i}}};class kZ{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function _Z(t){return(e,n,r,i)=>new CZ(e,t,n,r,i)}class xk{constructor(e,n,r,i,s){this.parser=e,this.parse=n,this.overlay=r,this.target=i,this.from=s}}function Ck(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class xZ{constructor(e,n,r,i,s,o,a){this.parser=e,this.predicate=n,this.mounts=r,this.index=i,this.start=s,this.target=o,this.prev=a,this.depth=0,this.ranges=[]}}const Ay=new Qe({perNode:!0});class CZ{constructor(e,n,r,i,s){this.nest=n,this.input=r,this.fragments=i,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new ft(r.type,r.children,r.positions,r.length,r.propValues.concat([[Ay,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[Qe.mounted.id]=new ou(n,e.overlay,e.parser),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].from<e&&(e=Math.min(e,this.inner[n].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].parse.stopAt(e)}startInner(){let e=new PZ(this.fragments),n=null,r=null,i=new pp(new On(this.baseTree,this.ranges[0].from,0,null),ct.IncludeAnonymous|ct.IgnoreMounts);e:for(let s,o;;){let a=!0,l;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)a=!1;else if(e.hasNode(i)){if(n){let c=n.mounts.find(u=>u.frag.from<=i.from&&u.frag.to>=i.to&&u.mount.overlay);if(c)for(let u of c.mount.overlay){let h=u.from+c.pos,d=u.to+c.pos;h>=i.from&&d<=i.to&&!n.ranges.some(p=>p.from<d&&p.to>h)&&n.ranges.push({from:h,to:d})}}a=!1}else if(r&&(o=DZ(r.ranges,i.from,i.to)))a=o!=2;else if(!i.type.isAnonymous&&(s=this.nest(i,this.input))&&(i.from<i.to||!s.overlay)){i.tree||(AZ(i),n&&n.depth++,r&&r.depth++);let c=e.findMounts(i.from,s.parser);if(typeof s.overlay=="function")n=new xZ(s.parser,s.overlay,c,this.inner.length,i.from,i.tree,n);else{let u=Pk(this.ranges,s.overlay||(i.from<i.to?[new ur(i.from,i.to)]:[]));u.length&&Ck(u),(u.length||!s.overlay)&&this.inner.push(new xk(s.parser,u.length?s.parser.startParse(this.input,Nk(c,u),u):s.parser.startParse(""),s.overlay?s.overlay.map(h=>new ur(h.from-i.from,h.to-i.from)):null,i.tree,u.length?u[0].from:i.from)),s.overlay?u.length&&(r={ranges:u,depth:0,prev:r}):a=!1}}else if(n&&(l=n.predicate(i))&&(l===!0&&(l=new ur(i.from,i.to)),l.from<l.to)){let c=n.ranges.length-1;c>=0&&n.ranges[c].to==l.from?n.ranges[c]={from:n.ranges[c].from,to:l.to}:n.ranges.push(l)}if(a&&i.firstChild())n&&n.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(n&&!--n.depth){let c=Pk(this.ranges,n.ranges);c.length&&(Ck(c),this.inner.splice(n.index,0,new xk(n.parser,n.parser.startParse(this.input,Nk(n.mounts,c),c),n.ranges.map(u=>new ur(u.from-n.start,u.to-n.start)),n.target,c[0].from))),n=n.prev}r&&!--r.depth&&(r=r.prev)}}}}function DZ(t,e,n){for(let r of t){if(r.from>=n)break;if(r.to>e)return r.from<=e&&r.to>=n?2:1}return 0}function Dk(t,e,n,r,i,s){if(e<n){let o=t.buffer[e+1];r.push(t.slice(e,n,o)),i.push(o-s)}}function AZ(t){let{node:e}=t,n=[],r=e.context.buffer;do n.push(t.index),t.parent();while(!t.tree);let i=t.tree,s=i.children.indexOf(r),o=i.children[s],a=o.buffer,l=[s];function c(u,h,d,p,f,m){let g=n[m],y=[],b=[];Dk(o,u,g,y,b,p);let T=a[g+1],S=a[g+2];l.push(y.length);let w=m?c(g+4,a[g+3],o.set.types[a[g]],T,S-T,m-1):e.toTree();return y.push(w),b.push(T-p),Dk(o,a[g+3],h,y,b,p),new ft(d,y,b,f)}i.children[s]=c(0,a.length,Dn.none,0,o.length,n.length-1);for(let u of l){let h=t.tree.children[u],d=t.tree.positions[u];t.yield(new On(h,d+t.from,u,t._tree))}}class Ak{constructor(e,n){this.offset=n,this.done=!1,this.cursor=e.cursor(ct.IncludeAnonymous|ct.IgnoreMounts)}moveTo(e){let{cursor:n}=this,r=e-this.offset;for(;!this.done&&n.from<r;)n.to>=e&&n.enter(r,1,ct.IgnoreOverlays|ct.ExcludeBuffers)||n.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 n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof ft)n=n.children[0];else break}return!1}}let PZ=class{constructor(t){var e;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let n=this.curFrag=t[0];this.curTo=(e=n.tree.prop(Ay))!==null&&e!==void 0?e:n.to,this.inner=new Ak(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=(t=e.tree.prop(Ay))!==null&&t!==void 0?t:e.to,this.inner=new Ak(e.tree,-e.offset)}}findMounts(t,e){var n;let r=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let i=this.inner.cursor.node;i;i=i.parent){let s=(n=i.tree)===null||n===void 0?void 0:n.prop(Qe.mounted);if(s&&s.parser==e)for(let o=this.fragI;o<this.fragments.length;o++){let a=this.fragments[o];if(a.from>=i.to)break;a.tree==this.curFrag.tree&&r.push({frag:a,pos:i.from-a.offset,mount:s})}}}return r}};function Pk(t,e){let n=null,r=e;for(let i=1,s=0;i<t.length;i++){let o=t[i-1].to,a=t[i].from;for(;s<r.length;s++){let l=r[s];if(l.from>=a)break;l.to<=o||(n||(r=n=e.slice()),l.from<o?(n[s]=new ur(l.from,o),l.to>a&&n.splice(s+1,0,new ur(a,l.to))):l.to>a?n[s--]=new ur(a,l.to):n.splice(s--,1))}}return r}function NZ(t,e,n,r){let i=0,s=0,o=!1,a=!1,l=-1e9,c=[];for(;;){let u=i==t.length?1e9:o?t[i].to:t[i].from,h=s==e.length?1e9:a?e[s].to:e[s].from;if(o!=a){let d=Math.max(l,n),p=Math.min(u,h,r);d<p&&c.push(new ur(d,p))}if(l=Math.min(u,h),l==1e9)break;u==l&&(o?(o=!1,i++):o=!0),h==l&&(a?(a=!1,s++):a=!0)}return c}function Nk(t,e){let n=[];for(let{pos:r,mount:i,frag:s}of t){let o=r+(i.overlay?i.overlay[0].from:0),a=o+i.tree.length,l=Math.max(s.from,o),c=Math.min(s.to,a);if(i.overlay){let u=i.overlay.map(d=>new ur(d.from+r,d.to+r)),h=NZ(e,u,l,c);for(let d=0,p=l;;d++){let f=d==h.length,m=f?c:h[d].from;if(m>p&&n.push(new Ui(p,m,i.tree,-o,s.from>=p||s.openStart,s.to<=m||s.openEnd)),f)break;p=h[d].to}}else n.push(new Ui(l,c,i.tree,-o,s.from>=o||s.openStart,s.to<=a||s.openEnd))}return n}class fp{constructor(e,n,r,i,s,o,a,l,c,u=0,h){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=s,this.score=o,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=h}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new fp(e,[],n,r,r,0,[],0,i?new Rk(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:s}=this.p,o=this.reducePos<this.pos-25;o&&this.setLookAhead(this.pos);let a=s.dynamicPrecedence(i);if(a&&(this.score+=a),r==0){this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(i,this.reducePos);return}let l=this.stack.length-(r-1)*3-(e&262144?6:0),c=l?this.stack[l-2]:this.p.ranges[0].from,u=this.reducePos-c;u>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=c,this.p.lastBigReductionSize=u));let h=l?this.stack[l-1]:0,d=this.bufferBase+this.buffer.length-h;if(i<s.minRepeatTerm||e&131072){let p=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,c,p,d+4,!0)}if(e&262144)this.state=this.stack[l];else{let p=this.stack[l-3];this.state=s.getGoto(p,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,c)}storeNode(e,n,r,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,a=this.buffer.length;if(a==0&&o.parent&&(a=o.bufferBase-o.parent.bufferBase,o=o.parent),a>0&&o.buffer[a-4]==0&&o.buffer[a-1]>-1){if(n==r)return;if(o.buffer[a-2]>=n){o.buffer[a-2]=r;return}}}if(!s||this.pos==r)this.buffer.push(e,n,r,i);else{let o=this.buffer.length;if(o>0&&(this.buffer[o-4]!=0||this.buffer[o-1]<0)){let a=!1;for(let l=o;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;o>0&&this.buffer[o-2]>r;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,i>4&&(i-=4)}this.buffer[o]=e,this.buffer[o+1]=n,this.buffer[o+2]=r,this.buffer[o+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:o}=this.p;(i>this.pos||n<=o.maxNode)&&(this.pos=i,o.stateFlag(s,1)||(this.reducePos=i)),this.pushState(s,r),this.shiftContext(n,r),n<=o.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(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new fp(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new RZ(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if((r&65536)==0)return!0;n.reduce(r)}}recoverByInsert(e){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 s=0,o;s<n.length;s+=2)(o=n[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&i.push(n[s],o);if(this.stack.length<120)for(let s=0;i.length<8&&s<n.length;s+=2){let o=n[s+1];i.some((a,l)=>l&1&&a==o)||i.push(n[s],o)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let s=n[i+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(n[i],this.pos),o.reducePos=this.pos,o.score-=200,r.push(o)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&65535,s=this.stack.length-r*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;n=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,s)=>{if(!n.includes(i))return n.push(i),e.allActions(i,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-s;if(a>1){let l=o&65535,c=this.stack.length-a*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return a<<19|65536|l}}else{let a=r(o,s+1);if(a!=null)return a}})};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:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new Rk(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Rk{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class RZ{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class mp{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new mp(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.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 mp(this.stack,this.pos,this.index)}}function ic(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let s=0;for(;;){let o=t.charCodeAt(r++),a=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,a=!0),s+=l,a)break;s*=46}n?n[i++]=s:n=new e(s)}return n}class _d{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Mk=new _d;class MZ{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Mk,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,s=this.pos+e;for(;s<r.from;){if(!i)return null;let o=this.ranges[--i];s-=r.from-o.to,r=o}for(;n<0?s>r.to:s>=r.to;){if(i==this.ranges.length-1)return null;let o=this.ranges[++i];s+=o.from-r.to,r=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(r=s,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let o=this.rangeIndex,a=this.range;for(;a.to<=r;)a=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>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,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=Mk,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,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class Ra{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;PM(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}Ra.prototype.contextual=Ra.prototype.fallback=Ra.prototype.extend=!1;class gp{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?ic(e):e}token(e,n){let r=e.pos,i=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(PM(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,o==null)break;e.reset(o,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}gp.prototype.contextual=Ra.prototype.fallback=Ra.prototype.extend=!1;class Kn{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function PM(t,e,n,r,i,s){let o=0,a=1<<r,{dialect:l}=n.p.parser;e:for(;(a&t[o])!=0;){let c=t[o+1];for(let p=o+3;p<c;p+=2)if((t[p+1]&a)>0){let f=t[p];if(l.allows(f)&&(e.token.value==-1||e.token.value==f||IZ(f,e.token.value,i,s))){e.acceptToken(f);break}}let u=e.next,h=0,d=t[o+2];if(e.next<0&&d>h&&t[c+d*3-3]==65535){o=t[c+d*3-1];continue e}for(;h<d;){let p=h+d>>1,f=c+p+(p<<1),m=t[f],g=t[f+1]||65536;if(u<m)d=p;else if(u>=g)h=p+1;else{o=t[f+2],e.advance();continue e}}break}}function Ik(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function IZ(t,e,n,r){let i=Ik(n,r,e);return i<0||Ik(n,r,t)<i}const zn=typeof process<"u"&&AS&&/\bparse\b/.test(AS.LOG);let Ng=null;function Lk(t,e,n){let r=t.cursor(ct.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class LZ{constructor(e,n){this.fragments=e,this.nodeSet=n,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?Lk(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Lk(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 n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=r.children[i],o=this.start[n]+r.positions[i];if(o>e)return this.nextStart=o,null;if(s instanceof ft){if(o==e){if(o<this.safeFrom)return null;let a=o+s.length;if(a<=this.safeTo){let l=s.prop(Qe.lookAhead);if(!l||a+l<this.fragment.to)return s}}this.index[n]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+s.length}}}class QZ{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new _d)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:s}=i,o=i.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let c=0;c<s.length;c++){if((1<<c&o)==0)continue;let u=s[c],h=this.tokens[c];if(!(r&&!u.fallback)&&((u.contextual||h.start!=e.pos||h.mask!=o||h.context!=a)&&(this.updateCachedToken(h,u,e),h.mask=o,h.context=a),h.lookAhead>h.end+25&&(l=Math.max(h.lookAhead,l)),h.value!=0)){let d=n;if(h.extended>-1&&(n=this.addActions(e,h.extended,h.end,n)),n=this.addActions(e,h.value,h.end,n),!u.extend&&(r=h,n>d))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new _d,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new _d,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:s}=r.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let a=s.specializers[o](this.stream.read(e.start,e.end),r);if(a>=0&&r.p.parser.dialect.allows(a>>1)){(a&1)==0?e.value=a>>1:e.extended=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let s=0;s<i;s+=3)if(this.actions[s]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:s}=e,{parser:o}=e.p,{data:a}=o;for(let l=0;l<2;l++)for(let c=o.stateSlot(s,l?2:1);;c+=3){if(a[c]==65535)if(a[c+1]==1)c=Pi(a,c+2);else{i==0&&a[c+1]==2&&(i=this.putAction(Pi(a,c+2),n,r,i));break}a[c]==n&&(i=this.putAction(Pi(a,c+1),n,r,i))}return i}}class $Z{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,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 MZ(n,i),this.tokens=new QZ(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[fp.start(this,e.top[0],s)],this.fragments=r.length&&this.stream.end-s>e.bufferLength*4?new LZ(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let a=e[o];for(;;){if(this.tokens.mainToken=null,a.pos>n)r.push(a);else{if(this.advanceStack(a,r,e))continue;{i||(i=[],s=[]),i.push(a);let l=this.tokens.getMainToken(a);s.push(l.value,l.end)}}break}}if(!r.length){let o=i&&BZ(i);if(o)return zn&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw zn&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let o=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,r);if(o)return zn&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(r.length>o)for(r.sort((a,l)=>l.score-a.score);r.length>o;)r.pop();r.some(a=>a.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let o=0;o<r.length-1;o++){let a=r[o];for(let l=o+1;l<r.length;l++){let c=r[l];if(a.sameState(c)||a.buffer.length>500&&c.buffer.length>500)if((a.score-c.score||a.buffer.length-c.buffer.length)>0)r.splice(l--,1);else{r.splice(o--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let o=1;o<r.length;o++)r[o].pos<this.minStackPos&&(this.minStackPos=r[o].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,n,r){let i=e.pos,{parser:s}=this,o=zn?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let h=this.fragments.nodeAt(i);h;){let d=this.parser.nodeSet.types[h.type.id]==h.type?s.getGoto(e.state,h.type.id):-1;if(d>-1&&h.length&&(!c||(h.prop(Qe.contextHash)||0)==u))return e.useNode(h,d),zn&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(h.type.id)})`),!0;if(!(h instanceof ft)||h.children.length==0||h.positions[0]>0)break;let p=h.children[0];if(p instanceof ft&&h.positions[0]==0)h=p;else break}}let a=s.stateSlot(e.state,4);if(a>0)return e.reduce(a),zn&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(a&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 u=l[c++],h=l[c++],d=l[c++],p=c==l.length||!r,f=p?e:e.split(),m=this.tokens.mainToken;if(f.apply(u,h,m?m.start:f.pos,d),zn&&console.log(o+this.stackID(f)+` (via ${(u&65536)==0?"shift":`reduce of ${s.getName(u&65535)}`} for ${s.getName(h)} @ ${i}${f==e?"":", split"})`),p)return!0;f.pos>i?n.push(f):r.push(f)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return Qk(e,n),!0}}runRecovery(e,n,r){let i=null,s=!1;for(let o=0;o<e.length;o++){let a=e[o],l=n[o<<1],c=n[(o<<1)+1],u=zn?this.stackID(a)+" -> ":"";if(a.deadEnd&&(s||(s=!0,a.restart(),zn&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,r))))continue;let h=a.split(),d=u;for(let p=0;p<10&&h.forceReduce()&&(zn&&console.log(d+this.stackID(h)+" (via force-reduce)"),!this.advanceFully(h,r));p++)zn&&(d=this.stackID(h)+" -> ");for(let p of a.recoverByInsert(l))zn&&console.log(u+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,r);this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),zn&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),Qk(a,r)):(!i||i.score<a.score)&&(i=a)}return i}stackToTree(e){return e.close(),ft.build({buffer:mp.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 n=(Ng||(Ng=new WeakMap)).get(e);return n||Ng.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function Qk(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class FZ{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const Rg=t=>t;class NM{constructor(e){this.start=e.start,this.shift=e.shift||Rg,this.reduce=e.reduce||Rg,this.reuse=e.reuse||Rg,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Ka extends AM{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;a<e.repeatNodeCount;a++)n.push("");let r=Object.keys(e.topRules).map(a=>e.topRules[a][1]),i=[];for(let a=0;a<n.length;a++)i.push([]);function s(a,l,c){i[a].push([l,l.deserialize(String(c))])}if(e.nodeProps)for(let a of e.nodeProps){let l=a[0];typeof l=="string"&&(l=Qe[l]);for(let c=1;c<a.length;){let u=a[c++];if(u>=0)s(u,l,a[c++]);else{let h=a[c+-u];for(let d=-u;d>0;d--)s(a[c++],l,h);c++}}}this.nodeSet=new vv(n.map((a,l)=>Dn.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:i[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=kM;let o=ic(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map($k),this.states=ic(e.states,Uint32Array),this.data=ic(e.stateData),this.goto=ic(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new Ra(o,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new $Z(this,e,n,r);for(let s of this.wrappers)i=s(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let s=i[n+1];;){let o=i[s++],a=o&1,l=i[s++];if(a&&r)return l;for(let c=s+(o>>1);s<c;s++)if(i[s]==e)return l;if(a)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let s=this.stateSlot(e,i?2:1),o;;s+=3){if((o=r[s])==65535)if(r[s+1]==1)o=r[s=Pi(r,s+2)];else{if(r[s+1]==2)return Pi(r,s+2);break}if(o==n||o==0)return Pi(r,s+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=Pi(this.data,s+2);else break;i=n(Pi(this.data,s+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Pi(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];n.some((s,o)=>o&1&&s==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(Ka.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(s=>s.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let s=e.specializers.find(a=>a.from==r.external);if(!s)return r;let o=Object.assign(Object.assign({},r),{external:s.to});return n.specializers[i]=$k(o),o})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let s of e.split(" ")){let o=n.indexOf(s);o>=0&&(r[o]=!0)}let i=null;for(let s=0;s<n.length;s++)if(!r[s])for(let o=this.dialects[n[s]],a;(a=this.data[o++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[a]=1;return new FZ(e,r,i)}static deserialize(e){return new Ka(e)}}function Pi(t,e){return t[e]|t[e+1]<<16}function BZ(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function $k(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}let jZ=0;class sr{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=jZ++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof sr&&(n=e),n==null?void 0:n.base)throw new Error("Can not derive from a modified tag");let i=new sr(r,[],null,[]);if(i.set.push(i),n)for(let s of n.set)i.set.push(s);return i}static defineModifier(e){let n=new Op(e);return r=>r.modified.indexOf(n)>-1?r:Op.get(r.base||r,r.modified.concat(n).sort((i,s)=>i.id-s.id))}}let zZ=0;class Op{constructor(e){this.name=e,this.instances=[],this.id=zZ++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(a=>a.base==e&&VZ(n,a.modified));if(r)return r;let i=[],s=new sr(e.name,i,e,n);for(let a of n)a.instances.push(s);let o=UZ(n);for(let a of e.set)if(!a.modified.length)for(let l of o)i.push(Op.get(a,l));return s}}function VZ(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function UZ(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function im(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let s=[],o=2,a=i;for(let h=0;;){if(a=="..."&&h>0&&h+3==i.length){o=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!d)throw new RangeError("Invalid path: "+i);if(s.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),h+=d[0].length,h==i.length)break;let p=i[h++];if(h==i.length&&p=="!"){o=0;break}if(p!="/")throw new RangeError("Invalid path: "+i);a=i.slice(h)}let l=s.length-1,c=s[l];if(!c)throw new RangeError("Invalid path: "+i);let u=new lu(r,o,l>0?s.slice(0,l):null);e[c]=u.sort(e[c])}}return RM.add(e)}const RM=new Qe({combine(t,e){let n,r,i;for(;t||e;){if(!t||e&&t.depth>=e.depth?(i=e,e=e.next):(i=t,t=t.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let s=new lu(i.tags,i.mode,i.context);n?n.next=s:r=s,n=s}return r}});let lu=class{constructor(t,e,n,r){this.tags=t,this.mode=e,this.context=n,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}get depth(){return this.context?this.context.length:0}};lu.empty=new lu([],2,null);function MM(t,e){let n=Object.create(null);for(let s of t)if(!Array.isArray(s.tag))n[s.tag.id]=s.class;else for(let o of s.tag)n[o.id]=s.class;let{scope:r,all:i=null}=e||{};return{style:s=>{let o=i;for(let a of s)for(let l of a.set){let c=n[l.id];if(c){o=o?o+" "+c:c;break}}return o},scope:r}}function HZ(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function XZ(t,e,n,r=0,i=t.length){let s=new qZ(r,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),r,i,"",s.highlighters),s.flush(i)}class qZ{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,s){let{type:o,from:a,to:l}=e;if(a>=r||l<=n)return;o.isTop&&(s=this.highlighters.filter(p=>!p.scope||p.scope(o)));let c=i,u=ZZ(e)||lu.empty,h=HZ(s,u.tags);if(h&&(c&&(c+=" "),c+=h,u.mode==1&&(i+=(i?" ":"")+h)),this.startSpan(Math.max(n,a),c),u.opaque)return;let d=e.tree&&e.tree.prop(Qe.mounted);if(d&&d.overlay){let p=e.node.enter(d.overlay[0].from+a,1),f=this.highlighters.filter(g=>!g.scope||g.scope(d.tree.type)),m=e.firstChild();for(let g=0,y=a;;g++){let b=g<d.overlay.length?d.overlay[g]:null,T=b?b.from+a:l,S=Math.max(n,y),w=Math.min(r,T);if(S<w&&m)for(;e.from<w&&(this.highlightRange(e,S,w,i,s),this.startSpan(Math.min(w,e.to),c),!(e.to>=T||!e.nextSibling())););if(!b||T>r)break;y=b.to+a,y>n&&(this.highlightRange(p.cursor(),Math.max(n,b.from+a),Math.min(r,y),"",f),this.startSpan(Math.min(r,y),c))}m&&e.parent()}else if(e.firstChild()){d&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,s),this.startSpan(Math.min(r,e.to),c)}while(e.nextSibling());e.parent()}}}function ZZ(t){let e=t.type.prop(RM);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const ee=sr.define,Nh=ee(),bs=ee(),Fk=ee(bs),Bk=ee(bs),Es=ee(),Rh=ee(Es),Mg=ee(Es),Ur=ee(),uo=ee(Ur),jr=ee(),zr=ee(),Py=ee(),Ml=ee(Py),Mh=ee(),R={comment:Nh,lineComment:ee(Nh),blockComment:ee(Nh),docComment:ee(Nh),name:bs,variableName:ee(bs),typeName:Fk,tagName:ee(Fk),propertyName:Bk,attributeName:ee(Bk),className:ee(bs),labelName:ee(bs),namespace:ee(bs),macroName:ee(bs),literal:Es,string:Rh,docString:ee(Rh),character:ee(Rh),attributeValue:ee(Rh),number:Mg,integer:ee(Mg),float:ee(Mg),bool:ee(Es),regexp:ee(Es),escape:ee(Es),color:ee(Es),url:ee(Es),keyword:jr,self:ee(jr),null:ee(jr),atom:ee(jr),unit:ee(jr),modifier:ee(jr),operatorKeyword:ee(jr),controlKeyword:ee(jr),definitionKeyword:ee(jr),moduleKeyword:ee(jr),operator:zr,derefOperator:ee(zr),arithmeticOperator:ee(zr),logicOperator:ee(zr),bitwiseOperator:ee(zr),compareOperator:ee(zr),updateOperator:ee(zr),definitionOperator:ee(zr),typeOperator:ee(zr),controlOperator:ee(zr),punctuation:Py,separator:ee(Py),bracket:Ml,angleBracket:ee(Ml),squareBracket:ee(Ml),paren:ee(Ml),brace:ee(Ml),content:Ur,heading:uo,heading1:ee(uo),heading2:ee(uo),heading3:ee(uo),heading4:ee(uo),heading5:ee(uo),heading6:ee(uo),contentSeparator:ee(Ur),list:ee(Ur),quote:ee(Ur),emphasis:ee(Ur),strong:ee(Ur),link:ee(Ur),monospace:ee(Ur),strikethrough:ee(Ur),inserted:ee(),deleted:ee(),changed:ee(),invalid:ee(),meta:Mh,documentMeta:ee(Mh),annotation:ee(Mh),processingInstruction:ee(Mh),definition:sr.defineModifier("definition"),constant:sr.defineModifier("constant"),function:sr.defineModifier("function"),standard:sr.defineModifier("standard"),local:sr.defineModifier("local"),special:sr.defineModifier("special")};for(let t in R){let e=R[t];e instanceof sr&&(e.name=t)}MM([{tag:R.link,class:"tok-link"},{tag:R.heading,class:"tok-heading"},{tag:R.emphasis,class:"tok-emphasis"},{tag:R.strong,class:"tok-strong"},{tag:R.keyword,class:"tok-keyword"},{tag:R.atom,class:"tok-atom"},{tag:R.bool,class:"tok-bool"},{tag:R.url,class:"tok-url"},{tag:R.labelName,class:"tok-labelName"},{tag:R.inserted,class:"tok-inserted"},{tag:R.deleted,class:"tok-deleted"},{tag:R.literal,class:"tok-literal"},{tag:R.string,class:"tok-string"},{tag:R.number,class:"tok-number"},{tag:[R.regexp,R.escape,R.special(R.string)],class:"tok-string2"},{tag:R.variableName,class:"tok-variableName"},{tag:R.local(R.variableName),class:"tok-variableName tok-local"},{tag:R.definition(R.variableName),class:"tok-variableName tok-definition"},{tag:R.special(R.variableName),class:"tok-variableName2"},{tag:R.definition(R.propertyName),class:"tok-propertyName tok-definition"},{tag:R.typeName,class:"tok-typeName"},{tag:R.namespace,class:"tok-namespace"},{tag:R.className,class:"tok-className"},{tag:R.macroName,class:"tok-macroName"},{tag:R.propertyName,class:"tok-propertyName"},{tag:R.operator,class:"tok-operator"},{tag:R.comment,class:"tok-comment"},{tag:R.meta,class:"tok-meta"},{tag:R.invalid,class:"tok-invalid"},{tag:R.punctuation,class:"tok-punctuation"}]);const WZ=55,GZ=1,YZ=56,KZ=2,JZ=57,eW=3,jk=4,tW=5,kv=6,IM=7,LM=8,QM=9,$M=10,nW=11,rW=12,iW=13,Ig=58,sW=14,oW=15,zk=59,FM=21,aW=23,BM=24,lW=25,Ny=27,jM=28,cW=29,uW=32,hW=35,dW=37,pW=38,fW=0,mW=1,gW={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},OW={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Vk={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 yW(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}let Uk=null,Hk=null,Xk=0;function Ry(t,e){let n=t.pos+e;if(Xk==n&&Hk==t)return Uk;let r=t.peek(e),i="";for(;yW(r);)i+=String.fromCharCode(r),r=t.peek(++e);return Hk=t,Xk=n,Uk=i?i.toLowerCase():r==bW||r==EW?void 0:null}const zM=60,yp=62,_v=47,bW=63,EW=33,vW=45;function qk(t,e){this.name=t,this.parent=e}const TW=[kv,$M,IM,LM,QM],SW=new NM({start:null,shift(t,e,n,r){return TW.indexOf(e)>-1?new qk(Ry(r,1)||"",t):t},reduce(t,e){return e==FM&&t?t.parent:t},reuse(t,e,n,r){let i=e.type.id;return i==kv||i==dW?new qk(Ry(r,1)||"",t):t},strict:!1}),wW=new Kn((t,e)=>{if(t.next!=zM){t.next<0&&e.context&&t.acceptToken(Ig);return}t.advance();let n=t.next==_v;n&&t.advance();let r=Ry(t,0);if(r===void 0)return;if(!r)return t.acceptToken(n?oW:sW);let i=e.context?e.context.name:null;if(n){if(r==i)return t.acceptToken(nW);if(i&&OW[i])return t.acceptToken(Ig,-2);if(e.dialectEnabled(fW))return t.acceptToken(rW);for(let s=e.context;s;s=s.parent)if(s.name==r)return;t.acceptToken(iW)}else{if(r=="script")return t.acceptToken(IM);if(r=="style")return t.acceptToken(LM);if(r=="textarea")return t.acceptToken(QM);if(gW.hasOwnProperty(r))return t.acceptToken($M);i&&Vk[i]&&Vk[i][r]?t.acceptToken(Ig,-1):t.acceptToken(kv)}},{contextual:!0}),kW=new Kn(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(zk);break}if(t.next==vW)e++;else if(t.next==yp&&e>=2){n>=3&&t.acceptToken(zk,-2);break}else e=0;t.advance()}});function _W(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const xW=new Kn((t,e)=>{if(t.next==_v&&t.peek(1)==yp){let n=e.dialectEnabled(mW)||_W(e.context);t.acceptToken(n?tW:jk,2)}else t.next==yp&&t.acceptToken(jk,1)});function xv(t,e,n){let r=2+t.length;return new Kn(i=>{for(let s=0,o=0,a=0;;a++){if(i.next<0){a&&i.acceptToken(e);break}if(s==0&&i.next==zM||s==1&&i.next==_v||s>=2&&s<r&&i.next==t.charCodeAt(s-2))s++,o++;else if(s==r&&i.next==yp){a>o?i.acceptToken(e,-o):i.acceptToken(n,-(o-2));break}else if((i.next==10||i.next==13)&&a){i.acceptToken(e,1);break}else s=o=0;i.advance()}})}const CW=xv("script",WZ,GZ),DW=xv("style",YZ,KZ),AW=xv("textarea",JZ,eW),PW=im({"Text RawText IncompleteTag IncompleteCloseTag":R.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":R.angleBracket,TagName:R.tagName,"MismatchedCloseTag/TagName":[R.tagName,R.invalid],AttributeName:R.attributeName,"AttributeValue UnquotedAttributeValue":R.attributeValue,Is:R.definitionOperator,"EntityReference CharacterReference":R.character,Comment:R.blockComment,ProcessingInst:R.processingInstruction,DoctypeDecl:R.documentMeta}),NW=Ka.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:SW,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:[PW],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:[CW,DW,AW,xW,wW,kW,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function VM(t,e){let n=Object.create(null);for(let r of t.getChildren(BM)){let i=r.getChild(lW),s=r.getChild(Ny)||r.getChild(jM);i&&(n[e.read(i.from,i.to)]=s?s.type.id==Ny?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return n}function Zk(t,e){let n=t.getChild(aW);return n?e.read(n.from,n.to):" "}function Lg(t,e,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||(r=VM(t.node.parent.firstChild,e))))return{parser:i.parser};return null}function UM(t=[],e=[]){let n=[],r=[],i=[],s=[];for(let a of t)(a.tag=="script"?n:a.tag=="style"?r:a.tag=="textarea"?i:s).push(a);let o=e.length?Object.create(null):null;for(let a of e)(o[a.name]||(o[a.name]=[])).push(a);return _Z((a,l)=>{let c=a.type.id;if(c==cW)return Lg(a,l,n);if(c==uW)return Lg(a,l,r);if(c==hW)return Lg(a,l,i);if(c==FM&&s.length){let u=a.node,h=u.firstChild,d=h&&Zk(h,l),p;if(d){for(let f of s)if(f.tag==d&&(!f.attrs||f.attrs(p||(p=VM(h,l))))){let m=u.lastChild,g=m.type.id==pW?m.from:u.to;if(g>h.to)return{parser:f.parser,overlay:[{from:h.to,to:g}]}}}}if(o&&c==BM){let u=a.node,h;if(h=u.firstChild){let d=o[l.read(h.from,h.to)];if(d)for(let p of d){if(p.tagName&&p.tagName!=Zk(u.parent,l))continue;let f=u.lastChild;if(f.type.id==Ny){let m=f.from+1,g=f.lastChild,y=f.to-(g&&g.isError?0:1);if(y>m)return{parser:p.parser,overlay:[{from:m,to:y}]}}else if(f.type.id==jM)return{parser:p.parser,overlay:[{from:f.from,to:f.to}]}}}}return null})}const RW=122,Wk=1,MW=123,IW=124,HM=2,LW=125,QW=3,$W=4,XM=[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],FW=58,BW=40,qM=95,jW=91,xd=45,zW=46,VW=35,UW=37,HW=38,XW=92,qW=10,ZW=42;function cu(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function Cv(t){return t>=48&&t<=57}function Gk(t){return Cv(t)||t>=97&&t<=102||t>=65&&t<=70}const ZM=(t,e,n)=>(r,i)=>{for(let s=!1,o=0,a=0;;a++){let{next:l}=r;if(cu(l)||l==xd||l==qM||s&&Cv(l))!s&&(l!=xd||a>0)&&(s=!0),o===a&&l==xd&&o++,r.advance();else if(l==XW&&r.peek(1)!=qW){if(r.advance(),Gk(r.next)){do r.advance();while(Gk(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();s=!0}else{s&&r.acceptToken(o==2&&i.canShift(HM)?e:l==BW?n:t);break}}},WW=new Kn(ZM(MW,HM,IW)),GW=new Kn(ZM(LW,QW,$W)),YW=new Kn(t=>{if(XM.includes(t.peek(-1))){let{next:e}=t;(cu(e)||e==qM||e==VW||e==zW||e==ZW||e==jW||e==FW&&cu(t.peek(1))||e==xd||e==HW)&&t.acceptToken(RW)}}),KW=new Kn(t=>{if(!XM.includes(t.peek(-1))){let{next:e}=t;if(e==UW&&(t.advance(),t.acceptToken(Wk)),cu(e)){do t.advance();while(cu(t.next)||Cv(t.next));t.acceptToken(Wk)}}}),JW=im({"AtKeyword import charset namespace keyframes media supports":R.definitionKeyword,"from to selector":R.keyword,NamespaceName:R.namespace,KeyframeName:R.labelName,KeyframeRangeName:R.operatorKeyword,TagName:R.tagName,ClassName:R.className,PseudoClassName:R.constant(R.className),IdName:R.labelName,"FeatureName PropertyName":R.propertyName,AttributeName:R.attributeName,NumberLiteral:R.number,KeywordQuery:R.keyword,UnaryQueryOp:R.operatorKeyword,"CallTag ValueName":R.atom,VariableName:R.variableName,Callee:R.operatorKeyword,Unit:R.unit,"UniversalSelector NestingSelector":R.definitionOperator,"MatchOp CompareOp":R.compareOperator,"ChildOp SiblingOp, LogicOp":R.logicOperator,BinOp:R.arithmeticOperator,Important:R.modifier,Comment:R.blockComment,ColorLiteral:R.color,"ParenthesizedContent StringLiteral":R.string,":":R.punctuation,"PseudoOp #":R.derefOperator,"; ,":R.separator,"( )":R.paren,"[ ]":R.squareBracket,"{ }":R.brace}),e6={__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},t6={__proto__:null,or:98,and:98,not:106,only:106,layer:170},n6={__proto__:null,selector:112,layer:166},r6={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},i6={__proto__:null,to:207},s6=Ka.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:[JW],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:[YW,KW,WW,GW,1,2,3,4,new gp("m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~",28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},specialized:[{term:124,get:t=>e6[t]||-1},{term:125,get:t=>t6[t]||-1},{term:4,get:t=>n6[t]||-1},{term:25,get:t=>r6[t]||-1},{term:123,get:t=>i6[t]||-1}],tokenPrec:1963});let My=[],WM=[];(()=>{let t="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(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?WM:My).push(n=n+t[e])})();function o6(t){if(t<768)return!1;for(let e=0,n=My.length;;){let r=e+n>>1;if(t<My[r])n=r;else if(t>=WM[r])e=r+1;else return!0;if(e==n)return!1}}function Yk(t){return t>=127462&&t<=127487}const Kk=8205;function a6(t,e,n=!0,r=!0){return(n?GM:l6)(t,e,r)}function GM(t,e,n){if(e==t.length)return e;e&&YM(t.charCodeAt(e))&&KM(t.charCodeAt(e-1))&&e--;let r=Qg(t,e);for(e+=Jk(r);e<t.length;){let i=Qg(t,e);if(r==Kk||i==Kk||n&&o6(i))e+=Jk(i),r=i;else if(Yk(i)){let s=0,o=e-2;for(;o>=0&&Yk(Qg(t,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function l6(t,e,n){for(;e>0;){let r=GM(t,e-2,n);if(r<e)return r;e--}return 0}function Qg(t,e){let n=t.charCodeAt(e);if(!KM(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return YM(r)?(n-55296<<10)+(r-56320)+65536:n}function YM(t){return t>=56320&&t<57344}function KM(t){return t>=55296&&t<56320}function Jk(t){return t<65536?1:2}let We=class JM{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=Ja(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),ei.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Ja(this,e,n);let r=[];return this.decompose(e,n,r,0),ei.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new bc(this),s=new bc(e);for(let o=n,a=n;;){if(i.next(o),s.next(o),o=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(a+=i.value.length,i.done||a>=r)return!0}}iter(e=1){return new bc(this,e)}iterRange(e,n=this.length){return new eI(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new tI(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?JM.empty:e.length<=32?new wt(e):ei.from(wt.split(e,[]))}};class wt extends We{constructor(e,n=c6(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let s=0;;s++){let o=this.text[s],a=i+o.length;if((n?r:a)>=e)return new u6(i,a,r,o);i=a+1,r++}}decompose(e,n,r,i){let s=e<=0&&n>=this.length?this:new wt(e_(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let o=r.pop(),a=Cd(s.text,o.text.slice(),0,s.length);if(a.length<=32)r.push(new wt(a,o.length+s.length));else{let l=a.length>>1;r.push(new wt(a.slice(0,l)),new wt(a.slice(l)))}}else r.push(s)}replace(e,n,r){if(!(r instanceof wt))return super.replace(e,n,r);[e,n]=Ja(this,e,n);let i=Cd(this.text,Cd(r.text,e_(this.text,0,e)),n),s=this.length+r.length-(n-e);return i.length<=32?new wt(i,s):ei.from(wt.split(i,[]),s)}sliceString(e,n=this.length,r=`
`){[e,n]=Ja(this,e,n);let i="";for(let s=0,o=0;s<=n&&o<this.text.length;o++){let a=this.text[o],l=s+a.length;s>e&&o&&(i+=r),e<l&&n>s&&(i+=a.slice(Math.max(0,e-s),n-s)),s=l+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let s of e)r.push(s),i+=s.length+1,r.length==32&&(n.push(new wt(r,i)),r=[],i=-1);return i>-1&&n.push(new wt(r,i)),n}}class ei extends We{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let s=0;;s++){let o=this.children[s],a=i+o.length,l=r+o.lines-1;if((n?l:a)>=e)return o.lineInner(e,n,r,i);i=a+1,r=l+1}}decompose(e,n,r,i){for(let s=0,o=0;o<=n&&s<this.children.length;s++){let a=this.children[s],l=o+a.length;if(e<=l&&n>=o){let c=i&((o<=e?1:0)|(l>=n?2:0));o>=e&&l<=n&&!c?r.push(a):a.decompose(e-o,n-o,r,c)}o=l+1}}replace(e,n,r){if([e,n]=Ja(this,e,n),r.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let o=this.children[i],a=s+o.length;if(e>=s&&n<=a){let l=o.replace(e-s,n-s,r),c=this.lines-o.lines+l.lines;if(l.lines<c>>4&&l.lines>c>>6){let u=this.children.slice();return u[i]=l,new ei(u,this.length-(n-e)+r.length)}return super.replace(s,a,l)}s=a+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
`){[e,n]=Ja(this,e,n);let i="";for(let s=0,o=0;s<this.children.length&&o<=n;s++){let a=this.children[s],l=o+a.length;o>e&&s&&(i+=r),e<l&&n>o&&(i+=a.sliceString(e-o,n-o,r)),o=l+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof ei))return 0;let r=0,[i,s,o,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,s+=n){if(i==o||s==a)return r;let l=this.children[i],c=e.children[s];if(l!=c)return r+l.scanIdentical(c,n);r+=l.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let p of e)r+=p.lines;if(r<32){let p=[];for(let f of e)f.flatten(p);return new wt(p,n)}let i=Math.max(32,r>>5),s=i<<1,o=i>>1,a=[],l=0,c=-1,u=[];function h(p){let f;if(p.lines>s&&p instanceof ei)for(let m of p.children)h(m);else p.lines>o&&(l>o||!l)?(d(),a.push(p)):p instanceof wt&&l&&(f=u[u.length-1])instanceof wt&&p.lines+f.lines<=32?(l+=p.lines,c+=p.length+1,u[u.length-1]=new wt(f.text.concat(p.text),f.length+1+p.length)):(l+p.lines>i&&d(),l+=p.lines,c+=p.length+1,u.push(p))}function d(){l!=0&&(a.push(u.length==1?u[0]:ei.from(u,c)),c=-1,l=u.length=0)}for(let p of e)h(p);return d(),a.length==1?a[0]:new ei(a,n)}}We.empty=new wt([""],0);function c6(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Cd(t,e,n=0,r=1e9){for(let i=0,s=0,o=!0;s<t.length&&i<=r;s++){let a=t[s],l=i+a.length;l>=n&&(l>r&&(a=a.slice(0,r-i)),i<n&&(a=a.slice(n-i)),o?(e[e.length-1]+=a,o=!1):e.push(a)),i=l+1}return e}function e_(t,e,n){return Cd(t,[""],e,n)}class bc{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof wt?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],s=this.offsets[r],o=s>>1,a=i instanceof wt?i.text.length:i.children.length;if(o==(n>0?a:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
`,this;e--}else if(i instanceof wt){let l=i.text[o+(n<0?-1:0)];if(this.offsets[r]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[o+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof wt?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)}}class eI{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new bc(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),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!=""}}class tI{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(We.prototype[Symbol.iterator]=function(){return this.iter()},bc.prototype[Symbol.iterator]=eI.prototype[Symbol.iterator]=tI.prototype[Symbol.iterator]=function(){return this});class u6{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}}function Ja(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Fi(t,e,n=!0,r=!0){return a6(t,e,n,r)}function h6(t){return t>=56320&&t<57344}function d6(t){return t>=55296&&t<56320}function p6(t,e){let n=t.charCodeAt(e);if(!d6(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return h6(r)?(n-55296<<10)+(r-56320)+65536:n}function f6(t){return t<65536?1:2}const Iy=/\r\n?|\n/;var Sn=(function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t})(Sn||(Sn={}));class Hi{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let s=this.sections[n++],o=this.sections[n++];o<0?(e(r,i,s),i+=s):i+=o,r+=s}}iterChangedRanges(e,n=!1){Ly(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new Hi(e)}composeDesc(e){return this.empty?e:e.empty?this:nI(this,e)}mapDesc(e,n=!1){return e.empty?this:Qy(this,e,n)}mapPos(e,n=-1,r=Sn.Simple){let i=0,s=0;for(let o=0;o<this.sections.length;){let a=this.sections[o++],l=this.sections[o++],c=i+a;if(l<0){if(c>e)return s+(e-i);s+=a}else{if(r!=Sn.Simple&&c>=e&&(r==Sn.TrackDel&&i<e&&c>e||r==Sn.TrackBefore&&i<e||r==Sn.TrackAfter&&c>e))return null;if(c>e||c==e&&n<0&&!a)return e==i||n<0?s:s+l;s+=l}i=c}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let s=this.sections[r++],o=this.sections[r++],a=i+s;if(o>=0&&i<=n&&a>=e)return i<e&&a>n?"cover":!0;i=a}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Hi(e)}static create(e){return new Hi(e)}}class Ht extends Hi{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Ly(this,(n,r,i,s,o)=>e=e.replace(i,i+(r-n),o),!1),e}mapDesc(e,n=!1){return Qy(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,s=0;i<n.length;i+=2){let o=n[i],a=n[i+1];if(a>=0){n[i]=a,n[i+1]=o;let l=i>>1;for(;r.length<l;)r.push(We.empty);r.push(o?e.slice(s,s+o):We.empty)}s+=o}return new Ht(n,r)}compose(e){return this.empty?e:e.empty?this:nI(this,e,!0)}map(e,n=!1){return e.empty?this:Qy(this,e,n,!0)}iterChanges(e,n=!1){Ly(this,e,n)}get desc(){return Hi.create(this.sections)}filter(e){let n=[],r=[],i=[],s=new uu(this);e:for(let o=0,a=0;;){let l=o==e.length?1e9:e[o++];for(;a<l||a==l&&s.len==0;){if(s.done)break e;let u=Math.min(s.len,l-a);hn(i,u,-1);let h=s.ins==-1?-1:s.off==0?s.ins:0;hn(n,u,h),h>0&&Ps(r,n,s.text),s.forward(u),a+=u}let c=e[o++];for(;a<c;){if(s.done)break e;let u=Math.min(s.len,c-a);hn(n,u,-1),hn(i,u,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(u),a+=u}}return{changes:new Ht(n,r),filtered:Hi.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],s=[],o=0,a=null;function l(u=!1){if(!u&&!i.length)return;o<n&&hn(i,n-o,-1);let h=new Ht(i,s);a=a?a.compose(h.map(a)):h,i=[],s=[],o=0}function c(u){if(Array.isArray(u))for(let h of u)c(h);else if(u instanceof Ht){if(u.length!=n)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${n})`);l(),a=a?a.compose(u.map(a)):u}else{let{from:h,to:d=h,insert:p}=u;if(h>d||h<0||d>n)throw new RangeError(`Invalid change range ${h} to ${d} (in doc of length ${n})`);let f=p?typeof p=="string"?We.of(p.split(r||Iy)):p:We.empty,m=f.length;if(h==d&&m==0)return;h<o&&l(),h>o&&hn(i,h-o,-1),hn(i,d-h,m),Ps(s,i,f),o=d}}return c(e),l(!a),a}static empty(e){return new Ht(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let s=e[i];if(typeof s=="number")n.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,a)=>a&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;r.length<i;)r.push(We.empty);r[i]=We.of(s.slice(1)),n.push(s[0],r[i].length)}}}return new Ht(n,r)}static createSet(e,n){return new Ht(e,n)}}function hn(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function Ps(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(We.empty);t.push(n)}}function Ly(t,e,n){let r=t.inserted;for(let i=0,s=0,o=0;o<t.sections.length;){let a=t.sections[o++],l=t.sections[o++];if(l<0)i+=a,s+=a;else{let c=i,u=s,h=We.empty;for(;c+=a,u+=l,l&&r&&(h=h.append(r[o-2>>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)a=t.sections[o++],l=t.sections[o++];e(i,c,s,u,h),i=c,s=u}}}function Qy(t,e,n,r=!1){let i=[],s=r?[]:null,o=new uu(t),a=new uu(e);for(let l=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&a.ins==-1){let c=Math.min(o.len,a.len);hn(i,c,-1),o.forward(c),a.forward(c)}else if(a.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(a.len<o.len||a.len==o.len&&!n))){let c=a.len;for(hn(i,a.ins,-1);c;){let u=Math.min(o.len,c);o.ins>=0&&l<o.i&&o.len<=u&&(hn(i,0,o.ins),s&&Ps(s,i,o.text),l=o.i),o.forward(u),c-=u}a.next()}else if(o.ins>=0){let c=0,u=o.len;for(;u;)if(a.ins==-1){let h=Math.min(u,a.len);c+=h,u-=h,a.forward(h)}else if(a.ins==0&&a.len<u)u-=a.len,a.next();else break;hn(i,c,l<o.i?o.ins:0),s&&l<o.i&&Ps(s,i,o.text),l=o.i,o.forward(o.len-u)}else{if(o.done&&a.done)return s?Ht.createSet(i,s):Hi.create(i);throw new Error("Mismatched change set lengths")}}}function nI(t,e,n=!1){let r=[],i=n?[]:null,s=new uu(t),o=new uu(e);for(let a=!1;;){if(s.done&&o.done)return i?Ht.createSet(r,i):Hi.create(r);if(s.ins==0)hn(r,s.len,0,a),s.next();else if(o.len==0&&!o.done)hn(r,0,o.ins,a),i&&Ps(i,r,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let l=Math.min(s.len2,o.len),c=r.length;if(s.ins==-1){let u=o.ins==-1?-1:o.off?0:o.ins;hn(r,l,u,a),i&&u&&Ps(i,r,o.text)}else o.ins==-1?(hn(r,s.off?0:s.len,l,a),i&&Ps(i,r,s.textBit(l))):(hn(r,s.off?0:s.len,o.off?0:o.ins,a),i&&!o.off&&Ps(i,r,o.text));a=(s.ins>l||o.ins>=0&&o.len>l)&&(a||r.length>c),s.forward2(l),o.forward(l)}}}}class uu{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,n=this.i-2>>1;return n>=e.length?We.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?We.empty:n[r].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)}}class So{constructor(e,n,r){this.from=e,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 e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new So(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return ae.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return ae.range(this.anchor,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return ae.range(e.anchor,e.head)}static create(e,n,r){return new So(e,n,r)}}class ae{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:ae.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new ae([this.main],0)}addRange(e,n=!0){return ae.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,ae.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new ae(e.ranges.map(n=>So.fromJSON(n)),e.main)}static single(e,n=e){return new ae([ae.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let s=e[i];if(s.empty?s.from<=r:s.from<r)return ae.normalized(e.slice(),n);r=s.to}return new ae(e,n)}static cursor(e,n=0,r,i){return So.create(e,e,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,n,r,i){let s=(r??16777215)<<6|(i==null?7:Math.min(6,i));return n<e?So.create(n,e,48|s):So.create(e,n,(n>e?8:0)|s)}static normalized(e,n=0){let r=e[n];e.sort((i,s)=>i.from-s.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let s=e[i],o=e[i-1];if(s.empty?s.from<=o.to:s.from<o.to){let a=o.from,l=Math.max(s.to,o.to);i<=n&&n--,e.splice(--i,2,s.anchor>s.head?ae.range(l,a):ae.range(a,l))}}return new ae(e,n)}}function rI(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let Dv=0;class Ee{constructor(e,n,r,i,s){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=Dv++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new Ee(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:Av),!!e.static,e.enables)}of(e){return new Dd([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Dd(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Dd(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function Av(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class Dd{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=Dv++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,s=this.id,o=e[s]>>1,a=this.type==2,l=!1,c=!1,u=[];for(let h of this.dependencies)h=="doc"?l=!0:h=="selection"?c=!0:(((n=e[h.id])!==null&&n!==void 0?n:1)&1)==0&&u.push(e[h.id]);return{create(h){return h.values[o]=r(h),1},update(h,d){if(l&&d.docChanged||c&&(d.docChanged||d.selection)||$y(h,u)){let p=r(h);if(a?!t_(p,h.values[o],i):!i(p,h.values[o]))return h.values[o]=p,1}return 0},reconfigure:(h,d)=>{let p,f=d.config.address[s];if(f!=null){let m=Ep(d,f);if(this.dependencies.every(g=>g instanceof Ee?d.facet(g)===h.facet(g):g instanceof to?d.field(g,!1)==h.field(g,!1):!0)||(a?t_(p=r(h),m,i):i(p=r(h),m)))return h.values[o]=m,0}else p=r(h);return h.values[o]=p,1}}}}function t_(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function $y(t,e){let n=!1;for(let r of e)Ec(t,r)&1&&(n=!0);return n}function m6(t,e,n){let r=n.map(l=>t[l.id]),i=n.map(l=>l.type),s=r.filter(l=>!(l&1)),o=t[e.id]>>1;function a(l){let c=[];for(let u=0;u<r.length;u++){let h=Ep(l,r[u]);if(i[u]==2)for(let d of h)c.push(d);else c.push(h)}return e.combine(c)}return{create(l){for(let c of r)Ec(l,c);return l.values[o]=a(l),1},update(l,c){if(!$y(l,s))return 0;let u=a(l);return e.compare(u,l.values[o])?0:(l.values[o]=u,1)},reconfigure(l,c){let u=$y(l,r),h=c.config.facets[e.id],d=c.facet(e);if(h&&!u&&Av(n,h))return l.values[o]=d,0;let p=a(l);return e.compare(p,d)?(l.values[o]=d,0):(l.values[o]=p,1)}}}const Ih=Ee.define({static:!0});class to{constructor(e,n,r,i,s){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let n=new to(Dv++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(Ih).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let s=r.values[n],o=this.updateF(s,i);return this.compareF(s,o)?0:(r.values[n]=o,1)},reconfigure:(r,i)=>{let s=r.facet(Ih),o=i.facet(Ih),a;return(a=s.find(l=>l.field==this))&&a!=o.find(l=>l.field==this)?(r.values[n]=a.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(e){return[this,Ih.of({field:this,create:e})]}get extension(){return this}}const bo={lowest:4,low:3,default:2,high:1,highest:0};function Il(t){return e=>new iI(e,t)}const sm={highest:Il(bo.highest),high:Il(bo.high),default:Il(bo.default),low:Il(bo.low),lowest:Il(bo.lowest)};class iI{constructor(e,n){this.inner=e,this.prec=n}}class om{of(e){return new Fy(this,e)}reconfigure(e){return om.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Fy{constructor(e,n){this.compartment=e,this.inner=n}}class bp{constructor(e,n,r,i,s,o){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],s=Object.create(null),o=new Map;for(let d of g6(e,n,o))d instanceof to?i.push(d):(s[d.facet.id]||(s[d.facet.id]=[])).push(d);let a=Object.create(null),l=[],c=[];for(let d of i)a[d.id]=c.length<<1,c.push(p=>d.slot(p));let u=r==null?void 0:r.config.facets;for(let d in s){let p=s[d],f=p[0].facet,m=u&&u[d]||[];if(p.every(g=>g.type==0))if(a[f.id]=l.length<<1|1,Av(m,p))l.push(r.facet(f));else{let g=f.combine(p.map(y=>y.value));l.push(r&&f.compare(g,r.facet(f))?r.facet(f):g)}else{for(let g of p)g.type==0?(a[g.id]=l.length<<1|1,l.push(g.value)):(a[g.id]=c.length<<1,c.push(y=>g.dynamicSlot(y)));a[f.id]=c.length<<1,c.push(g=>m6(g,f,p))}}let h=c.map(d=>d(a));return new bp(e,o,h,a,l,s)}}function g6(t,e,n){let r=[[],[],[],[],[]],i=new Map;function s(o,a){let l=i.get(o);if(l!=null){if(l<=a)return;let c=r[l].indexOf(o);c>-1&&r[l].splice(c,1),o instanceof Fy&&n.delete(o.compartment)}if(i.set(o,a),Array.isArray(o))for(let c of o)s(c,a);else if(o instanceof Fy){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(o.compartment)||o.inner;n.set(o.compartment,c),s(c,a)}else if(o instanceof iI)s(o.inner,o.prec);else if(o instanceof to)r[a].push(o),o.provides&&s(o.provides,a);else if(o instanceof Dd)r[a].push(o),o.facet.extensions&&s(o.facet.extensions,bo.default);else{let c=o.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(c,a)}}return s(t,bo.default),r.reduce((o,a)=>o.concat(a))}function Ec(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function Ep(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const sI=Ee.define(),By=Ee.define({combine:t=>t.some(e=>e),static:!0}),oI=Ee.define({combine:t=>t.length?t[0]:void 0,static:!0}),aI=Ee.define(),lI=Ee.define(),cI=Ee.define(),uI=Ee.define({combine:t=>t.length?t[0]:!1});class Jo{constructor(e,n){this.type=e,this.value=n}static define(){return new O6}}class O6{of(e){return new Jo(this,e)}}class y6{constructor(e){this.map=e}of(e){return new Et(this,e)}}class Et{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Et(this.type,n)}is(e){return this.type==e}static define(e={}){return new y6(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let s=i.map(n);s&&r.push(s)}return r}}Et.reconfigure=Et.define();Et.appendConfig=Et.define();class nn{constructor(e,n,r,i,s,o){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,r&&rI(r,n.newLength),s.some(a=>a.type==nn.time)||(this.annotations=s.concat(nn.time.of(Date.now())))}static create(e,n,r,i,s,o){return new nn(e,n,r,i,s,o)}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(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(nn.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}nn.time=Jo.define();nn.userEvent=Jo.define();nn.addToHistory=Jo.define();nn.remote=Jo.define();function b6(t,e){let n=[];for(let r=0,i=0;;){let s,o;if(r<t.length&&(i==e.length||e[i]>=t[r]))s=t[r++],o=t[r++];else if(i<e.length)s=e[i++],o=e[i++];else return n;!n.length||n[n.length-1]<s?n.push(s,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function hI(t,e,n){var r;let i,s,o;return n?(i=e.changes,s=Ht.empty(e.changes.length),o=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),s=t.changes.mapDesc(e.changes,!0),o=t.changes.compose(i)),{changes:o,selection:e.selection?e.selection.map(s):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:Et.mapEffects(t.effects,i).concat(Et.mapEffects(e.effects,s)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function jy(t,e,n){let r=e.selection,i=Ma(e.annotations);return e.userEvent&&(i=i.concat(nn.userEvent.of(e.userEvent))),{changes:e.changes instanceof Ht?e.changes:Ht.of(e.changes||[],n,t.facet(oI)),selection:r&&(r instanceof ae?r:ae.single(r.anchor,r.head)),effects:Ma(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function dI(t,e,n){let r=jy(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(n=!1);let o=!!e[s].sequential;r=hI(r,jy(t,e[s],o?r.changes.newLength:t.doc.length),o)}let i=nn.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return v6(n?E6(i):i)}function E6(t){let e=t.startState,n=!0;for(let i of e.facet(aI)){let s=i(t);if(s===!1){n=!1;break}Array.isArray(s)&&(n=n===!0?s:b6(n,s))}if(n!==!0){let i,s;if(n===!1)s=t.changes.invertedDesc,i=Ht.empty(e.doc.length);else{let o=t.changes.filter(n);i=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}t=nn.create(e,i,t.selection&&t.selection.map(s),Et.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let r=e.facet(lI);for(let i=r.length-1;i>=0;i--){let s=r[i](t);s instanceof nn?t=s:Array.isArray(s)&&s.length==1&&s[0]instanceof nn?t=s[0]:t=dI(e,Ma(s),!1)}return t}function v6(t){let e=t.startState,n=e.facet(cI),r=t;for(let i=n.length-1;i>=0;i--){let s=n[i](t);s&&Object.keys(s).length&&(r=hI(r,jy(e,s,t.changes.newLength),!0))}return r==t?t:nn.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const T6=[];function Ma(t){return t==null?T6:Array.isArray(t)?t:[t]}var Bi=(function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t})(Bi||(Bi={}));const S6=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let zy;try{zy=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function w6(t){if(zy)return zy.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||S6.test(n)))return!0}return!1}function k6(t){return e=>{if(!/\S/.test(e))return Bi.Space;if(w6(e))return Bi.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return Bi.Word;return Bi.Other}}class Ze{constructor(e,n,r,i,s,o){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)Ec(this,a<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return Ec(this,r),Ep(this,r)}update(...e){return dI(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let a of e.effects)a.is(om.reconfigure)?(n&&(i=new Map,n.compartments.forEach((l,c)=>i.set(c,l)),n=null),i.set(a.value.compartment,a.value.extension)):a.is(Et.reconfigure)?(n=null,r=a.value):a.is(Et.appendConfig)&&(n=null,r=Ma(r).concat(a.value));let s;n?s=e.startState.values.slice():(n=bp.resolve(r,i,this),s=new Ze(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(a,l)=>l.reconfigure(a,this),null).values);let o=e.startState.facet(By)?e.newSelection:e.newSelection.asSingle();new Ze(n,e.newDoc,o,s,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:ae.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),s=[r.range],o=Ma(r.effects);for(let a=1;a<n.ranges.length;a++){let l=e(n.ranges[a]),c=this.changes(l.changes),u=c.map(i);for(let d=0;d<a;d++)s[d]=s[d].map(u);let h=i.mapDesc(c,!0);s.push(l.range.map(h)),i=i.compose(u),o=Et.mapEffects(o,u).concat(Et.mapEffects(Ma(l.effects),h))}return{changes:i,selection:ae.create(s,n.mainIndex),effects:o}}changes(e=[]){return e instanceof Ht?e:Ht.of(e,this.doc.length,this.facet(Ze.lineSeparator))}toText(e){return We.of(e.split(this.facet(Ze.lineSeparator)||Iy))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(Ec(this,n),Ep(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof to&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let s in r)if(Object.prototype.hasOwnProperty.call(e,s)){let o=r[s],a=e[s];i.push(o.init(l=>o.spec.fromJSON(a,l)))}}return Ze.create({doc:e.doc,selection:ae.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=bp.resolve(e.extensions||[],new Map),r=e.doc instanceof We?e.doc:We.of((e.doc||"").split(n.staticFacet(Ze.lineSeparator)||Iy)),i=e.selection?e.selection instanceof ae?e.selection:ae.single(e.selection.anchor,e.selection.head):ae.single(0);return rI(i,r.length),n.staticFacet(By)||(i=i.asSingle()),new Ze(n,r,i,n.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(Ze.tabSize)}get lineBreak(){return this.facet(Ze.lineSeparator)||`
`}get readOnly(){return this.facet(uI)}phrase(e,...n){for(let r of this.facet(Ze.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>n.length?r:n[s-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let s of this.facet(sI))for(let o of s(this,n,r))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){return k6(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-r,a=e-r;for(;o>0;){let l=Fi(n,o,!1);if(s(n.slice(l,o))!=Bi.Word)break;o=l}for(;a<i;){let l=Fi(n,a);if(s(n.slice(a,l))!=Bi.Word)break;a=l}return o==a?null:ae.range(o+r,a+r)}}Ze.allowMultipleSelections=By;Ze.tabSize=Ee.define({combine:t=>t.length?t[0]:4});Ze.lineSeparator=oI;Ze.readOnly=uI;Ze.phrases=Ee.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});Ze.languageData=sI;Ze.changeFilter=aI;Ze.transactionFilter=lI;Ze.transactionExtender=cI;om.reconfigure=Et.define();function _6(t,e,n={}){let r={};for(let i of t)for(let s of Object.keys(i)){let o=i[s],a=r[s];if(a===void 0)r[s]=o;else if(!(a===o||o===void 0))if(Object.hasOwnProperty.call(n,s))r[s]=n[s](a,o);else throw new Error("Config merge conflict for field "+s)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class Fo{eq(e){return this==e}range(e,n=e){return hu.create(e,n,this)}}Fo.prototype.startSide=Fo.prototype.endSide=0;Fo.prototype.point=!1;Fo.prototype.mapMode=Sn.TrackDel;class hu{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new hu(e,n,r)}}function Vy(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Pv{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let s=r?this.to:this.from;for(let o=i,a=s.length;;){if(o==a)return o;let l=o+a>>1,c=s[l]-e||(r?this.value[l].endSide:this.value[l].startSide)-n;if(l==o)return c>=0?o:a;c>=0?a=l:o=l+1}}between(e,n,r,i){for(let s=this.findIndex(n,-1e9,!0),o=this.findIndex(r,1e9,!1,s);s<o;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,n){let r=[],i=[],s=[],o=-1,a=-1;for(let l=0;l<this.value.length;l++){let c=this.value[l],u=this.from[l]+e,h=this.to[l]+e,d,p;if(u==h){let f=n.mapPos(u,c.startSide,c.mapMode);if(f==null||(d=p=f,c.startSide!=c.endSide&&(p=n.mapPos(u,c.endSide),p<d)))continue}else if(d=n.mapPos(u,c.startSide),p=n.mapPos(h,c.endSide),d>p||d==p&&c.startSide>0&&c.endSide<=0)continue;(p-d||c.endSide-c.startSide)<0||(o<0&&(o=d),c.point&&(a=Math.max(a,p-d)),r.push(c),i.push(d-o),s.push(p-o))}return{mapped:r.length?new Pv(i,s,r,a):null,pos:o}}}class Ye{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new Ye(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:s=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(Vy)),this.isEmpty)return n.length?Ye.of(n):this;let a=new pI(this,null,-1).goto(0),l=0,c=[],u=new du;for(;a.value||l<n.length;)if(l<n.length&&(a.from-n[l].from||a.startSide-n[l].value.startSide)>=0){let h=n[l++];u.addInner(h.from,h.to,h.value)||c.push(h)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(l==n.length||this.chunkEnd(a.chunkIndex)<n[l].from)&&(!o||i>this.chunkEnd(a.chunkIndex)||s<this.chunkPos[a.chunkIndex])&&u.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!o||i>a.to||s<a.from||o(a.from,a.to,a.value))&&(u.addInner(a.from,a.to,a.value)||c.push(hu.create(a.from,a.to,a.value))),a.next());return u.finishInner(this.nextLayer.isEmpty&&!c.length?Ye.empty:this.nextLayer.update({add:c,filter:o,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let o=0;o<this.chunk.length;o++){let a=this.chunkPos[o],l=this.chunk[o],c=e.touchesRange(a,a+l.length);if(c===!1)i=Math.max(i,l.maxPoint),n.push(l),r.push(e.mapPos(a));else if(c===!0){let{mapped:u,pos:h}=l.map(a,e);u&&(i=Math.max(i,u.maxPoint),n.push(u),r.push(h))}}let s=this.nextLayer.map(e);return n.length==0?s:new Ye(r,n,s||Ye.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i];if(n>=s&&e<=s+o.length&&o.between(s,e-s,n-s,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return pu.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return pu.from(e).goto(n)}static compare(e,n,r,i,s=-1){let o=e.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=s),a=n.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=s),l=n_(o,a,r),c=new Ll(o,l,s),u=new Ll(a,l,s);r.iterGaps((h,d,p)=>r_(c,h,u,d,p,i)),r.empty&&r.length==0&&r_(c,0,u,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=999999999);let s=e.filter(u=>!u.isEmpty&&n.indexOf(u)<0),o=n.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let a=n_(s,o),l=new Ll(s,a,0).goto(r),c=new Ll(o,a,0).goto(r);for(;;){if(l.to!=c.to||!Uy(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>i)return!0;l.next(),c.next()}}static spans(e,n,r,i,s=-1){let o=new Ll(e,null,s).goto(n),a=n,l=o.openStart;for(;;){let c=Math.min(o.to,r);if(o.point){let u=o.activeForPoint(o.to),h=o.pointFrom<n?u.length+1:o.point.startSide<0?u.length:Math.min(u.length,l);i.point(a,c,o.point,u,h,o.pointRank),l=Math.min(o.openEnd(c),u.length)}else c>a&&(i.span(a,c,o.active,l),l=o.openEnd(c));if(o.to>r)return l+(o.point&&o.to>r?1:0);a=o.to,o.next()}}static of(e,n=!1){let r=new du;for(let i of e instanceof hu?[e]:n?x6(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return Ye.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=Ye.empty;i=i.nextLayer)n=new Ye(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}Ye.empty=new Ye([],[],null,-1);function x6(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(Vy(e,r)>0)return t.slice().sort(Vy);e=r}return t}Ye.empty.nextLayer=Ye.empty;class du{finishChunk(e){this.chunks.push(new Pv(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,e&&(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(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new du)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-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=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-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(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(Ye.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Ye.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function n_(t,e,n){let r=new Map;for(let s of t)for(let o=0;o<s.chunk.length;o++)s.chunk[o].maxPoint<=0&&r.set(s.chunk[o],s.chunkPos[o]);let i=new Set;for(let s of e)for(let o=0;o<s.chunk.length;o++){let a=r.get(s.chunk[o]);a!=null&&(n?n.mapPos(a):a)==s.chunkPos[o]&&!(n!=null&&n.touchesRange(a,a+s.chunk[o].length))&&i.add(s.chunk[o])}return i}class pI{constructor(e,n,r,i=0){this.layer=e,this.skip=n,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!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],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.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}}class pu{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let s=0;s<e.length;s++)for(let o=e[s];!o.isEmpty;o=o.nextLayer)o.maxPoint>=r&&i.push(new pI(o,n,r,s));return i.length==1?i[0]:new pu(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)$g(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)$g(this.heap,r);(this.to-e||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 e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),$g(this.heap,0)}}}function $g(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class Ll{constructor(e,n,r){this.minPoint=r,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=pu.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){Lh(this.active,e),Lh(this.activeTo,e),Lh(this.activeRank,e),this.minActive=i_(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:s}=this.cursor;for(;n<this.activeRank.length&&(s-this.activeRank[n]||i-this.activeTo[n])>0;)n++;Qh(this.active,n,r),Qh(this.activeTo,n,i),Qh(this.activeRank,n,s),e&&Qh(e,n,this.cursor.from),this.minActive=i_(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&Lh(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function r_(t,e,n,r,i,s){t.goto(e),n.goto(r);let o=r+i,a=r,l=r-e;for(;;){let c=t.to+l-n.to,u=c||t.endSide-n.endSide,h=u<0?t.to+l:n.to,d=Math.min(h,o);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&Uy(t.activeForPoint(t.to),n.activeForPoint(n.to))||s.comparePoint(a,d,t.point,n.point):d>a&&!Uy(t.active,n.active)&&s.compareRange(a,d,t.active,n.active),h>o)break;(c||t.openEnd!=n.openEnd)&&s.boundChange&&s.boundChange(h),a=h,u<=0&&t.next(),u>=0&&n.next()}}function Uy(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function Lh(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function Qh(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function i_(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function C6(t,e,n,r){for(let i=0,s=0;;){if(s>=e)return i;if(i==t.length)break;s+=t.charCodeAt(i)==9?n-s%n:1,i=Fi(t,i)}return t.length}const Hy="ͼ",s_=typeof Symbol>"u"?"__"+Hy:Symbol.for(Hy),Xy=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),o_=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class qs{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,a,l,c){let u=[],h=/^@(\w+)\b/.exec(o[0]),d=h&&h[1]=="keyframes";if(h&&a==null)return l.push(o[0]+";");for(let p in a){let f=a[p];if(/&/.test(p))s(p.split(/,\s*/).map(m=>o.map(g=>m.replace(/&/,g))).reduce((m,g)=>m.concat(g)),f,l);else if(f&&typeof f=="object"){if(!h)throw new RangeError("The value of a property ("+p+") should be a primitive value.");s(i(p),f,u,d)}else f!=null&&u.push(p.replace(/_.*/,"").replace(/[A-Z]/g,m=>"-"+m.toLowerCase())+": "+f+";")}(u.length||d)&&l.push((r&&!h&&!c?o.map(r):o).join(", ")+" {"+u.join(" ")+"}")}for(let o in e)s(i(o),e[o],this.rules)}getRules(){return this.rules.join(`
`)}static newName(){let e=o_[s_]||1;return o_[s_]=e+1,Hy+e.toString(36)}static mount(e,n,r){let i=e[Xy],s=r&&r.nonce;i?s&&i.setNonce(s):i=new D6(e,s),i.mount(Array.isArray(n)?n:[n],e)}}let a_=new Map;class D6{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let s=a_.get(r);if(s)return e[Xy]=s;this.sheet=new i.CSSStyleSheet,a_.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[Xy]=this}mount(e,n){let r=this.sheet,i=0,s=0;for(let o=0;o<e.length;o++){let a=e[o],l=this.modules.indexOf(a);if(l<s&&l>-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,a),r)for(let c=0;c<a.rules.length;c++)r.insertRule(a.rules[c],i++)}else{for(;s<l;)i+=this.modules[s++].rules.length;i+=a.rules.length,s++}}if(r)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let o="";for(let l=0;l<this.modules.length;l++)o+=this.modules[l].getRules()+`
`;this.styleTag.textContent=o;let a=n.head||n;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}let Tn=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},qy=typeof document<"u"?document:{documentElement:{style:{}}};const Zy=/Edge\/(\d+)/.exec(Tn.userAgent),fI=/MSIE \d/.test(Tn.userAgent),Wy=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Tn.userAgent),am=!!(fI||Wy||Zy),l_=!am&&/gecko\/(\d+)/i.test(Tn.userAgent),Fg=!am&&/Chrome\/(\d+)/.exec(Tn.userAgent),A6="webkitFontSmoothing"in qy.documentElement.style,Gy=!am&&/Apple Computer/.test(Tn.vendor),c_=Gy&&(/Mobile\/\w+/.test(Tn.userAgent)||Tn.maxTouchPoints>2);var se={mac:c_||/Mac/.test(Tn.platform),windows:/Win/.test(Tn.platform),linux:/Linux|X11/.test(Tn.platform),ie:am,ie_version:fI?qy.documentMode||6:Wy?+Wy[1]:Zy?+Zy[1]:0,gecko:l_,gecko_version:l_?+(/Firefox\/(\d+)/.exec(Tn.userAgent)||[0,0])[1]:0,chrome:!!Fg,chrome_version:Fg?+Fg[1]:0,ios:c_,android:/Android\b/.test(Tn.userAgent),webkit_version:A6?+(/\bAppleWebKit\/(\d+)/.exec(Tn.userAgent)||[0,0])[1]:0,safari:Gy,safari_version:Gy?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Tn.userAgent)||[0,0])[1]:0,tabSize:qy.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function fu(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function Yy(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function Ad(t,e){if(!e.anchorNode)return!1;try{return Yy(t,e.anchorNode)}catch{return!1}}function mu(t){return t.nodeType==3?jo(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function vc(t,e,n,r){return n?u_(t,e,n,r,-1)||u_(t,e,n,r,1):!1}function Bo(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function vp(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function u_(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:di(t))){if(t.nodeName=="DIV")return!1;let s=t.parentNode;if(!s||s.nodeType!=1)return!1;e=Bo(t)+(i<0?0:1),t=s}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?di(t):0}else return!1}}function di(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function lm(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function P6(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function mI(t,e){let n=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function N6(t,e,n,r,i,s,o,a){let l=t.ownerDocument,c=l.defaultView||window;for(let u=t,h=!1;u&&!h;)if(u.nodeType==1){let d,p=u==l.body,f=1,m=1;if(p)d=P6(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(h=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let b=u.getBoundingClientRect();({scaleX:f,scaleY:m}=mI(u,b)),d={left:b.left,right:b.left+u.clientWidth*f,top:b.top,bottom:b.top+u.clientHeight*m}}let g=0,y=0;if(i=="nearest")e.top<d.top?(y=e.top-(d.top+o),n>0&&e.bottom>d.bottom+y&&(y=e.bottom-d.bottom+o)):e.bottom>d.bottom&&(y=e.bottom-d.bottom+o,n<0&&e.top-y<d.top&&(y=e.top-(d.top+o)));else{let b=e.bottom-e.top,T=d.bottom-d.top;y=(i=="center"&&b<=T?e.top+b/2-T/2:i=="start"||i=="center"&&n<0?e.top-o:e.bottom-T+o)-d.top}if(r=="nearest"?e.left<d.left?(g=e.left-(d.left+s),n>0&&e.right>d.right+g&&(g=e.right-d.right+s)):e.right>d.right&&(g=e.right-d.right+s,n<0&&e.left<d.left+g&&(g=e.left-(d.left+s))):g=(r=="center"?e.left+(e.right-e.left)/2-(d.right-d.left)/2:r=="start"==a?e.left-s:e.right-(d.right-d.left)+s)-d.left,g||y)if(p)c.scrollBy(g,y);else{let b=0,T=0;if(y){let S=u.scrollTop;u.scrollTop+=y/m,T=(u.scrollTop-S)*m}if(g){let S=u.scrollLeft;u.scrollLeft+=g/f,b=(u.scrollLeft-S)*f}e={left:e.left-b,top:e.top-T,right:e.right-b,bottom:e.bottom-T},b&&Math.abs(b-g)<1&&(r="nearest"),T&&Math.abs(T-y)<1&&(i="nearest")}if(p)break;(e.top<d.top||e.bottom>d.bottom||e.left<d.left||e.right>d.right)&&(e={left:Math.max(e.left,d.left),right:Math.min(e.right,d.right),top:Math.max(e.top,d.top),bottom:Math.min(e.bottom,d.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function R6(t){let e=t.ownerDocument,n,r;for(let i=t.parentNode;i&&!(i==e.body||n&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:n,y:r}}class M6{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:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?di(n):0),r,Math.min(e.focusOffset,r?di(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let Oo=null;se.safari&&se.safari_version>=26&&(Oo=!1);function gI(t){if(t.setActive)return t.setActive();if(Oo)return t.focus(Oo);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Oo==null?{get preventScroll(){return Oo={preventScroll:!0},!0}}:void 0),!Oo){Oo=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],s=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=s&&(r.scrollLeft=s)}}}let h_;function jo(t,e,n=e){let r=h_||(h_=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function Ia(t,e,n,r){let i={key:e,code:e,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let s=new KeyboardEvent("keydown",i);s.synthetic=!0,t.dispatchEvent(s);let o=new KeyboardEvent("keyup",i);return o.synthetic=!0,t.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}function I6(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function OI(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function L6(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,di(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=di(n))}else{if(n==t)return!0;r=Bo(n),n=n.parentNode}}function yI(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function bI(t,e){for(let n=t,r=e;;){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=di(n)}else if(n.parentNode&&!vp(n))r=Bo(n),n=n.parentNode;else return null}}function EI(t,e){for(let n=t,r=e;;){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&&!vp(n))r=Bo(n)+1,n=n.parentNode;else return null}}class pn{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new pn(e.parentNode,Bo(e),n)}static after(e,n){return new pn(e.parentNode,Bo(e)+1,n)}}const Nv=[];class Je{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;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}sync(e,n){if(this.flags&2){let r=this.dom,i=null,s;for(let o of this.children){if(o.flags&7){if(!o.dom&&(s=i?i.nextSibling:r.firstChild)){let a=Je.get(s);(!a||!a.parent&&a.canReuseDOM(o))&&o.reuseDOM(s)}o.sync(e,n),o.flags&=-8}if(s=i?i.nextSibling:r.firstChild,n&&!n.written&&n.node==r&&s!=o.dom&&(n.written=!0),o.dom.parentNode==r)for(;s&&s!=o.dom;)s=d_(s);else r.insertBefore(o.dom,s);i=o.dom}for(s=i?i.nextSibling:r.firstChild,s&&n&&n.node==r&&(n.written=!0);s;)s=d_(s)}else if(this.flags&1)for(let r of this.children)r.flags&7&&(r.sync(e,n),r.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let r;if(e==this.dom)r=this.dom.childNodes[n];else{let i=di(e)==0?0:n==0?-1:1;for(;;){let s=e.parentNode;if(s==this.dom)break;i==0&&s.firstChild!=s.lastChild&&(e==s.firstChild?i=-1:i=1),e=s}i<0?r=e:r=e.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!Je.get(r);)r=r.nextSibling;if(!r)return this.length;for(let i=0,s=0;;i++){let o=this.children[i];if(o.dom==r)return s;s+=o.length+o.breakAfter}}domBoundsAround(e,n,r=0){let i=-1,s=-1,o=-1,a=-1;for(let l=0,c=r,u=r;l<this.children.length;l++){let h=this.children[l],d=c+h.length;if(c<e&&d>n)return h.domBoundsAround(e,n,c);if(d>=e&&i==-1&&(i=l,s=c),c>n&&h.dom.parentNode==this.dom){o=l,a=u;break}u=d,c=d+h.breakAfter}return{from:s,to:a<0?r+this.length:a,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,r=Nv){this.markDirty();for(let i=e;i<n;i++){let s=this.children[i];s.parent==this&&r.indexOf(s)<0&&s.destroy()}r.length<250?this.children.splice(e,n-e,...r):this.children=[].concat(this.children.slice(0,e),r,this.children.slice(n));for(let i=0;i<r.length;i++)r[i].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new vI(this.children,e,this.children.length)}childPos(e,n=1){return this.childCursor().findPos(e,n)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,n,r,i,s,o){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}Je.prototype.breakAfter=0;function d_(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class vI{constructor(e,n,r){this.children=e,this.pos=n,this.i=r,this.off=0}findPos(e,n=1){for(;;){if(e>this.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function TI(t,e,n,r,i,s,o,a,l){let{children:c}=t,u=c.length?c[e]:null,h=s.length?s[s.length-1]:null,d=h?h.breakAfter:o;if(!(e==r&&u&&!o&&!d&&s.length<2&&u.merge(n,i,s.length?h:null,n==0,a,l))){if(r<c.length){let p=c[r];p&&(i<p.length||p.breakAfter&&(h!=null&&h.breakAfter))?(e==r&&(p=p.split(i),i=0),!d&&h&&p.merge(0,i,h,!0,0,l)?s[s.length-1]=p:((i||p.children.length&&!p.children[0].length)&&p.merge(0,i,null,!1,0,l),s.push(p))):p!=null&&p.breakAfter&&(h?h.breakAfter=1:o=1),r++}for(u&&(u.breakAfter=o,n>0&&(!o&&s.length&&u.merge(n,u.length,s[0],!1,a,0)?u.breakAfter=s.shift().breakAfter:(n<u.length||u.children.length&&u.children[u.children.length-1].length==0)&&u.merge(n,u.length,null,!1,a,0),e++));e<r&&s.length;)if(c[r-1].become(s[s.length-1]))r--,s.pop(),l=s.length?0:a;else if(c[e].become(s[0]))e++,s.shift(),a=s.length?0:l;else break;!s.length&&e&&r<c.length&&!c[e-1].breakAfter&&c[r].merge(0,0,c[e-1],!1,a,l)&&e--,(e<r||s.length)&&t.replaceChildren(e,r,s)}}function SI(t,e,n,r,i,s){let o=t.childCursor(),{i:a,off:l}=o.findPos(n,1),{i:c,off:u}=o.findPos(e,-1),h=e-n;for(let d of r)h+=d.length;t.length+=h,TI(t,c,u,a,l,r,0,i,s)}const Q6=256;class Ar extends Je{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,r){return this.flags&8||r&&(!(r instanceof Ar)||this.length-(n-e)+r.length>Q6||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new Ar(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new pn(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return $6(this.dom,e,n)}}class Yi extends Je{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let i of n)i.setParent(this)}setAttrs(e){if(OI(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,r,i,s,o){return r&&(!(r instanceof Yi&&r.mark.eq(this.mark))||e&&s<=0||n<this.length&&o<=0)?!1:(SI(this,e,n,r?r.children.slice():[],s-1,o-1),this.markDirty(),!0)}split(e){let n=[],r=0,i=-1,s=0;for(let a of this.children){let l=r+a.length;l>e&&n.push(r<e?a.split(e-r):a),i<0&&r>=e&&(i=s),r=l,s++}let o=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new Yi(this.mark,n,o)}domAtPos(e){return wI(this,e)}coordsAt(e,n){return _I(this,e,n)}}function $6(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,s=e,o=0;e==0&&n<0||e==r&&n>=0?se.chrome||se.gecko||(e?(i--,o=1):s<r&&(s++,o=-1)):n<0?i--:s<r&&s++;let a=jo(t,i,s).getClientRects();if(!a.length)return null;let l=a[(o?o<0:n>=0)?0:a.length-1];return se.safari&&!o&&l.width==0&&(l=Array.prototype.find.call(a,c=>c.width)||l),o?lm(l,o<0):l||null}class Ns extends Je{static create(e,n,r){return new Ns(e,n,r)}constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}split(e){let n=Ns.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,r,i,s,o){return r&&(!(r instanceof Ns)||!this.widget.compare(r.widget)||e>0&&s<=0||n<this.length&&o<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}become(e){return e instanceof Ns&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return We.empty;let e=this;for(;e.parent;)e=e.parent;let{view:n}=e,r=n&&n.state.doc,i=this.posAtStart;return r?r.slice(i,i+this.length):We.empty}domAtPos(e){return(this.length?e==0:this.side>0)?pn.before(this.dom):pn.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;let i=this.dom.getClientRects(),s=null;if(!i.length)return null;let o=this.side?this.side<0:e>0;for(let a=o?i.length-1:0;s=i[a],!(e>0?a==0:a==i.length-1||s.top<s.bottom);a+=o?-1:1);return lm(s,!o)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class el extends Je{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof el&&e.side==this.side}split(){return new el(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?pn.before(this.dom):pn.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return We.empty}get isHidden(){return!0}}Ar.prototype.children=Ns.prototype.children=el.prototype.children=Nv;function wI(t,e){let n=t.dom,{children:r}=t,i=0;for(let s=0;i<r.length;i++){let o=r[i],a=s+o.length;if(!(a==s&&o.getSide()<=0)){if(e>s&&e<a&&o.dom.parentNode==n)return o.domAtPos(e-s);if(e<=s)break;s=a}}for(let s=i;s>0;s--){let o=r[s-1];if(o.dom.parentNode==n)return o.domAtPos(o.length)}for(let s=i;s<r.length;s++){let o=r[s];if(o.dom.parentNode==n)return o.domAtPos(0)}return new pn(n,0)}function kI(t,e,n){let r,{children:i}=t;n>0&&e instanceof Yi&&i.length&&(r=i[i.length-1])instanceof Yi&&r.mark.eq(e.mark)?kI(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function _I(t,e,n){let r=null,i=-1,s=null,o=-1;function a(c,u){for(let h=0,d=0;h<c.children.length&&d<=u;h++){let p=c.children[h],f=d+p.length;f>=u&&(p.children.length?a(p,u-d):(!s||s.isHidden&&(n>0||B6(s,p)))&&(f>u||d==f&&p.getSide()>0)?(s=p,o=u-d):(d<u||d==f&&p.getSide()<0&&!p.isHidden)&&(r=p,i=u-d)),d=f}}a(t,e);let l=(n<0?r:s)||r||s;return l?l.coordsAt(Math.max(0,l==r?i:o),n):F6(t)}function F6(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=mu(e);return n[n.length-1]||null}function B6(t,e){let n=t.coordsAt(0,1),r=e.coordsAt(0,1);return n&&r&&r.top<n.bottom}function Ky(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const p_=Object.create(null);function Tp(t,e,n){if(t==e)return!0;t||(t=p_),e||(e=p_);let r=Object.keys(t),i=Object.keys(e);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let s of r)if(s!=n&&(i.indexOf(s)==-1||t[s]!==e[s]))return!1;return!0}function Jy(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function j6(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class cm{eq(e){return!1}updateDOM(e,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,n,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var fr=(function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t})(fr||(fr={}));class Ft extends Fo{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new Uu(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new Zs(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:s,end:o}=xI(e,n);r=(s?n?-3e8:-1:5e8)-1,i=(o?n?2e8:1:-6e8)+1}return new Zs(e,r,i,n,e.widget||null,!0)}static line(e){return new Hu(e)}static set(e,n=!1){return Ye.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ft.none=Ye.empty;class Uu extends Ft{constructor(e){let{start:n,end:r}=xI(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,r;return this==e||e instanceof Uu&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&Tp(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}Uu.prototype.point=!1;class Hu extends Ft{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Hu&&this.spec.class==e.spec.class&&Tp(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Hu.prototype.mapMode=Sn.TrackBefore;Hu.prototype.point=!0;class Zs extends Ft{constructor(e,n,r,i,s,o){super(n,r,s,e),this.block=i,this.isReplace=o,this.mapMode=i?n<=0?Sn.TrackBefore:Sn.TrackAfter:Sn.TrackDel}get type(){return this.startSide!=this.endSide?fr.WidgetRange:this.startSide<=0?fr.WidgetBefore:fr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Zs&&z6(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Zs.prototype.point=!0;function xI(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function z6(t,e){return t==e||!!(t&&e&&t.compare(e))}function Pd(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class At extends Je{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,i,s,o){if(r){if(!(r instanceof At))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),SI(this,e,n,r?r.children.slice():[],s,o),!0}split(e){let n=new At;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:i}=this.childPos(e);i&&(n.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let s=r;s<this.children.length;s++)n.append(this.children[s],0);for(;r>0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Tp(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){kI(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=Ky(n,this.attrs||{})),r&&(this.attrs=Ky({class:r},this.attrs||{}))}domAtPos(e){return wI(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var r;this.dom?this.flags&4&&(OI(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Jy(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let i=this.dom.lastChild;for(;i&&Je.get(i)instanceof Yi;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=Je.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!se.ios||!this.children.some(s=>s instanceof Ar))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let r of this.children){if(!(r instanceof Ar)||/[^ -~]/.test(r.text))return null;let i=mu(r.dom);if(i.length!=1)return null;e+=i[0].width,n=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=_I(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,s=r.bottom-r.top;if(Math.abs(s-i.lineHeight)<2&&i.textHeight<s){let o=(s-i.textHeight)/2;return{top:r.top+o,bottom:r.bottom-o,left:r.left,right:r.left}}}return r}become(e){return e instanceof At&&this.children.length==0&&e.children.length==0&&Tp(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,n){for(let r=0,i=0;r<e.children.length;r++){let s=e.children[r],o=i+s.length;if(o>=n){if(s instanceof At)return s;if(o>n)break}i=o+s.breakAfter}return null}}class Xi extends Je{constructor(e,n,r){super(),this.widget=e,this.length=n,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,i,s,o){return r&&(!(r instanceof Xi)||!this.widget.compare(r.widget)||e>0&&s<=0||n<this.length&&o<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}domAtPos(e){return e==0?pn.before(this.dom):pn.after(this.dom,e==this.length)}split(e){let n=this.length-e;this.length=e;let r=new Xi(this.widget,n,this.deco);return r.breakAfter=this.breakAfter,r}get children(){return Nv}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):We.empty}domBoundsAround(){return null}become(e){return e instanceof Xi&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,n){return this.widget.coordsAt(this.dom,e,n)||(this.widget instanceof eb?null:lm(this.dom.getBoundingClientRect(),this.length?e==0:n<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:n,endSide:r}=this.deco;return n==r?!1:e<0?n<0:r>0}}class eb extends cm{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}}class Tc{constructor(e,n,r,i){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Xi&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new At),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append($h(new el(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Xi)&&this.getLine()}buildText(e,n,r){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:a,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(a){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e),s=Math.min(i,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append($h(new Ar(this.text.slice(this.textOff,this.textOff+s)),n),r),this.atCursorPos=!0,this.textOff+=s,e-=s,r=i<=s?0:n.length}}span(e,n,r,i){this.buildText(n-e,r,i),this.pos=n,this.openStart<0&&(this.openStart=i)}point(e,n,r,i,s,o){if(this.disallowBlockEffectsFor[o]&&r instanceof Zs){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=n-e;if(r instanceof Zs)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Xi(r.widget||tl.block,a,r));else{let l=Ns.create(r.widget||tl.inline,a,a?0:r.startSide),c=this.atCursorPos&&!l.isEditable&&s<=i.length&&(e<n||r.startSide>0),u=!l.isEditable&&(e<n||s>i.length||r.startSide<=0),h=this.getLine();this.pendingBuffer==2&&!c&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),c&&(h.append($h(new el(1),i),s),s=i.length+Math.max(0,s-i.length)),h.append($h(l,i),s),this.atCursorPos=u,this.pendingBuffer=u?e<n||s>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=s)}static build(e,n,r,i,s){let o=new Tc(e,n,r,s);return o.openEnd=Ye.spans(i,n,r,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function $h(t,e){for(let n of e)t=new Yi(n,[t],t.length);return t}class tl extends cm{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}}tl.inline=new tl("span");tl.block=new tl("div");var Zt=(function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t})(Zt||(Zt={}));const zo=Zt.LTR,Rv=Zt.RTL;function CI(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const V6=CI("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),U6=CI("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),tb=Object.create(null),Vr=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);tb[e]=n,tb[n]=-e}function DI(t){return t<=247?V6[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?U6[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const H6=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Rs{get dir(){return this.level%2?Rv:zo}constructor(e,n,r){this.from=e,this.to=n,this.level=r}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,r,i){let s=-1;for(let o=0;o<e.length;o++){let a=e[o];if(a.from<=n&&a.to>=n){if(a.level==r)return o;(s<0||(i!=0?i<0?a.from<n:a.to>n:e[s].level>a.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function AI(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!AI(r.inner,i.inner))return!1}return!0}const et=[];function X6(t,e,n,r,i){for(let s=0;s<=r.length;s++){let o=s?r[s-1].to:e,a=s<r.length?r[s].from:n,l=s?256:i;for(let c=o,u=l,h=l;c<a;c++){let d=DI(t.charCodeAt(c));d==512?d=u:d==8&&h==4&&(d=16),et[c]=d==4?2:d,d&7&&(h=d),u=d}for(let c=o,u=l,h=l;c<a;c++){let d=et[c];if(d==128)c<a-1&&u==et[c+1]&&u&24?d=et[c]=u:et[c]=256;else if(d==64){let p=c+1;for(;p<a&&et[p]==64;)p++;let f=c&&u==8||p<n&&et[p]==8?h==1?1:8:256;for(let m=c;m<p;m++)et[m]=f;c=p-1}else d==8&&h==1&&(et[c]=1);u=d,d&7&&(h=d)}}}function q6(t,e,n,r,i){let s=i==1?2:1;for(let o=0,a=0,l=0;o<=r.length;o++){let c=o?r[o-1].to:e,u=o<r.length?r[o].from:n;for(let h=c,d,p,f;h<u;h++)if(p=tb[d=t.charCodeAt(h)])if(p<0){for(let m=a-3;m>=0;m-=3)if(Vr[m+1]==-p){let g=Vr[m+2],y=g&2?i:g&4?g&1?s:i:0;y&&(et[h]=et[Vr[m]]=y),a=m;break}}else{if(Vr.length==189)break;Vr[a++]=h,Vr[a++]=d,Vr[a++]=l}else if((f=et[h])==2||f==1){let m=f==i;l=m?0:1;for(let g=a-3;g>=0;g-=3){let y=Vr[g+2];if(y&2)break;if(m)Vr[g+2]|=2;else{if(y&4)break;Vr[g+2]|=4}}}}}function Z6(t,e,n,r){for(let i=0,s=r;i<=n.length;i++){let o=i?n[i-1].to:t,a=i<n.length?n[i].from:e;for(let l=o;l<a;){let c=et[l];if(c==256){let u=l+1;for(;;)if(u==a){if(i==n.length)break;u=n[i++].to,a=i<n.length?n[i].from:e}else if(et[u]==256)u++;else break;let h=s==1,d=(u<e?et[u]:r)==1,p=h==d?h?1:2:r;for(let f=u,m=i,g=m?n[m-1].to:t;f>l;)f==g&&(f=n[--m].from,g=m?n[m-1].to:t),et[--f]=p;l=u}else s=c,l++}}}function nb(t,e,n,r,i,s,o){let a=r%2?2:1;if(r%2==i%2)for(let l=e,c=0;l<n;){let u=!0,h=!1;if(c==s.length||l<s[c].from){let m=et[l];m!=a&&(u=!1,h=m==16)}let d=!u&&a==1?[]:null,p=u?r:r+1,f=l;e:for(;;)if(c<s.length&&f==s[c].from){if(h)break e;let m=s[c];if(!u)for(let g=m.to,y=c+1;;){if(g==n)break e;if(y<s.length&&s[y].from==g)g=s[y++].to;else{if(et[g]==a)break e;break}}if(c++,d)d.push(m);else{m.from>l&&o.push(new Rs(l,m.from,p));let g=m.direction==zo!=!(p%2);rb(t,g?r+1:r,i,m.inner,m.from,m.to,o),l=m.to}f=m.to}else{if(f==n||(u?et[f]!=a:et[f]==a))break;f++}d?nb(t,l,f,r+1,i,d,o):l<f&&o.push(new Rs(l,f,p)),l=f}else for(let l=n,c=s.length;l>e;){let u=!0,h=!1;if(!c||l>s[c-1].to){let m=et[l-1];m!=a&&(u=!1,h=m==16)}let d=!u&&a==1?[]:null,p=u?r:r+1,f=l;e:for(;;)if(c&&f==s[c-1].to){if(h)break e;let m=s[--c];if(!u)for(let g=m.from,y=c;;){if(g==e)break e;if(y&&s[y-1].to==g)g=s[--y].from;else{if(et[g-1]==a)break e;break}}if(d)d.push(m);else{m.to<l&&o.push(new Rs(m.to,l,p));let g=m.direction==zo!=!(p%2);rb(t,g?r+1:r,i,m.inner,m.from,m.to,o),l=m.from}f=m.from}else{if(f==e||(u?et[f-1]!=a:et[f-1]==a))break;f--}d?nb(t,f,l,r+1,i,d,o):f<l&&o.push(new Rs(f,l,p)),l=f}}function rb(t,e,n,r,i,s,o){let a=e%2?2:1;X6(t,i,s,r,a),q6(t,i,s,r,a),Z6(i,s,r,a),nb(t,i,s,e,n,r,o)}function W6(t,e,n){if(!t)return[new Rs(0,0,e==Rv?1:0)];if(e==zo&&!n.length&&!H6.test(t))return PI(t.length);if(n.length)for(;t.length>et.length;)et[et.length]=256;let r=[],i=e==zo?0:1;return rb(t,i,i,n,0,t.length,r),r}function PI(t){return[new Rs(0,t,0)]}let NI="";function G6(t,e,n,r,i){var s;let o=r.head-t.from,a=Rs.find(e,o,(s=r.bidiLevel)!==null&&s!==void 0?s:-1,r.assoc),l=e[a],c=l.side(i,n);if(o==c){let d=a+=i?1:-1;if(d<0||d>=e.length)return null;l=e[a=d],o=l.side(!i,n),c=l.side(i,n)}let u=Fi(t.text,o,l.forward(i,n));(u<l.from||u>l.to)&&(u=c),NI=t.text.slice(Math.min(o,u),Math.max(o,u));let h=a==(i?e.length-1:0)?null:e[a+(i?1:-1)];return h&&u==c&&h.level+(i?0:1)<l.level?ae.cursor(h.side(!i,n)+t.from,h.forward(i,n)?1:-1,h.level):ae.cursor(u+t.from,l.forward(i,n)?-1:1,l.level)}function Y6(t,e,n){for(let r=e;r<n;r++){let i=DI(t.charCodeAt(r));if(i==1)return zo;if(i==2||i==4)return Rv}return zo}const RI=Ee.define(),MI=Ee.define(),II=Ee.define(),LI=Ee.define(),ib=Ee.define(),QI=Ee.define(),$I=Ee.define(),Mv=Ee.define(),Iv=Ee.define(),FI=Ee.define({combine:t=>t.some(e=>e)}),K6=Ee.define({combine:t=>t.some(e=>e)}),BI=Ee.define();class La{constructor(e,n="nearest",r="nearest",i=5,s=5,o=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new La(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new La(ae.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Fh=Et.define({map:(t,e)=>t.map(e)}),jI=Et.define();function ri(t,e,n){let r=t.facet(LI);r.length?r[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const Ri=Ee.define({combine:t=>t.length?t[0]:!0});let J6=0;const Sa=Ee.define({combine(t){return t.filter((e,n)=>{for(let r=0;r<n;r++)if(t[r].plugin==e.plugin)return!1;return!0})}});class Ws{constructor(e,n,r,i,s){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(Sa.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Sa.of({plugin:this,arg:e}))}static define(e,n){const{eventHandlers:r,eventObservers:i,provide:s,decorations:o}=n||{};return new Ws(J6++,e,r,i,a=>{let l=[];return o&&l.push(gu.of(c=>{let u=c.plugin(a);return u?o(u):Ft.none})),s&&l.push(s(a)),l})}static fromClass(e,n){return Ws.define((r,i)=>new e(r,i),n)}}class Bg{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 n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(ri(n.state,r,"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(n){ri(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){ri(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const zI=Ee.define(),Lv=Ee.define(),gu=Ee.define(),VI=Ee.define(),Xu=Ee.define(),UI=Ee.define();function f_(t,e){let n=t.state.facet(UI);if(!n.length)return n;let r=n.map(s=>s instanceof Function?s(t):s),i=[];return Ye.spans(r,e.from,e.to,{point(){},span(s,o,a,l){let c=s-e.from,u=o-e.from,h=i;for(let d=a.length-1;d>=0;d--,l--){let p=a[d].spec.bidiIsolate,f;if(p==null&&(p=Y6(e.text,c,u)),l>0&&h.length&&(f=h[h.length-1]).to==c&&f.direction==p)f.to=u,h=f.inner;else{let m={from:c,to:u,direction:p,inner:[]};h.push(m),h=m.inner}}}}),i}const HI=Ee.define();function XI(t){let e=0,n=0,r=0,i=0;for(let s of t.state.facet(HI)){let o=s(t);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:e,right:n,top:r,bottom:i}}const sc=Ee.define();class mr{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new mr(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.length==0)return e;let r=[];for(let i=0,s=0,o=0,a=0;;i++){let l=i==e.length?null:e[i],c=o-a,u=l?l.fromB:1e9;for(;s<n.length&&n[s]<u;){let h=n[s],d=n[s+1],p=Math.max(a,h),f=Math.min(u,d);if(p<=f&&new mr(p+c,f+c,p,f).addToSet(r),d>u)break;s+=2}if(!l)return r;new mr(l.fromA,l.toA,l.fromB,l.toB).addToSet(r),o=l.toA,a=l.toB}}}class Sp{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=Ht.empty(this.startState.doc.length);for(let s of r)this.changes=this.changes.compose(s.changes);let i=[];this.changes.iterChangedRanges((s,o,a,l)=>i.push(new mr(s,o,a,l))),this.changedRanges=i}static create(e,n,r){return new Sp(e,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(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class m_ extends Je{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Ft.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.setDOM(e.contentDOM),this.children=[new At],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new mr(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:c,toA:u})=>u<this.minWidthFrom||c>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 i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!oG(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let s=i>-1?tG(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:u}=this.hasComposition;r=new mr(c,u,e.changes.mapPos(c,-1),e.changes.mapPos(u,1)).addToSet(r.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(se.ie||se.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,a=this.updateDeco(),l=iG(o,a,e.changes);return r=mr.extendWithRanges(r,l),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=se.chrome||se.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||i.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let s=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let o of this.children)o instanceof Xi&&o.widget instanceof eb&&s.push(o.dom);i.updateGaps(s)}updateChildren(e,n,r){let i=r?r.range.addToSet(e.slice()):e,s=this.childCursor(n);for(let o=i.length-1;;o--){let a=o>=0?i[o]:null;if(!a)break;let{fromA:l,toA:c,fromB:u,toB:h}=a,d,p,f,m;if(r&&r.range.fromB<h&&r.range.toB>u){let S=Tc.build(this.view.state.doc,u,r.range.fromB,this.decorations,this.dynamicDecorationMap),w=Tc.build(this.view.state.doc,r.range.toB,h,this.decorations,this.dynamicDecorationMap);p=S.breakAtStart,f=S.openStart,m=w.openEnd;let A=this.compositionView(r);w.breakAtStart?A.breakAfter=1:w.content.length&&A.merge(A.length,A.length,w.content[0],!1,w.openStart,0)&&(A.breakAfter=w.content[0].breakAfter,w.content.shift()),S.content.length&&A.merge(0,0,S.content[S.content.length-1],!0,0,S.openEnd)&&S.content.pop(),d=S.content.concat(A).concat(w.content)}else({content:d,breakAtStart:p,openStart:f,openEnd:m}=Tc.build(this.view.state.doc,u,h,this.decorations,this.dynamicDecorationMap));let{i:g,off:y}=s.findPos(c,1),{i:b,off:T}=s.findPos(l,-1);TI(this,b,T,g,y,d,p,f,m)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(jI)&&(this.editContextFormatting=r.value)}compositionView(e){let n=new Ar(e.text.nodeValue);n.flags|=8;for(let{deco:i}of e.marks)n=new Yi(i,[n],n.length);let r=new At;return r.append(n,0),r}fixCompositionDOM(e){let n=(s,o)=>{o.flags|=8|(o.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(o);let a=Je.get(s);a&&a!=o&&(a.dom=null),o.setDOM(s)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];n(e.line,i);for(let s=e.marks.length-1;s>=-1;s--)r=i.childPos(r.off,1),i=i.children[r.i],n(s>=0?e.marks[s].node:e.text,i)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,s=!i&&!(this.view.state.facet(Ri)||this.dom.tabIndex>-1)&&Ad(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||n||s))return;let o=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(a.anchor)),c=a.empty?l:this.moveToLine(this.domAtPos(a.head));if(se.gecko&&a.empty&&!this.hasComposition&&eG(l)){let h=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(h,l.node.childNodes[l.offset]||null)),l=c=new pn(h,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!vc(l.node,l.offset,u.anchorNode,u.anchorOffset)||!vc(c.node,c.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,a))&&(this.view.observer.ignore(()=>{se.android&&se.chrome&&this.dom.contains(u.focusNode)&&sG(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let h=fu(this.view.root);if(h)if(a.empty){if(se.gecko){let d=nG(l.node,l.offset);if(d&&d!=3){let p=(d==1?bI:EI)(l.node,l.offset);p&&(l=new pn(p.node,p.offset))}}h.collapse(l.node,l.offset),a.bidiLevel!=null&&h.caretBidiLevel!==void 0&&(h.caretBidiLevel=a.bidiLevel)}else if(h.extend){h.collapse(l.node,l.offset);try{h.extend(c.node,c.offset)}catch{}}else{let d=document.createRange();a.anchor>a.head&&([l,c]=[c,l]),d.setEnd(c.node,c.offset),d.setStart(l.node,l.offset),h.removeAllRanges(),h.addRange(d)}s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new pn(u.anchorNode,u.anchorOffset),this.impreciseHead=c.precise?null:new pn(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&vc(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=fu(e.root),{anchorNode:i,anchorOffset:s}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let o=At.find(this,n.head);if(!o)return;let a=o.posAtStart;if(n.head==a||n.head==a+o.length)return;let l=this.coordsAt(n.head,-1),c=this.coordsAt(n.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(n.head+n.assoc);r.collapse(u.node,u.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let h=e.observer.selectionRange;e.docView.posFromDOM(h.anchorNode,h.anchorOffset)!=n.from&&r.collapse(i,s)}moveToLine(e){let n=this.dom,r;if(e.node!=n)return e;for(let i=e.offset;!r&&i<n.childNodes.length;i++){let s=Je.get(n.childNodes[i]);s instanceof At&&(r=s.domAtPos(0))}for(let i=e.offset-1;!r&&i>=0;i--){let s=Je.get(n.childNodes[i]);s instanceof At&&(r=s.domAtPos(s.length))}return r?new pn(r.node,r.offset,!0):e}nearest(e){for(let n=e;n;){let r=Je.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n<this.children.length-1;){let i=this.children[n];if(r<i.length||i instanceof At)break;n++,r=0}return this.children[n].domAtPos(r)}coordsAt(e,n){let r=null,i=0;for(let s=this.length,o=this.children.length-1;o>=0;o--){let a=this.children[o],l=s-a.breakAfter,c=l-a.length;if(l<e)break;if(c<=e&&(c<e||a.covers(-1))&&(l>e||a.covers(1))&&(!r||a instanceof At&&!(r instanceof At&&n>=0)))r=a,i=c;else if(r&&c==e&&l==e&&a instanceof Xi&&Math.abs(n)<2){if(a.deco.startSide<0)break;o&&(r=null)}s=c}return r?r.coordsAt(e-i,n):null}coordsForChar(e){let{i:n,off:r}=this.childPos(e,1),i=this.children[n];if(!(i instanceof At))return null;for(;i.children.length;){let{i:a,off:l}=i.childPos(r,1);for(;;a++){if(a==i.children.length)return null;if((i=i.children[a]).length)break}r=l}if(!(i instanceof Ar))return null;let s=Fi(i.text,r);if(s==r)return null;let o=jo(i.dom,r,s).getClientRects();for(let a=0;a<o.length;a++){let l=o[a];if(a==o.length-1||l.top<l.bottom&&l.left<l.right)return l}return null}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,s=this.view.contentDOM.clientWidth,o=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==Zt.LTR;for(let c=0,u=0;u<this.children.length;u++){let h=this.children[u],d=c+h.length;if(d>i)break;if(c>=r){let p=h.dom.getBoundingClientRect();if(n.push(p.height),o){let f=h.dom.lastChild,m=f?mu(f):[];if(m.length){let g=m[m.length-1],y=l?g.right-p.left:p.right-g.left;y>a&&(a=y,this.minWidth=s,this.minWidthFrom=c,this.minWidthTo=d)}}}c=d+h.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?Zt.RTL:Zt.LTR}measureTextSize(){for(let s of this.children)if(s instanceof At){let o=s.measureTextSize();if(o)return o}let e=document.createElement("div"),n,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=mu(e.firstChild)[0];n=e.getBoundingClientRect().height,r=s?s.width/27:7,i=s?s.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new vI(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let s=i==n.viewports.length?null:n.viewports[i],o=s?s.from-1:this.length;if(o>r){let a=(n.lineBlockAt(o).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(Ft.replace({widget:new eb(a),block:!0,inclusive:!0,isBlockGap:!0}).range(r,o))}if(!s)break;r=s.to+1}return Ft.set(e)}updateDeco(){let e=1,n=this.view.state.facet(gu).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),r=!1,i=this.view.state.facet(VI).map((s,o)=>{let a=typeof s=="function";return a&&(r=!0),a?s(this.view):s});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push(Ye.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let c=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=c.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let c of this.view.state.facet(BI))try{if(c(this.view,e.range,e))return!0}catch(u){ri(this.view.state,u,"scroll handler")}let{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc: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 s=XI(this.view),o={left:r.left-s.left,top:r.top-s.top,right:r.right+s.right,bottom:r.bottom+s.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;N6(this.view.scrollDOM,o,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,l),-l),this.view.textDirection==Zt.LTR)}lineHasWidget(e){let{i:n}=this.childCursor().findPos(e);if(n==this.children.length)return!1;let r=i=>i instanceof Ns||i.children.some(r);return r(this.children[n])}}function eG(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function qI(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let r=bI(n.focusNode,n.focusOffset),i=EI(n.focusNode,n.focusOffset),s=r||i;if(i&&r&&i.node!=r.node){let a=Je.get(i.node);if(!a||a instanceof Ar&&a.text!=i.node.nodeValue)s=i;else if(t.docView.lastCompositionAfterCursor){let l=Je.get(r.node);!l||l instanceof Ar&&l.text!=r.node.nodeValue||(s=i)}}if(t.docView.lastCompositionAfterCursor=s!=r,!s)return null;let o=e-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}function tG(t,e,n){let r=qI(t,n);if(!r)return null;let{node:i,from:s,to:o}=r,a=i.nodeValue;if(/[\n\r]/.test(a)||t.state.doc.sliceString(r.from,r.to)!=a)return null;let l=e.invertedDesc,c=new mr(l.mapPos(s),l.mapPos(o),s,o),u=[];for(let h=i.parentNode;;h=h.parentNode){let d=Je.get(h);if(d instanceof Yi)u.push({node:h,deco:d.mark});else{if(d instanceof At||h.nodeName=="DIV"&&h.parentNode==t.contentDOM)return{range:c,text:i,marks:u,line:h};if(h!=t.contentDOM)u.push({node:h,deco:new Uu({inclusive:!0,attributes:j6(h),tagName:h.tagName.toLowerCase()})});else return null}}}function nG(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let rG=class{constructor(){this.changes=[]}compareRange(t,e){Pd(t,e,this.changes)}comparePoint(t,e){Pd(t,e,this.changes)}boundChange(t){Pd(t,t,this.changes)}};function iG(t,e,n){let r=new rG;return Ye.compare(t,e,n,r),r.changes}function sG(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function oG(t,e){let n=!1;return e&&t.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(n=!0)}),n}function aG(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),s=e-i.from;if(i.length==0)return ae.cursor(e);s==0?n=1:s==i.length&&(n=-1);let o=s,a=s;n<0?o=Fi(i.text,s,!1):a=Fi(i.text,s);let l=r(i.text.slice(o,a));for(;o>0;){let c=Fi(i.text,o,!1);if(r(i.text.slice(c,o))!=l)break;o=c}for(;a<i.length;){let c=Fi(i.text,a);if(r(i.text.slice(a,c))!=l)break;a=c}return ae.range(o+i.from,a+i.from)}function lG(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function cG(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function jg(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function g_(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function O_(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function sb(t,e,n){let r,i,s,o,a=!1,l,c,u,h;for(let f=t.firstChild;f;f=f.nextSibling){let m=mu(f);for(let g=0;g<m.length;g++){let y=m[g];i&&jg(i,y)&&(y=g_(O_(y,i.bottom),i.top));let b=lG(e,y),T=cG(n,y);if(b==0&&T==0)return f.nodeType==3?y_(f,e,n):sb(f,e,n);(!r||o>T||o==T&&s>b)&&(r=f,i=y,s=b,o=T,a=b?e<y.left?g>0:g<m.length-1:!0),b==0?n>y.bottom&&(!u||u.bottom<y.bottom)?(l=f,u=y):n<y.top&&(!h||h.top>y.top)&&(c=f,h=y):u&&jg(u,y)?u=O_(u,y.bottom):h&&jg(h,y)&&(h=g_(h,y.top))}}if(u&&u.bottom>=n?(r=l,i=u):h&&h.top<=n&&(r=c,i=h),!r)return{node:t,offset:0};let d=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return y_(r,d,n);if(a&&r.contentEditable!="false")return sb(r,d,n);let p=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:p}}function y_(t,e,n){let r=t.nodeValue.length,i=-1,s=1e9,o=0;for(let a=0;a<r;a++){let l=jo(t,a,a+1).getClientRects();for(let c=0;c<l.length;c++){let u=l[c];if(u.top==u.bottom)continue;o||(o=e-u.left);let h=(u.top>n?u.top-n:n-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&h<s){let d=e>=(u.left+u.right)/2,p=d;if(se.chrome||se.gecko){let f=jo(t,a).getBoundingClientRect();Math.abs(f.left-u.right)<.1&&(p=!d)}if(h<=0)return{node:t,offset:a+(p?1:0)};i=a+(p?1:0),s=h}}}return{node:t,offset:i>-1?i:o>0?t.nodeValue.length:0}}function ZI(t,e,n,r=-1){var i,s;let o=t.contentDOM.getBoundingClientRect(),a=o.top+t.viewState.paddingTop,l,{docHeight:c}=t.viewState,{x:u,y:h}=e,d=h-a;if(d<0)return 0;if(d>c)return t.state.doc.length;for(let S=t.viewState.heightOracle.textHeight/2,w=!1;l=t.elementAtHeight(d),l.type!=fr.Text;)for(;d=r>0?l.bottom+S:l.top-S,!(d>=0&&d<=c);){if(w)return n?null:0;w=!0,r=-r}h=a+d;let p=l.from;if(p<t.viewport.from)return t.viewport.from==0?0:n?null:b_(t,o,l,u,h);if(p>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:b_(t,o,l,u,h);let f=t.dom.ownerDocument,m=t.root.elementFromPoint?t.root:f,g=m.elementFromPoint(u,h);g&&!t.contentDOM.contains(g)&&(g=null),g||(u=Math.max(o.left+1,Math.min(o.right-1,u)),g=m.elementFromPoint(u,h),g&&!t.contentDOM.contains(g)&&(g=null));let y,b=-1;if(g&&((i=t.docView.nearest(g))===null||i===void 0?void 0:i.isEditable)!=!1){if(f.caretPositionFromPoint){let S=f.caretPositionFromPoint(u,h);S&&({offsetNode:y,offset:b}=S)}else if(f.caretRangeFromPoint){let S=f.caretRangeFromPoint(u,h);S&&({startContainer:y,startOffset:b}=S)}y&&(!t.contentDOM.contains(y)||se.safari&&uG(y,b,u)||se.chrome&&hG(y,b,u))&&(y=void 0),y&&(b=Math.min(di(y),b))}if(!y||!t.docView.dom.contains(y)){let S=At.find(t.docView,p);if(!S)return d>l.top+l.height/2?l.to:l.from;({node:y,offset:b}=sb(S.dom,u,h))}let T=t.docView.nearest(y);if(!T)return null;if(T.isWidget&&((s=T.dom)===null||s===void 0?void 0:s.nodeType)==1){let S=T.dom.getBoundingClientRect();return e.y<S.top||e.y<=S.bottom&&e.x<=(S.left+S.right)/2?T.posAtStart:T.posAtEnd}else return T.localPosFromDOM(y,b)+T.posAtStart}function b_(t,e,n,r,i){let s=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((i-n.top-(t.defaultLineHeight-a)*.5)/a);s+=l*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(n.from,n.to);return n.from+C6(o,s,t.state.tabSize)}function WI(t,e,n){let r,i=t;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(;;){let s=i.nextSibling;if(s){if(s.nodeName=="BR")break;return!1}else{let o=i.parentNode;if(!o||o.nodeName=="DIV")break;i=o}}return jo(t,r-1,r).getBoundingClientRect().right>n}function uG(t,e,n){return WI(t,e,n)}function hG(t,e,n){if(e!=0)return WI(t,e,n);for(let i=t;;){let s=i.parentNode;if(!s||s.nodeType!=1||s.firstChild!=i)return!1;if(s.classList.contains("cm-line"))break;i=s}let r=t.nodeType==1?t.getBoundingClientRect():jo(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function dG(t,e,n){let r=t.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let s of r.type){if(s.from>e)break;if(!(s.to<e)){if(s.from<e&&s.to>e)return s;(!i||s.type==fr.Text&&(i.type!=s.type||(n<0?s.from<e:s.to>e)))&&(i=s)}}return i||r}return r}function pG(t,e,n,r){let i=dG(t,e.head,e.assoc||-1),s=!r||i.type!=fr.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(s){let o=t.dom.getBoundingClientRect(),a=t.textDirectionAt(i.from),l=t.posAtCoords({x:n==(a==Zt.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(l!=null)return ae.cursor(l,n?-1:1)}return ae.cursor(n?i.to:i.from,n?-1:1)}function E_(t,e,n,r){let i=t.state.doc.lineAt(e.head),s=t.bidiSpans(i),o=t.textDirectionAt(i.from);for(let a=e,l=null;;){let c=G6(i,s,o,a,n),u=NI;if(!c){if(i.number==(n?t.state.doc.lines:1))return a;u=`
`,i=t.state.doc.line(i.number+(n?1:-1)),s=t.bidiSpans(i),c=t.visualLineSide(i,!n)}if(l){if(!l(u))return a}else{if(!r)return c;l=r(u)}a=c}}function fG(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return s=>{let o=r(s);return i==Bi.Space&&(i=o),i==o}}function mG(t,e,n,r){let i=e.head,s=n?1:-1;if(i==(n?t.state.doc.length:0))return ae.cursor(i,e.assoc);let o=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(i,e.assoc||-1),u=t.documentTop;if(c)o==null&&(o=c.left-l.left),a=s<0?c.top:c.bottom;else{let p=t.viewState.lineBlockAt(i);o==null&&(o=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-p.from))),a=(s<0?p.top:p.bottom)+u}let h=l.left+o,d=r??t.viewState.heightOracle.textHeight>>1;for(let p=0;;p+=10){let f=a+(d+p)*s,m=ZI(t,{x:h,y:f},!1,s);if(f<l.top||f>l.bottom||(s<0?m<i:m>i)){let g=t.docView.coordsForChar(m),y=!g||f<g.top?-1:1;return ae.cursor(m,y,void 0,o)}}}function Sc(t,e,n){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(s,o,a)=>{if(e>s&&e<o){let l=r||n||(e-s<o-e?-1:1);e=l<0?s:o,r=l}});if(!r)return e}}function GI(t,e){let n=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],s=null;if(i.empty){let o=Sc(t,i.from,0);o!=i.from&&(s=ae.cursor(o,-1))}else{let o=Sc(t,i.from,-1),a=Sc(t,i.to,1);(o!=i.from||a!=i.to)&&(s=ae.range(i.from==i.anchor?o:a,i.from==i.head?o:a))}s&&(n||(n=e.ranges.slice()),n[r]=s)}return n?ae.create(n,e.mainIndex):e}function zg(t,e,n){let r=Sc(t.state.facet(Xu).map(i=>i(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:ae.cursor(r,r<n.from?1:-1)}const oc="￿";class gG{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(Ze.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=oc}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let s=this.text.length;this.readNode(i);let o=i.nextSibling;if(o==n)break;let a=Je.get(i),l=Je.get(o);(a&&l?a.breakAfter:(a?a.breakAfter:vp(i))||vp(o)&&(i.nodeName!="BR"||i.cmIgnore)&&this.text.length>s)&&!yG(o,n)&&this.lineBreak(),i=o}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,a;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,r),o=this.lineSeparator.length):(a=i.exec(n))&&(s=a.index,o=a[0].length),this.append(n.slice(r,s<0?n.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=o-1);r=s+o}}readNode(e){if(e.cmIgnore)return;let n=Je.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.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,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(OG(e,r.node,r.offset)?n:0))}}function OG(t,e,n){for(;;){if(!e||n<di(e))return!1;if(e==t)return!0;n=Bo(e)+1,e=e.parentNode}}function yG(t,e){let n;for(;!(t==e||!t);t=t.nextSibling){let r=Je.get(t);if(!(r!=null&&r.isWidget||t.cmIgnore))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}class v_{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class bG{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,r,0))){let a=s||o?[]:vG(e),l=new gG(a,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=TG(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=s&&s.node==a.focusNode&&s.offset==a.focusOffset||!Yy(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),c=o&&o.node==a.anchorNode&&o.offset==a.anchorOffset||!Yy(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),u=e.viewport;if((se.ios||se.chrome)&&e.state.selection.main.empty&&l!=c&&(u.from>0||u.to<e.state.doc.length)){let h=Math.min(l,c),d=Math.max(l,c),p=u.from-h,f=u.to-d;(p==0||p==1||h==0)&&(f==0||f==-1||d==e.state.doc.length)&&(l=0,c=e.state.doc.length)}e.inputState.composing>-1&&e.state.selection.ranges.length>1?this.newSel=e.state.selection.replaceRange(ae.range(c,l)):this.newSel=ae.single(c,l)}}}function YI(t,e){let n,{newSel:r}=e,i=t.state.selection.main,s=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:a}=e.bounds,l=i.from,c=null;(s===8||se.android&&e.text.length<a-o)&&(l=i.to,c="end");let u=KI(t.state.doc.sliceString(o,a,oc),e.text,l-o,c);u&&(se.chrome&&s==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==oc+oc&&u.toB--,n={from:o+u.from,to:o+u.toA,insert:We.of(e.text.slice(u.from,u.toB).split(oc))})}else r&&(!t.hasFocus&&t.state.facet(Ri)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&e.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:(se.mac||se.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&t.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:We.of([n.insert.toString().replace("."," ")])}):n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:t.state.doc.lineAt(i.from).to<i.to&&t.docView.lineHasWidget(i.to)&&t.inputState.insertingTextAt>Date.now()-50?n={from:i.from,to:i.to,insert:t.state.toText(t.inputState.insertingText)}:se.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
`&&t.lineWrapping&&(r&&(r=ae.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:We.of([" "])}),n)return Qv(t,n,r,s);if(r&&!r.main.eq(i)){let o=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(o=!0),a=t.inputState.lastSelectionOrigin,a=="select.pointer"&&(r=GI(t.state.facet(Xu).map(l=>l(t)),r))),t.dispatch({selection:r,scrollIntoView:o,userEvent:a}),!0}else return!1}function Qv(t,e,n,r=-1){if(se.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(se.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Ia(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&Ia(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Ia(t.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let o,a=()=>o||(o=EG(t,e,n));return t.state.facet(QI).some(l=>l(t,e.from,e.to,s,a))||t.dispatch(a()),!0}function EG(t,e,n){let r,i=t.state,s=i.selection.main,o=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let l=e.from<s.from?-1:1,c=l<0?s.from:s.to,u=Sc(i.facet(Xu).map(h=>h(t)),c,l);e.from==u&&(o=u)}if(o>-1)r={changes:e,selection:ae.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let l=s.from<e.from?i.sliceDoc(s.from,e.from):"",c=s.to>e.to?i.sliceDoc(e.to,s.to):"";r=i.replaceSelection(t.state.toText(l+e.insert.sliceString(0,void 0,t.state.lineBreak)+c))}else{let l=i.changes(e),c=n&&n.main.to<=l.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(t.inputState.composing>=0||t.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let u=t.state.sliceDoc(e.from,e.to),h,d=n&&qI(t,n.main.head);if(d){let f=e.insert.length-(e.to-e.from);h={from:d.from,to:d.to-f}}else h=t.state.doc.lineAt(s.head);let p=s.to-e.to;r=i.changeByRange(f=>{if(f.from==s.from&&f.to==s.to)return{changes:l,range:c||f.map(l)};let m=f.to-p,g=m-u.length;if(t.state.sliceDoc(g,m)!=u||m>=h.from&&g<=h.to)return{range:f};let y=i.changes({from:g,to:m,insert:e.insert}),b=f.to-s.to;return{changes:y,range:c?ae.range(Math.max(0,c.anchor+b),Math.max(0,c.head+b)):f.map(y)}})}else r={changes:l,selection:c&&i.selection.replaceRange(c)}}let a="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:a,scrollIntoView:!0})}function KI(t,e,n,r){let i=Math.min(t.length,e.length),s=0;for(;s<i&&t.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==i&&t.length==e.length)return null;let o=t.length,a=e.length;for(;o>0&&a>0&&t.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if(r=="end"){let l=Math.max(0,s-Math.min(o,a));n-=o+l-s}if(o<s&&t.length<e.length){let l=n<=s&&n>=o?s-n:0;s-=l,a=s+(a-o),o=s}else if(a<s){let l=n<=s&&n>=a?s-n:0;s-=l,o=s+(o-a),a=s}return{from:s,toA:o,toB:a}}function vG(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}=t.observer.selectionRange;return n&&(e.push(new v_(n,r)),(i!=n||s!=r)&&e.push(new v_(i,s))),e}function TG(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?ae.single(n+e,r+e):null}class SG{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=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,se.safari&&e.contentDOM.addEventListener("input",()=>null),se.gecko&&FG(e.contentDOM.ownerDocument)}handleEvent(e){!PG(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,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=wG(e),r=this.handlers,i=this.view.contentDOM;for(let s in n)if(s!="scroll"){let o=!n[s].handlers.length,a=r[s];a&&o!=!a.handlers.length&&(i.removeEventListener(s,this.handleEvent),a=null),a||i.addEventListener(s,this.handleEvent,{passive:o})}for(let s in r)s!="scroll"&&!n[s]&&i.removeEventListener(s,this.handleEvent);this.handlers=n}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&&eL.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),se.android&&se.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return se.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=JI.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||kG.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Ia(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:se.safari&&!se.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 T_(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){ri(n.state,i)}}}function wG(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec,s=i&&i.plugin.domEventHandlers,o=i&&i.plugin.domEventObservers;if(s)for(let a in s){let l=s[a];l&&n(a).handlers.push(T_(r.value,l))}if(o)for(let a in o){let l=o[a];l&&n(a).observers.push(T_(r.value,l))}}for(let r in Pr)n(r).handlers.push(Pr[r]);for(let r in gr)n(r).observers.push(gr[r]);return e}const JI=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],kG="dthko",eL=[16,17,18,20,91,92,224,225],Bh=6;function jh(t){return Math.max(0,t)*.7+8}function _G(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class xG{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=R6(e.contentDOM),this.atoms=e.state.facet(Xu).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(Ze.allowMultipleSelections)&&CG(e,n),this.dragging=AG(e,n)&&rL(n)==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&&_G(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=0,s=0,o=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:a}=this.scrollParents.y.getBoundingClientRect());let l=XI(this.view);e.clientX-l.left<=i+Bh?n=-jh(i-e.clientX):e.clientX+l.right>=o-Bh&&(n=jh(e.clientX-o)),e.clientY-l.top<=s+Bh?r=-jh(s-e.clientY):e.clientY+l.bottom>=a-Bh&&(r=jh(e.clientY-a)),this.setScrollSpeed(n,r)}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,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,r=GI(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function CG(t,e){let n=t.state.facet(RI);return n.length?n[0](e):se.mac?e.metaKey:e.ctrlKey}function DG(t,e){let n=t.state.facet(MI);return n.length?n[0](e):se.mac?!e.altKey:!e.ctrlKey}function AG(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=fu(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let s=0;s<i.length;s++){let o=i[s];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function PG(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=Je.get(n))&&r.ignoreEvent(e))return!1;return!0}const Pr=Object.create(null),gr=Object.create(null),tL=se.ie&&se.ie_version<15||se.ios&&se.webkit_version<604;function NG(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),nL(t,n.value)},50)}function um(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function nL(t,e){e=um(t.state,Mv,e);let{state:n}=t,r,i=1,s=n.toText(e),o=s.lines==n.selection.ranges.length;if(ob!=null&&n.selection.ranges.every(a=>a.empty)&&ob==s.toString()){let a=-1;r=n.changeByRange(l=>{let c=n.doc.lineAt(l.from);if(c.from==a)return{range:l};a=c.from;let u=n.toText((o?s.line(i++).text:e)+n.lineBreak);return{changes:{from:c.from,insert:u},range:ae.cursor(l.from+u.length)}})}else o?r=n.changeByRange(a=>{let l=s.line(i++);return{changes:{from:a.from,to:a.to,insert:l.text},range:ae.cursor(a.from+l.length)}}):r=n.replaceSelection(s);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}gr.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Pr.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);gr.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};gr.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Pr.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(II))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=IG(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new xG(t,e,n,r)),r&&t.observer.ignore(()=>{gI(t.contentDOM);let s=t.root.activeElement;s&&!s.contains(t.contentDOM)&&s.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function S_(t,e,n,r){if(r==1)return ae.cursor(e,n);if(r==2)return aG(t.state,e,n);{let i=At.find(t.docView,e),s=t.state.doc.lineAt(i?i.posAtEnd:e),o=i?i.posAtStart:s.from,a=i?i.posAtEnd:s.to;return a<t.state.doc.length&&a==s.to&&a++,ae.range(o,a)}}let w_=(t,e,n)=>e>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function RG(t,e,n,r){let i=At.find(t.docView,e);if(!i)return 1;let s=e-i.posAtStart;if(s==0)return 1;if(s==i.length)return-1;let o=i.coordsAt(s,-1);if(o&&w_(n,r,o))return-1;let a=i.coordsAt(s,1);return a&&w_(n,r,a)?1:o&&o.bottom>=r?-1:1}function k_(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:RG(t,n,e.clientX,e.clientY)}}const MG=se.ie&&se.ie_version<=11;let __=null,x_=0,C_=0;function rL(t){if(!MG)return t.detail;let e=__,n=C_;return __=t,C_=Date.now(),x_=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(x_+1)%3:1}function IG(t,e){let n=k_(t,e),r=rL(e),i=t.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),i=i.map(s.changes))},get(s,o,a){let l=k_(t,s),c,u=S_(t,l.pos,l.bias,r);if(n.pos!=l.pos&&!o){let h=S_(t,n.pos,n.bias,r),d=Math.min(h.from,u.from),p=Math.max(h.to,u.to);u=d<u.from?ae.range(d,p):ae.range(p,d)}return o?i.replaceRange(i.main.extend(u.from,u.to)):a&&r==1&&i.ranges.length>1&&(c=LG(i,l.pos))?c:a?i.addRange(u):ae.create([u])}}}function LG(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:i}=t.ranges[n];if(r<=e&&i>=e)return ae.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}Pr.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.nearest(e.target);if(i&&i.isWidget){let s=i.posAtStart,o=s+i.length;(s>=n.to||o<=n.from)&&(n=ae.range(s,o))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",um(t.state,Iv,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Pr.dragend=t=>(t.inputState.draggedContent=null,!1);function D_(t,e,n,r){if(n=um(t.state,Mv,n),!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=t.inputState,o=r&&s&&DG(t,e)?{from:s.from,to:s.to}:null,a={from:i,insert:n},l=t.state.changes(o?[o,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Pr.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,s=()=>{++i==n.length&&D_(t,e,r.filter(o=>o!=null).join(t.state.lineBreak),!1)};for(let o=0;o<n.length;o++){let a=new FileReader;a.onerror=s,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(r[o]=a.result),s()},a.readAsText(n[o])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return D_(t,e,r,!0),!0}return!1};Pr.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=tL?null:e.clipboardData;return n?(nL(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(NG(t),!1)};function QG(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function $G(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:s}of t.selection.ranges){let o=t.doc.lineAt(s);o.number>i&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),i=o.number}r=!0}return{text:um(t,Iv,e.join(t.lineBreak)),ranges:n,linewise:r}}let ob=null;Pr.copy=Pr.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=$G(t.state);if(!n&&!i)return!1;ob=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=tL?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(QG(t,n),!1)};const iL=Jo.define();function sL(t,e){let n=[];for(let r of t.facet($I)){let i=r(t,e);i&&n.push(i)}return n.length?t.update({effects:n,annotations:iL.of(!0)}):null}function oL(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=sL(t.state,e);n?t.dispatch(n):t.update([])}},10)}gr.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),oL(t)};gr.blur=t=>{t.observer.clearSelectionRange(),oL(t)};gr.compositionstart=gr.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};gr.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,se.chrome&&se.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};gr.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Pr.beforeinput=(t,e)=>{var n,r;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(t.inputState.insertingText=e.data,t.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&t.observer.editContext){let s=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let a=o[0],l=t.posAtDOM(a.startContainer,a.startOffset),c=t.posAtDOM(a.endContainer,a.endOffset);return Qv(t,{from:l,to:c,insert:t.state.toText(s)},null),!0}}let i;if(se.chrome&&se.android&&(i=JI.find(s=>s.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return se.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),se.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>gr.compositionend(t,e),20),!1};const A_=new Set;function FG(t){A_.has(t)||(A_.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const P_=["pre-wrap","normal","pre-line","break-spaces"];let nl=!1;function N_(){nl=!1}class BG{constructor(e){this.lineWrapping=e,this.doc=We.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}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 P_.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,s,o){let a=P_.indexOf(e)>-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=s,l){this.heightSamples={};for(let c=0;c<o.length;c++){let u=o[c];u<0?c++:this.heightSamples[Math.floor(u*10)]=!0}}return l}}class jG{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class ti{constructor(e,n,r,i,s){this.from=e,this.length=n,this.top=r,this.height=i,this._content=s}get type(){return typeof this._content=="number"?fr.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 Zs?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new ti(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var ht=(function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t})(ht||(ht={}));const Nd=.001;class wn{constructor(e,n,r=2){this.length=e,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Nd&&(nl=!0),this.height=e)}replace(e,n,r){return wn.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let s=this,o=r.doc;for(let a=i.length-1;a>=0;a--){let{fromA:l,toA:c,fromB:u,toB:h}=i[a],d=s.lineAt(l,ht.ByPosNoHeight,r.setDoc(n),0,0),p=d.to>=c?d:s.lineAt(c,ht.ByPosNoHeight,r,0,0);for(h+=p.to-c,c=p.to;a>0&&d.from<=i[a-1].toA;)l=i[a-1].fromA,u=i[a-1].fromB,a--,l<d.from&&(d=s.lineAt(l,ht.ByPosNoHeight,r,0,0));u+=d.from-l,l=d.from;let f=$v.build(r.setDoc(o),e,u,h);s=wp(s,s.replace(l,c,f))}return s.updateHeight(r,0)}static empty(){return new Hn(0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,s=0;for(;;)if(n==r)if(i>s*2){let a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),r+=1+a.break,i-=a.size}else if(s>i*2){let a=e[r];a.break?e.splice(r,1,a.left,null,a.right):e.splice(r,1,a.left,a.right),r+=2+a.break,s-=a.size}else break;else if(i<s){let a=e[n++];a&&(i+=a.size)}else{let a=e[--r];a&&(s+=a.size)}let o=0;return e[n-1]==null?(o=1,n--):e[n]==null&&(o=1,r++),new zG(wn.of(e.slice(0,n)),o,wn.of(e.slice(r)))}}function wp(t,e){return t==e?t:(t.constructor!=e.constructor&&(nl=!0),e)}wn.prototype.size=1;class aL extends wn{constructor(e,n,r){super(e,n),this.deco=r}blockAt(e,n,r,i){return new ti(i,this.length,r,this.height,this.deco||0)}lineAt(e,n,r,i,s){return this.blockAt(0,r,i,s)}forEachLine(e,n,r,i,s,o){e<=s+this.length&&n>=s&&o(this.blockAt(0,r,i,s))}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Hn extends aL{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,r,i){return new ti(i,this.length,r,this.height,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof Hn||i instanceof Jt&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Jt?i=new Hn(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):wn.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Jt extends wn{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,s=i-r+1,o,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*s);o=l/s,this.length>s+1&&(a=(this.height-l)/(this.length-s-1))}else o=this.height/s;return{firstLine:r,lastLine:i,perLine:o,perChar:a}}blockAt(e,n,r,i){let{firstLine:s,lastLine:o,perLine:a,perChar:l}=this.heightMetrics(n,i);if(n.lineWrapping){let c=i+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),u=n.doc.lineAt(c),h=a+u.length*l,d=Math.max(r,e-h/2);return new ti(u.from,u.length,d,h,0)}else{let c=Math.max(0,Math.min(o-s,Math.floor((e-r)/a))),{from:u,length:h}=n.doc.line(s+c);return new ti(u,h,r+a*c,a,0)}}lineAt(e,n,r,i,s){if(n==ht.ByHeight)return this.blockAt(e,r,i,s);if(n==ht.ByPosNoHeight){let{from:p,to:f}=r.doc.lineAt(e);return new ti(p,f-p,0,0,0)}let{firstLine:o,perLine:a,perChar:l}=this.heightMetrics(r,s),c=r.doc.lineAt(e),u=a+c.length*l,h=c.number-o,d=i+a*h+l*(c.from-s-h);return new ti(c.from,c.length,Math.max(i,Math.min(d,i+this.height-u)),u,0)}forEachLine(e,n,r,i,s,o){e=Math.max(e,s),n=Math.min(n,s+this.length);let{firstLine:a,perLine:l,perChar:c}=this.heightMetrics(r,s);for(let u=e,h=i;u<=n;){let d=r.doc.lineAt(u);if(u==e){let f=d.number-a;h+=l*f+c*(e-s-f)}let p=l+c*d.length;o(new ti(d.from,d.length,h,p,0)),h+=p,u=d.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let s=r[r.length-1];s instanceof Jt?r[r.length-1]=new Jt(s.length+i):r.push(null,new Jt(i-1))}if(e>0){let s=r[0];s instanceof Jt?r[0]=new Jt(e+s.length):r.unshift(new Jt(e-1),null)}return wn.of(r)}decomposeLeft(e,n){n.push(new Jt(e-1),null)}decomposeRight(e,n){n.push(null,new Jt(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let s=n+this.length;if(i&&i.from<=n+this.length&&i.more){let o=[],a=Math.max(n,i.from),l=-1;for(i.from>n&&o.push(new Jt(i.from-n-1).updateHeight(e,n));a<=s&&i.more;){let u=e.doc.lineAt(a).length;o.length&&o.push(null);let h=i.heights[i.index++];l==-1?l=h:Math.abs(h-l)>=Nd&&(l=-2);let d=new Hn(u,h);d.outdated=!1,o.push(d),a+=u+1}a<=s&&o.push(null,new Jt(s-a).updateHeight(e,a));let c=wn.of(o);return(l<0||Math.abs(c.height-this.height)>=Nd||Math.abs(l-this.heightMetrics(e,n).perLine)>=Nd)&&(nl=!0),wp(this,c)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class zG extends wn{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let s=r+this.left.height;return e<s?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,s,i+this.left.length+this.break)}lineAt(e,n,r,i,s){let o=i+this.left.height,a=s+this.left.length+this.break,l=n==ht.ByHeight?e<o:e<a,c=l?this.left.lineAt(e,n,r,i,s):this.right.lineAt(e,n,r,o,a);if(this.break||(l?c.to<a:c.from>a))return c;let u=n==ht.ByPosNoHeight?ht.ByPosNoHeight:ht.ByPos;return l?c.join(this.right.lineAt(a,u,r,o,a)):this.left.lineAt(a,u,r,i,s).join(c)}forEachLine(e,n,r,i,s,o){let a=i+this.left.height,l=s+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,n,r,i,s,o),n>=l&&this.right.forEachLine(e,n,r,a,l,o);else{let c=this.lineAt(l,ht.ByPos,r,i,s);e<c.from&&this.left.forEachLine(e,c.from-1,r,i,s,o),c.to>=e&&c.from<=n&&o(c),n>c.to&&this.right.forEachLine(c.to+1,n,r,a,l,o)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let a of r)s.push(a);if(e>0&&R_(s,o-1),n<this.length){let a=s.length;this.decomposeRight(n,s),R_(s,a)}return wn.of(s)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?wn.of(this.break?[e,null,n]:[e,n]):(this.left=wp(this.left,e),this.right=wp(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:s,right:o}=this,a=n+s.length+this.break,l=null;return i&&i.from<=n+s.length&&i.more?l=s=s.updateHeight(e,n,r,i):s.updateHeight(e,n,r),i&&i.from<=a+o.length&&i.more?l=o=o.updateHeight(e,a,r,i):o.updateHeight(e,a,r),l?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function R_(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof Jt&&(r=t[e+1])instanceof Jt&&t.splice(e-1,3,new Jt(n.length+1+r.length))}const VG=5;class $v{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Hn?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Hn(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,s=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let o=n-e;r.block?this.addBlock(new aL(o,i,r)):(o||s||i>=VG)&&this.addLineDeco(i,s,o)}else n>e&&this.span(e,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:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Hn(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new Jt(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Hn)return e;let n=new Hn(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Hn)&&!this.isCovered?this.nodes.push(new Hn(0,-1)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof Hn&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let s=new $v(r,e);return Ye.spans(n,r,i,s,0),s.finish(r)}}function UG(t,e,n){let r=new HG;return Ye.compare(t,e,n,r,0),r.changes}class HG{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&Pd(e,n,this.changes,5)}}function XG(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,s=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom);for(let c=t.parentNode;c&&c!=r.body;)if(c.nodeType==1){let u=c,h=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&h.overflow!="visible"){let d=u.getBoundingClientRect();s=Math.max(s,d.left),o=Math.min(o,d.right),a=Math.max(a,d.top),l=Math.min(c==t.parentNode?i.innerHeight:l,d.bottom)}c=h.position=="absolute"||h.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:s-n.left,right:Math.max(s,o)-n.left,top:a-(n.top+e),bottom:Math.max(a,l)-(n.top+e)}}function qG(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}function ZG(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Vg{constructor(e,n,r,i){this.from=e,this.to=n,this.size=r,this.displaySize=i}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=n[r];if(i.from!=s.from||i.to!=s.to||i.size!=s.size)return!1}return!0}draw(e,n){return Ft.replace({widget:new WG(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class WG extends cm{constructor(e,n){super(),this.size=e,this.vertical=n}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}}class M_{constructor(e){this.state=e,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.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=I_,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Zt.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(Lv).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new BG(n),this.stateDeco=e.facet(gu).filter(r=>typeof r!="function"),this.heightMap=wn.empty().applyChanges(this.stateDeco,We.empty,this.heightOracle.setDoc(e.doc),[new mr(0,0,0,e.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=Ft.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:s,to:o})=>i>=s&&i<=o)){let{from:s,to:o}=this.lineBlockAt(i);e.push(new zh(s,o))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?I_:new Fv(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(ac(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(gu).filter(u=>typeof u!="function");let i=e.changedRanges,s=mr.extendWithRanges(i,UG(r,this.stateDeco,e?e.changes:Ht.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);N_(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||nl)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let l=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<l.from||n.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));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),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(K6)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,s=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Zt.RTL:Zt.LTR;let o=this.heightOracle.mustRefreshForWrapping(s),a=n.getBoundingClientRect(),l=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let c=0,u=0;if(a.width&&a.height){let{scaleX:S,scaleY:w}=mI(n,a);(S>.005&&Math.abs(this.scaleX-S)>.005||w>.005&&Math.abs(this.scaleY-w)>.005)&&(this.scaleX=S,this.scaleY=w,c|=16,o=l=!0)}let h=(parseInt(r.paddingTop)||0)*this.scaleY,d=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=h||this.paddingBottom!=d)&&(this.paddingTop=h,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let p=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=yI(e.scrollDOM);let f=(this.printing?ZG:XG)(n,this.paddingTop),m=f.top-this.pixelViewport.top,g=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;let y=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(y!=this.inView&&(this.inView=y,y&&(l=!0)),!this.inView&&!this.scrollTarget&&!qG(e.dom))return 0;let b=a.width;if((this.contentDOMWidth!=b||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),l){let S=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(S)&&(o=!0),o||i.lineWrapping&&Math.abs(b-this.contentDOMWidth)>i.charWidth){let{lineHeight:w,charWidth:A,textHeight:C}=e.docView.measureTextSize();o=w>0&&i.refresh(s,w,A,C,Math.max(5,b/A),S),o&&(e.docView.minWidth=0,c|=16)}m>0&&g>0?u=Math.max(m,g):m<0&&g<0&&(u=Math.min(m,g)),N_();for(let w of this.viewports){let A=w.from==this.viewport.from?S:e.docView.measureVisibleLineHeights(w);this.heightMap=(o?wn.empty().applyChanges(this.stateDeco,We.empty,this.heightOracle,[new mr(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new jG(w.from,A))}nl&&(c|=2)}let T=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return T&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||T)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]: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,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,l=new zh(i.lineAt(o-r*1e3,ht.ByHeight,s,0,0).from,i.lineAt(a+(1-r)*1e3,ht.ByHeight,s,0,0).to);if(n){let{head:c}=n.range;if(c<l.from||c>l.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=i.lineAt(c,ht.ByPos,s,0,0),d;n.y=="center"?d=(h.top+h.bottom)/2-u/2:n.y=="start"||n.y=="nearest"&&c<l.from?d=h.top:d=h.bottom-u,l=new zh(i.lineAt(d-1e3/2,ht.ByHeight,s,0,0).from,i.lineAt(d+u+1e3/2,ht.ByHeight,s,0,0).to)}}return l}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new zh(this.heightMap.lineAt(r,ht.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,ht.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,ht.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(n,ht.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:a}=this;return(e==0||i<=o-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||s>=a+Math.max(10,Math.min(r,250)))&&i>o-2*1e3&&s<a+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new Vg(n.mapPos(i.from),n.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,s=i>>1,o=i<<1;if(this.defaultTextDirection!=Zt.LTR&&!r)return[];let a=[],l=(u,h,d,p)=>{if(h-u<s)return;let f=this.state.selection.main,m=[f.from];f.empty||m.push(f.to);for(let y of m)if(y>u&&y<h){l(u,y-10,d,p),l(y+10,h,d,p);return}let g=YG(e,y=>y.from>=d.from&&y.to<=d.to&&Math.abs(y.from-u)<s&&Math.abs(y.to-h)<s&&!m.some(b=>y.from<b&&y.to>b));if(!g){if(h<d.to&&n&&r&&n.visibleRanges.some(T=>T.from<=h&&T.to>=h)){let T=n.moveToLineBoundary(ae.cursor(h),!1,!0).head;T>u&&(h=T)}let y=this.gapSize(d,u,h,p),b=r||y<2e6?y:2e6;g=new Vg(u,h,y,b)}a.push(g)},c=u=>{if(u.length<o||u.type!=fr.Text)return;let h=GG(u.from,u.to,this.stateDeco);if(h.total<o)return;let d=this.scrollTarget?this.scrollTarget.range.head:null,p,f;if(r){let m=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,g,y;if(d!=null){let b=Uh(h,d),T=((this.visibleBottom-this.visibleTop)/2+m)/u.height;g=b-T,y=b+T}else g=(this.visibleTop-u.top-m)/u.height,y=(this.visibleBottom-u.top+m)/u.height;p=Vh(h,g),f=Vh(h,y)}else{let m=h.total*this.heightOracle.charWidth,g=i*this.heightOracle.charWidth,y=0;if(m>2e6)for(let A of e)A.from>=u.from&&A.from<u.to&&A.size!=A.displaySize&&A.from*this.heightOracle.charWidth+y<this.pixelViewport.left&&(y=A.size-A.displaySize);let b=this.pixelViewport.left+y,T=this.pixelViewport.right+y,S,w;if(d!=null){let A=Uh(h,d),C=((T-b)/2+g)/m;S=A-C,w=A+C}else S=(b-g)/m,w=(T+g)/m;p=Vh(h,S),f=Vh(h,w)}p>u.from&&l(u.from,p,u,h),f<u.to&&l(f,u.to,u,h)};for(let u of this.viewportLines)Array.isArray(u.type)?u.type.forEach(c):c(u);return a}gapSize(e,n,r,i){let s=Uh(i,r)-Uh(i,n);return this.heightOracle.lineWrapping?e.height*s:i.total*this.heightOracle.charWidth*s}updateLineGaps(e){Vg.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Ft.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let r=[];Ye.spans(n,this.viewport.from,this.viewport.to,{span(s,o){r.push({from:s,to:o})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let s=0;s<r.length&&!(i&8);s++){let o=this.visibleRanges[s],a=r[s];(o.from!=a.from||o.to!=a.to)&&(i|=4,e&&e.mapPos(o.from,-1)==a.from&&e.mapPos(o.to,1)==a.to||(i|=8))}return this.visibleRanges=r,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||ac(this.heightMap.lineAt(e,ht.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(n=>n.top<=e&&n.bottom>=e)||ac(this.heightMap.lineAt(this.scaler.fromDOM(e),ht.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return ac(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}}class zh{constructor(e,n){this.from=e,this.to=n}}function GG(t,e,n){let r=[],i=t,s=0;return Ye.spans(n,t,e,{span(){},point(o,a){o>i&&(r.push({from:i,to:o}),s+=o-i),i=a}},20),i<e&&(r.push({from:i,to:e}),s+=e-i),{total:s,ranges:r}}function Vh({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:s,to:o}=e[i],a=o-s;if(r<=a)return s+r;r-=a}}function Uh(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function YG(t,e){for(let n of t)if(e(n))return n}const I_={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class Fv{constructor(e,n,r){let i=0,s=0,o=0;this.viewports=r.map(({from:a,to:l})=>{let c=n.lineAt(a,ht.ByPos,e,0,0).top,u=n.lineAt(l,ht.ByPos,e,0,0).bottom;return i+=u-c,{from:a,to:l,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let a of this.viewports)a.domTop=o+(a.top-s)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),s=a.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.top)return i+(e-r)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);r=s.bottom,i=s.domBottom}}fromDOM(e){for(let n=0,r=0,i=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.domTop)return r+(e-i)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);r=s.bottom,i=s.domBottom}}eq(e){return e instanceof Fv?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,r)=>n.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function ac(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new ti(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>ac(i,e)):t._content)}const Hh=Ee.define({combine:t=>t.join(" ")}),ab=Ee.define({combine:t=>t.indexOf(!0)>-1}),lb=qs.newName(),lL=qs.newName(),cL=qs.newName(),uL={"&light":"."+lL,"&dark":"."+cL};function cb(t,e,n){return new qs(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const KG=cb("."+lb,{"&":{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-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"}},uL),JG={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Ug=se.ie&&se.ie_version<=11;class e7{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new M6,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(n=>{for(let r of n)this.queue.push(r);(se.ie&&se.ie_version<=11||se.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&se.android&&e.constructor.EDIT_CONTEXT!==!1&&!(se.chrome&&se.chrome_version<126)&&(this.editContext=new n7(e),e.state.facet(Ri)&&(e.contentDOM.editContext=this.editContext.editContext)),Ug&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.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 n;((n=this.view.docView)===null||n===void 0?void 0:n.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(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.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(n=>{n.length>0&&n[n.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((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(Ri)?r.root.activeElement!=this.dom:!Ad(this.dom,i))return;let s=i.anchorNode&&r.docView.nearest(i.anchorNode);if(s&&s.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(se.ie&&se.ie_version<=11||se.android&&se.chrome)&&!r.state.selection.main.empty&&i.focusNode&&vc(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=fu(e.root);if(!n)return!1;let r=se.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&t7(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=Ad(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&L6(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let r=this.dom;r;)if(r.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=n)r.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,JG),Ug&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Ug&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var r;if(!this.delayedAndroidKey){let i=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&Ia(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.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 n=-1,r=-1,i=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(i=!0),n==-1?{from:n,to:r}=o:(n=Math.min(o.from,n),r=Math.max(o.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Ad(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new bG(this.view,e,n,r);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=YI(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let r=L_(n,e.previousSibling||e.target.previousSibling,-1),i=L_(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.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(Ri)!=e.state.facet(Ri)&&(e.view.contentDOM.editContext=e.state.facet(Ri)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.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 L_(t,e,n){for(;e;){let r=Je.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function Q_(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor);return vc(o.node,o.offset,i,s)&&([n,r,i,s]=[i,s,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}}function t7(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return Q_(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?Q_(t,n):null}class n7{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=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=r=>{let i=e.state.selection.main,{anchor:s,head:o}=i,a=this.toEditorPos(r.updateRangeStart),l=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:a,drifted:!1});let c=l-a>r.text.length;a==this.from&&s<this.from?a=s:l==this.to&&s>this.to&&(l=s);let u=KI(e.state.sliceDoc(a,l),r.text,(c?i.from:i.to)-a,c?"end":null);if(!u){let d=ae.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));d.main.eq(i)||e.dispatch({selection:d,userEvent:"select"});return}let h={from:u.from+a,to:u.toA+a,insert:We.of(r.text.slice(u.from,u.toB).split(`
`))};if((se.mac||se.android)&&h.from==o-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(h={from:a,to:l,insert:We.of([r.text.replace("."," ")])}),this.pendingContextChange=h,!e.state.readOnly){let d=this.to-this.from+(h.to-h.from+h.insert.length);Qv(e,h,ae.single(this.toEditorPos(r.selectionStart,d),this.toEditorPos(r.selectionEnd,d)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),h.from<h.to&&!h.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(n.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],s=null;for(let o=this.toEditorPos(r.rangeStart),a=this.toEditorPos(r.rangeEnd);o<a;o++){let l=e.coordsForChar(o);s=l&&new DOMRect(l.left,l.top,l.right-l.left,l.bottom-l.top)||s||new DOMRect,i.push(s)}n.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let s of r.getTextFormats()){let o=s.underlineStyle,a=s.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(a)){let l=this.toEditorPos(s.rangeStart),c=this.toEditorPos(s.rangeEnd);if(l<c){let u=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(a)?1:2}px`;i.push(Ft.mark({attributes:{style:u}}).range(l,c))}}}e.dispatch({effects:jI.of(Ft.set(i))})},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:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=fu(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((s,o,a,l,c)=>{if(r)return;let u=c.length-(o-s);if(i&&o>=i.to)if(i.from==s&&i.to==o&&i.insert.eq(c)){i=this.pendingContextChange=null,n+=u,this.to+=u;return}else i=null,this.revertPending(e.state);if(s+=n,o+=n,o<=this.from)this.from+=u,this.to+=u;else if(s<this.to){if(s<this.from||o>this.to||this.to-this.from+c.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),c.toString()),this.to+=u}n+=u}),i&&!r&&this.revertPending(e.state),!r}update(e){let n=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.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||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+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 n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Ce{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(e={}){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),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(s=>r(s,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||I6(e.parent)||document,this.viewState=new M_(e.state||Ze.create(e)),e.scrollTo&&e.scrollTo.is(Fh)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Sa).map(i=>new Bg(i));for(let i of this.plugins)i.update(this);this.observer=new e7(this),this.inputState=new SG(this),this.inputState.ensureHandlers(this.plugins),this.docView=new m_(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof nn?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){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,s=this.state;for(let d of e){if(d.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=d.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,a=0,l=null;e.some(d=>d.annotation(iL))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,l=sL(s,o),l||(a=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(u=null)):this.observer.clear(),s.facet(Ze.phrases)!=this.state.facet(Ze.phrases))return this.setState(s);i=Sp.create(this,s,e),i.flags|=a;let h=this.viewState.scrollTarget;try{this.updateState=2;for(let d of e){if(h&&(h=h.map(d.changes)),d.scrollIntoView){let{main:p}=d.state.selection;h=new La(p.empty?p:ae.cursor(p.head,p.head>p.anchor?-1:1))}for(let p of d.effects)p.is(Fh)&&(h=p.value.clip(this.state))}this.viewState.update(i,h),this.bidiCache=kp.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(sc)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(d=>d.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(Hh)!=i.state.facet(Hh)&&(this.viewState.mustMeasureContent=!0),(n||r||h||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let d of this.state.facet(ib))try{d(i)}catch(p){ri(this.state,p,"update listener")}(l||u)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!YI(this,u)&&c.force&&Ia(this.contentDOM,c.key,c.keyCode)})}setState(e){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=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new M_(e),this.plugins=e.facet(Sa).map(r=>new Bg(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new m_(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Sa),r=e.state.facet(Sa);if(n!=r){let i=[];for(let s of r){let o=n.indexOf(s);if(o<0)i.push(new Bg(s));else{let a=this.plugins[o];a.mustUpdate=e,i.push(a)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(r){ri(this.state,r,"doc view update listener")}}}measure(e=!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,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(o<0)if(yI(r))s=-1,o=this.viewState.heightMap.height;else{let p=this.viewState.scrollAnchorAt(i);s=p.from,o=p.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];l&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(p=>{try{return p.read(this)}catch(f){return ri(this.state,f),$_}}),h=Sp.create(this,this.state,[]),d=!1;h.flags|=l,n?n.flags|=l:n=h,this.updateState=2,h.empty||(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),d=this.docView.update(h),d&&this.docViewUpdate());for(let p=0;p<c.length;p++)if(u[p]!=$_)try{let f=c[p];f.write&&f.write(u[p],this)}catch(f){ri(this.state,f)}if(d&&this.docView.updateSelection(!0),!h.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let p=(s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-o;if(p>1||p<-1){i=i+p,r.scrollTop=i/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let a of this.state.facet(ib))a(n)}get themeClasses(){return lb+" "+(this.state.facet(ab)?cL:lL)+" "+this.state.facet(Hh)}updateAttrs(){let e=F_(this,zI,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Ri)?"true":"false",class:"cm-content",style:`${se.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),F_(this,Lv,n);let r=this.observer.ignore(()=>{let i=Jy(this.contentDOM,this.contentAttrs,n),s=Jy(this.dom,this.editorAttrs,e);return i||s});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(Ce.announce)){n&&(this.announceDOM.textContent=""),n=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(sc);let e=this.state.facet(Ce.cspNonce);qs.mount(this.root,this.styleModules.concat(KG).reverse(),e?{nonce:e}: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(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.plugin!=e)&&this.pluginMap.set(e,n=this.plugins.find(r=>r.plugin==e)||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(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return zg(this,e,E_(this,e,n,r))}moveByGroup(e,n){return zg(this,e,E_(this,e,n,r=>fG(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),s=r[n?r.length-1:0];return ae.cursor(s.side(n,i)+e.from,s.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return pG(this,e,n,r)}moveVertically(e,n,r){return zg(this,e,mG(this,e,n,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),ZI(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),s=this.bidiSpans(i),o=s[Rs.find(s,e-i.from,-1,n)];return lm(r,o.dir==Zt.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(FI)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>r7)return PI(e.length);let n=this.textDirectionAt(e.from),r;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||AI(s.isolates,r=f_(this,e))))return s.order;r||(r=f_(this,e));let i=W6(e.text,n,r);return this.bidiCache.push(new kp(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||se.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{gI(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.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(e,n={}){return Fh.of(new La(typeof e=="number"?ae.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return Fh.of(new La(ae.cursor(r.from),"start","start",r.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Ws.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Ws.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=qs.newName(),i=[Hh.of(r),sc.of(cb(`.${r}`,e))];return n&&n.dark&&i.push(ab.of(!0)),i}static baseTheme(e){return sm.lowest(sc.of(cb("."+lb,e,uL)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&Je.get(r)||Je.get(e);return((n=i==null?void 0:i.rootView)===null||n===void 0?void 0:n.view)||null}}Ce.styleModule=sc;Ce.inputHandler=QI;Ce.clipboardInputFilter=Mv;Ce.clipboardOutputFilter=Iv;Ce.scrollHandler=BI;Ce.focusChangeEffect=$I;Ce.perLineTextDirection=FI;Ce.exceptionSink=LI;Ce.updateListener=ib;Ce.editable=Ri;Ce.mouseSelectionStyle=II;Ce.dragMovesSelection=MI;Ce.clickAddsSelectionRange=RI;Ce.decorations=gu;Ce.outerDecorations=VI;Ce.atomicRanges=Xu;Ce.bidiIsolatedRanges=UI;Ce.scrollMargins=HI;Ce.darkTheme=ab;Ce.cspNonce=Ee.define({combine:t=>t.length?t[0]:""});Ce.contentAttributes=Lv;Ce.editorAttributes=zI;Ce.lineWrapping=Ce.contentAttributes.of({class:"cm-lineWrapping"});Ce.announce=Et.define();const r7=4096,$_={};class kp{constructor(e,n,r,i,s,o){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=s,this.order=o}static update(e,n){if(n.empty&&!e.some(s=>s.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:Zt.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let o=e[s];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new kp(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}}function F_(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let s=r[i],o=typeof s=="function"?s(t):s;o&&Ky(o,n)}return n}const i7=se.mac?"mac":se.windows?"win":se.linux?"linux":"key";function s7(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,s,o,a;for(let l=0;l<n.length-1;++l){const c=n[l];if(/^(cmd|meta|m)$/i.test(c))a=!0;else if(/^a(lt)?$/i.test(c))i=!0;else if(/^(c|ctrl|control)$/i.test(c))s=!0;else if(/^s(hift)?$/i.test(c))o=!0;else if(/^mod$/i.test(c))e=="mac"?a=!0:s=!0;else throw new Error("Unrecognized modifier name: "+c)}return i&&(r="Alt-"+r),s&&(r="Ctrl-"+r),a&&(r="Meta-"+r),o&&(r="Shift-"+r),r}function Xh(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const o7=sm.default(Ce.domEventHandlers({keydown(t,e){return u7(a7(e.state),t,e,"editor")}})),hL=Ee.define({enables:o7}),B_=new WeakMap;function a7(t){let e=t.facet(hL),n=B_.get(e);return n||B_.set(e,n=c7(e.reduce((r,i)=>r.concat(i),[]))),n}let ws=null;const l7=4e3;function c7(t,e=i7){let n=Object.create(null),r=Object.create(null),i=(o,a)=>{let l=r[o];if(l==null)r[o]=a;else if(l!=a)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,a,l,c,u)=>{var h,d;let p=n[o]||(n[o]=Object.create(null)),f=a.split(/ (?!$)/).map(y=>s7(y,e));for(let y=1;y<f.length;y++){let b=f.slice(0,y).join(" ");i(b,!0),p[b]||(p[b]={preventDefault:!0,stopPropagation:!1,run:[T=>{let S=ws={view:T,prefix:b,scope:o};return setTimeout(()=>{ws==S&&(ws=null)},l7),!0}]})}let m=f.join(" ");i(m,!1);let g=p[m]||(p[m]={preventDefault:!1,stopPropagation:!1,run:((d=(h=p._any)===null||h===void 0?void 0:h.run)===null||d===void 0?void 0:d.slice())||[]});l&&g.run.push(l),c&&(g.preventDefault=!0),u&&(g.stopPropagation=!0)};for(let o of t){let a=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let c of a){let u=n[c]||(n[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:h}=o;for(let d in u)u[d].run.push(p=>h(p,ub))}let l=o[e]||o.key;if(l)for(let c of a)s(c,l,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(c,"Shift-"+l,o.shift,o.preventDefault,o.stopPropagation)}return n}let ub=null;function u7(t,e,n,r){ub=e;let i=IN(e),s=p6(i,0),o=f6(s)==i.length&&i!=" ",a="",l=!1,c=!1,u=!1;ws&&ws.view==n&&ws.scope==r&&(a=ws.prefix+" ",eL.indexOf(e.keyCode)<0&&(c=!0,ws=null));let h=new Set,d=g=>{if(g){for(let y of g.run)if(!h.has(y)&&(h.add(y),y(n)))return g.stopPropagation&&(u=!0),!0;g.preventDefault&&(g.stopPropagation&&(u=!0),c=!0)}return!1},p=t[r],f,m;return p&&(d(p[a+Xh(i,e,!o)])?l=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(se.windows&&e.ctrlKey&&e.altKey)&&!(se.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(f=Gi[e.keyCode])&&f!=i?(d(p[a+Xh(f,e,!0)])||e.shiftKey&&(m=Kc[e.keyCode])!=i&&m!=f&&d(p[a+Xh(m,e,!1)]))&&(l=!0):o&&e.shiftKey&&d(p[a+Xh(i,e,!0)])&&(l=!0),!l&&d(p._any)&&(l=!0)),c&&(l=!0),l&&u&&e.stopPropagation(),ub=null,l}class Vo extends Fo{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Vo.prototype.elementClass="";Vo.prototype.toDOM=void 0;Vo.prototype.mapMode=Sn.TrackBefore;Vo.prototype.startSide=Vo.prototype.endSide=-1;Vo.prototype.point=!0;const Hg=Ee.define(),h7=Ee.define(),Rd=Ee.define(),j_=Ee.define({combine:t=>t.some(e=>e)});function d7(t){return[p7]}const p7=Ws.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.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=t.state.facet(Rd).map(e=>new V_(t,e)),this.fixed=!t.state.facet(j_);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.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(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(j_)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Ye.iter(this.view.state.facet(Hg),this.view.viewport.from),r=[],i=this.gutters.map(s=>new f7(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(s.type)){let o=!0;for(let a of s.type)if(a.type==fr.Text&&o){hb(n,r,a.from);for(let l of i)l.line(this.view,a,r);o=!1}else if(a.widget)for(let l of i)l.widget(this.view,a)}else if(s.type==fr.Text){hb(n,r,s.from);for(let o of i)o.line(this.view,s,r)}else if(s.widget)for(let o of i)o.widget(this.view,s);for(let s of i)s.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(Rd),n=t.state.facet(Rd),r=t.docChanged||t.heightChanged||t.viewportChanged||!Ye.eq(t.startState.facet(Hg),t.state.facet(Hg),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let s of n){let o=e.indexOf(s);o<0?i.push(new V_(this.view,s)):(this.gutters[o].update(t),i.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),i.indexOf(s)<0&&s.destroy();for(let s of i)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>Ce.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*e.scaleX,i=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==Zt.LTR?{left:r,right:i}:{right:r,left:i}})});function z_(t){return Array.isArray(t)?t:[t]}function hb(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class f7{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Ye.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,s=(n.top-this.height)/e.scaleY,o=n.height/e.scaleY;if(this.i==i.elements.length){let a=new dL(e,o,s,r);i.elements.push(a),i.dom.appendChild(a.dom)}else i.elements[this.i].update(e,o,s,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];hb(this.cursor,i,n.from),r.length&&(i=i.concat(r));let s=this.gutter.config.lineMarker(e,n,i);s&&i.unshift(s);let o=this.gutter;i.length==0&&!o.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),i=r?[r]:null;for(let s of e.state.facet(h7)){let o=s(e,n.widget,n);o&&(i||(i=[])).push(o)}i&&this.addElement(e,n,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class V_{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let s=i.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let l=s.getBoundingClientRect();o=(l.top+l.bottom)/2}else o=i.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);n.domEventHandlers[r](e,a,i)&&i.preventDefault()});this.markers=z_(n.markers(e)),n.initialSpacer&&(this.spacer=new dL(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=z_(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!Ye.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class dL{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),m7(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let s=0,o=0;;){let a=o,l=s<n.length?n[s++]:null,c=!1;if(l){let u=l.elementClass;u&&(r+=" "+u);for(let h=o;h<this.markers.length;h++)if(this.markers[h].compare(l)){a=h,c=!0;break}}else a=this.markers.length;for(;o<a;){let u=this.markers[o++];if(u.toDOM){u.destroy(i);let h=i.nextSibling;i.remove(),i=h}}if(!l)break;l.toDOM&&(c?i=i.nextSibling:this.dom.insertBefore(l.toDOM(e),i)),c&&o++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function m7(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const g7=Ee.define(),O7=Ee.define(),wa=Ee.define({combine(t){return _6(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let s=r[i],o=n[i];r[i]=s?(a,l,c)=>s(a,l,c)||o(a,l,c):o}return r}})}});class Xg extends Vo{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function qg(t,e){return t.state.facet(wa).formatNumber(e,t.state)}const y7=Rd.compute([wa],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(g7)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new Xg(qg(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let i of e.state.facet(O7)){let s=i(e,n,r);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(wa)!=e.state.facet(wa),initialSpacer(e){return new Xg(qg(e,U_(e.state.doc.lines)))},updateSpacer(e,n){let r=qg(n.view,U_(n.view.state.doc.lines));return r==e.number?e:new Xg(r)},domEventHandlers:t.facet(wa).domEventHandlers,side:"before"}));function b7(t={}){return[wa.of(t),d7(),y7]}function U_(t){let e=9;for(;e<t;)e=e*10+9;return e}var Zg;const ka=new Qe;function pL(t){return Ee.define({combine:t?e=>e.concat(t):void 0})}const Bv=new Qe;class Sr{constructor(e,n,r=[],i=""){this.data=e,this.name=i,Ze.prototype.hasOwnProperty("tree")||Object.defineProperty(Ze.prototype,"tree",{get(){return Nr(this)}}),this.parser=n,this.extension=[sl.of(this),Ze.languageData.of((s,o,a)=>{let l=H_(s,o,a),c=l.type.prop(ka);if(!c)return[];let u=s.facet(c),h=l.type.prop(Bv);if(h){let d=l.resolve(o-l.from,a);for(let p of h)if(p.test(d,s)){let f=s.facet(p.facet);return p.type=="replace"?f:f.concat(u)}}return u})].concat(r)}isActiveAt(e,n,r=-1){return H_(e,n,r).type.prop(ka)==this.data}findRegions(e){let n=e.facet(sl);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(s,o)=>{if(s.prop(ka)==this.data){r.push({from:o,to:o+s.length});return}let a=s.prop(Qe.mounted);if(a){if(a.tree.prop(ka)==this.data){if(a.overlay)for(let l of a.overlay)r.push({from:l.from+o,to:l.to+o});else r.push({from:o,to:o+s.length});return}else if(a.overlay){let l=r.length;if(i(a.tree,a.overlay[0].from+o),r.length>l)return}}for(let l=0;l<s.children.length;l++){let c=s.children[l];c instanceof ft&&i(c,s.positions[l]+o)}};return i(Nr(e),0),r}get allowsNesting(){return!0}}Sr.setState=Et.define();function H_(t,e,n){let r=t.facet(sl),i=Nr(t).topNode;if(!r||r.allowsNesting)for(let s=i;s;s=s.enter(e,n,ct.ExcludeBuffers))s.type.isTop&&(i=s);return i}class rl extends Sr{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=pL(e.languageData);return new rl(n,e.parser.configure({props:[ka.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new rl(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Nr(t){let e=t.field(Sr.state,!1);return e?e.tree:ft.empty}class E7{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,n){let r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let Ql=null;class _p{constructor(e,n,r=[],i,s,o,a,l){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=s,this.viewport=o,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new _p(e,n,[],ft.empty,0,r,[],null)}startParse(){return this.parser.startParse(new E7(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=ft.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>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(Ui.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(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(Ui.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Ql;Ql=this;try{return e()}finally{Ql=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=X_(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:s,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((c,u,h,d)=>l.push({fromA:c,toA:u,fromB:h,toB:d})),r=Ui.applyChanges(r,l),i=ft.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){a=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),h=e.mapPos(c.to,-1);u<h&&a.push({from:u,to:h})}}}return new _p(this.parser,n,r,i,s,o,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:s}=this.skipped[r];i<e.to&&s>e.from&&(this.fragments=X_(this.fragments,i,s),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends AM{createParse(n,r,i){let s=i[0].from,o=i[i.length-1].to;return{parsedPos:s,advance(){let a=Ql;if(a){for(let l of i)a.tempSkipped.push(l);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=o,new ft(Dn.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Ql}}function X_(t,e,n){return Ui.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class il{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new il(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=_p.create(e.facet(sl).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new il(r)}}Sr.state=to.define({create:il.init,update(t,e){for(let n of e.effects)if(n.is(Sr.setState))return n.value;return e.startState.facet(sl)!=e.state.facet(sl)?il.init(e.state):t.apply(e)}});let fL=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(fL=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const Wg=typeof navigator<"u"&&!((Zg=navigator.scheduling)===null||Zg===void 0)&&Zg.isInputPending?()=>navigator.scheduling.isInputPending():null,v7=Ws.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 e=this.view.state.field(Sr.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(Sr.state);(e.tree!=e.context.tree||!e.context.isDone(t.doc.length))&&(this.working=fL(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEnd<e&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=e+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,i=n.field(Sr.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,t&&!Wg?Math.max(25,t.timeRemaining()-5):1e9),o=i.context.treeLen<r&&n.doc.length>r+1e3,a=i.context.work(()=>Wg&&Wg()||Date.now()>s,r+(o?0:1e5));this.chunkBudget-=Date.now()-e,(a||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:Sr.setState.of(new il(i.context))})),this.chunkBudget>0&&!(a&&!o)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(e=>ri(this.view.state,e)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),sl=Ee.define({combine(t){return t.length?t[0]:null},enables:t=>[Sr.state,v7,Ce.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class jv{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const T7=Ee.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}}),zv=new Qe;function S7(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),o=i==null||i<=s.from?s.to:Math.min(s.to,i);for(let a=n.to;;){let l=e.childAfter(a);if(!l||l==r)return null;if(!l.type.isSkipped){if(l.from>=o)return null;let c=/^ */.exec(s.text.slice(n.to-s.from))[0].length;return{from:n.from,to:n.to+c}}a=l.to}}function w7({closing:t,align:e=!0,units:n=1}){return r=>k7(r,e,n,t)}function k7(t,e,n,r,i){let s=t.textAfter,o=s.match(/^\s*/)[0].length,a=r&&s.slice(o,o+r.length)==r||i==t.pos+o,l=e?S7(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}const _7=t=>t.baseIndent;function Md({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const Vv=new Qe;function mL(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}class hm{constructor(e,n){this.specs=e;let r;function i(a){let l=qs.newName();return(r||(r=Object.create(null)))["."+l]=a,l}const s=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,o=n.scope;this.scope=o instanceof Sr?a=>a.prop(ka)==o.data:o?a=>a==o:void 0,this.style=MM(e.map(a=>({tag:a.tag,class:a.class||i(Object.assign({},a,{tag:null}))})),{all:s}).style,this.module=r?new qs(r):null,this.themeType=n.themeType}static define(e,n){return new hm(e,n||{})}}const db=Ee.define(),x7=Ee.define({combine(t){return t.length?[t[0]]:null}});function Gg(t){let e=t.facet(db);return e.length?e:t.facet(x7)}function C7(t,e){let n=[A7],r;return t instanceof hm&&(t.module&&n.push(Ce.styleModule.of(t.module)),r=t.themeType),r?n.push(db.computeN([Ce.darkTheme],i=>i.facet(Ce.darkTheme)==(r=="dark")?[t]:[])):n.push(db.of(t)),n}class D7{constructor(e){this.markCache=Object.create(null),this.tree=Nr(e.state),this.decorations=this.buildDeco(e,Gg(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Nr(e.state),r=Gg(e.state),i=r!=Gg(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);n.length<s.to&&!i&&n.type==this.tree.type&&o>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=s.to)}buildDeco(e,n){if(!n||!this.tree.length)return Ft.none;let r=new du;for(let{from:i,to:s}of e.visibleRanges)XZ(this.tree,n,(o,a,l)=>{r.add(o,a,this.markCache[l]||(this.markCache[l]=Ft.mark({class:l})))},i,s);return r.finish()}}const A7=sm.high(Ws.fromClass(D7,{decorations:t=>t.decorations})),P7=new Qe,N7=Object.create(null),q_=[Dn.none],Z_=[],W_=Object.create(null),R7=Object.create(null);for(let[t,e]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"]])R7[t]=M7(N7,e);function Yg(t,e){Z_.indexOf(t)>-1||(Z_.push(t),console.warn(e))}function M7(t,e){let n=[];for(let a of e.split(" ")){let l=[];for(let c of a.split(".")){let u=t[c]||R[c];u?typeof u=="function"?l.length?l=l.map(u):Yg(c,`Modifier ${c} used at start of tag`):l.length?Yg(c,`Tag ${c} used as modifier`):l=Array.isArray(u)?u:[u]:Yg(c,`Unknown highlighting tag ${c}`)}for(let c of l)n.push(c)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(a=>a.id),s=W_[i];if(s)return s.id;let o=W_[i]=Dn.define({id:q_.length,name:r,props:[im({[r]:n})]});return q_.push(o),o.id}Zt.RTL,Zt.LTR;let Kg=null;function Jg(){if(!Kg&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let r in t)r!="cssText"&&r!="cssFloat"&&typeof t[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),n.has(r)||(e.push(r),n.add(r)));Kg=e.sort().map(r=>({type:"property",label:r,apply:r+": "}))}return Kg||[]}const G_=["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(t=>({type:"class",label:t})),Y_=["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(t=>({type:"keyword",label:t})).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(t=>({type:"constant",label:t}))),I7=["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(t=>({type:"type",label:t})),L7=["@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(t=>({type:"keyword",label:t})),Si=/^(\w[\w-]*|-\w[\w-]*|)$/,Q7=/^-(-[\w-]*)?$/;function $7(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let r=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return(r==null?void 0:r.name)!="Callee"?!1:e.sliceString(r.from,r.to)=="var"}const K_=new DM,F7=["Declaration"];function B7(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function gL(t,e,n){if(e.to-e.from>4096){let r=K_.get(e);if(r)return r;let i=[],s=new Set,o=e.cursor(ct.IncludeAnonymous);if(o.firstChild())do for(let a of gL(t,o.node,n))s.has(a.label)||(s.add(a.label),i.push(a));while(o.nextSibling());return K_.set(e,i),i}else{let r=[],i=new Set;return e.cursor().iterate(s=>{var o;if(n(s)&&s.matchContext(F7)&&((o=s.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let a=t.sliceString(s.from,s.to);i.has(a)||(i.add(a),r.push({label:a,type:"variable"}))}}),r}}const j7=t=>e=>{let{state:n,pos:r}=e,i=Nr(n).resolveInner(r,-1),s=i.type.isError&&i.from==i.to-1&&n.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:Jg(),validFor:Si};if(i.name=="ValueName")return{from:i.from,options:Y_,validFor:Si};if(i.name=="PseudoClassName")return{from:i.from,options:G_,validFor:Si};if(t(i)||(e.explicit||s)&&$7(i,n.doc))return{from:t(i)||s?i.from:r,options:gL(n.doc,B7(i),t),validFor:Q7};if(i.name=="TagName"){for(let{parent:l}=i;l;l=l.parent)if(l.name=="Block")return{from:i.from,options:Jg(),validFor:Si};return{from:i.from,options:I7,validFor:Si}}if(i.name=="AtKeyword")return{from:i.from,options:L7,validFor:Si};if(!e.explicit)return null;let o=i.resolve(r),a=o.childBefore(r);return a&&a.name==":"&&o.name=="PseudoClassSelector"?{from:r,options:G_,validFor:Si}:a&&a.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:r,options:Y_,validFor:Si}:o.name=="Block"||o.name=="Styles"?{from:r,options:Jg(),validFor:Si}:null},z7=j7(t=>t.name=="VariableName"),xp=rl.define({name:"css",parser:s6.configure({props:[zv.add({Declaration:Md()}),Vv.add({"Block KeyframeList":mL})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function V7(){return new jv(xp,xp.data.of({autocomplete:z7}))}const U7=316,H7=317,J_=1,X7=2,q7=3,Z7=4,W7=318,G7=320,Y7=321,K7=5,J7=6,eY=0,pb=[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],OL=125,tY=59,fb=47,nY=42,rY=43,iY=45,sY=60,oY=44,aY=63,lY=46,cY=91,uY=new NM({start:!1,shift(t,e){return e==K7||e==J7||e==G7?t:e==Y7},strict:!1}),hY=new Kn((t,e)=>{let{next:n}=t;(n==OL||n==-1||e.context)&&t.acceptToken(W7)},{contextual:!0,fallback:!0}),dY=new Kn((t,e)=>{let{next:n}=t,r;pb.indexOf(n)>-1||n==fb&&((r=t.peek(1))==fb||r==nY)||n!=OL&&n!=tY&&n!=-1&&!e.context&&t.acceptToken(U7)},{contextual:!0}),pY=new Kn((t,e)=>{t.next==cY&&!e.context&&t.acceptToken(H7)},{contextual:!0}),fY=new Kn((t,e)=>{let{next:n}=t;if(n==rY||n==iY){if(t.advance(),n==t.next){t.advance();let r=!e.context&&e.canShift(J_);t.acceptToken(r?J_:X7)}}else n==aY&&t.peek(1)==lY&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(q7))},{contextual:!0});function eO(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const mY=new Kn((t,e)=>{if(t.next!=sY||!e.dialectEnabled(eY)||(t.advance(),t.next==fb))return;let n=0;for(;pb.indexOf(t.next)>-1;)t.advance(),n++;if(eO(t.next,!0)){for(t.advance(),n++;eO(t.next,!1);)t.advance(),n++;for(;pb.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==oY)return;for(let r=0;;r++){if(r==7){if(!eO(t.next,!0))return;break}if(t.next!="extends".charCodeAt(r))break;t.advance(),n++}}t.acceptToken(Z7,-n)}),gY=im({"get set async static":R.modifier,"for while do if else switch try catch finally return throw break continue default case defer":R.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":R.operatorKeyword,"let var const using function class extends":R.definitionKeyword,"import export from":R.moduleKeyword,"with debugger new":R.keyword,TemplateString:R.special(R.string),super:R.atom,BooleanLiteral:R.bool,this:R.self,null:R.null,Star:R.modifier,VariableName:R.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":R.function(R.variableName),VariableDefinition:R.definition(R.variableName),Label:R.labelName,PropertyName:R.propertyName,PrivatePropertyName:R.special(R.propertyName),"CallExpression/MemberExpression/PropertyName":R.function(R.propertyName),"FunctionDeclaration/VariableDefinition":R.function(R.definition(R.variableName)),"ClassDeclaration/VariableDefinition":R.definition(R.className),"NewExpression/VariableName":R.className,PropertyDefinition:R.definition(R.propertyName),PrivatePropertyDefinition:R.definition(R.special(R.propertyName)),UpdateOp:R.updateOperator,"LineComment Hashbang":R.lineComment,BlockComment:R.blockComment,Number:R.number,String:R.string,Escape:R.escape,ArithOp:R.arithmeticOperator,LogicOp:R.logicOperator,BitOp:R.bitwiseOperator,CompareOp:R.compareOperator,RegExp:R.regexp,Equals:R.definitionOperator,Arrow:R.function(R.punctuation),": Spread":R.punctuation,"( )":R.paren,"[ ]":R.squareBracket,"{ }":R.brace,"InterpolationStart InterpolationEnd":R.special(R.brace),".":R.derefOperator,", ;":R.separator,"@":R.meta,TypeName:R.typeName,TypeDefinition:R.definition(R.typeName),"type enum interface implements namespace module declare":R.definitionKeyword,"abstract global Privacy readonly override":R.modifier,"is keyof unique infer asserts":R.operatorKeyword,JSXAttributeValue:R.attributeValue,JSXText:R.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":R.angleBracket,"JSXIdentifier JSXNameSpacedName":R.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":R.attributeName,"JSXBuiltin/JSXIdentifier":R.standard(R.tagName)}),OY={__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},yY={__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},bY={__proto__:null,"<":193},EY=Ka.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*XO!k)OP~P!1uO#k*aO~O!l*bO~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*dO(VTO(YUO(a$uO(y$}O(z%PO~O![*gO!Y)PP~P!3tOr*sOs!nO!S*iO!b*qO!c*kO!d*kO!l*bO#[*rO%`*mO(U!lO(VTO(YUO(e!mO~O!^*pO~P!5iO#S$dOn(`X!Q(`X'y(`X(y(`X(z(`X!](`X#`(`X~Og(`X$O(`X~P!6kOn*xO#`*wOg(_X!](_X~O!]*yOg(^X~Oj%dOk%dOl%dO(T&ZOg(^P~Os*|O~Og)}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%hO![+ZO!](^O!_%iO(T%gO!Y(vP~Os'[O!S+]O![+[O(VTO(YUO(e(|O~O!^(xP~P!9|O!]+^Oa)TX'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%WO![/mO!](^O(T/lO!Y(vP!Y)PP~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:uY,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:[gY],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:[dY,pY,fY,mY,2,3,4,5,6,7,8,9,10,11,12,13,14,hY,new gp("$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 gp("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:t=>OY[t]||-1},{term:343,get:t=>yY[t]||-1},{term:95,get:t=>bY[t]||-1}],tokenPrec:15201});function ex(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function vY(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let s=1;s<i.length;s++)n[i[s]]=!0}let r=ex(e)+ex(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function TY(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:vY(e);return i=>{let s=i.matchBefore(r);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:n}:null}}function SY(t,e){return n=>{for(let r=Nr(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}const wY=Jo.define(),kY=Ce.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"}}});class _Y{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class Uv{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,Sn.TrackDel),r=e.mapPos(this.to,1,Sn.TrackDel);return n==null||r==null?null:new Uv(this.field,n,r)}}class Hv{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],s=e.doc.lineAt(n),o=/^\s*/.exec(s.text)[0];for(let l of this.lines){if(r.length){let c=o,u=/^\t*/.exec(l)[0].length;for(let h=0;h<u;h++)c+=e.facet(T7);i.push(n+c.length-u),l=c+l.slice(u)}r.push(l),n+=l.length+1}let a=this.fieldPositions.map(l=>new Uv(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:r,ranges:a}}static parse(e){let n=[],r=[],i=[],s;for(let o of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(o);){let a=s[1]?+s[1]:null,l=s[2]||s[3]||"",c=-1,u=l.replace(/\\[{}]/g,h=>h[1]);for(let h=0;h<n.length;h++)(a!=null?n[h].seq==a:u&&n[h].name==u)&&(c=h);if(c<0){let h=0;for(;h<n.length&&(a==null||n[h].seq!=null&&n[h].seq<a);)h++;n.splice(h,0,{seq:a,name:u}),c=h;for(let d of i)d.field>=c&&d.field++}for(let h of i)if(h.line==r.length&&h.from>s.index){let d=s[2]?3+(s[1]||"").length:2;h.from-=d,h.to-=d}i.push(new _Y(c,r.length,s.index,s.index+u.length)),o=o.slice(0,s.index)+l+o.slice(s.index+s[0].length)}o=o.replace(/\\([{}])/g,(a,l,c)=>{for(let u of i)u.line==r.length&&u.from>c&&(u.from--,u.to--);return l}),r.push(o)}return new Hv(r,i)}}let xY=Ft.widget({widget:new class extends cm{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),CY=Ft.mark({class:"cm-snippetField"});class yl{constructor(e,n){this.ranges=e,this.active=n,this.deco=Ft.set(e.map(r=>(r.from==r.to?xY:CY).range(r.from,r.to)),!0)}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new yl(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const qu=Et.define({map(t,e){return t&&t.map(e)}}),DY=Et.define(),Ou=to.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(qu))return n.value;if(n.is(DY)&&t)return new yl(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Ce.decorations.from(t,e=>e?e.deco:Ft.none)});function Xv(t,e){return ae.create(t.filter(n=>n.field==e).map(n=>ae.range(n.from,n.to)))}function AY(t){let e=Hv.parse(t);return(n,r,i,s)=>{let{text:o,ranges:a}=e.instantiate(n.state,i),{main:l}=n.state.selection,c={changes:{from:i,to:s==l.from?l.to:s,insert:We.of(o)},scrollIntoView:!0,annotations:r?[wY.of(r),nn.userEvent.of("input.complete")]:void 0};if(a.length&&(c.selection=Xv(a,0)),a.some(u=>u.field>0)){let u=new yl(a,0),h=c.effects=[qu.of(u)];n.state.field(Ou,!1)===void 0&&h.push(Et.appendConfig.of([Ou,IY,LY,kY]))}n.dispatch(n.state.update(c))}}function yL(t){return({state:e,dispatch:n})=>{let r=e.field(Ou,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,s=t>0&&!r.ranges.some(o=>o.field==i+t);return n(e.update({selection:Xv(r.ranges,i),effects:qu.of(s?null:new yl(r.ranges,i)),scrollIntoView:!0})),!0}}const PY=({state:t,dispatch:e})=>t.field(Ou,!1)?(e(t.update({effects:qu.of(null)})),!0):!1,NY=yL(1),RY=yL(-1),MY=[{key:"Tab",run:NY,shift:RY},{key:"Escape",run:PY}],tx=Ee.define({combine(t){return t.length?t[0]:MY}}),IY=sm.highest(hL.compute([tx],t=>t.facet(tx)));function Nn(t,e){return{...e,apply:AY(t)}}const LY=Ce.domEventHandlers({mousedown(t,e){let n=e.state.field(Ou,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(s=>s.from<=r&&s.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:Xv(n.ranges,i.field),effects:qu.of(n.ranges.some(s=>s.field>i.field)?new yl(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),bL=new class extends Fo{};bL.startSide=1;bL.endSide=-1;const EL=[Nn("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Nn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Nn("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Nn("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Nn("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Nn(`try {
\${}
} catch (\${error}) {
\${}
}`,{label:"try",detail:"/ catch block",type:"keyword"}),Nn("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Nn(`if (\${}) {
\${}
} else {
\${}
}`,{label:"if",detail:"/ else block",type:"keyword"}),Nn(`class \${name} {
constructor(\${params}) {
\${}
}
}`,{label:"class",detail:"definition",type:"keyword"}),Nn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Nn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],QY=EL.concat([Nn("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Nn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Nn("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),nx=new DM,vL=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function $l(t){return(e,n)=>{let r=e.node.getChild("VariableDefinition");return r&&n(r,t),!0}}const $Y=["FunctionDeclaration"],FY={FunctionDeclaration:$l("function"),ClassDeclaration:$l("class"),ClassExpression:()=>!0,EnumDeclaration:$l("constant"),TypeAliasDeclaration:$l("type"),NamespaceDeclaration:$l("namespace"),VariableDefinition(t,e){t.matchContext($Y)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function TL(t,e){let n=nx.get(e);if(n)return n;let r=[],i=!0;function s(o,a){let l=t.sliceString(o.from,o.to);r.push({label:l,type:a})}return e.cursor(ct.IncludeAnonymous).iterate(o=>{if(i)i=!1;else if(o.name){let a=FY[o.name];if(a&&a(o,s)||vL.has(o.name))return!1}else if(o.to-o.from>8192){for(let a of TL(t,o.node))r.push(a);return!1}}),nx.set(e,r),r}const rx=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,SL=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function BY(t){let e=Nr(t.state).resolveInner(t.pos,-1);if(SL.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&rx.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let r=[];for(let i=e;i;i=i.parent)vL.has(i.name)&&(r=r.concat(TL(t.state.doc,i)));return{options:r,from:n?e.from:t.pos,validFor:rx}}const oi=rl.define({name:"javascript",parser:EY.configure({props:[zv.add({IfStatement:Md({except:/^\s*({|else\b)/}),TryStatement:Md({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:_7,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:r?1:2)*t.unit},Block:w7({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Md({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),Vv.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":mL,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),wL={test:t=>/^JSX/.test(t.name),facet:pL({commentTokens:{block:{open:"{/*",close:"*/}"}}})},kL=oi.configure({dialect:"ts"},"typescript"),_L=oi.configure({dialect:"jsx",props:[Bv.add(t=>t.isTop?[wL]:void 0)]}),xL=oi.configure({dialect:"jsx ts",props:[Bv.add(t=>t.isTop?[wL]:void 0)]},"typescript");let CL=t=>({label:t,type:"keyword"});const DL="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(CL),jY=DL.concat(["declare","implements","private","protected","public"].map(CL));function zY(t={}){let e=t.jsx?t.typescript?xL:_L:t.typescript?kL:oi,n=t.typescript?QY.concat(jY):EL.concat(DL);return new jv(e,[oi.data.of({autocomplete:SY(SL,TY(n))}),oi.data.of({autocomplete:BY}),t.jsx?HY:[]])}function VY(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function ix(t,e,n=t.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return t.sliceString(r.from,Math.min(r.to,n));return""}const UY=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),HY=Ce.inputHandler.of((t,e,n,r,i)=>{if((UY?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||r!=">"&&r!="/"||!oi.isActiveAt(t.state,e,-1))return!1;let s=i(),{state:o}=s,a=o.changeByRange(l=>{var c;let{head:u}=l,h=Nr(o).resolveInner(u-1,-1),d;if(h.name=="JSXStartTag"&&(h=h.parent),!(o.doc.sliceString(u-1,u)!=r||h.name=="JSXAttributeValue"&&h.to>u)){if(r==">"&&h.name=="JSXFragmentTag")return{range:l,changes:{from:u,insert:"</>"}};if(r=="/"&&h.name=="JSXStartCloseTag"){let p=h.parent,f=p.parent;if(f&&p.from==u-2&&((d=ix(o.doc,f.firstChild,u))||((c=f.firstChild)===null||c===void 0?void 0:c.name)=="JSXFragmentTag")){let m=`${d}>`;return{range:ae.cursor(u+m.length,-1),changes:{from:u,insert:m}}}}else if(r==">"){let p=VY(h);if(p&&p.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(u,u+2))&&(d=ix(o.doc,p,u)))return{range:l,changes:{from:u,insert:`</${d}>`}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Fl=["_blank","_self","_top","_parent"],tO=["ascii","utf-8","utf-16","latin1","latin1"],nO=["get","post","put","delete"],rO=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Vn=["true","false"],he={},XY={a:{attrs:{href:null,ping:null,type:null,media:null,target:Fl,hreflang:null}},abbr:he,address:he,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:he,aside:he,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:he,base:{attrs:{href:null,target:Fl}},bdi:he,bdo:he,blockquote:{attrs:{cite:null}},body:he,br:he,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:rO,formmethod:nO,formnovalidate:["novalidate"],formtarget:Fl,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:he,center:he,cite:he,code:he,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:he,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:he,div:he,dl:he,dt:he,em:he,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:he,figure:he,footer:he,form:{attrs:{action:null,name:null,"accept-charset":tO,autocomplete:["on","off"],enctype:rO,method:nO,novalidate:["novalidate"],target:Fl}},h1:he,h2:he,h3:he,h4:he,h5:he,h6:he,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:he,hgroup:he,hr:he,html:{attrs:{manifest:null}},i:he,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:rO,formmethod:nO,formnovalidate:["novalidate"],formtarget:Fl,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:he,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:he,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:he,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:tO,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:he,noscript:he,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:he,param:{attrs:{name:null,value:null}},pre:he,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:he,rt:he,ruby:he,samp:he,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:tO}},section:he,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:he,source:{attrs:{src:null,type:null,media:null}},span:he,strong:he,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:he,summary:he,sup:he,table:he,tbody:he,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:he,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:he,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:he,time:{attrs:{datetime:null}},title:he,tr:he,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:he,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:he},AL={accesskey:null,class:null,contenteditable:Vn,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:Vn,autocorrect:Vn,autocapitalize:Vn,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":Vn,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Vn,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Vn,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Vn,"aria-hidden":Vn,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Vn,"aria-multiselectable":Vn,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Vn,"aria-relevant":null,"aria-required":Vn,"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},PL="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(t=>"on"+t);for(let t of PL)AL[t]=null;let Cp=class{constructor(t,e){this.tags={...XY,...t},this.globalAttrs={...AL,...e},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};Cp.default=new Cp;function ol(t,e,n=t.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?t.sliceString(i.from,Math.min(i.to,n)):""}function al(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function NL(t,e,n){let r=n.tags[ol(t,al(e))];return(r==null?void 0:r.children)||n.allTags}function qv(t,e){let n=[];for(let r=al(e);r&&!r.type.isTop;r=al(r.parent)){let i=ol(t,r);if(i&&r.lastChild.name=="CloseTag")break;i&&n.indexOf(i)<0&&(e.name=="EndTag"||e.from>=r.firstChild.to)&&n.push(i)}return n}const RL=/^[:\-\.\w\u00b7-\uffff]*$/;function sx(t,e,n,r,i){let s=/\s*>/.test(t.sliceDoc(i,i+5))?"":">",o=al(n,n.name=="StartTag"||n.name=="TagName");return{from:r,to:i,options:NL(t.doc,o,e).map(a=>({label:a,type:"type"})).concat(qv(t.doc,n).map((a,l)=>({label:"/"+a,apply:"/"+a+s,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function ox(t,e,n,r){let i=/\s*>/.test(t.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:qv(t.doc,e).map((s,o)=>({label:s,apply:s+i,type:"type",boost:99-o})),validFor:RL}}function qY(t,e,n,r){let i=[],s=0;for(let o of NL(t.doc,n,e))i.push({label:"<"+o,type:"type"});for(let o of qv(t.doc,n))i.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function ZY(t,e,n,r,i){let s=al(n),o=s?e.tags[ol(t.doc,s)]:null,a=o&&o.attrs?Object.keys(o.attrs):[],l=o&&o.globalAttrs===!1?a:a.length?a.concat(e.globalAttrNames):e.globalAttrNames;return{from:r,to:i,options:l.map(c=>({label:c,type:"property"})),validFor:RL}}function WY(t,e,n,r,i){var s;let o=(s=n.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),a=[],l;if(o){let c=t.sliceDoc(o.from,o.to),u=e.globalAttrs[c];if(!u){let h=al(n),d=h?e.tags[ol(t.doc,h)]:null;u=(d==null?void 0:d.attrs)&&d.attrs[c]}if(u){let h=t.sliceDoc(r,i).toLowerCase(),d='"',p='"';/^['"]/.test(h)?(l=h[0]=='"'?/^[^"]*$/:/^[^']*$/,d="",p=t.sliceDoc(i,i+1)==h[0]?"":h[0],h=h.slice(1),r++):l=/^[^\s<>='"]*$/;for(let f of u)a.push({label:f,apply:d+f+p,type:"constant"})}}return{from:r,to:i,options:a,validFor:l}}function GY(t,e){let{state:n,pos:r}=e,i=Nr(n).resolveInner(r,-1),s=i.resolve(r);for(let o=r,a;s==i&&(a=i.childBefore(o));){let l=a.lastChild;if(!l||!l.type.isError||l.from<l.to)break;s=i=a,o=l.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?ox(n,i,i.from,r):sx(n,t,i,i.from,r):i.name=="StartTag"||i.name=="IncompleteTag"?sx(n,t,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?ox(n,i,r,r):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?ZY(n,t,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?WY(n,t,i,i.name=="Is"?r:i.from,r):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?qY(n,t,i,r):null}function YY(t){let{extraTags:e,extraGlobalAttributes:n}=t,r=n||e?new Cp(e,n):Cp.default;return i=>GY(r,i)}const KY=oi.parser.configure({top:"SingleExpression"}),ML=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:kL.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:_L.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:xL.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:KY},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:oi.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:xp.parser}],IL=[{name:"style",parser:xp.parser.configure({top:"Styles"})}].concat(PL.map(t=>({name:t,parser:oi.parser}))),LL=rl.define({name:"html",parser:NW.configure({props:[zv.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e=null,n;for(let r=t.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;e=r=i}return e&&!((n=e.lastChild)&&(n.name=="CloseTag"||n.name=="SelfClosingTag"))?t.lineIndent(e.from)+t.unit:null}}),Vv.add({Element(t){let e=t.firstChild,n=t.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:n.name=="CloseTag"?n.from:t.to}}}),P7.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),Id=LL.configure({wrap:UM(ML,IL)});function JY(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=UM((t.nestedLanguages||[]).concat(ML),(t.nestedAttributes||[]).concat(IL)));let r=n?LL.configure({wrap:n,dialect:e}):e?Id.configure({dialect:e}):Id;return new jv(r,[Id.data.of({autocomplete:YY(t)}),t.autoCloseTags!==!1?e9:[],zY().support,V7().support])}const ax=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),e9=Ce.inputHandler.of((t,e,n,r,i)=>{if(t.composing||t.state.readOnly||e!=n||r!=">"&&r!="/"||!Id.isActiveAt(t.state,e,-1))return!1;let s=i(),{state:o}=s,a=o.changeByRange(l=>{var c,u,h;let d=o.doc.sliceString(l.from-1,l.to)==r,{head:p}=l,f=Nr(o).resolveInner(p,-1),m;if(d&&r==">"&&f.name=="EndTag"){let g=f.parent;if(((u=(c=g.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(m=ol(o.doc,g.parent,p))&&!ax.has(m)){let y=p+(o.doc.sliceString(p,p+1)===">"?1:0),b=`</${m}>`;return{range:l,changes:{from:p,to:y,insert:b}}}}else if(d&&r=="/"&&f.name=="IncompleteCloseTag"){let g=f.parent;if(f.from==p-2&&((h=g.lastChild)===null||h===void 0?void 0:h.name)!="CloseTag"&&(m=ol(o.doc,g,p))&&!ax.has(m)){let y=p+(o.doc.sliceString(p,p+1)===">"?1:0),b=`${m}>`;return{range:ae.cursor(p+b.length,-1),changes:{from:p,to:y,insert:b}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),t9=Ce.theme({"&":{color:"inherit",fontSize:"90%",backgroundColor:"inherit",outline:"none !important",display:"block !important",width:"100%",minHeight:"inherit",cursor:"text",height:"100%"},".cm-content":{lineHeight:1.75,fontFamily:"var(--font-mono)",caretColor:"hsl(var(--foreground, 0 0% 100%))",padding:"10px 0"},".cm-scroller":{minHeight:"inherit",height:"100%"},".cm-cursor":{borderLeftColor:"inherit"},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, ::selection":{backgroundColor:"rgba(59, 130, 246, 0.25)"},".cm-gutters":{color:"inherit",backgroundColor:"inherit",borderRight:"unset"},".cm-lineNumbers .cm-gutterElement":{paddingRight:"24px",opacity:"75%"},".cm-lineWrapping ":{wordBreak:"break-all !important"},".cm-tooltip":{backgroundColor:"hsl(var(--popover, 0 0% 10%))",color:"hsl(var(--popover-foreground, 0 0% 98%))",border:"1px solid hsl(var(--border, 0 0% 25%))",boxShadow:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",zIndex:60},".cm-tooltip-autocomplete":{"& > ul":{maxHeight:"240px",overflow:"auto"}},".cm-tooltip-autocomplete ul li":{padding:"6px 8px"},".cm-tooltip-autocomplete ul li[aria-selected]":{backgroundColor:"hsl(var(--accent, 0 0% 20%))",color:"hsl(var(--accent-foreground, 0 0% 98%))"},".cm-completionMatchedText":{color:"#60a5fa",fontWeight:600,textDecoration:"none"}}),n9=hm.define([{tag:[R.comment],color:"#64748b"},{tag:[R.keyword,R.typeName,R.typeOperator],color:"#7c3aed",fontWeight:"500"},{tag:[R.string,R.meta,R.regexp],color:"#16a34a"},{tag:[R.number,R.bool],color:"#ea580c"},{tag:[R.operator,R.name],color:"#0ea5e9"},{tag:[R.variableName,R.attributeName,R.propertyName],color:"#0ea5e9"},{tag:[R.className],color:"#22d3ee"},{tag:[R.tagName],color:"#e11d48"},{tag:[R.heading,R.strong],color:"#111827",fontWeight:"bold"},{tag:[R.emphasis],color:"#111827",fontStyle:"italic"},{tag:[R.link],textDecoration:"underline"},{tag:[R.strikethrough],textDecoration:"line-through"},{tag:[R.invalid],color:"#ef4444"}]),r9=[t9,C7(n9)];function i9({initialContent:t}){const e=v.useRef(null);return v.useEffect(()=>{if(!e.current)return;const n=Ze.create({doc:t,extensions:[b7(),JY(),r9,Ze.readOnly.of(!0),Ce.lineWrapping]}),r=new Ce({state:n,parent:e.current});return()=>r.destroy()},[t]),e}var QL=Object.defineProperty,$L=t=>{throw TypeError(t)},s9=(t,e,n)=>e in t?QL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,FL=(t,e)=>{for(var n in e)QL(t,n,{get:e[n],enumerable:!0})},lx=(t,e,n)=>s9(t,typeof e!="symbol"?e+"":e,n),o9=(t,e,n)=>e.has(t)||$L("Cannot "+n),qh=(t,e,n)=>(o9(t,e,"read from private field"),n?n.call(t):e.get(t)),a9=(t,e,n)=>e.has(t)?$L("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),BL={};FL(BL,{languages:()=>G1,options:()=>K1,parsers:()=>D2,printers:()=>Dee});var Zv=(t,e)=>(n,r,...i)=>n|1&&r==null?void 0:(e.call(r)??r[t]).apply(r,i),l9=String.prototype.replaceAll??function(t,e){return t.global?this.replace(t,e):this.split(t).join(e)},c9=Zv("replaceAll",function(){if(typeof this=="string")return l9}),kn=c9;function u9(t){return this[t<0?this.length+t:t]}var h9=Zv("at",function(){if(Array.isArray(this)||typeof this=="string")return u9}),bl=h9,d9=()=>{},p9=d9,jL="string",zL="array",VL="cursor",Wv="indent",Gv="align",UL="trim",Yv="group",Kv="fill",Jv="if-break",eT="indent-if-break",HL="line-suffix",XL="line-suffix-boundary",El="line",qL="label",tT="break-parent",ZL=new Set([VL,Wv,Gv,UL,Yv,Kv,Jv,eT,HL,XL,El,qL,tT]);function f9(t){if(typeof t=="string")return jL;if(Array.isArray(t))return zL;if(!t)return;let{type:e}=t;if(ZL.has(e))return e}var WL=f9,m9=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function g9(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
Expected it to be 'string' or 'object'.`;if(WL(t))throw new Error("doc is valid.");let n=Object.prototype.toString.call(t);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let r=m9([...ZL].map(i=>`'${i}'`));return`Unexpected doc.type '${t.type}'.
Expected it to be ${r}.`}var O9=class extends Error{constructor(e){super(g9(e));V(this,"name","InvalidDocError");this.doc=e}},y9=O9;function GL(t,e){if(typeof t=="string")return e(t);let n=new Map;return r(t);function r(s){if(n.has(s))return n.get(s);let o=i(s);return n.set(s,o),o}function i(s){switch(WL(s)){case zL:return e(s.map(r));case Kv:return e({...s,parts:s.parts.map(r)});case Jv:return e({...s,breakContents:r(s.breakContents),flatContents:r(s.flatContents)});case Yv:{let{expandedStates:o,contents:a}=s;return o?(o=o.map(r),a=o[0]):a=r(a),e({...s,contents:a,expandedStates:o})}case Gv:case Wv:case eT:case qL:case HL:return e({...s,contents:r(s.contents)});case jL:case VL:case UL:case XL:case El:case tT:return e(s);default:throw new y9(s)}}}function ai(t,e=k9){return GL(t,n=>typeof n=="string"?vl(e,n.split(`
`)):n)}var b9=p9;function mi(t){return{type:Wv,contents:t}}function E9(t,e){return{type:Gv,contents:e,n:t}}function v9(t){return E9(Number.NEGATIVE_INFINITY,t)}var Zu={type:tT};function YL(t){return{type:Kv,parts:t}}function $t(t,e={}){return b9(e.expandedStates),{type:Yv,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function yu(t,e="",n={}){return{type:Jv,breakContents:t,flatContents:e,groupId:n.groupId}}function T9(t,e){return{type:eT,contents:t,groupId:e.groupId,negate:e.negate}}function vl(t,e){let n=[];for(let r=0;r<e.length;r++)r!==0&&n.push(t),n.push(e[r]);return n}var kt={type:El},fn={type:El,soft:!0},S9={type:El,hard:!0},Ot=[S9,Zu],w9={type:El,hard:!0,literal:!0},k9=[w9,Zu];function _9(t,e){let n=e===!0||e==="'"?"'":'"',r=n==="'"?'"':"'",i=0,s=0;for(let o of t)o===n?i++:o===r&&s++;return i>s?r:n}var x9=_9;function C9(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var rr,_f,KL,nA,D9=(nA=class{constructor(t){Oh(this,_f);Oh(this,rr);DS(this,rr,new Set(t))}getLeadingWhitespaceCount(t){let e=vi(this,rr),n=0;for(let r=0;r<t.length&&e.has(t.charAt(r));r++)n++;return n}getTrailingWhitespaceCount(t){let e=vi(this,rr),n=0;for(let r=t.length-1;r>=0&&e.has(t.charAt(r));r--)n++;return n}getLeadingWhitespace(t){let e=this.getLeadingWhitespaceCount(t);return t.slice(0,e)}getTrailingWhitespace(t){let e=this.getTrailingWhitespaceCount(t);return t.slice(t.length-e)}hasLeadingWhitespace(t){return vi(this,rr).has(t.charAt(0))}hasTrailingWhitespace(t){return vi(this,rr).has(bl(0,t,-1))}trimStart(t){let e=this.getLeadingWhitespaceCount(t);return t.slice(e)}trimEnd(t){let e=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-e)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,e=!1){let n=`[${C9([...vi(this,rr)].join(""))}]+`,r=new RegExp(e?`(${n})`:n,"u");return t.split(r)}hasWhitespaceCharacter(t){let e=vi(this,rr);return Array.prototype.some.call(t,n=>e.has(n))}hasNonWhitespaceCharacter(t){let e=vi(this,rr);return Array.prototype.some.call(t,n=>!e.has(n))}isWhitespaceOnly(t){let e=vi(this,rr);return Array.prototype.every.call(t,n=>e.has(n))}dedentString(t){let e=co(this,_f,KL).call(this,t);return e===0?t:t.split(`
`).map(n=>n.slice(e)).join(`
`)}},rr=new WeakMap,_f=new WeakSet,KL=function(t){let e=Number.POSITIVE_INFINITY;for(let n of t.split(`
`)){if(n.length===0)continue;let r=this.getLeadingWhitespaceCount(n);if(r===0)return 0;n.length!==r&&r<e&&(e=r)}return e===Number.POSITIVE_INFINITY?0:e},nA),A9=D9,P9=[" ",`
`,"\f","\r"," "],N9=new A9(P9),Or=N9,R9=class extends Error{constructor(e,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(e[r])}.`);V(this,"name","UnexpectedNodeError");this.node=e}},M9=R9,I9=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens","switchValueSourceSpan","expSourceSpan","valueSourceSpan"]),L9=new Set(["if","else if","for","switch","case"]);function JL(t,e,n){var r;if(t.kind==="text"||t.kind==="comment")return null;if(t.kind==="yaml"&&delete e.value,t.kind==="attribute"){let{fullName:i,value:s}=t;i==="style"||i==="class"||i==="srcset"&&(n.fullName==="img"||n.fullName==="source")||i==="allow"&&n.fullName==="iframe"||i.startsWith("on")||i.startsWith("@")||i.startsWith(":")||i.startsWith(".")||i.startsWith("#")||i.startsWith("v-")||i==="vars"&&n.fullName==="style"||(i==="setup"||i==="generic")&&n.fullName==="script"||i==="slot-scope"||i.startsWith("(")||i.startsWith("[")||i.startsWith("*")||i.startsWith("bind")||i.startsWith("i18n")||i.startsWith("on-")||i.startsWith("ng-")||s!=null&&s.includes("{{")?delete e.value:s&&(e.value=kn(0,s,/'|&quot;|&apos;/gu,'"'))}if(t.kind==="docType"&&(e.value=kn(0,t.value.toLowerCase(),/\s+/gu," ")),t.kind==="angularControlFlowBlock"&&((r=t.parameters)==null?void 0:r.children))for(let i of e.parameters.children)L9.has(t.name)?delete i.expression:i.expression=i.expression.trim();t.kind==="angularIcuExpression"&&(e.switchValue=t.switchValue.trim()),t.kind==="angularLetDeclarationInitializer"&&delete e.value,t.kind==="element"&&t.isVoid&&!t.isSelfClosing&&(e.isSelfClosing=!0)}JL.ignoredProperties=I9;var Q9=JL;function Wu(t,e=!0){return[mi([fn,t]),e?fn:""]}function Tl(t,e){let n=t.type==="NGRoot"?t.node.type==="NGMicrosyntax"&&t.node.body.length===1&&t.node.body[0].type==="NGMicrosyntaxExpression"?t.node.body[0].expression:t.node:t.type==="JsExpressionRoot"?t.node:t;return n&&(n.type==="ObjectExpression"||n.type==="ArrayExpression"||(e.parser==="__vue_expression"||e.parser==="__vue_ts_expression")&&(n.type==="TemplateLiteral"||n.type==="StringLiteral"))}async function yr(t,e,n,r){n={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...n};let i=!0;r&&(n.__onHtmlBindingRoot=(o,a)=>{i=r(o,a)});let s=await e(t,n,e);return i?$t(s):Wu(s)}function $9(t,e,n,r){let{node:i}=n,s=r.originalText.slice(i.sourceSpan.start.offset,i.sourceSpan.end.offset);return/^\s*$/u.test(s)?"":yr(s,t,{parser:"__ng_directive",__isInHtmlAttribute:!1},Tl)}var F9=$9,B9=Array.prototype.toReversed??function(){return[...this].reverse()},j9=Zv("toReversed",function(){if(Array.isArray(this))return B9}),z9=j9;function V9(){var n,r,i,s,o,a;let t=globalThis,e=(r=(n=t.Deno)==null?void 0:n.build)==null?void 0:r.os;return typeof e=="string"?e==="windows":((s=(i=t.navigator)==null?void 0:i.platform)==null?void 0:s.startsWith("Win"))??((a=(o=t.process)==null?void 0:o.platform)==null?void 0:a.startsWith("win"))??!1}var U9=V9();function e2(t){if(t=t instanceof URL?t:new URL(t),t.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${t.protocol}"`);return t}function H9(t){return t=e2(t),decodeURIComponent(t.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function X9(t){t=e2(t);let e=decodeURIComponent(t.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return t.hostname!==""&&(e=`\\\\${t.hostname}${e}`),e}function q9(t){return U9?X9(t):H9(t)}var Z9=t=>String(t).split(/[/\\]/u).pop(),W9=t=>String(t).startsWith("file:");function G9(t){return Array.isArray(t)&&t.length>0}var nT=G9;function cx(t,e){if(!e)return;let n=Z9(e).toLowerCase();return t.find(({filenames:r})=>r==null?void 0:r.some(i=>i.toLowerCase()===n))??t.find(({extensions:r})=>r==null?void 0:r.some(i=>n.endsWith(i)))}function Y9(t,e){if(e)return t.find(({name:n})=>n.toLowerCase()===e)??t.find(({aliases:n})=>n==null?void 0:n.includes(e))??t.find(({extensions:n})=>n==null?void 0:n.includes(`.${e}`))}var iO=void 0;function ux(t,e){if(e){if(W9(e))try{e=q9(e)}catch{return}if(typeof e=="string")return t.find(({isSupported:n})=>n==null?void 0:n({filepath:e}))}}function K9(t,e){var r;let n=z9(0,t.plugins).flatMap(i=>i.languages??[]);return(r=Y9(n,e.language)??cx(n,e.physicalFile)??cx(n,e.file)??ux(n,e.physicalFile)??ux(n,e.file)??(iO==null?void 0:iO(n,e.physicalFile)))==null?void 0:r.parsers[0]}var rT=K9,t2=Symbol.for("PRETTIER_IS_FRONT_MATTER");function J9(t){return!!(t!=null&&t[t2])}var dm=J9,Bl=3;function eK(t){let e=t.slice(0,Bl);if(e!=="---"&&e!=="+++")return;let n=t.indexOf(`
`,Bl);if(n===-1)return;let r=t.slice(Bl,n).trim(),i=t.indexOf(`
${e}`,n),s=r;if(s||(s=e==="+++"?"toml":"yaml"),i===-1&&e==="---"&&s==="yaml"&&(i=t.indexOf(`
...`,n)),i===-1)return;let o=i+1+Bl,a=t.charAt(o+1);if(!/\s?/u.test(a))return;let l=t.slice(0,o),c;return{language:s,explicitLanguage:r||null,value:t.slice(n+1,i),startDelimiter:e,endDelimiter:l.slice(-Bl),raw:l,start:{line:1,column:0,index:0},end:{index:l.length,get line(){return c??(c=l.split(`
`)),c.length},get column(){return c??(c=l.split(`
`)),bl(0,c,-1).length}},[t2]:!0}}function tK(t){let e=eK(t);return e?{frontMatter:e,get content(){let{raw:n}=e;return kn(0,n,/[^\n]/gu," ")+t.slice(n.length)}}:{content:t}}var nK=tK,rK="inline",hx={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",search:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",menu:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",input:"inline-block",button:"inline-block",fieldset:"block",details:"block",summary:"block",marquee:"inline-block",select:"inline-block",source:"block",track:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",option:"block",optgroup:"block"},iK="normal",dx={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function sK(t){return t.kind==="element"&&!t.hasExplicitNamespace&&!["html","svg"].includes(t.namespace)}var Gu=sK,oK=t=>kn(0,t,/^[\t\f\r ]*\n/gu,""),n2=t=>oK(Or.trimEnd(t)),aK=t=>{let e=t,n=Or.getLeadingWhitespace(e);n&&(e=e.slice(n.length));let r=Or.getTrailingWhitespace(e);return r&&(e=e.slice(0,-r.length)),{leadingWhitespace:n,trailingWhitespace:r,text:e}};function r2(t,e){return!!(t.kind==="ieConditionalComment"&&t.lastChild&&!t.lastChild.isSelfClosing&&!t.lastChild.endSourceSpan||t.kind==="ieConditionalComment"&&!t.complete||ll(t)&&t.children.some(n=>n.kind!=="text"&&n.kind!=="interpolation")||sT(t,e)&&!Ki(t,e)&&t.kind!=="interpolation")}function pm(t){return t.kind==="attribute"||!t.parent||!t.prev?!1:lK(t.prev)}function lK(t){return t.kind==="comment"&&t.value.trim()==="prettier-ignore"}function cr(t){return t.kind==="text"||t.kind==="comment"}function Ki(t,e){return t.kind==="element"&&(t.fullName==="script"||t.fullName==="style"||t.fullName==="svg:style"||t.fullName==="svg:script"||t.fullName==="mj-style"&&e.parser==="mjml"||Gu(t)&&(t.name==="script"||t.name==="style"))}function cK(t,e){return t.children&&!Ki(t,e)}function uK(t,e){return Ki(t,e)||t.kind==="interpolation"||i2(t)}function i2(t){return h2(t).startsWith("pre")}function hK(t,e){var i,s;let n=r();if(n&&!t.prev&&((s=(i=t.parent)==null?void 0:i.tagDefinition)!=null&&s.ignoreFirstLf))return t.kind==="interpolation";return n;function r(){return dm(t)||t.kind==="angularControlFlowBlock"?!1:(t.kind==="text"||t.kind==="interpolation")&&t.prev&&(t.prev.kind==="text"||t.prev.kind==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:ll(t.parent)?!0:!(!t.prev&&(t.parent.kind==="root"||ll(t)&&t.parent||Ki(t.parent,e)||fm(t.parent,e)||!EK(t.parent.cssDisplay))||t.prev&&!SK(t.prev.cssDisplay))}}function dK(t,e){return dm(t)||t.kind==="angularControlFlowBlock"?!1:(t.kind==="text"||t.kind==="interpolation")&&t.next&&(t.next.kind==="text"||t.next.kind==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:ll(t.parent)?!0:!(!t.next&&(t.parent.kind==="root"||ll(t)&&t.parent||Ki(t.parent,e)||fm(t.parent,e)||!vK(t.parent.cssDisplay))||t.next&&!TK(t.next.cssDisplay))}function pK(t,e){return wK(t.cssDisplay)&&!Ki(t,e)}function Zh(t){return dm(t)||t.next&&t.sourceSpan.end&&t.sourceSpan.end.line+1<t.next.sourceSpan.start.line}function fK(t){return s2(t)||t.kind==="element"&&t.children.length>0&&(["body","script","style"].includes(t.name)||t.children.some(e=>gK(e)))||t.firstChild&&t.firstChild===t.lastChild&&t.firstChild.kind!=="text"&&a2(t.firstChild)&&(!t.lastChild.isTrailingSpaceSensitive||l2(t.lastChild))}function s2(t){return t.kind==="element"&&t.children.length>0&&(["html","head","ul","ol","select"].includes(t.name)||t.cssDisplay.startsWith("table")&&t.cssDisplay!=="table-cell")}function sO(t){return c2(t)||t.prev&&mK(t.prev)||o2(t)}function mK(t){return c2(t)||t.kind==="element"&&t.fullName==="br"||o2(t)}function o2(t){return a2(t)&&l2(t)}function a2(t){return t.hasLeadingSpaces&&(t.prev?t.prev.sourceSpan.end.line<t.sourceSpan.start.line:t.parent.kind==="root"||t.parent.startSourceSpan.end.line<t.sourceSpan.start.line)}function l2(t){return t.hasTrailingSpaces&&(t.next?t.next.sourceSpan.start.line>t.sourceSpan.end.line:t.parent.kind==="root"||t.parent.endSourceSpan&&t.parent.endSourceSpan.start.line>t.sourceSpan.end.line)}function c2(t){switch(t.kind){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(t.name)}return!1}function iT(t){return t.lastChild?iT(t.lastChild):t}function gK(t){var e;return(e=t.children)==null?void 0:e.some(n=>n.kind!=="text")}function u2(t){if(t)switch(t){case"module":case"text/javascript":case"text/babel":case"text/jsx":case"application/javascript":return"babel";case"application/x-typescript":return"typescript";case"text/markdown":return"markdown";case"text/html":return"html";case"text/x-handlebars-template":return"glimmer";default:if(t.endsWith("json")||t.endsWith("importmap")||t==="speculationrules")return"json"}}function OK(t,e){let{name:n,attrMap:r}=t;if(n!=="script"||Object.prototype.hasOwnProperty.call(r,"src"))return;let{type:i,lang:s}=t.attrMap;return!s&&!i?"babel":rT(e,{language:s})??u2(i)}function yK(t,e){if(!sT(t,e))return;let{attrMap:n}=t;if(Object.prototype.hasOwnProperty.call(n,"src"))return;let{type:r,lang:i}=n;return rT(e,{language:i})??u2(r)}function bK(t,e){if(t.name==="style"){let{lang:n}=t.attrMap;return n?rT(e,{language:n}):"css"}if(t.name==="mj-style"&&e.parser==="mjml")return"css"}function px(t,e){return OK(t,e)??bK(t,e)??yK(t,e)}function Yu(t){return t==="block"||t==="list-item"||t.startsWith("table")}function EK(t){return!Yu(t)&&t!=="inline-block"}function vK(t){return!Yu(t)&&t!=="inline-block"}function TK(t){return!Yu(t)}function SK(t){return!Yu(t)}function wK(t){return!Yu(t)&&t!=="inline-block"}function ll(t){return h2(t).startsWith("pre")}function kK(t,e){let n=t;for(;n;){if(e(n))return!0;n=n.parent}return!1}function _K(t,e){var r;if(Sl(t,e))return"block";if(((r=t.prev)==null?void 0:r.kind)==="comment"){let i=t.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/u);if(i)return i[1]}let n=!1;if(t.kind==="element"&&t.namespace==="svg")if(kK(t,i=>i.fullName==="svg:foreignObject"))n=!0;else return t.name==="svg"?"inline-block":"block";switch(e.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:if(t.kind==="element"&&(!t.namespace||n||Gu(t))&&Object.prototype.hasOwnProperty.call(hx,t.name))return hx[t.name]}return rK}function h2(t){return t.kind==="element"&&(!t.namespace||Gu(t))&&Object.prototype.hasOwnProperty.call(dx,t.name)?dx[t.name]:iK}function d2(t){return kn(0,kn(0,t,"&apos;","'"),"&quot;",'"')}function Fn(t){return d2(t.value)}var xK=new Set(["template","style","script"]);function fm(t,e){return Sl(t,e)&&!xK.has(t.fullName)}function Sl(t,e){return e.parser==="vue"&&t.kind==="element"&&t.parent.kind==="root"&&t.fullName.toLowerCase()!=="html"}function sT(t,e){return Sl(t,e)&&(fm(t,e)||t.attrMap.lang&&t.attrMap.lang!=="html")}function CK(t){let e=t.fullName;return e.charAt(0)==="#"||e==="slot-scope"||e==="v-slot"||e.startsWith("v-slot:")}function DK(t,e){let n=t.parent;if(!Sl(n,e))return!1;let r=n.fullName,i=t.fullName;return r==="script"&&i==="setup"||r==="style"&&i==="vars"}function p2(t,e=t.value){return t.parent.isWhitespaceSensitive?t.parent.isIndentationSensitive?ai(e):ai(Or.dedentString(n2(e)),Ot):vl(kt,Or.split(e))}function f2(t,e){return Sl(t,e)&&t.name==="script"}var m2=/\{\{(.+?)\}\}/su,AK=({node:{value:t}})=>m2.test(t);async function PK(t,e,n){let r=Fn(n.node),i=[];for(let[s,o]of r.split(m2).entries())if(s%2===0)i.push(ai(o));else try{i.push($t(["{{",mi([kt,await yr(o,t,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0})]),kt,"}}"]))}catch{i.push("{{",ai(o),"}}")}return i}var oO=t=>(e,n,r)=>yr(Fn(r.node),e,{parser:t},Tl),NK=[{test(t){let e=t.node.fullName;return e.startsWith("(")&&e.endsWith(")")||e.startsWith("on-")},print:oO("__ng_action")},{test(t){let e=t.node.fullName;return e.startsWith("[")&&e.endsWith("]")||/^bind(?:on)?-/u.test(e)||/^ng-(?:if|show|hide|class|style)$/u.test(e)},print:oO("__ng_binding")},{test:t=>t.node.fullName.startsWith("*"),print:oO("__ng_directive")},{test:t=>/^i18n(?:-.+)?$/u.test(t.node.fullName),print:RK},{test:AK,print:PK}].map(({test:t,print:e})=>({test:(n,r)=>r.parser==="angular"&&t(n),print:e}));function RK(t,e,{node:n}){let r=Fn(n);return Wu(YL(p2(n,r.trim())),!r.includes("@@"))}var MK=NK,IK=({node:t},e)=>!e.parentParser&&t.fullName==="class"&&!t.value.includes("{{"),LK=(t,e,n)=>Fn(n.node).trim().split(/\s+/u).join(" "),QK=["onabort","onafterprint","onauxclick","onbeforeinput","onbeforematch","onbeforeprint","onbeforetoggle","onbeforeunload","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncommand","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpagereveal","onpageshow","onpageswap","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onrejectionhandled","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],$K=new Set(QK),FK=({node:t},e)=>$K.has(t.fullName)&&!e.parentParser&&!t.value.includes("{{"),BK=(t,e,n)=>yr(Fn(n.node),t,{parser:"babel",__isHtmlInlineEventHandler:!0},()=>!1);function jK(t){let e=[];for(let n of t.split(";")){if(n=Or.trim(n),!n)continue;let[r,...i]=Or.split(n);e.push({name:r,value:i})}return e}var zK=jK,VK=({node:t},e)=>t.fullName==="allow"&&!e.parentParser&&t.parent.fullName==="iframe"&&!t.value.includes("{{");function UK(t,e,n){let{node:r}=n,i=zK(Fn(r));return i.length===0?[""]:Wu(i.map(({name:s,value:o},a)=>[[s,...o].join(" "),a===i.length-1?yu(";"):[";",kt]]))}function fx(t){return t===" "||t===`
`||t==="\f"||t==="\r"||t===" "}var HK=/^[ \t\n\r\u000c]+/,XK=/^[, \t\n\r\u000c]+/,qK=/^[^ \t\n\r\u000c]+/,ZK=/[,]+$/,mx=/^\d+$/,WK=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function GK(t){let e=t.length,n,r,i,s,o,a=0,l;function c(p){let f,m=p.exec(t.substring(a));if(m)return[f]=m,a+=f.length,f}let u=[];for(;;){if(c(XK),a>=e){if(u.length===0)throw new Error("Must contain one or more image candidate strings.");return u}l=a,n=c(qK),r=[],n.slice(-1)===","?(n=n.replace(ZK,""),d()):h()}function h(){for(c(HK),i="",s="in descriptor";;){if(o=t.charAt(a),s==="in descriptor")if(fx(o))i&&(r.push(i),i="",s="after descriptor");else if(o===","){a+=1,i&&r.push(i),d();return}else if(o==="(")i+=o,s="in parens";else if(o===""){i&&r.push(i),d();return}else i+=o;else if(s==="in parens")if(o===")")i+=o,s="in descriptor";else if(o===""){r.push(i),d();return}else i+=o;else if(s==="after descriptor"&&!fx(o))if(o===""){d();return}else s="in descriptor",a-=1;a+=1}}function d(){let p=!1,f,m,g,y,b={},T,S,w,A,C;for(y=0;y<r.length;y++)T=r[y],S=T[T.length-1],w=T.substring(0,T.length-1),A=parseInt(w,10),C=parseFloat(w),mx.test(w)&&S==="w"?((f||m)&&(p=!0),A===0?p=!0:f=A):WK.test(w)&&S==="x"?((f||m||g)&&(p=!0),C<0?p=!0:m=C):mx.test(w)&&S==="h"?((g||m)&&(p=!0),A===0?p=!0:g=A):p=!0;if(!p)b.source={value:n,startOffset:l},f&&(b.width={value:f}),m&&(b.density={value:m}),g&&(b.height={value:g}),u.push(b);else throw new Error(`Invalid srcset descriptor found in "${t}" at "${T}".`)}}var YK=GK,KK=t=>t.node.fullName==="srcset"&&(t.parent.fullName==="img"||t.parent.fullName==="source"),g2={width:"w",height:"h",density:"x"},JK=Object.keys(g2);function eJ(t,e,n){let r=Fn(n.node),i=YK(r),s=JK.filter(p=>i.some(f=>Object.prototype.hasOwnProperty.call(f,p)));if(s.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[o]=s,a=g2[o],l=i.map(p=>p.source.value),c=Math.max(...l.map(p=>p.length)),u=i.map(p=>p[o]?String(p[o].value):""),h=u.map(p=>{let f=p.indexOf(".");return f===-1?p.length:f}),d=Math.max(...h);return Wu(vl([",",kt],l.map((p,f)=>{let m=[p],g=u[f];if(g){let y=c-p.length+1,b=d-h[f],T=" ".repeat(y+b);m.push(yu(T," "),g+a)}return m})))}var tJ=({node:t},e)=>t.fullName==="style"&&!e.parentParser&&!t.value.includes("{{"),nJ=async(t,e,n)=>Wu(await t(Fn(n.node),{parser:"css",__isHTMLStyleAttribute:!0})),aO=new WeakMap;function rJ(t,e){let{root:n}=t;return aO.has(n)||aO.set(n,n.children.some(r=>f2(r,e)&&["ts","typescript"].includes(r.attrMap.lang))),aO.get(n)}var wl=rJ;function iJ(t,e,n){let r=Fn(n.node);return yr(`type T<${r}> = any`,t,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},Tl)}function sJ(t,e,n,r){let i=Fn(n.node),s=wl(n,r)?"babel-ts":"babel";return yr(`function _(${i}) {}`,t,{parser:s,__isVueBindings:!0})}async function oJ(t,e,n,r){let i=Fn(n.node),{left:s,operator:o,right:a}=aJ(i),l=wl(n,r);return[$t(await yr(`function _(${s}) {}`,t,{parser:l?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",o," ",await yr(a,t,{parser:l?"__ts_expression":"__js_expression"})]}function aJ(t){let e=/(.*?)\s+(in|of)\s+(.*)/su,n=/,([^,\]}]*)(?:,([^,\]}]*))?$/u,r=/^\(|\)$/gu,i=t.match(e);if(!i)return;let s={for:i[3].trim()};if(!s.for)return;let o=kn(0,i[1].trim(),r,""),a=o.match(n);a?(s.alias=o.replace(n,""),s.iterator1=a[1].trim(),a[2]&&(s.iterator2=a[2].trim())):s.alias=o;let l=[s.alias,s.iterator1,s.iterator2];if(!l.some((c,u)=>!c&&(u===0||l.slice(u+1).some(Boolean))))return{left:l.filter(Boolean).join(","),operator:i[2],right:s.for}}var lJ=[{test:t=>t.node.fullName==="v-for",print:oJ},{test:(t,e)=>t.node.fullName==="generic"&&f2(t.parent,e),print:iJ},{test:({node:t},e)=>CK(t)||DK(t,e),print:sJ},{test(t){let e=t.node.fullName;return e.startsWith("@")||e.startsWith("v-on:")},print:cJ},{test(t){let e=t.node.fullName;return e.startsWith(":")||e.startsWith(".")||e.startsWith("v-bind:")},print:uJ},{test:t=>t.node.fullName.startsWith("v-"),print:O2}].map(({test:t,print:e})=>({test:(n,r)=>r.parser==="vue"&&t(n,r),print:e}));async function cJ(t,e,n,r){var o;try{return await O2(t,e,n,r)}catch(a){if(((o=a.cause)==null?void 0:o.code)!=="BABEL_PARSER_SYNTAX_ERROR")throw a}let i=Fn(n.node),s=wl(n,r)?"__vue_ts_event_binding":"__vue_event_binding";return yr(i,t,{parser:s},Tl)}function uJ(t,e,n,r){let i=Fn(n.node),s=wl(n,r)?"__vue_ts_expression":"__vue_expression";return yr(i,t,{parser:s},Tl)}function O2(t,e,n,r){let i=Fn(n.node),s=wl(n,r)?"__ts_expression":"__js_expression";return yr(i,t,{parser:s},Tl)}var hJ=lJ,dJ=[{test:KK,print:eJ},{test:tJ,print:nJ},{test:FK,print:BK},{test:IK,print:LK},{test:VK,print:UK},...hJ,...MK].map(({test:t,print:e})=>({test:t,print:fJ(e)}));function pJ(t,e){var i;let{node:n}=t,{value:r}=n;if(r)return/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(r)||e.parser==="lwc"&&r.startsWith("{")&&r.endsWith("}")?[n.rawName,"=",r]:(i=dJ.find(({test:s})=>s(t,e)))==null?void 0:i.print}function fJ(t){return async(e,n,r,i)=>{let s=await t(e,n,r,i);if(s)return s=GL(s,o=>typeof o=="string"?kn(0,o,'"',"&quot;"):o),[r.node.rawName,'="',$t(s),'"']}}var mJ=pJ,Ku=t=>t.sourceSpan.start.offset,mm=t=>t.sourceSpan.end.offset;function mb(t,e){return[t.isSelfClosing?"":gJ(t,e),wc(t,e)]}function gJ(t,e){return t.lastChild&&bu(t.lastChild)?"":[OJ(t,e),oT(t,e)]}function wc(t,e){return(t.next?Ho(t.next):eh(t.parent))?"":[Ju(t,e),Uo(t,e)]}function OJ(t,e){return eh(t)?Ju(t.lastChild,e):""}function Uo(t,e){return bu(t)?oT(t.parent,e):gm(t)?aT(t.next,e):""}function oT(t,e){if(y2(t,e))return"";switch(t.kind){case"ieConditionalComment":return"<!";case"element":if(t.hasHtmComponentClosingTag)return"<//";default:return`</${t.rawName}`}}function Ju(t,e){if(y2(t,e))return"";switch(t.kind){case"ieConditionalComment":case"ieConditionalEndComment":return"[endif]-->";case"ieConditionalStartComment":return"]><!-->";case"interpolation":return"}}";case"angularIcuExpression":return"}";case"element":if(t.isSelfClosing)return"/>";default:return">"}}function y2(t,e){return!t.isSelfClosing&&!t.endSourceSpan&&(pm(t)||r2(t.parent,e))}function Ho(t){return t.prev&&t.prev.kind!=="docType"&&t.kind!=="angularControlFlowBlock"&&!cr(t.prev)&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function eh(t){var e;return((e=t.lastChild)==null?void 0:e.isTrailingSpaceSensitive)&&!t.lastChild.hasTrailingSpaces&&!cr(iT(t.lastChild))&&!ll(t)}function bu(t){return!t.next&&!t.hasTrailingSpaces&&t.isTrailingSpaceSensitive&&cr(iT(t))}function gm(t){return t.next&&!cr(t.next)&&cr(t)&&t.isTrailingSpaceSensitive&&!t.hasTrailingSpaces}function yJ(t){let e=t.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/su);return e?e[1]?e[1].split(/\s+/u):!0:!1}function Om(t){return!t.prev&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function bJ(t,e,n){var u;let{node:r}=t;if(!nT(r.attrs))return r.isSelfClosing?" ":"";let i=((u=r.prev)==null?void 0:u.kind)==="comment"&&yJ(r.prev.value),s=typeof i=="boolean"?()=>i:Array.isArray(i)?h=>i.includes(h.rawName):()=>!1,o=t.map(({node:h})=>s(h)?ai(e.originalText.slice(Ku(h),mm(h))):n(),"attrs"),a=r.kind==="element"&&r.fullName==="script"&&r.attrs.length===1&&r.attrs[0].fullName==="src"&&r.children.length===0,l=e.singleAttributePerLine&&r.attrs.length>1&&!Sl(r,e)?Ot:kt,c=[mi([a?" ":kt,vl(l,o)])];return r.firstChild&&Om(r.firstChild)||r.isSelfClosing&&eh(r.parent)||a?c.push(r.isSelfClosing?" ":""):c.push(e.bracketSameLine?r.isSelfClosing?" ":"":r.isSelfClosing?kt:fn),c}function EJ(t){return t.firstChild&&Om(t.firstChild)?"":lT(t)}function gb(t,e,n){let{node:r}=t;return[kc(r,e),bJ(t,e,n),r.isSelfClosing?"":EJ(r)]}function kc(t,e){return t.prev&&gm(t.prev)?"":[Xo(t,e),aT(t,e)]}function Xo(t,e){return Om(t)?lT(t.parent):Ho(t)?Ju(t.prev,e):""}var gx="<!doctype";function aT(t,e){switch(t.kind){case"ieConditionalComment":case"ieConditionalStartComment":return`<!--[if ${t.condition}`;case"ieConditionalEndComment":return"<!--<!";case"interpolation":return"{{";case"docType":{if(t.value==="html"){let{filepath:r}=e;if(r&&/\.html?$/u.test(r))return gx}let n=Ku(t);return e.originalText.slice(n,n+gx.length)}case"angularIcuExpression":return"{";case"element":if(t.condition)return`<!--[if ${t.condition}]><!--><${t.rawName}`;default:return`<${t.rawName}`}}function lT(t){switch(t.kind){case"ieConditionalComment":return"]>";case"element":if(t.condition)return"><!--<![endif]-->";default:return">"}}function vJ(t,e){if(!t.endSourceSpan)return"";let n=t.startSourceSpan.end.offset;t.firstChild&&Om(t.firstChild)&&(n-=lT(t).length);let r=t.endSourceSpan.start.offset;return t.lastChild&&bu(t.lastChild)?r+=oT(t,e).length:eh(t)&&(r-=Ju(t.lastChild,e).length),e.originalText.slice(n,r)}var b2=vJ,TJ=new Set(["if","else if","for","switch","case"]);function SJ(t,e){let{node:n}=t;switch(n.kind){case"element":if(Ki(n,e)||n.kind==="interpolation")return;if(!n.isSelfClosing&&sT(n,e)){let r=px(n,e);return r?async(i,s)=>{let o=b2(n,e),a=/^\s*$/u.test(o),l="";return a||(l=await i(n2(o),{parser:r,__embeddedInHtml:!0}),a=l===""),[Xo(n,e),$t(gb(t,e,s)),a?"":Ot,l,a?"":Ot,mb(n,e),Uo(n,e)]}:void 0}break;case"text":if(Ki(n.parent,e)){let r=px(n.parent,e);if(r)return async i=>{let s=r==="markdown"?Or.dedentString(n.value.replace(/^[^\S\n]*\n/u,"")):n.value,o={parser:r,__embeddedInHtml:!0};if(e.parser==="html"&&r==="babel"){let a="script",{attrMap:l}=n.parent;l&&(l.type==="module"||(l.type==="text/babel"||l.type==="text/jsx")&&l["data-type"]==="module")&&(a="module"),o.__babelSourceType=a}return[Zu,Xo(n,e),await i(s,o),Uo(n,e)]}}else if(n.parent.kind==="interpolation")return async r=>{let i={__isInHtmlInterpolation:!0,__embeddedInHtml:!0};return e.parser==="angular"?i.parser="__ng_interpolation":e.parser==="vue"?i.parser=wl(t,e)?"__vue_ts_expression":"__vue_expression":i.parser="__js_expression",[mi([kt,await r(n.value,i)]),n.parent.next&&Ho(n.parent.next)?" ":kt]};break;case"attribute":return mJ(t,e);case"angularControlFlowBlockParameters":return TJ.has(t.parent.name)?F9:void 0;case"angularLetDeclarationInitializer":return r=>yr(n.value,r,{parser:"__ng_binding",__isInHtmlAttribute:!1})}}var wJ=SJ,jl=null;function _c(t){if(jl!==null&&typeof jl.property){let e=jl;return jl=_c.prototype=null,e}return jl=_c.prototype=t??Object.create(null),new _c}var kJ=10;for(let t=0;t<=kJ;t++)_c();function _J(t){return _c(t)}function xJ(t,e="type"){_J(t);function n(r){let i=r[e],s=t[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:r});return s}return n}var CJ=xJ,DJ={root:["children"],element:["attrs","children"],ieConditionalComment:["children"],ieConditionalStartComment:[],ieConditionalEndComment:[],interpolation:["children"],text:["children"],docType:[],comment:[],attribute:[],cdata:[],angularControlFlowBlock:["children","parameters"],angularControlFlowBlockParameters:["children"],angularControlFlowBlockParameter:[],angularLetDeclaration:["init"],angularLetDeclarationInitializer:[],angularIcuExpression:["cases"],angularIcuCase:["expression"]},AJ=DJ,PJ=CJ(AJ,"kind"),NJ=PJ,RJ="format",MJ=/^\s*<!--\s*@(?:noformat|noprettier)\s*-->/u,IJ=/^\s*<!--\s*@(?:format|prettier)\s*-->/u,LJ=t=>IJ.test(t),QJ=t=>MJ.test(t),$J=t=>`<!-- @${RJ} -->
${t}`,FJ=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function E2(t){let e=mm(t);return t.kind==="element"&&!t.endSourceSpan&&nT(t.children)?Math.max(e,E2(bl(0,t.children,-1))):e}function zl(t,e,n){let r=t.node;if(pm(r)){let i=E2(r);return[Xo(r,e),ai(Or.trimEnd(e.originalText.slice(Ku(r)+(r.prev&&gm(r.prev)?aT(r).length:0),i-(r.next&&Ho(r.next)?Ju(r,e).length:0)))),Uo(r,e)]}return n()}function Wh(t,e){return cr(t)&&cr(e)?t.isTrailingSpaceSensitive?t.hasTrailingSpaces?sO(e)?Ot:kt:"":sO(e)?Ot:fn:gm(t)&&(pm(e)||e.firstChild||e.isSelfClosing||e.kind==="element"&&e.attrs.length>0)||t.kind==="element"&&t.isSelfClosing&&Ho(e)?"":!e.isLeadingSpaceSensitive||sO(e)||Ho(e)&&t.lastChild&&bu(t.lastChild)&&t.lastChild.lastChild&&bu(t.lastChild.lastChild)?Ot:e.hasLeadingSpaces?kt:fn}function cT(t,e,n){let{node:r}=t;if(s2(r))return[Zu,...t.map(()=>{let s=t.node,o=s.prev?Wh(s.prev,s):"";return[o?[o,Zh(s.prev)?Ot:""]:"",zl(t,e,n)]},"children")];let i=r.children.map(()=>Symbol(""));return t.map(({node:s,index:o})=>{if(cr(s)){if(s.prev&&cr(s.prev)){let p=Wh(s.prev,s);if(p)return Zh(s.prev)?[Ot,Ot,zl(t,e,n)]:[p,zl(t,e,n)]}return zl(t,e,n)}let a=[],l=[],c=[],u=[],h=s.prev?Wh(s.prev,s):"",d=s.next?Wh(s,s.next):"";return h&&(Zh(s.prev)?a.push(Ot,Ot):h===Ot?a.push(Ot):cr(s.prev)?l.push(h):l.push(yu("",fn,{groupId:i[o-1]}))),d&&(Zh(s)?cr(s.next)&&u.push(Ot,Ot):d===Ot?cr(s.next)&&u.push(Ot):c.push(d)),[...a,$t([...l,$t([zl(t,e,n),...c],{id:i[o]})]),...u]},"children")}function BJ(t,e,n){let{node:r}=t,i=[];jJ(t)&&i.push("} "),i.push("@",r.name),r.parameters&&i.push(" (",$t(n("parameters")),")"),i.push(" {");let s=v2(r);return r.children.length>0?(r.firstChild.hasLeadingSpaces=!0,r.lastChild.hasTrailingSpaces=!0,i.push(mi([Ot,cT(t,e,n)])),s&&i.push(Ot,"}")):s&&i.push("}"),$t(i,{shouldBreak:!0})}function v2(t){var e,n;return!(((e=t.next)==null?void 0:e.kind)==="angularControlFlowBlock"&&((n=FJ.get(t.name))!=null&&n.has(t.next.name)))}function jJ(t){let{previous:e}=t;return(e==null?void 0:e.kind)==="angularControlFlowBlock"&&!pm(e)&&!v2(e)}function zJ(t,e,n){return[mi([fn,vl([";",kt],t.map(n,"children"))]),fn]}function VJ(t,e,n){let{node:r}=t;return[kc(r,e),$t([r.switchValue.trim(),", ",r.type,r.cases.length>0?[",",mi([kt,vl(kt,t.map(n,"cases"))])]:"",fn]),wc(r,e)]}function UJ(t,e,n){let{node:r}=t;return[r.value," {",$t([mi([fn,t.map(({node:i,isLast:s})=>{let o=[n()];return i.kind==="text"&&(i.hasLeadingSpaces&&o.unshift(kt),i.hasTrailingSpaces&&!s&&o.push(kt)),o},"expression")]),fn]),"}"]}function HJ(t,e,n){let{node:r}=t;if(r2(r,e))return[Xo(r,e),$t(gb(t,e,n)),ai(b2(r,e)),...mb(r,e),Uo(r,e)];let i=r.children.length===1&&(r.firstChild.kind==="interpolation"||r.firstChild.kind==="angularIcuExpression")&&r.firstChild.isLeadingSpaceSensitive&&!r.firstChild.hasLeadingSpaces&&r.lastChild.isTrailingSpaceSensitive&&!r.lastChild.hasTrailingSpaces,s=Symbol("element-attr-group-id"),o=u=>$t([$t(gb(t,e,n),{id:s}),u,mb(r,e)]),a=u=>i?T9(u,{groupId:s}):(Ki(r,e)||fm(r,e))&&r.parent.kind==="root"&&e.parser==="vue"&&!e.vueIndentScriptAndStyle?u:mi(u),l=()=>i?yu(fn,"",{groupId:s}):r.firstChild.hasLeadingSpaces&&r.firstChild.isLeadingSpaceSensitive?kt:r.firstChild.kind==="text"&&r.isWhitespaceSensitive&&r.isIndentationSensitive?v9(fn):fn,c=()=>(r.next?Ho(r.next):eh(r.parent))?r.lastChild.hasTrailingSpaces&&r.lastChild.isTrailingSpaceSensitive?" ":"":i?yu(fn,"",{groupId:s}):r.lastChild.hasTrailingSpaces&&r.lastChild.isTrailingSpaceSensitive?kt:(r.lastChild.kind==="comment"||r.lastChild.kind==="text"&&r.isWhitespaceSensitive&&r.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${e.tabWidth*(t.ancestors.length-1)}}$`,"u").test(r.lastChild.value)?"":fn;return r.children.length===0?o(r.hasDanglingSpaces&&r.isDanglingSpaceSensitive?kt:""):o([fK(r)?Zu:"",a([l(),cT(t,e,n)]),c()])}var Mi=(function(t){return t[t.RAW_TEXT=0]="RAW_TEXT",t[t.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",t[t.PARSABLE_DATA=2]="PARSABLE_DATA",t})({});function ym(t,e=!0){if(t[0]!=":")return[null,t];let n=t.indexOf(":",1);if(n===-1){if(e)throw new Error(`Unsupported format "${t}" expecting ":namespace:name"`);return[null,t]}return[t.slice(1,n),t.slice(n+1)]}function Ox(t){return ym(t)[1]==="ng-container"}function yx(t){return ym(t)[1]==="ng-content"}function Ld(t){return t===null?null:ym(t)[0]}function xc(t,e){return t?`:${t}:${e}`:e}var bx={name:"custom-elements"},Ex={name:"no-errors-schema"},lc=(function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t})({}),XJ=/-+([a-z0-9])/g;function qJ(t){return t.replace(XJ,(...e)=>e[1].toUpperCase())}var Qd;function vx(){return Qd||(Qd={},Gh(lc.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),Gh(lc.STYLE,["*|style"]),Gh(lc.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","input|src","ins|cite","q|cite","source|src","track|src","video|poster","video|src"]),Gh(lc.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),Qd}function Gh(t,e){for(let n of e)Qd[n.toLowerCase()]=t}var ZJ=class{},WJ="boolean",GJ="number",YJ="string",KJ="object",JJ=["[Element]|textContent,%ariaActiveDescendantElement,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColIndexText,%ariaColSpan,%ariaControlsElements,%ariaCurrent,%ariaDescribedByElements,%ariaDescription,%ariaDetailsElements,%ariaDisabled,%ariaErrorMessageElements,%ariaExpanded,%ariaFlowToElements,%ariaHasPopup,%ariaHidden,%ariaInvalid,%ariaKeyShortcuts,%ariaLabel,%ariaLabelledByElements,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaOwnsElements,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowIndexText,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,search,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume",":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","data^[HTMLElement]|value","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,media,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type","select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","selectedcontent^[HTMLElement]|","slot^[HTMLElement]|name","source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","search^[HTMLELement]|","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","time^[HTMLElement]|dateTime","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|decoding",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|",":math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*scrollend,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":math:math^:math:|",":math:maction^:math:|",":math:menclose^:math:|",":math:merror^:math:|",":math:mfenced^:math:|",":math:mfrac^:math:|",":math:mi^:math:|",":math:mmultiscripts^:math:|",":math:mn^:math:|",":math:mo^:math:|",":math:mover^:math:|",":math:mpadded^:math:|",":math:mphantom^:math:|",":math:mroot^:math:|",":math:mrow^:math:|",":math:ms^:math:|",":math:mspace^:math:|",":math:msqrt^:math:|",":math:mstyle^:math:|",":math:msub^:math:|",":math:msubsup^:math:|",":math:msup^:math:|",":math:mtable^:math:|",":math:mtd^:math:|",":math:mtext^:math:|",":math:mtr^:math:|",":math:munder^:math:|",":math:munderover^:math:|",":math:semantics^:math:|"],T2=new Map(Object.entries({class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex","aria-activedescendant":"ariaActiveDescendantElement","aria-atomic":"ariaAtomic","aria-autocomplete":"ariaAutoComplete","aria-busy":"ariaBusy","aria-checked":"ariaChecked","aria-colcount":"ariaColCount","aria-colindex":"ariaColIndex","aria-colindextext":"ariaColIndexText","aria-colspan":"ariaColSpan","aria-controls":"ariaControlsElements","aria-current":"ariaCurrent","aria-describedby":"ariaDescribedByElements","aria-description":"ariaDescription","aria-details":"ariaDetailsElements","aria-disabled":"ariaDisabled","aria-errormessage":"ariaErrorMessageElements","aria-expanded":"ariaExpanded","aria-flowto":"ariaFlowToElements","aria-haspopup":"ariaHasPopup","aria-hidden":"ariaHidden","aria-invalid":"ariaInvalid","aria-keyshortcuts":"ariaKeyShortcuts","aria-label":"ariaLabel","aria-labelledby":"ariaLabelledByElements","aria-level":"ariaLevel","aria-live":"ariaLive","aria-modal":"ariaModal","aria-multiline":"ariaMultiLine","aria-multiselectable":"ariaMultiSelectable","aria-orientation":"ariaOrientation","aria-owns":"ariaOwnsElements","aria-placeholder":"ariaPlaceholder","aria-posinset":"ariaPosInSet","aria-pressed":"ariaPressed","aria-readonly":"ariaReadOnly","aria-required":"ariaRequired","aria-roledescription":"ariaRoleDescription","aria-rowcount":"ariaRowCount","aria-rowindex":"ariaRowIndex","aria-rowindextext":"ariaRowIndexText","aria-rowspan":"ariaRowSpan","aria-selected":"ariaSelected","aria-setsize":"ariaSetSize","aria-sort":"ariaSort","aria-valuemax":"ariaValueMax","aria-valuemin":"ariaValueMin","aria-valuenow":"ariaValueNow","aria-valuetext":"ariaValueText"})),e1=Array.from(T2).reduce((t,[e,n])=>(t.set(e,n),t),new Map),t1=class extends ZJ{constructor(){super(),this._schema=new Map,this._eventSchema=new Map,JJ.forEach(t=>{let e=new Map,n=new Set,[r,i]=t.split("|"),s=i.split(","),[o,a]=r.split("^");o.split(",").forEach(c=>{this._schema.set(c.toLowerCase(),e),this._eventSchema.set(c.toLowerCase(),n)});let l=a&&this._schema.get(a.toLowerCase());if(l){for(let[c,u]of l)e.set(c,u);for(let c of this._eventSchema.get(a.toLowerCase()))n.add(c)}s.forEach(c=>{if(c.length>0)switch(c[0]){case"*":n.add(c.substring(1));break;case"!":e.set(c.substring(1),WJ);break;case"#":e.set(c.substring(1),GJ);break;case"%":e.set(c.substring(1),KJ);break;default:e.set(c,YJ)}})})}hasProperty(t,e,n){if(n.some(r=>r.name===Ex.name))return!0;if(t.indexOf("-")>-1){if(Ox(t)||yx(t))return!1;if(n.some(r=>r.name===bx.name))return!0}return(this._schema.get(t.toLowerCase())||this._schema.get("unknown")).has(e)}hasElement(t,e){return e.some(n=>n.name===Ex.name)||t.indexOf("-")>-1&&(Ox(t)||yx(t)||e.some(n=>n.name===bx.name))?!0:this._schema.has(t.toLowerCase())}securityContext(t,e,n){n&&(e=this.getMappedPropName(e)),t=t.toLowerCase(),e=e.toLowerCase();let r=vx()[t+"|"+e];return r||(r=vx()["*|"+e],r||lc.NONE)}getMappedPropName(t){return T2.get(t)??t}getDefaultComponentElementName(){return"ng-component"}validateProperty(t){return t.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${t}' is disallowed for security reasons, please use (${t.slice(2)})=...
If '${t}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(t){return t.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${t}' is disallowed for security reasons, please use (${t.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(t){let e=this._schema.get(t.toLowerCase())||this._schema.get("unknown");return Array.from(e.keys()).map(n=>e1.get(n)??n)}allKnownEventsOfElement(t){return Array.from(this._eventSchema.get(t.toLowerCase())??[])}normalizeAnimationStyleProperty(t){return qJ(t)}normalizeAnimationStyleValue(t,e,n){let r="",i=n.toString().trim(),s=null;if(n1(t)&&n!==0&&n!=="0")if(typeof n=="number")r="px";else{let o=n.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&(s=`Please provide a CSS unit value for ${e}:${n}`)}return{error:s,value:i+r}}};function n1(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var De=class{constructor({closedByChildren:t,implicitNamespacePrefix:e,contentType:n=Mi.PARSABLE_DATA,closedByParent:r=!1,isVoid:i=!1,ignoreFirstLf:s=!1,preventNamespaceInheritance:o=!1,canSelfClose:a=!1}={}){this.closedByChildren={},this.closedByParent=!1,t&&t.length>0&&t.forEach(l=>this.closedByChildren[l]=!0),this.isVoid=i,this.closedByParent=r||i,this.implicitNamespacePrefix=e||null,this.contentType=n,this.ignoreFirstLf=s,this.preventNamespaceInheritance=o,this.canSelfClose=a??i}isClosedByChild(t){return this.isVoid||t.toLowerCase()in this.closedByChildren}getContentType(t){return typeof this.contentType=="object"?(t===void 0?void 0:this.contentType[t])??this.contentType.default:this.contentType}},Tx,Vl;function Ob(t){return Vl||(Tx=new De({canSelfClose:!0}),Vl=Object.assign(Object.create(null),{base:new De({isVoid:!0}),meta:new De({isVoid:!0}),area:new De({isVoid:!0}),embed:new De({isVoid:!0}),link:new De({isVoid:!0}),img:new De({isVoid:!0}),input:new De({isVoid:!0}),param:new De({isVoid:!0}),hr:new De({isVoid:!0}),br:new De({isVoid:!0}),source:new De({isVoid:!0}),track:new De({isVoid:!0}),wbr:new De({isVoid:!0}),p:new De({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new De({closedByChildren:["tbody","tfoot"]}),tbody:new De({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new De({closedByChildren:["tbody"],closedByParent:!0}),tr:new De({closedByChildren:["tr"],closedByParent:!0}),td:new De({closedByChildren:["td","th"],closedByParent:!0}),th:new De({closedByChildren:["td","th"],closedByParent:!0}),col:new De({isVoid:!0}),svg:new De({implicitNamespacePrefix:"svg"}),foreignObject:new De({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new De({implicitNamespacePrefix:"math"}),li:new De({closedByChildren:["li"],closedByParent:!0}),dt:new De({closedByChildren:["dt","dd"]}),dd:new De({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new De({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new De({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new De({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new De({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new De({closedByChildren:["optgroup"],closedByParent:!0}),option:new De({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new De({ignoreFirstLf:!0}),listing:new De({ignoreFirstLf:!0}),style:new De({contentType:Mi.RAW_TEXT}),script:new De({contentType:Mi.RAW_TEXT}),title:new De({contentType:{default:Mi.ESCAPABLE_RAW_TEXT,svg:Mi.PARSABLE_DATA}}),textarea:new De({contentType:Mi.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new t1().allKnownElementNames().forEach(e=>{!Vl[e]&&Ld(e)===null&&(Vl[e]=new De({canSelfClose:!1}))})),Vl[t]??Tx}function Dp(t){return t>=9&&t<=32||t==160}function bm(t){return 48<=t&&t<=57}function Eu(t){return t>=97&&t<=122||t>=65&&t<=90}function r1(t){return t>=97&&t<=102||t>=65&&t<=70||bm(t)}function Ap(t){return t===10||t===13}function Sx(t){return 48<=t&&t<=55}function lO(t){return t===39||t===34||t===96}var yb=class S2{constructor(e,n,r,i){this.file=e,this.offset=n,this.line=r,this.col=i}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){let n=this.file.content,r=n.length,i=this.offset,s=this.line,o=this.col;for(;i>0&&e<0;)if(i--,e++,n.charCodeAt(i)==10){s--;let a=n.substring(0,i-1).lastIndexOf(`
`);o=a>0?i-a:i}else o--;for(;i<r&&e>0;){let a=n.charCodeAt(i);i++,e--,a==10?(s++,o=0):o++}return new S2(this.file,i,s,o)}getContext(e,n){let r=this.file.content,i=this.offset;if(i!=null){i>r.length-1&&(i=r.length-1);let s=i,o=0,a=0;for(;o<e&&i>0&&(i--,o++,!(r[i]==`
`&&++a==n)););for(o=0,a=0;o<e&&s<r.length-1&&(s++,o++,!(r[s]==`
`&&++a==n)););return{before:r.substring(i,this.offset),after:r.substring(this.offset,s+1)}}return null}},w2=class{constructor(t,e){this.content=t,this.url=e}},_e=class{constructor(t,e,n=t,r=null){this.start=t,this.end=e,this.fullStart=n,this.details=r}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},wx=(function(t){return t[t.WARNING=0]="WARNING",t[t.ERROR=1]="ERROR",t})({}),Ea=class extends Error{constructor(t,e,n=wx.ERROR,r){super(e),this.span=t,this.msg=e,this.level=n,this.relatedError=r,Object.setPrototypeOf(this,new.target.prototype)}contextualMessage(){let t=this.span.start.getContext(100,3);return t?`${this.msg} ("${t.before}[${wx[this.level]} ->]${t.after}")`:this.msg}toString(){let t=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${t}`}},ea=class{constructor(t,e){this.sourceSpan=t,this.i18n=e}},i1=class extends ea{constructor(t,e,n,r){super(e,r),this.value=t,this.tokens=n,this.kind="text"}visit(t,e){return t.visitText(this,e)}},s1=class extends ea{constructor(t,e,n,r){super(e,r),this.value=t,this.tokens=n,this.kind="cdata"}visit(t,e){return t.visitCdata(this,e)}},o1=class extends ea{constructor(t,e,n,r,i,s){super(r,s),this.switchValue=t,this.type=e,this.cases=n,this.switchValueSourceSpan=i,this.kind="expansion"}visit(t,e){return t.visitExpansion(this,e)}},a1=class{constructor(t,e,n,r,i){this.value=t,this.expression=e,this.sourceSpan=n,this.valueSourceSpan=r,this.expSourceSpan=i,this.kind="expansionCase"}visit(t,e){return t.visitExpansionCase(this,e)}},l1=class extends ea{constructor(t,e,n,r,i,s,o){super(n,o),this.name=t,this.value=e,this.keySpan=r,this.valueSpan=i,this.valueTokens=s,this.kind="attribute"}visit(t,e){return t.visitAttribute(this,e)}get nameSpan(){return this.keySpan}},ho=class extends ea{constructor(t,e,n,r,i,s,o,a=null,l=null,c,u){super(s,u),this.name=t,this.attrs=e,this.directives=n,this.children=r,this.isSelfClosing=i,this.startSourceSpan=o,this.endSourceSpan=a,this.nameSpan=l,this.isVoid=c,this.kind="element"}visit(t,e){return t.visitElement(this,e)}},c1=class{constructor(t,e){this.value=t,this.sourceSpan=e,this.kind="comment"}visit(t,e){return t.visitComment(this,e)}},u1=class{constructor(t,e){this.value=t,this.sourceSpan=e,this.kind="docType"}visit(t,e){return t.visitDocType(this,e)}},pa=class extends ea{constructor(t,e,n,r,i,s,o=null,a){super(r,a),this.name=t,this.parameters=e,this.children=n,this.nameSpan=i,this.startSourceSpan=s,this.endSourceSpan=o,this.kind="block"}visit(t,e){return t.visitBlock(this,e)}},hs=class extends ea{constructor(t,e,n,r,i,s,o,a,l,c=null,u){super(a,u),this.componentName=t,this.tagName=e,this.fullName=n,this.attrs=r,this.directives=i,this.children=s,this.isSelfClosing=o,this.startSourceSpan=l,this.endSourceSpan=c,this.kind="component"}visit(t,e){return t.visitComponent(this,e)}},h1=class{constructor(t,e,n,r,i=null){this.name=t,this.attrs=e,this.sourceSpan=n,this.startSourceSpan=r,this.endSourceSpan=i,this.kind="directive"}visit(t,e){return t.visitDirective(this,e)}},kx=class{constructor(t,e){this.expression=t,this.sourceSpan=e,this.kind="blockParameter",this.startSourceSpan=null,this.endSourceSpan=null}visit(t,e){return t.visitBlockParameter(this,e)}},_x=class{constructor(t,e,n,r,i){this.name=t,this.value=e,this.sourceSpan=n,this.nameSpan=r,this.valueSpan=i,this.kind="letDeclaration",this.startSourceSpan=null,this.endSourceSpan=null}visit(t,e){return t.visitLetDeclaration(this,e)}};function k2(t,e,n=null){let r=[],i=t.visit?s=>t.visit(s,n)||s.visit(t,n):s=>s.visit(t,n);return e.forEach(s=>{let o=i(s);o&&r.push(o)}),r}var d1=class{constructor(){}visitElement(t,e){this.visitChildren(e,n=>{n(t.attrs),n(t.directives),n(t.children)})}visitAttribute(t,e){}visitText(t,e){}visitCdata(t,e){}visitComment(t,e){}visitDocType(t,e){}visitExpansion(t,e){return this.visitChildren(e,n=>{n(t.cases)})}visitExpansionCase(t,e){}visitBlock(t,e){this.visitChildren(e,n=>{n(t.parameters),n(t.children)})}visitBlockParameter(t,e){}visitLetDeclaration(t,e){}visitComponent(t,e){this.visitChildren(e,n=>{n(t.attrs),n(t.children)})}visitDirective(t,e){this.visitChildren(e,n=>{n(t.attrs)})}visitChildren(t,e){let n=[],r=this;function i(s){s&&n.push(k2(r,s,t))}return e(i),Array.prototype.concat.apply([],n)}},vu={AElig:"Æ",AMP:"&",amp:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",af:"",Aring:"Å",angst:"Å",Ascr:"𝒜",Assign:"≔",colone:"≔",coloneq:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"",setminus:"",setmn:"",smallsetminus:"",ssetmn:"",Barv:"⫧",Barwed:"⌆",doublebarwedge:"⌆",Bcy:"Б",Because:"∵",becaus:"∵",because:"∵",Bernoullis:"",Bscr:"",bernou:"",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",breve:"˘",Bumpeq:"≎",HumpDownHump:"≎",bump:"≎",CHcy:"Ч",COPY:"©",copy:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"",DD:"",Cayleys:"",Cfr:"",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",cedil:"¸",CenterDot:"·",centerdot:"·",middot:"·",Chi:"Χ",CircleDot:"⊙",odot:"⊙",CircleMinus:"⊖",ominus:"⊖",CirclePlus:"⊕",oplus:"⊕",CircleTimes:"⊗",otimes:"⊗",ClockwiseContourIntegral:"∲",cwconint:"∲",CloseCurlyDoubleQuote:"”",rdquo:"”",rdquor:"”",CloseCurlyQuote:"",rsquo:"",rsquor:"",Colon:"∷",Proportion:"∷",Colone:"⩴",Congruent:"≡",equiv:"≡",Conint:"∯",DoubleContourIntegral:"∯",ContourIntegral:"∮",conint:"∮",oint:"∮",Copf:"",complexes:"",Coproduct:"∐",coprod:"∐",CounterClockwiseContourIntegral:"∳",awconint:"∳",Cross:"",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",asympeq:"≍",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",ddagger:"‡",Darr:"↡",Dashv:"⫤",DoubleLeftTee:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",nabla:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",acute:"´",DiacriticalDot:"˙",dot:"˙",DiacriticalDoubleAcute:"˝",dblac:"˝",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"˜",tilde:"˜",Diamond:"⋄",diam:"⋄",diamond:"⋄",DifferentialD:"",dd:"",Dopf:"𝔻",Dot:"¨",DoubleDot:"¨",die:"¨",uml:"¨",DotDot:"⃜",DotEqual:"≐",doteq:"≐",esdot:"≐",DoubleDownArrow:"⇓",Downarrow:"⇓",dArr:"⇓",DoubleLeftArrow:"⇐",Leftarrow:"⇐",lArr:"⇐",DoubleLeftRightArrow:"⇔",Leftrightarrow:"⇔",hArr:"⇔",iff:"⇔",DoubleLongLeftArrow:"⟸",Longleftarrow:"⟸",xlArr:"⟸",DoubleLongLeftRightArrow:"⟺",Longleftrightarrow:"⟺",xhArr:"⟺",DoubleLongRightArrow:"⟹",Longrightarrow:"⟹",xrArr:"⟹",DoubleRightArrow:"⇒",Implies:"⇒",Rightarrow:"⇒",rArr:"⇒",DoubleRightTee:"⊨",vDash:"⊨",DoubleUpArrow:"⇑",Uparrow:"⇑",uArr:"⇑",DoubleUpDownArrow:"⇕",Updownarrow:"⇕",vArr:"⇕",DoubleVerticalBar:"∥",par:"∥",parallel:"∥",shortparallel:"∥",spar:"∥",DownArrow:"↓",ShortDownArrow:"↓",darr:"↓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",duarr:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",leftharpoondown:"↽",lhard:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",rhard:"⇁",rightharpoondown:"⇁",DownRightVectorBar:"⥗",DownTee:"",top:"",DownTeeArrow:"↧",mapstodown:"↧",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",in:"∈",isin:"∈",isinv:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",eqsim:"≂",esim:"≂",Equilibrium:"⇌",rightleftharpoons:"⇌",rlhar:"⇌",Escr:"",expectation:"",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",exist:"∃",ExponentialE:"",ee:"",exponentiale:"",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",blacksquare:"▪",squarf:"▪",squf:"▪",Fopf:"𝔽",ForAll:"∀",forall:"∀",Fouriertrf:"",Fscr:"",GJcy:"Ѓ",GT:">",gt:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",ggg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",ge:"≥",geq:"≥",GreaterEqualLess:"⋛",gel:"⋛",gtreqless:"⋛",GreaterFullEqual:"≧",gE:"≧",geqq:"≧",GreaterGreater:"⪢",GreaterLess:"≷",gl:"≷",gtrless:"≷",GreaterSlantEqual:"⩾",geqslant:"⩾",ges:"⩾",GreaterTilde:"≳",gsim:"≳",gtrsim:"≳",Gscr:"𝒢",Gt:"≫",NestedGreaterGreater:"≫",gg:"≫",HARDcy:"Ъ",Hacek:"ˇ",caron:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"",Poincareplane:"",HilbertSpace:"",Hscr:"",hamilt:"",Hopf:"",quaternions:"",HorizontalLine:"─",boxh:"─",Hstrok:"Ħ",HumpEqual:"≏",bumpe:"≏",bumpeq:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"",Im:"",image:"",imagpart:"",Igrave:"Ì",Imacr:"Ī",ImaginaryI:"",ii:"",Int:"∬",Integral:"∫",int:"∫",Intersection:"⋂",bigcap:"⋂",xcap:"⋂",InvisibleComma:"",ic:"",InvisibleTimes:"",it:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"",imagline:"",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",lt:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"",Lscr:"",lagran:"",Larr:"↞",twoheadleftarrow:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",lang:"⟨",langle:"⟨",LeftArrow:"←",ShortLeftArrow:"←",larr:"←",leftarrow:"←",slarr:"←",LeftArrowBar:"⇤",larrb:"⇤",LeftArrowRightArrow:"⇆",leftrightarrows:"⇆",lrarr:"⇆",LeftCeiling:"⌈",lceil:"⌈",LeftDoubleBracket:"⟦",lobrk:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",dharl:"⇃",downharpoonleft:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",lfloor:"⌊",LeftRightArrow:"↔",harr:"↔",leftrightarrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",dashv:"⊣",LeftTeeArrow:"↤",mapstoleft:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",vartriangleleft:"⊲",vltri:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",ltrie:"⊴",trianglelefteq:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",uharl:"↿",upharpoonleft:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",leftharpoonup:"↼",lharu:"↼",LeftVectorBar:"⥒",LessEqualGreater:"⋚",leg:"⋚",lesseqgtr:"⋚",LessFullEqual:"≦",lE:"≦",leqq:"≦",LessGreater:"≶",lessgtr:"≶",lg:"≶",LessLess:"⪡",LessSlantEqual:"⩽",leqslant:"⩽",les:"⩽",LessTilde:"≲",lesssim:"≲",lsim:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",lAarr:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",longleftarrow:"⟵",xlarr:"⟵",LongLeftRightArrow:"⟷",longleftrightarrow:"⟷",xharr:"⟷",LongRightArrow:"⟶",longrightarrow:"⟶",xrarr:"⟶",Lopf:"𝕃",LowerLeftArrow:"↙",swarr:"↙",swarrow:"↙",LowerRightArrow:"↘",searr:"↘",searrow:"↘",Lsh:"↰",lsh:"↰",Lstrok:"Ł",Lt:"≪",NestedLessLess:"≪",ll:"≪",Map:"⤅",Mcy:"М",MediumSpace:"",Mellintrf:"",Mscr:"",phmmat:"",Mfr:"𝔐",MinusPlus:"∓",mnplus:"∓",mp:"∓",Mopf:"𝕄",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",ZeroWidthSpace:"",NewLine:`
`,Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",nbsp:" ",Nopf:"",naturals:"",Not:"⫬",NotCongruent:"≢",nequiv:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",npar:"∦",nparallel:"∦",nshortparallel:"∦",nspar:"∦",NotElement:"∉",notin:"∉",notinva:"∉",NotEqual:"≠",ne:"≠",NotEqualTilde:"≂̸",nesim:"≂̸",NotExists:"∄",nexist:"∄",nexists:"∄",NotGreater:"≯",ngt:"≯",ngtr:"≯",NotGreaterEqual:"≱",nge:"≱",ngeq:"≱",NotGreaterFullEqual:"≧̸",ngE:"≧̸",ngeqq:"≧̸",NotGreaterGreater:"≫̸",nGtv:"≫̸",NotGreaterLess:"≹",ntgl:"≹",NotGreaterSlantEqual:"⩾̸",ngeqslant:"⩾̸",nges:"⩾̸",NotGreaterTilde:"≵",ngsim:"≵",NotHumpDownHump:"≎̸",nbump:"≎̸",NotHumpEqual:"≏̸",nbumpe:"≏̸",NotLeftTriangle:"⋪",nltri:"⋪",ntriangleleft:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",nltrie:"⋬",ntrianglelefteq:"⋬",NotLess:"≮",nless:"≮",nlt:"≮",NotLessEqual:"≰",nle:"≰",nleq:"≰",NotLessGreater:"≸",ntlg:"≸",NotLessLess:"≪̸",nLtv:"≪̸",NotLessSlantEqual:"⩽̸",nleqslant:"⩽̸",nles:"⩽̸",NotLessTilde:"≴",nlsim:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",npr:"⊀",nprec:"⊀",NotPrecedesEqual:"⪯̸",npre:"⪯̸",npreceq:"⪯̸",NotPrecedesSlantEqual:"⋠",nprcue:"⋠",NotReverseElement:"∌",notni:"∌",notniva:"∌",NotRightTriangle:"⋫",nrtri:"⋫",ntriangleright:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",nrtrie:"⋭",ntrianglerighteq:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",nsqsube:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",nsqsupe:"⋣",NotSubset:"⊂⃒",nsubset:"⊂⃒",vnsub:"⊂⃒",NotSubsetEqual:"⊈",nsube:"⊈",nsubseteq:"⊈",NotSucceeds:"⊁",nsc:"⊁",nsucc:"⊁",NotSucceedsEqual:"⪰̸",nsce:"⪰̸",nsucceq:"⪰̸",NotSucceedsSlantEqual:"⋡",nsccue:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",nsupset:"⊃⃒",vnsup:"⊃⃒",NotSupersetEqual:"⊉",nsupe:"⊉",nsupseteq:"⊉",NotTilde:"≁",nsim:"≁",NotTildeEqual:"≄",nsime:"≄",nsimeq:"≄",NotTildeFullEqual:"≇",ncong:"≇",NotTildeTilde:"≉",nap:"≉",napprox:"≉",NotVerticalBar:"∤",nmid:"∤",nshortmid:"∤",nsmid:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",ohm:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",ldquo:"“",OpenCurlyQuote:"",lsquo:"",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",oline:"‾",OverBrace:"⏞",OverBracket:"⎴",tbrk:"⎴",OverParenthesis:"⏜",PartialD:"∂",part:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",plusmn:"±",pm:"±",Popf:"",primes:"",Pr:"⪻",Precedes:"≺",pr:"≺",prec:"≺",PrecedesEqual:"⪯",pre:"⪯",preceq:"⪯",PrecedesSlantEqual:"≼",prcue:"≼",preccurlyeq:"≼",PrecedesTilde:"≾",precsim:"≾",prsim:"≾",Prime:"″",Product:"∏",prod:"∏",Proportional:"∝",prop:"∝",propto:"∝",varpropto:"∝",vprop:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',quot:'"',Qfr:"𝔔",Qopf:"",rationals:"",Qscr:"𝒬",RBarr:"⤐",drbkarow:"⤐",REG:"®",circledR:"®",reg:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",twoheadrightarrow:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"",Rfr:"",real:"",realpart:"",ReverseElement:"∋",SuchThat:"∋",ni:"∋",niv:"∋",ReverseEquilibrium:"⇋",leftrightharpoons:"⇋",lrhar:"⇋",ReverseUpEquilibrium:"⥯",duhar:"⥯",Rho:"Ρ",RightAngleBracket:"⟩",rang:"⟩",rangle:"⟩",RightArrow:"→",ShortRightArrow:"→",rarr:"→",rightarrow:"→",srarr:"→",RightArrowBar:"⇥",rarrb:"⇥",RightArrowLeftArrow:"⇄",rightleftarrows:"⇄",rlarr:"⇄",RightCeiling:"⌉",rceil:"⌉",RightDoubleBracket:"⟧",robrk:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",dharr:"⇂",downharpoonright:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rfloor:"⌋",RightTee:"⊢",vdash:"⊢",RightTeeArrow:"↦",map:"↦",mapsto:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",vartriangleright:"⊳",vrtri:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",rtrie:"⊵",trianglerighteq:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",uharr:"↾",upharpoonright:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",rharu:"⇀",rightharpoonup:"⇀",RightVectorBar:"⥓",Ropf:"",reals:"",RoundImplies:"⥰",Rrightarrow:"⇛",rAarr:"⇛",Rscr:"",realine:"",Rsh:"↱",rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortUpArrow:"↑",UpArrow:"↑",uarr:"↑",uparrow:"↑",Sigma:"Σ",SmallCircle:"∘",compfn:"∘",Sopf:"𝕊",Sqrt:"√",radic:"√",Square:"□",squ:"□",square:"□",SquareIntersection:"⊓",sqcap:"⊓",SquareSubset:"⊏",sqsub:"⊏",sqsubset:"⊏",SquareSubsetEqual:"⊑",sqsube:"⊑",sqsubseteq:"⊑",SquareSuperset:"⊐",sqsup:"⊐",sqsupset:"⊐",SquareSupersetEqual:"⊒",sqsupe:"⊒",sqsupseteq:"⊒",SquareUnion:"⊔",sqcup:"⊔",Sscr:"𝒮",Star:"⋆",sstarf:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",sube:"⊆",subseteq:"⊆",Succeeds:"≻",sc:"≻",succ:"≻",SucceedsEqual:"⪰",sce:"⪰",succeq:"⪰",SucceedsSlantEqual:"≽",sccue:"≽",succcurlyeq:"≽",SucceedsTilde:"≿",scsim:"≿",succsim:"≿",Sum:"∑",sum:"∑",Sup:"⋑",Supset:"⋑",Superset:"⊃",sup:"⊃",supset:"⊃",SupersetEqual:"⊇",supe:"⊇",supseteq:"⊇",THORN:"Þ",TRADE:"™",trade:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",there4:"∴",therefore:"∴",Theta:"Θ",ThickSpace:"",ThinSpace:"",thinsp:"",Tilde:"",sim:"",thicksim:"",thksim:"",TildeEqual:"≃",sime:"≃",simeq:"≃",TildeFullEqual:"≅",cong:"≅",TildeTilde:"≈",ap:"≈",approx:"≈",asymp:"≈",thickapprox:"≈",thkap:"≈",Topf:"𝕋",TripleDot:"⃛",tdot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",lowbar:"_",UnderBrace:"⏟",UnderBracket:"⎵",bbrk:"⎵",UnderParenthesis:"⏝",Union:"",bigcup:"",xcup:"",UnionPlus:"⊎",uplus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",udarr:"⇅",UpDownArrow:"↕",updownarrow:"↕",varr:"↕",UpEquilibrium:"⥮",udhar:"⥮",UpTee:"⊥",bot:"⊥",bottom:"⊥",perp:"⊥",UpTeeArrow:"↥",mapstoup:"↥",UpperLeftArrow:"↖",nwarr:"↖",nwarrow:"↖",UpperRightArrow:"↗",nearr:"↗",nearrow:"↗",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"",bigvee:"",xvee:"",Verbar:"‖",Vert:"‖",VerticalBar:"",mid:"",shortmid:"",smid:"",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"❘",VerticalTilde:"≀",wr:"≀",wreath:"≀",VeryThinSpace:"",hairsp:"",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",bigwedge:"⋀",xwedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",Zeta:"Ζ",Zfr:"",zeetrf:"",Zopf:"",integers:"",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",mstpos:"∾",acE:"∾̳",acd:"∿",acirc:"â",acy:"а",aelig:"æ",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",and:"∧",wedge:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",angle:"∠",ange:"⦤",angmsd:"∡",measuredangle:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angzarr:"⍼",aogon:"ą",aopf:"𝕒",apE:"⩰",apacir:"⩯",ape:"≊",approxeq:"≊",apid:"≋",apos:"'",aring:"å",ascr:"𝒶",ast:"*",midast:"*",atilde:"ã",auml:"ä",awint:"⨑",bNot:"⫭",backcong:"≌",bcong:"≌",backepsilon:"϶",bepsi:"϶",backprime:"",bprime:"",backsim:"∽",bsim:"∽",backsimeq:"⋍",bsime:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrktbrk:"⎶",bcy:"б",bdquo:"„",ldquor:"„",bemptyv:"⦰",beta:"β",beth:"ℶ",between:"≬",twixt:"≬",bfr:"𝔟",bigcirc:"◯",xcirc:"◯",bigodot:"⨀",xodot:"⨀",bigoplus:"⨁",xoplus:"⨁",bigotimes:"⨂",xotime:"⨂",bigsqcup:"⨆",xsqcup:"⨆",bigstar:"★",starf:"★",bigtriangledown:"▽",xdtri:"▽",bigtriangleup:"△",xutri:"△",biguplus:"⨄",xuplus:"⨄",bkarow:"⤍",rbarr:"⤍",blacklozenge:"⧫",lozf:"⧫",blacktriangle:"▴",utrif:"▴",blacktriangledown:"▾",dtrif:"▾",blacktriangleleft:"◂",ltrif:"◂",blacktriangleright:"▸",rtrif:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",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:"┌",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",minusb:"⊟",boxplus:"⊞",plusb:"⊞",boxtimes:"⊠",timesb:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bumpE:"⪮",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cemptyv:"⦲",cent:"¢",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",cire:"≗",circlearrowleft:"↺",olarr:"↺",circlearrowright:"↻",orarr:"↻",circledS:"Ⓢ",oS:"Ⓢ",circledast:"⊛",oast:"⊛",circledcirc:"⊚",ocir:"⊚",circleddash:"⊝",odash:"⊝",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",comma:",",commat:"@",comp:"∁",complement:"∁",congdot:"⩭",copf:"𝕔",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",curlyeqprec:"⋞",cuesc:"⋟",curlyeqsucc:"⋟",cularr:"↶",curvearrowleft:"↶",cularrp:"⤽",cup:"",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"",curarr:"↷",curvearrowright:"↷",curarrm:"⤼",curlyvee:"⋎",cuvee:"⋎",curlywedge:"⋏",cuwed:"⋏",curren:"¤",cwint:"∱",cylcty:"⌭",dHar:"⥥",dagger:"†",daleth:"ℸ",dash:"",hyphen:"",dbkarow:"⤏",rBarr:"⤏",dcaron:"ď",dcy:"д",ddarr:"⇊",downdownarrows:"⇊",ddotseq:"⩷",eDDot:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",diamondsuit:"♦",diams:"♦",digamma:"ϝ",gammad:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",llcorner:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",doteqdot:"≑",eDot:"≑",dotminus:"∸",minusd:"∸",dotplus:"∔",plusdo:"∔",dotsquare:"⊡",sdotb:"⊡",drcorn:"⌟",lrcorner:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",triangledown:"▿",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",eqcirc:"≖",ecirc:"ê",ecolon:"≕",eqcolon:"≕",ecy:"э",edot:"ė",efDot:"≒",fallingdotseq:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",eqslantgtr:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"",els:"⪕",eqslantless:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",varnothing:"∅",emsp13:"",emsp14:"",emsp:"",eng:"ŋ",ensp:"",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",straightepsilon:"ϵ",varepsilon:"ϵ",equals:"=",equest:"≟",questeq:"≟",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",risingdotseq:"≓",erarr:"⥱",escr:"",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",fork:"⋔",pitchfork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",half:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"",frown:"⌢",sfrown:"⌢",fscr:"𝒻",gEl:"⪌",gtreqqless:"⪌",gacute:"ǵ",gamma:"γ",gap:"⪆",gtrapprox:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gimel:"ℷ",gjcy:"ѓ",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gneqq:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gnsim:"⋧",gopf:"𝕘",gscr:"",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtrdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrarr:"⥸",gvertneqq:"≩︀",gvnE:"≩︀",hardcy:"ъ",harrcir:"⥈",harrw:"↭",leftrightsquigarrow:"↭",hbar:"ℏ",hslash:"ℏ",planck:"ℏ",plankv:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",mldr:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",searhk:"⤥",hkswarow:"⤦",swarhk:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",larrhk:"↩",hookrightarrow:"↪",rarrhk:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hstrok:"ħ",hybull:"",iacute:"í",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",ifr:"𝔦",igrave:"ì",iiiint:"⨌",qint:"⨌",iiint:"∭",tint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",imath:"ı",inodot:"ı",imof:"⊷",imped:"Ƶ",incare:"℅",infin:"∞",infintie:"⧝",intcal:"⊺",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iquest:"¿",iscr:"𝒾",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",varkappa:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAtail:"⤛",lBarr:"⤎",lEg:"⪋",lesseqqgtr:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lambda:"λ",langd:"⦑",lap:"⪅",lessapprox:"⪅",laquo:"«",larrbfs:"⤟",larrfs:"⤝",larrlp:"↫",looparrowleft:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",leftarrowtail:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lcy:"л",ldca:"⤶",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leq:"≤",leftleftarrows:"⇇",llarr:"⇇",leftthreetimes:"⋋",lthree:"⋋",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessdot:"⋖",ltdot:"⋖",lfisht:"⥼",lfr:"𝔩",lgE:"⪑",lharul:"⥪",lhblk:"▄",ljcy:"љ",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lneqq:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lnsim:"⋦",loang:"⟬",loarr:"⇽",longmapsto:"⟼",xmap:"⟼",looparrowright:"↬",rarrlp:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"",loz:"◊",lozenge:"◊",lpar:"(",lparlt:"⦓",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"",lscr:"𝓁",lsime:"⪍",lsimg:"⪏",lsquor:"",sbquo:"",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",triangleleft:"◃",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",strns:"¯",male:"♂",malt:"✠",maltese:"✠",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",mfr:"𝔪",mho:"℧",micro:"µ",midcir:"⫰",minus:"",minusdu:"⨪",mlcp:"⫛",models:"⊧",mopf:"𝕞",mscr:"𝓂",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nLeftarrow:"⇍",nlArr:"⇍",nLeftrightarrow:"⇎",nhArr:"⇎",nLl:"⋘̸",nLt:"≪⃒",nRightarrow:"⇏",nrArr:"⇏",nVDash:"⊯",nVdash:"⊮",nacute:"ń",nang:"∠⃒",napE:"⩰̸",napid:"≋̸",napos:"ʼn",natur:"♮",natural:"♮",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"",neArr:"⇗",nearhk:"⤤",nedot:"≐̸",nesear:"⤨",toea:"⤨",nfr:"𝔫",nharr:"↮",nleftrightarrow:"↮",nhpar:"⫲",nis:"⋼",nisd:"⋺",njcy:"њ",nlE:"≦̸",nleqq:"≦̸",nlarr:"↚",nleftarrow:"↚",nldr:"‥",nopf:"𝕟",not:"¬",notinE:"⋹̸",notindot:"⋵̸",notinvb:"⋷",notinvc:"⋶",notnivb:"⋾",notnivc:"⋽",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",nrarr:"↛",nrightarrow:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nscr:"𝓃",nsub:"⊄",nsubE:"⫅̸",nsubseteqq:"⫅̸",nsup:"⊅",nsupE:"⫆̸",nsupseteqq:"⫆̸",ntilde:"ñ",nu:"ν",num:"#",numero:"№",numsp:"",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwnear:"⤧",oacute:"ó",ocirc:"ô",ocy:"о",odblac:"ő",odiv:"⨸",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",olcir:"⦾",olcross:"⦻",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",oopf:"𝕠",opar:"⦷",operp:"⦹",or:"",vee:"",ord:"⩝",order:"",orderof:"",oscr:"",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oslash:"ø",osol:"⊘",otilde:"õ",otimesas:"⨶",ouml:"ö",ovbar:"⌽",para:"¶",parsim:"⫳",parsl:"⫽",pcy:"п",percnt:"%",period:".",permil:"‰",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",straightphi:"ϕ",varphi:"ϕ",phone:"☎",pi:"π",piv:"ϖ",varpi:"ϖ",planckh:"",plus:"+",plusacir:"⨣",pluscir:"⨢",plusdu:"⨥",pluse:"⩲",plussim:"⨦",plustwo:"⨧",pointint:"⨕",popf:"𝕡",pound:"£",prE:"⪳",prap:"⪷",precapprox:"⪷",precnapprox:"⪹",prnap:"⪹",precneqq:"⪵",prnE:"⪵",precnsim:"⋨",prnsim:"⋨",prime:"",profalar:"⌮",profline:"⌒",profsurf:"⌓",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:"",qfr:"𝔮",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quatint:"⨖",quest:"?",rAtail:"⤜",rHar:"⥤",race:"∽̱",racute:"ŕ",raemptyv:"⦳",rangd:"⦒",range:"⦥",raquo:"»",rarrap:"⥵",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rightarrowtail:"↣",rarrw:"↝",rightsquigarrow:"↝",ratail:"⤚",ratio:"",rbbrk:"",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdsh:"↳",rect:"▭",rfisht:"⥽",rfr:"𝔯",rharul:"⥬",rho:"ρ",rhov:"ϱ",varrho:"ϱ",rightrightarrows:"⇉",rrarr:"⇉",rightthreetimes:"⋌",rthree:"⋌",ring:"˚",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rsaquo:"",rscr:"𝓇",rtimes:"⋊",rtri:"▹",triangleright:"▹",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",scE:"⪴",scap:"⪸",succapprox:"⪸",scaron:"š",scedil:"ş",scirc:"ŝ",scnE:"⪶",succneqq:"⪶",scnap:"⪺",succnapprox:"⪺",scnsim:"⋩",succnsim:"⋩",scpolint:"⨓",scy:"с",sdot:"⋅",sdote:"⩦",seArr:"⇘",sect:"§",semi:";",seswar:"⤩",tosa:"⤩",sext:"✶",sfr:"𝔰",sharp:"♯",shchcy:"щ",shcy:"ш",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",varsigma:"ς",simdot:"⩪",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",smashp:"⨳",smeparsl:"⧤",smile:"⌣",ssmile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",sqcaps:"⊓︀",sqcups:"⊔︀",sscr:"𝓈",star:"☆",sub:"⊂",subset:"⊂",subE:"⫅",subseteqq:"⫅",subdot:"⪽",subedot:"⫃",submult:"⫁",subnE:"⫋",subsetneqq:"⫋",subne:"⊊",subsetneq:"⊊",subplus:"⪿",subrarr:"⥹",subsim:"⫇",subsub:"⫕",subsup:"⫓",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supseteqq:"⫆",supdot:"⪾",supdsub:"⫘",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supsetneqq:"⫌",supne:"⊋",supsetneq:"⊋",supplus:"⫀",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tcaron:"ť",tcedil:"ţ",tcy:"т",telrec:"⌕",tfr:"𝔱",theta:"θ",thetasym:"ϑ",thetav:"ϑ",vartheta:"ϑ",thorn:"þ",times:"×",timesbar:"⨱",timesd:"⨰",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tprime:"‴",triangle:"▵",utri:"▵",triangleq:"≜",trie:"≜",tridot:"◬",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",uHar:"⥣",uacute:"ú",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udblac:"ű",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uogon:"ų",uopf:"𝕦",upsi:"υ",upsilon:"υ",upuparrows:"⇈",uuarr:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",uuml:"ü",uwangle:"⦧",vBar:"⫨",vBarv:"⫩",vangrt:"⦜",varsubsetneq:"⊊︀",vsubne:"⊊︀",varsubsetneqq:"⫋︀",vsubnE:"⫋︀",varsupsetneq:"⊋︀",vsupne:"⊋︀",varsupsetneqq:"⫌︀",vsupnE:"⫌︀",vcy:"в",veebar:"⊻",veeeq:"≚",vellip:"⋮",vfr:"𝔳",vopf:"𝕧",vscr:"𝓋",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedgeq:"≙",weierp:"℘",wp:"℘",wfr:"𝔴",wopf:"𝕨",wscr:"𝓌",xfr:"𝔵",xi:"ξ",xnis:"⋻",xopf:"𝕩",xscr:"𝓍",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"",zwnj:""},p1="";vu.ngsp=p1;var Q=(function(t){return t[t.TAG_OPEN_START=0]="TAG_OPEN_START",t[t.TAG_OPEN_END=1]="TAG_OPEN_END",t[t.TAG_OPEN_END_VOID=2]="TAG_OPEN_END_VOID",t[t.TAG_CLOSE=3]="TAG_CLOSE",t[t.INCOMPLETE_TAG_OPEN=4]="INCOMPLETE_TAG_OPEN",t[t.TEXT=5]="TEXT",t[t.ESCAPABLE_RAW_TEXT=6]="ESCAPABLE_RAW_TEXT",t[t.RAW_TEXT=7]="RAW_TEXT",t[t.INTERPOLATION=8]="INTERPOLATION",t[t.ENCODED_ENTITY=9]="ENCODED_ENTITY",t[t.COMMENT_START=10]="COMMENT_START",t[t.COMMENT_END=11]="COMMENT_END",t[t.CDATA_START=12]="CDATA_START",t[t.CDATA_END=13]="CDATA_END",t[t.ATTR_NAME=14]="ATTR_NAME",t[t.ATTR_QUOTE=15]="ATTR_QUOTE",t[t.ATTR_VALUE_TEXT=16]="ATTR_VALUE_TEXT",t[t.ATTR_VALUE_INTERPOLATION=17]="ATTR_VALUE_INTERPOLATION",t[t.DOC_TYPE_START=18]="DOC_TYPE_START",t[t.DOC_TYPE_END=19]="DOC_TYPE_END",t[t.EXPANSION_FORM_START=20]="EXPANSION_FORM_START",t[t.EXPANSION_CASE_VALUE=21]="EXPANSION_CASE_VALUE",t[t.EXPANSION_CASE_EXP_START=22]="EXPANSION_CASE_EXP_START",t[t.EXPANSION_CASE_EXP_END=23]="EXPANSION_CASE_EXP_END",t[t.EXPANSION_FORM_END=24]="EXPANSION_FORM_END",t[t.BLOCK_OPEN_START=25]="BLOCK_OPEN_START",t[t.BLOCK_OPEN_END=26]="BLOCK_OPEN_END",t[t.BLOCK_CLOSE=27]="BLOCK_CLOSE",t[t.BLOCK_PARAMETER=28]="BLOCK_PARAMETER",t[t.INCOMPLETE_BLOCK_OPEN=29]="INCOMPLETE_BLOCK_OPEN",t[t.LET_START=30]="LET_START",t[t.LET_VALUE=31]="LET_VALUE",t[t.LET_END=32]="LET_END",t[t.INCOMPLETE_LET=33]="INCOMPLETE_LET",t[t.COMPONENT_OPEN_START=34]="COMPONENT_OPEN_START",t[t.COMPONENT_OPEN_END=35]="COMPONENT_OPEN_END",t[t.COMPONENT_OPEN_END_VOID=36]="COMPONENT_OPEN_END_VOID",t[t.COMPONENT_CLOSE=37]="COMPONENT_CLOSE",t[t.INCOMPLETE_COMPONENT_OPEN=38]="INCOMPLETE_COMPONENT_OPEN",t[t.DIRECTIVE_NAME=39]="DIRECTIVE_NAME",t[t.DIRECTIVE_OPEN=40]="DIRECTIVE_OPEN",t[t.DIRECTIVE_CLOSE=41]="DIRECTIVE_CLOSE",t[t.EOF=42]="EOF",t})({}),f1=class{constructor(t,e,n){this.tokens=t,this.errors=e,this.nonNormalizedIcuExpressions=n}};function m1(t,e,n,r={}){let i=new b1(new w2(t,e),n,r);return i.tokenize(),new f1(_1(i.tokens),i.errors,i.nonNormalizedIcuExpressions)}var g1=/\r\n?/g;function po(t){return`Unexpected character "${t===0?"EOF":String.fromCharCode(t)}"`}function xx(t){return`Unknown entity "${t}" - use the "&#<decimal>;" or "&#x<hex>;" syntax`}function O1(t,e){return`Unable to parse entity "${e}" - ${t} character reference entities must end with ";"`}var bb=(function(t){return t.HEX="hexadecimal",t.DEC="decimal",t})(bb||{}),y1=["@if","@else","@for","@switch","@case","@default","@empty","@defer","@placeholder","@loading","@error"],Ul={start:"{{",end:"}}"},b1=class{constructor(t,e,n){this._getTagContentType=e,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._openDirectiveCount=0,this._inInterpolation=!1,this._fullNameStack=[],this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=n.tokenizeExpansionForms||!1,this._leadingTriviaCodePoints=n.leadingTriviaChars&&n.leadingTriviaChars.map(i=>i.codePointAt(0)||0),this._canSelfClose=n.canSelfClose||!1,this._allowHtmComponentClosingTags=n.allowHtmComponentClosingTags||!1;let r=n.range||{endPos:t.content.length,startPos:0,startLine:0,startCol:0};this._cursor=n.escapedString?new x1(t,r):new _2(t,r),this._preserveLineEndings=n.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=n.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=n.tokenizeBlocks??!0,this._tokenizeLet=n.tokenizeLet??!0,this._selectorlessEnabled=n.selectorlessEnabled??!1;try{this._cursor.init()}catch(i){this.handleError(i)}}_processCarriageReturns(t){return this._preserveLineEndings?t:t.replace(g1,`
`)}tokenize(){for(;this._cursor.peek()!==0;){let t=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(t):this._attemptStr("--")?this._consumeComment(t):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(t):this._consumeBogusComment(t);else if(this._attemptCharCode(47))this._consumeTagClose(t);else{let e=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=e,this._consumeBogusComment(t)):this._consumeTagOpen(t)}else this._tokenizeLet&&this._cursor.peek()===64&&!this._inInterpolation&&this._isLetStart()?this._consumeLetDeclaration(t):this._tokenizeBlocks&&this._isBlockStart()?this._consumeBlockStart(t):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(t):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(Q.TEXT,Q.INTERPOLATION,()=>this._isTextEnd(),()=>this._isTagStart())}catch(e){this.handleError(e)}}this._beginToken(Q.EOF),this._endToken([])}_getBlockName(){let t=!1,e=this._cursor.clone();return this._attemptCharCodeUntilFn(n=>Dp(n)?!t:k1(n)?(t=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeBlockStart(t){this._requireCharCode(64),this._beginToken(Q.BLOCK_OPEN_START,t);let e=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(at),this._attemptCharCode(41))this._attemptCharCodeUntilFn(at);else{e.type=Q.INCOMPLETE_BLOCK_OPEN;return}this._attemptCharCode(123)?(this._beginToken(Q.BLOCK_OPEN_END),this._endToken([])):e.type=Q.INCOMPLETE_BLOCK_OPEN}_consumeBlockEnd(t){this._beginToken(Q.BLOCK_CLOSE,t),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(Dx);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(Q.BLOCK_PARAMETER);let t=this._cursor.clone(),e=null,n=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||e!==null;){let r=this._cursor.peek();if(r===92)this._cursor.advance();else if(r===e)e=null;else if(e===null&&lO(r))e=r;else if(r===40&&e===null)n++;else if(r===41&&e===null){if(n===0)break;n>0&&n--}this._cursor.advance()}this._endToken([this._cursor.getChars(t)]),this._attemptCharCodeUntilFn(Dx)}}_consumeLetDeclaration(t){if(this._requireStr("@let"),this._beginToken(Q.LET_START,t),Dp(this._cursor.peek()))this._attemptCharCodeUntilFn(at);else{let n=this._endToken([this._cursor.getChars(t)]);n.type=Q.INCOMPLETE_LET;return}let e=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(at),!this._attemptCharCode(61)){e.type=Q.INCOMPLETE_LET;return}this._attemptCharCodeUntilFn(n=>at(n)&&!Ap(n)),this._consumeLetDeclarationValue(),this._cursor.peek()===59?(this._beginToken(Q.LET_END),this._endToken([]),this._cursor.advance()):(e.type=Q.INCOMPLETE_LET,e.sourceSpan=this._cursor.getSpan(t))}_getLetDeclarationName(){let t=this._cursor.clone(),e=!1;return this._attemptCharCodeUntilFn(n=>Eu(n)||n===36||n===95||e&&bm(n)?(e=!0,!1):!0),this._cursor.getChars(t).trim()}_consumeLetDeclarationValue(){let t=this._cursor.clone();for(this._beginToken(Q.LET_VALUE,t);this._cursor.peek()!==0;){let e=this._cursor.peek();if(e===59)break;lO(e)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(n=>n===92?(this._cursor.advance(),!1):n===e)),this._cursor.advance()}this._endToken([this._cursor.getChars(t)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(S1(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(t,e=this._cursor.clone()){this._currentTokenStart=e,this._currentTokenType=t}_endToken(t,e){if(this._currentTokenStart===null)throw new Ea(this._cursor.getSpan(e),"Programming error - attempted to end a token when there was no start to the token");if(this._currentTokenType===null)throw new Ea(this._cursor.getSpan(this._currentTokenStart),"Programming error - attempted to end a token which has no token type");let n={type:this._currentTokenType,parts:t,sourceSpan:(e??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}_createError(t,e){this._isInExpansionForm()&&(t+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let n=new Ea(e,t);return this._currentTokenStart=null,this._currentTokenType=null,n}handleError(t){if(t instanceof uT&&(t=this._createError(t.msg,this._cursor.getSpan(t.cursor))),t instanceof Ea)this.errors.push(t);else throw t}_attemptCharCode(t){return this._cursor.peek()===t?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(t){return w1(this._cursor.peek(),t)?(this._cursor.advance(),!0):!1}_requireCharCode(t){let e=this._cursor.clone();if(!this._attemptCharCode(t))throw this._createError(po(this._cursor.peek()),this._cursor.getSpan(e))}_attemptStr(t){let e=t.length;if(this._cursor.charsLeft()<e)return!1;let n=this._cursor.clone();for(let r=0;r<e;r++)if(!this._attemptCharCode(t.charCodeAt(r)))return this._cursor=n,!1;return!0}_attemptStrCaseInsensitive(t){for(let e=0;e<t.length;e++)if(!this._attemptCharCodeCaseInsensitive(t.charCodeAt(e)))return!1;return!0}_requireStr(t){let e=this._cursor.clone();if(!this._attemptStr(t))throw this._createError(po(this._cursor.peek()),this._cursor.getSpan(e))}_requireStrCaseInsensitive(t){let e=this._cursor.clone();if(!this._attemptStrCaseInsensitive(t))throw this._createError(po(this._cursor.peek()),this._cursor.getSpan(e))}_attemptCharCodeUntilFn(t){for(;!t(this._cursor.peek());)this._cursor.advance()}_requireCharCodeUntilFn(t,e){let n=this._cursor.clone();if(this._attemptCharCodeUntilFn(t),this._cursor.diff(n)<e)throw this._createError(po(this._cursor.peek()),this._cursor.getSpan(n))}_attemptUntilChar(t){for(;this._cursor.peek()!==t;)this._cursor.advance()}_readChar(){let t=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),t}_peekStr(t){let e=t.length;if(this._cursor.charsLeft()<e)return!1;let n=this._cursor.clone();for(let r=0;r<e;r++){if(n.peek()!==t.charCodeAt(r))return!1;n.advance()}return!0}_isBlockStart(){return this._cursor.peek()===64&&y1.some(t=>this._peekStr(t))}_isLetStart(){return this._cursor.peek()===64&&this._peekStr("@let")}_consumeEntity(t){this._beginToken(Q.ENCODED_ENTITY);let e=this._cursor.clone();if(this._cursor.advance(),this._attemptCharCode(35)){let n=this._attemptCharCode(120)||this._attemptCharCode(88),r=this._cursor.clone();if(this._attemptCharCodeUntilFn(v1),this._cursor.peek()!=59){this._cursor.advance();let s=n?bb.HEX:bb.DEC;throw this._createError(O1(s,this._cursor.getChars(e)),this._cursor.getSpan())}let i=this._cursor.getChars(r);this._cursor.advance();try{let s=parseInt(i,n?16:10);this._endToken([String.fromCodePoint(s),this._cursor.getChars(e)])}catch{throw this._createError(xx(this._cursor.getChars(e)),this._cursor.getSpan())}}else{let n=this._cursor.clone();if(this._attemptCharCodeUntilFn(T1),this._cursor.peek()!=59)this._beginToken(t,e),this._cursor=n,this._endToken(["&"]);else{let r=this._cursor.getChars(n);this._cursor.advance();let i=vu.hasOwnProperty(r)&&vu[r];if(!i)throw this._createError(xx(r),this._cursor.getSpan(e));this._endToken([i,`&${r};`])}}}_consumeRawText(t,e){this._beginToken(t?Q.ESCAPABLE_RAW_TEXT:Q.RAW_TEXT);let n=[];for(;;){let r=this._cursor.clone(),i=e();if(this._cursor=r,i)break;t&&this._cursor.peek()===38?(this._endToken([this._processCarriageReturns(n.join(""))]),n.length=0,this._consumeEntity(Q.ESCAPABLE_RAW_TEXT),this._beginToken(Q.ESCAPABLE_RAW_TEXT)):n.push(this._readChar())}this._endToken([this._processCarriageReturns(n.join(""))])}_consumeComment(t){this._beginToken(Q.COMMENT_START,t),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("-->")),this._beginToken(Q.COMMENT_END),this._requireStr("-->"),this._endToken([])}_consumeBogusComment(t){this._beginToken(Q.COMMENT_START,t),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(Q.COMMENT_END),this._cursor.advance(),this._endToken([])}_consumeCdata(t){this._beginToken(Q.CDATA_START,t),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(Q.CDATA_END),this._requireStr("]]>"),this._endToken([])}_consumeDocType(t){this._beginToken(Q.DOC_TYPE_START,t),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(Q.DOC_TYPE_END),this._cursor.advance(),this._endToken([])}_consumePrefixAndName(t){let e=this._cursor.clone(),n="";for(;this._cursor.peek()!==58&&!E1(this._cursor.peek());)this._cursor.advance();let r;this._cursor.peek()===58?(n=this._cursor.getChars(e),this._cursor.advance(),r=this._cursor.clone()):r=e,this._requireCharCodeUntilFn(t,n===""?0:1);let i=this._cursor.getChars(r);return[n,i]}_consumeTagOpen(t){let e,n,r,i,s=[];try{if(this._selectorlessEnabled&&Yh(this._cursor.peek()))i=this._consumeComponentOpenStart(t),[r,n,e]=i.parts,n&&(r+=`:${n}`),e&&(r+=`:${e}`),this._attemptCharCodeUntilFn(at);else{if(!Eu(this._cursor.peek()))throw this._createError(po(this._cursor.peek()),this._cursor.getSpan(t));i=this._consumeTagOpenStart(t),n=i.parts[0],e=r=i.parts[1],this._attemptCharCodeUntilFn(at)}for(;!Px(this._cursor.peek());)if(this._selectorlessEnabled&&this._cursor.peek()===64){let a=this._cursor.clone(),l=a.clone();l.advance(),Yh(l.peek())&&this._consumeDirective(a,l)}else{let a=this._consumeAttribute();s.push(a)}i.type===Q.COMPONENT_OPEN_START?this._consumeComponentOpenEnd():this._consumeTagOpenEnd()}catch(a){if(a instanceof Ea){i?i.type=i.type===Q.COMPONENT_OPEN_START?Q.INCOMPLETE_COMPONENT_OPEN:Q.INCOMPLETE_TAG_OPEN:(this._beginToken(Q.TEXT,t),this._endToken(["<"]));return}throw a}if(this._canSelfClose&&this.tokens[this.tokens.length-1].type===Q.TAG_OPEN_END_VOID)return;let o=this._getTagContentType(e,n,this._fullNameStack.length>0,s);this._handleFullNameStackForTagOpen(n,e),o===Mi.RAW_TEXT?this._consumeRawTextWithTagClose(n,i,r,!1):o===Mi.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,i,r,!0)}_consumeRawTextWithTagClose(t,e,n,r){this._consumeRawText(r,()=>!this._attemptCharCode(60)||!this._attemptCharCode(47)||(this._attemptCharCodeUntilFn(at),!this._attemptStrCaseInsensitive(t&&e.type!==Q.COMPONENT_OPEN_START?`${t}:${n}`:n))?!1:(this._attemptCharCodeUntilFn(at),this._attemptCharCode(62))),this._beginToken(e.type===Q.COMPONENT_OPEN_START?Q.COMPONENT_CLOSE:Q.TAG_CLOSE),this._requireCharCodeUntilFn(i=>i===62,3),this._cursor.advance(),this._endToken(e.parts),this._handleFullNameStackForTagClose(t,n)}_consumeTagOpenStart(t){this._beginToken(Q.TAG_OPEN_START,t);let e=this._consumePrefixAndName(fo);return this._endToken(e)}_consumeComponentOpenStart(t){this._beginToken(Q.COMPONENT_OPEN_START,t);let e=this._consumeComponentName();return this._endToken(e)}_consumeComponentName(){let t=this._cursor.clone();for(;Ax(this._cursor.peek());)this._cursor.advance();let e=this._cursor.getChars(t),n="",r="";return this._cursor.peek()===58&&(this._cursor.advance(),[n,r]=this._consumePrefixAndName(fo)),[e,n,r]}_consumeAttribute(){let[t,e]=this._consumeAttributeName(),n;return this._attemptCharCodeUntilFn(at),this._attemptCharCode(61)&&(this._attemptCharCodeUntilFn(at),n=this._consumeAttributeValue()),this._attemptCharCodeUntilFn(at),{prefix:t,name:e,value:n}}_consumeAttributeName(){let t=this._cursor.peek();if(t===39||t===34)throw this._createError(po(t),this._cursor.getSpan());this._beginToken(Q.ATTR_NAME);let e;if(this._openDirectiveCount>0){let r=0;e=i=>{if(this._openDirectiveCount>0){if(i===40)r++;else if(i===41){if(r===0)return!0;r--}}return fo(i)}}else if(t===91){let r=0;e=i=>(i===91?r++:i===93&&r--,r<=0?fo(i):Ap(i))}else e=fo;let n=this._consumePrefixAndName(e);return this._endToken(n),n}_consumeAttributeValue(){let t;if(this._cursor.peek()===39||this._cursor.peek()===34){let e=this._cursor.peek();this._consumeQuote(e);let n=()=>this._cursor.peek()===e;t=this._consumeWithInterpolation(Q.ATTR_VALUE_TEXT,Q.ATTR_VALUE_INTERPOLATION,n,n),this._consumeQuote(e)}else{let e=()=>fo(this._cursor.peek());t=this._consumeWithInterpolation(Q.ATTR_VALUE_TEXT,Q.ATTR_VALUE_INTERPOLATION,e,e)}return t}_consumeQuote(t){this._beginToken(Q.ATTR_QUOTE),this._requireCharCode(t),this._endToken([String.fromCodePoint(t)])}_consumeTagOpenEnd(){let t=this._attemptCharCode(47)?Q.TAG_OPEN_END_VOID:Q.TAG_OPEN_END;this._beginToken(t),this._requireCharCode(62),this._endToken([])}_consumeComponentOpenEnd(){let t=this._attemptCharCode(47)?Q.COMPONENT_OPEN_END_VOID:Q.COMPONENT_OPEN_END;this._beginToken(t),this._requireCharCode(62),this._endToken([])}_consumeTagClose(t){if(this._selectorlessEnabled){let e=t.clone();for(;e.peek()!==62&&!Yh(e.peek());)e.advance();if(Yh(e.peek())){this._beginToken(Q.COMPONENT_CLOSE,t);let n=this._consumeComponentName();this._attemptCharCodeUntilFn(at),this._requireCharCode(62),this._endToken(n);return}}if(this._beginToken(Q.TAG_CLOSE,t),this._attemptCharCodeUntilFn(at),this._allowHtmComponentClosingTags&&this._attemptCharCode(47))this._attemptCharCodeUntilFn(at),this._requireCharCode(62),this._endToken([]);else{let[e,n]=this._consumePrefixAndName(fo);this._attemptCharCodeUntilFn(at),this._requireCharCode(62),this._endToken([e,n]),this._handleFullNameStackForTagClose(e,n)}}_consumeExpansionFormStart(){this._beginToken(Q.EXPANSION_FORM_START),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(Q.EXPANSION_FORM_START),this._beginToken(Q.RAW_TEXT);let t=this._readUntil(44),e=this._processCarriageReturns(t);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([e]);else{let r=this._endToken([t]);e!==t&&this.nonNormalizedIcuExpressions.push(r)}this._requireCharCode(44),this._attemptCharCodeUntilFn(at),this._beginToken(Q.RAW_TEXT);let n=this._readUntil(44);this._endToken([n]),this._requireCharCode(44),this._attemptCharCodeUntilFn(at)}_consumeExpansionCaseStart(){this._beginToken(Q.EXPANSION_CASE_VALUE);let t=this._readUntil(123).trim();this._endToken([t]),this._attemptCharCodeUntilFn(at),this._beginToken(Q.EXPANSION_CASE_EXP_START),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(at),this._expansionCaseStack.push(Q.EXPANSION_CASE_EXP_START)}_consumeExpansionCaseEnd(){this._beginToken(Q.EXPANSION_CASE_EXP_END),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(at),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(Q.EXPANSION_FORM_END),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(t,e,n,r){this._beginToken(t);let i=[];for(;!n();){let o=this._cursor.clone();this._attemptStr(Ul.start)?(this._endToken([this._processCarriageReturns(i.join(""))],o),i.length=0,this._consumeInterpolation(e,o,r),this._beginToken(t)):this._cursor.peek()===38?(this._endToken([this._processCarriageReturns(i.join(""))]),i.length=0,this._consumeEntity(t),this._beginToken(t)):i.push(this._readChar())}this._inInterpolation=!1;let s=this._processCarriageReturns(i.join(""));return this._endToken([s]),s}_consumeInterpolation(t,e,n){let r=[];this._beginToken(t,e),r.push(Ul.start);let i=this._cursor.clone(),s=null,o=!1;for(;this._cursor.peek()!==0&&(n===null||!n());){let a=this._cursor.clone();if(this._isTagStart()){this._cursor=a,r.push(this._getProcessedChars(i,a)),this._endToken(r);return}if(s===null)if(this._attemptStr(Ul.end)){r.push(this._getProcessedChars(i,a)),r.push(Ul.end),this._endToken(r);return}else this._attemptStr("//")&&(o=!0);let l=this._cursor.peek();this._cursor.advance(),l===92?this._cursor.advance():l===s?s=null:!o&&s===null&&lO(l)&&(s=l)}r.push(this._getProcessedChars(i,this._cursor)),this._endToken(r)}_consumeDirective(t,e){for(this._requireCharCode(64),this._cursor.advance();Ax(this._cursor.peek());)this._cursor.advance();this._beginToken(Q.DIRECTIVE_NAME,t);let n=this._cursor.getChars(e);if(this._endToken([n]),this._attemptCharCodeUntilFn(at),this._cursor.peek()===40){for(this._openDirectiveCount++,this._beginToken(Q.DIRECTIVE_OPEN),this._cursor.advance(),this._endToken([]),this._attemptCharCodeUntilFn(at);!Px(this._cursor.peek())&&this._cursor.peek()!==41;)this._consumeAttribute();if(this._attemptCharCodeUntilFn(at),this._openDirectiveCount--,this._cursor.peek()!==41){if(this._cursor.peek()===62||this._cursor.peek()===47)return;throw this._createError(po(this._cursor.peek()),this._cursor.getSpan(t))}this._beginToken(Q.DIRECTIVE_CLOSE),this._cursor.advance(),this._endToken([]),this._attemptCharCodeUntilFn(at)}}_getProcessedChars(t,e){return this._processCarriageReturns(e.getChars(t))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===0||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===125&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._isLetStart()||this._cursor.peek()===125))}_isTagStart(){if(this._cursor.peek()===60){let t=this._cursor.clone();t.advance();let e=t.peek();if(97<=e&&e<=122||65<=e&&e<=90||e===47||e===33)return!0}return!1}_readUntil(t){let e=this._cursor.clone();return this._attemptUntilChar(t),this._cursor.getChars(e)}_isInExpansion(){return this._isInExpansionCase()||this._isInExpansionForm()}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===Q.EXPANSION_CASE_EXP_START}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===Q.EXPANSION_FORM_START}isExpansionFormStart(){if(this._cursor.peek()!==123)return!1;let t=this._cursor.clone(),e=this._attemptStr(Ul.start);return this._cursor=t,!e}_handleFullNameStackForTagOpen(t,e){let n=xc(t,e);(this._fullNameStack.length===0||this._fullNameStack[this._fullNameStack.length-1]===n)&&this._fullNameStack.push(n)}_handleFullNameStackForTagClose(t,e){let n=xc(t,e);this._fullNameStack.length!==0&&this._fullNameStack[this._fullNameStack.length-1]===n&&this._fullNameStack.pop()}};function at(t){return!Dp(t)||t===0}function fo(t){return Dp(t)||t===62||t===60||t===47||t===39||t===34||t===61||t===0}function E1(t){return(t<97||122<t)&&(t<65||90<t)&&(t<48||t>57)}function v1(t){return t===59||t===0||!r1(t)}function T1(t){return t===59||t===0||!Eu(t)}function S1(t){return t!==125}function w1(t,e){return Cx(t)===Cx(e)}function Cx(t){return t>=97&&t<=122?t-97+65:t}function k1(t){return Eu(t)||bm(t)||t===95}function Dx(t){return t!==59&&at(t)}function Yh(t){return t===95||t>=65&&t<=90}function Ax(t){return Eu(t)||bm(t)||t===95}function Px(t){return t===47||t===62||t===60||t===0}function _1(t){let e=[],n;for(let r=0;r<t.length;r++){let i=t[r];n&&n.type===Q.TEXT&&i.type===Q.TEXT||n&&n.type===Q.ATTR_VALUE_TEXT&&i.type===Q.ATTR_VALUE_TEXT?(n.parts[0]+=i.parts[0],n.sourceSpan.end=i.sourceSpan.end):(n=i,e.push(n))}return e}var _2=class Eb{constructor(e,n){if(e instanceof Eb){this.file=e.file,this.input=e.input,this.end=e.end;let r=e.state;this.state={peek:r.peek,offset:r.offset,line:r.line,column:r.column}}else{if(!n)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=e,this.input=e.content,this.end=n.endPos,this.state={peek:-1,offset:n.startPos,line:n.startLine,column:n.startCol}}}clone(){return new Eb(this)}peek(){return this.state.peek}charsLeft(){return this.end-this.state.offset}diff(e){return this.state.offset-e.state.offset}advance(){this.advanceState(this.state)}init(){this.updatePeek(this.state)}getSpan(e,n){e=e||this;let r=e;if(n)for(;this.diff(e)>0&&n.indexOf(e.peek())!==-1;)r===e&&(e=e.clone()),e.advance();let i=this.locationFromCursor(e);return new _e(i,this.locationFromCursor(this),r!==e?this.locationFromCursor(r):i)}getChars(e){return this.input.substring(e.state.offset,this.state.offset)}charAt(e){return this.input.charCodeAt(e)}advanceState(e){if(e.offset>=this.end)throw this.state=e,new uT('Unexpected character "EOF"',this);let n=this.charAt(e.offset);n===10?(e.line++,e.column=0):Ap(n)||e.column++,e.offset++,this.updatePeek(e)}updatePeek(e){e.peek=e.offset>=this.end?0:this.charAt(e.offset)}locationFromCursor(e){return new yb(e.file,e.state.offset,e.state.line,e.state.column)}},x1=class vb extends _2{constructor(e,n){e instanceof vb?(super(e),this.internalState={...e.internalState}):(super(e,n),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new vb(this)}getChars(e){let n=e.clone(),r="";for(;n.internalState.offset<this.internalState.offset;)r+=String.fromCodePoint(n.peek()),n.advance();return r}processEscapeSequence(){let e=()=>this.internalState.peek;if(e()===92)if(this.internalState={...this.state},this.advanceState(this.internalState),e()===110)this.state.peek=10;else if(e()===114)this.state.peek=13;else if(e()===118)this.state.peek=11;else if(e()===116)this.state.peek=9;else if(e()===98)this.state.peek=8;else if(e()===102)this.state.peek=12;else if(e()===117)if(this.advanceState(this.internalState),e()===123){this.advanceState(this.internalState);let n=this.clone(),r=0;for(;e()!==125;)this.advanceState(this.internalState),r++;this.state.peek=this.decodeHexDigits(n,r)}else{let n=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(n,4)}else if(e()===120){this.advanceState(this.internalState);let n=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(n,2)}else if(Sx(e())){let n="",r=0,i=this.clone();for(;Sx(e())&&r<3;)i=this.clone(),n+=String.fromCodePoint(e()),this.advanceState(this.internalState),r++;this.state.peek=parseInt(n,8),this.internalState=i.internalState}else Ap(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(e,n){let r=this.input.slice(e.internalState.offset,e.internalState.offset+n),i=parseInt(r,16);if(isNaN(i))throw e.state=e.internalState,new uT("Invalid hexadecimal escape sequence",e);return i}},uT=class extends Error{constructor(t,e){super(t),this.msg=t,this.cursor=e,Object.setPrototypeOf(this,new.target.prototype)}},zt=class x2 extends Ea{static create(e,n,r){return new x2(e,n,r)}constructor(e,n,r){super(n,r),this.elementName=e}},C1=class{constructor(t,e){this.rootNodes=t,this.errors=e}},D1=class{constructor(t){this.getTagDefinition=t}parse(t,e,n,r=!1,i){let s=p=>(f,...m)=>p(f.toLowerCase(),...m),o=r?this.getTagDefinition:s(this.getTagDefinition),a=p=>o(p).getContentType(),l=r?i:s(i),c=m1(t,e,i?(p,f,m,g)=>{let y=l(p,f,m,g);return y!==void 0?y:a(p)}:a,n),u=n&&n.canSelfClose||!1,h=n&&n.allowHtmComponentClosingTags||!1,d=new A1(c.tokens,o,u,h,r);return d.build(),new C1(d.rootNodes,[...c.errors,...d.errors])}},A1=class C2{constructor(e,n,r,i,s){this.tokens=e,this.tagDefinitionResolver=n,this.canSelfClose=r,this.allowHtmComponentClosingTags=i,this.isTagNameCaseSensitive=s,this._index=-1,this._containerStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;this._peek.type!==Q.EOF;)this._peek.type===Q.TAG_OPEN_START||this._peek.type===Q.INCOMPLETE_TAG_OPEN?this._consumeElementStartTag(this._advance()):this._peek.type===Q.TAG_CLOSE?(this._closeVoidElement(),this._consumeElementEndTag(this._advance())):this._peek.type===Q.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===Q.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===Q.TEXT||this._peek.type===Q.RAW_TEXT||this._peek.type===Q.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===Q.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._peek.type===Q.BLOCK_OPEN_START?(this._closeVoidElement(),this._consumeBlockOpen(this._advance())):this._peek.type===Q.BLOCK_CLOSE?(this._closeVoidElement(),this._consumeBlockClose(this._advance())):this._peek.type===Q.INCOMPLETE_BLOCK_OPEN?(this._closeVoidElement(),this._consumeIncompleteBlock(this._advance())):this._peek.type===Q.LET_START?(this._closeVoidElement(),this._consumeLet(this._advance())):this._peek.type===Q.DOC_TYPE_START?this._consumeDocType(this._advance()):this._peek.type===Q.INCOMPLETE_LET?(this._closeVoidElement(),this._consumeIncompleteLet(this._advance())):this._peek.type===Q.COMPONENT_OPEN_START||this._peek.type===Q.INCOMPLETE_COMPONENT_OPEN?this._consumeComponentStartTag(this._advance()):this._peek.type===Q.COMPONENT_CLOSE?this._consumeComponentEndTag(this._advance()):this._advance();for(let e of this._containerStack)e instanceof pa&&this.errors.push(zt.create(e.name,e.sourceSpan,`Unclosed block "${e.name}"`))}_advance(){let e=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],e}_advanceIf(e){return this._peek.type===e?this._advance():null}_consumeCdata(e){let n=this._advance(),r=this._getText(n),i=this._advanceIf(Q.CDATA_END);this._addToParent(new s1(r,new _e(e.sourceSpan.start,(i||n).sourceSpan.end),[n]))}_consumeComment(e){let n=this._advanceIf(Q.RAW_TEXT),r=this._advanceIf(Q.COMMENT_END),i=n!=null?n.parts[0].trim():null,s=r==null?e.sourceSpan:new _e(e.sourceSpan.start,r.sourceSpan.end,e.sourceSpan.fullStart);this._addToParent(new c1(i,s))}_consumeDocType(e){let n=this._advanceIf(Q.RAW_TEXT),r=this._advanceIf(Q.DOC_TYPE_END),i=n!=null?n.parts[0].trim():null,s=new _e(e.sourceSpan.start,(r||n||e).sourceSpan.end);this._addToParent(new u1(i,s))}_consumeExpansion(e){let n=this._advance(),r=this._advance(),i=[];for(;this._peek.type===Q.EXPANSION_CASE_VALUE;){let o=this._parseExpansionCase();if(!o)return;i.push(o)}if(this._peek.type!==Q.EXPANSION_FORM_END){this.errors.push(zt.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."));return}let s=new _e(e.sourceSpan.start,this._peek.sourceSpan.end,e.sourceSpan.fullStart);this._addToParent(new o1(n.parts[0],r.parts[0],i,s,n.sourceSpan)),this._advance()}_parseExpansionCase(){let e=this._advance();if(this._peek.type!==Q.EXPANSION_CASE_EXP_START)return this.errors.push(zt.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;let n=this._advance(),r=this._collectExpansionExpTokens(n);if(!r)return null;let i=this._advance();r.push({type:Q.EOF,parts:[],sourceSpan:i.sourceSpan});let s=new C2(r,this.tagDefinitionResolver,this.canSelfClose,this.allowHtmComponentClosingTags,this.isTagNameCaseSensitive);if(s.build(),s.errors.length>0)return this.errors=this.errors.concat(s.errors),null;let o=new _e(e.sourceSpan.start,i.sourceSpan.end,e.sourceSpan.fullStart),a=new _e(n.sourceSpan.start,i.sourceSpan.end,n.sourceSpan.fullStart);return new a1(e.parts[0],s.rootNodes,o,e.sourceSpan,a)}_collectExpansionExpTokens(e){let n=[],r=[Q.EXPANSION_CASE_EXP_START];for(;;){if((this._peek.type===Q.EXPANSION_FORM_START||this._peek.type===Q.EXPANSION_CASE_EXP_START)&&r.push(this._peek.type),this._peek.type===Q.EXPANSION_CASE_EXP_END)if(Nx(r,Q.EXPANSION_CASE_EXP_START)){if(r.pop(),r.length===0)return n}else return this.errors.push(zt.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===Q.EXPANSION_FORM_END)if(Nx(r,Q.EXPANSION_FORM_START))r.pop();else return this.errors.push(zt.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===Q.EOF)return this.errors.push(zt.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;n.push(this._advance())}}_getText(e){let n=e.parts[0];if(n.length>0&&n[0]==`
`){var r;let i=this._getClosestElementLikeParent();i!=null&&i.children.length==0&&!((r=this._getTagDefinition(i))===null||r===void 0)&&r.ignoreFirstLf&&(n=n.substring(1))}return n}_consumeText(e){let n=[e],r=e.sourceSpan,i=e.parts[0];if(i.length>0&&i[0]===`
`){var s;let o=this._getContainer();o!=null&&o.children.length===0&&!((s=this._getTagDefinition(o))===null||s===void 0)&&s.ignoreFirstLf&&(i=i.substring(1),n[0]={type:e.type,sourceSpan:e.sourceSpan,parts:[i]})}for(;this._peek.type===Q.INTERPOLATION||this._peek.type===Q.TEXT||this._peek.type===Q.ENCODED_ENTITY;)e=this._advance(),n.push(e),e.type===Q.INTERPOLATION?i+=e.parts.join("").replace(/&([^;]+);/g,Rx):e.type===Q.ENCODED_ENTITY?i+=e.parts[0]:i+=e.parts.join("");if(i.length>0){let o=e.sourceSpan;this._addToParent(new i1(i,new _e(r.start,o.end,r.fullStart,r.details),n))}}_closeVoidElement(){var e;let n=this._getContainer();n!==null&&!((e=this._getTagDefinition(n))===null||e===void 0)&&e.isVoid&&this._containerStack.pop()}_consumeElementStartTag(e){var n;let r=[],i=[];this._consumeAttributesAndDirectives(r,i);let s=this._getElementFullName(e,this._getClosestElementLikeParent()),o=this._getTagDefinition(s),a=!1;if(this._peek.type===Q.TAG_OPEN_END_VOID){this._advance(),a=!0;let m=this._getTagDefinition(s);this.canSelfClose||m!=null&&m.canSelfClose||Ld(s)!==null||m!=null&&m.isVoid||this.errors.push(zt.create(s,e.sourceSpan,`Only void, custom and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===Q.TAG_OPEN_END&&(this._advance(),a=!1);let l=this._peek.sourceSpan.fullStart,c=new _e(e.sourceSpan.start,l,e.sourceSpan.fullStart),u=new _e(e.sourceSpan.start,l,e.sourceSpan.fullStart),h=new _e(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),d=new ho(s,r,i,[],a,c,u,void 0,h,(o==null?void 0:o.isVoid)??!1),p=this._getContainer(),f=p!==null&&!!(!((n=this._getTagDefinition(p))===null||n===void 0)&&n.isClosedByChild(d.name));this._pushContainer(d,f),a?this._popContainer(s,ho,c):e.type===Q.INCOMPLETE_TAG_OPEN&&(this._popContainer(s,ho,null),this.errors.push(zt.create(s,c,`Opening tag "${s}" not terminated.`)))}_consumeComponentStartTag(e){var n;let r=e.parts[0],i=[],s=[];this._consumeAttributesAndDirectives(i,s);let o=this._getClosestElementLikeParent(),a=this._getComponentTagName(e,o),l=this._getComponentFullName(e,o),c=this._peek.type===Q.COMPONENT_OPEN_END_VOID;this._advance();let u=this._peek.sourceSpan.fullStart,h=new _e(e.sourceSpan.start,u,e.sourceSpan.fullStart),d=new _e(e.sourceSpan.start,u,e.sourceSpan.fullStart),p=new hs(r,a,l,i,s,[],c,h,d,void 0),f=this._getContainer(),m=f!==null&&p.tagName!==null&&!!(!((n=this._getTagDefinition(f))===null||n===void 0)&&n.isClosedByChild(p.tagName));this._pushContainer(p,m),c?this._popContainer(l,hs,h):e.type===Q.INCOMPLETE_COMPONENT_OPEN&&(this._popContainer(l,hs,null),this.errors.push(zt.create(l,h,`Opening tag "${l}" not terminated.`)))}_consumeAttributesAndDirectives(e,n){for(;this._peek.type===Q.ATTR_NAME||this._peek.type===Q.DIRECTIVE_NAME;)this._peek.type===Q.DIRECTIVE_NAME?n.push(this._consumeDirective(this._peek)):e.push(this._consumeAttr(this._advance()))}_consumeComponentEndTag(e){let n=this._getComponentFullName(e,this._getClosestElementLikeParent());if(!this._popContainer(n,hs,e.sourceSpan)){let r=this._containerStack[this._containerStack.length-1],i;r instanceof hs&&r.componentName===e.parts[0]?i=`, did you mean "${r.fullName}"?`:i=". It may happen when the tag has already been closed by another tag.";let s=`Unexpected closing tag "${n}"${i}`;this.errors.push(zt.create(n,e.sourceSpan,s))}}_getTagDefinition(e){return typeof e=="string"?this.tagDefinitionResolver(e):e instanceof ho?this.tagDefinitionResolver(e.name):e instanceof hs&&e.tagName!==null?this.tagDefinitionResolver(e.tagName):null}_pushContainer(e,n){n&&this._containerStack.pop(),this._addToParent(e),this._containerStack.push(e)}_consumeElementEndTag(e){var n;let r=this.allowHtmComponentClosingTags&&e.parts.length===0?null:this._getElementFullName(e,this._getClosestElementLikeParent());if(r&&!((n=this._getTagDefinition(r))===null||n===void 0)&&n.isVoid)this.errors.push(zt.create(r,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`));else if(!this._popContainer(r,ho,e.sourceSpan)){let i=`Unexpected closing tag "${r}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(zt.create(r,e.sourceSpan,i))}}_popContainer(e,n,r){let i=!1;for(let o=this._containerStack.length-1;o>=0;o--){var s;let a=this._containerStack[o],l=a instanceof hs?a.fullName:a.name;if(Ld(l)?l===e:(l===e||e===null)&&a instanceof n)return a.endSourceSpan=r,a.sourceSpan.end=r!==null?r.end:a.sourceSpan.end,this._containerStack.splice(o,this._containerStack.length-o),!i;(a instanceof pa||!(!((s=this._getTagDefinition(a))===null||s===void 0)&&s.closedByParent))&&(i=!0)}return!1}_consumeAttr(e){let n=xc(e.parts[0],e.parts[1]),r=e.sourceSpan.end,i;this._peek.type===Q.ATTR_QUOTE&&(i=this._advance());let s="",o=[],a,l;if(this._peek.type===Q.ATTR_VALUE_TEXT)for(a=this._peek.sourceSpan,l=this._peek.sourceSpan.end;this._peek.type===Q.ATTR_VALUE_TEXT||this._peek.type===Q.ATTR_VALUE_INTERPOLATION||this._peek.type===Q.ENCODED_ENTITY;){let u=this._advance();o.push(u),u.type===Q.ATTR_VALUE_INTERPOLATION?s+=u.parts.join("").replace(/&([^;]+);/g,Rx):u.type===Q.ENCODED_ENTITY?s+=u.parts[0]:s+=u.parts.join(""),l=r=u.sourceSpan.end}this._peek.type===Q.ATTR_QUOTE&&(l=r=this._advance().sourceSpan.end);let c=a&&l&&new _e((i==null?void 0:i.sourceSpan.start)??a.start,l,(i==null?void 0:i.sourceSpan.fullStart)??a.fullStart);return new l1(n,s,new _e(e.sourceSpan.start,r,e.sourceSpan.fullStart),e.sourceSpan,c,o.length>0?o:void 0,void 0)}_consumeDirective(e){let n=[],r=e.sourceSpan.end,i=null;if(this._advance(),this._peek.type===Q.DIRECTIVE_OPEN){for(r=this._peek.sourceSpan.end,this._advance();this._peek.type===Q.ATTR_NAME;)n.push(this._consumeAttr(this._advance()));this._peek.type===Q.DIRECTIVE_CLOSE?(i=this._peek.sourceSpan,this._advance()):this.errors.push(zt.create(null,e.sourceSpan,"Unterminated directive definition"))}let s=new _e(e.sourceSpan.start,r,e.sourceSpan.fullStart),o=new _e(s.start,i===null?e.sourceSpan.end:i.end,s.fullStart);return new h1(e.parts[0],n,o,s,i)}_consumeBlockOpen(e){let n=[];for(;this._peek.type===Q.BLOCK_PARAMETER;){let a=this._advance();n.push(new kx(a.parts[0],a.sourceSpan))}this._peek.type===Q.BLOCK_OPEN_END&&this._advance();let r=this._peek.sourceSpan.fullStart,i=new _e(e.sourceSpan.start,r,e.sourceSpan.fullStart),s=new _e(e.sourceSpan.start,r,e.sourceSpan.fullStart),o=new pa(e.parts[0],n,[],i,e.sourceSpan,s);this._pushContainer(o,!1)}_consumeBlockClose(e){this._popContainer(null,pa,e.sourceSpan)||this.errors.push(zt.create(null,e.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "&#125;" HTML entity instead.'))}_consumeIncompleteBlock(e){let n=[];for(;this._peek.type===Q.BLOCK_PARAMETER;){let a=this._advance();n.push(new kx(a.parts[0],a.sourceSpan))}let r=this._peek.sourceSpan.fullStart,i=new _e(e.sourceSpan.start,r,e.sourceSpan.fullStart),s=new _e(e.sourceSpan.start,r,e.sourceSpan.fullStart),o=new pa(e.parts[0],n,[],i,e.sourceSpan,s);this._pushContainer(o,!1),this._popContainer(null,pa,null),this.errors.push(zt.create(e.parts[0],i,`Incomplete block "${e.parts[0]}". If you meant to write the @ character, you should use the "&#64;" HTML entity instead.`))}_consumeLet(e){let n=e.parts[0],r,i;if(this._peek.type!==Q.LET_VALUE){this.errors.push(zt.create(e.parts[0],e.sourceSpan,`Invalid @let declaration "${n}". Declaration must have a value.`));return}else r=this._advance();if(this._peek.type!==Q.LET_END){this.errors.push(zt.create(e.parts[0],e.sourceSpan,`Unterminated @let declaration "${n}". Declaration must be terminated with a semicolon.`));return}else i=this._advance();let s=i.sourceSpan.fullStart,o=new _e(e.sourceSpan.start,s,e.sourceSpan.fullStart),a=e.sourceSpan.toString().lastIndexOf(n),l=new _e(e.sourceSpan.start.moveBy(a),e.sourceSpan.end),c=new _x(n,r.parts[0],o,l,r.sourceSpan);this._addToParent(c)}_consumeIncompleteLet(e){let n=e.parts[0]??"",r=n?` "${n}"`:"";if(n.length>0){let i=e.sourceSpan.toString().lastIndexOf(n),s=new _e(e.sourceSpan.start.moveBy(i),e.sourceSpan.end),o=new _e(e.sourceSpan.start,e.sourceSpan.start.moveBy(0)),a=new _x(n,"",e.sourceSpan,s,o);this._addToParent(a)}this.errors.push(zt.create(e.parts[0],e.sourceSpan,`Incomplete @let declaration${r}. @let declarations must be written as \`@let <name> = <value>;\``))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestElementLikeParent(){for(let e=this._containerStack.length-1;e>-1;e--){let n=this._containerStack[e];if(n instanceof ho||n instanceof hs)return n}return null}_addToParent(e){let n=this._getContainer();n===null?this.rootNodes.push(e):n.children.push(e)}_getElementFullName(e,n){return xc(this._getPrefix(e,n),e.parts[1])}_getComponentFullName(e,n){let r=e.parts[0],i=this._getComponentTagName(e,n);return i===null?r:i.startsWith(":")?r+i:`${r}:${i}`}_getComponentTagName(e,n){let r=this._getPrefix(e,n),i=e.parts[2];return!r&&!i?null:!r&&i?i:xc(r,i||"ng-component")}_getPrefix(e,n){var r;let i,s;if(e.type===Q.COMPONENT_OPEN_START||e.type===Q.INCOMPLETE_COMPONENT_OPEN||e.type===Q.COMPONENT_CLOSE?(i=e.parts[1],s=e.parts[2]):(i=e.parts[0],s=e.parts[1]),i=i||((r=this._getTagDefinition(s))===null||r===void 0?void 0:r.implicitNamespacePrefix)||"",!i&&n){let o=n instanceof ho?n.name:n.tagName;if(o!==null){let a=ym(o)[1],l=this._getTagDefinition(a);l!==null&&!l.preventNamespaceInheritance&&(i=Ld(o))}}return i}};function Nx(t,e){return t.length>0&&t[t.length-1]===e}function Rx(t,e){return vu[e]!==void 0?vu[e]||t:/^#x[a-f0-9]+$/i.test(e)?String.fromCodePoint(parseInt(e.slice(2),16)):/^#\d+$/.test(e)?String.fromCodePoint(parseInt(e.slice(1),10)):t}var P1=class extends D1{constructor(){super(Ob)}parse(t,e,n,r=!1,i){return super.parse(t,e,n,r,i)}},cO=null,N1=()=>(cO||(cO=new P1),cO);function Tb(t,e={}){let{canSelfClose:n=!1,allowHtmComponentClosingTags:r=!1,isTagNameCaseSensitive:i=!1,getTagContentType:s,tokenizeAngularBlocks:o=!1,tokenizeAngularLetDeclaration:a=!1,enableAngularSelectorlessSyntax:l=!1}=e;return N1().parse(t,"angular-html-parser",{tokenizeExpansionForms:o,canSelfClose:n,allowHtmComponentClosingTags:r,tokenizeBlocks:o,tokenizeLet:a,selectorlessEnabled:l},i,s)}var R1=[I1,L1,$1,B1,j1,U1,z1,V1,H1,F1];function M1(t,e){for(let n of R1)n(t,e);return t}function I1(t){t.walk(e=>{if(e.kind==="element"&&e.tagDefinition.ignoreFirstLf&&e.children.length>0&&e.children[0].kind==="text"&&e.children[0].value[0]===`
`){let n=e.children[0];n.value.length===1?e.removeChild(n):n.value=n.value.slice(1)}})}function L1(t){let e=n=>{var r,i;return n.kind==="element"&&((r=n.prev)==null?void 0:r.kind)==="ieConditionalStartComment"&&n.prev.sourceSpan.end.offset===n.startSourceSpan.start.offset&&((i=n.firstChild)==null?void 0:i.kind)==="ieConditionalEndComment"&&n.firstChild.sourceSpan.start.offset===n.startSourceSpan.end.offset};t.walk(n=>{if(n.children)for(let r=0;r<n.children.length;r++){let i=n.children[r];if(!e(i))continue;let s=i.prev,o=i.firstChild;n.removeChild(s),r--;let a=new _e(s.sourceSpan.start,o.sourceSpan.end),l=new _e(a.start,i.sourceSpan.end);i.condition=s.condition,i.sourceSpan=l,i.startSourceSpan=a,i.removeChild(o)}})}function Q1(t,e,n){t.walk(r=>{if(r.children)for(let i=0;i<r.children.length;i++){let s=r.children[i];if(s.kind!=="text"&&!e(s))continue;s.kind!=="text"&&(s.kind="text",s.value=n(s));let o=s.prev;!o||o.kind!=="text"||(o.value+=s.value,o.sourceSpan=new _e(o.sourceSpan.start,s.sourceSpan.end),r.removeChild(s),i--)}})}function $1(t){return Q1(t,e=>e.kind==="cdata",e=>`<![CDATA[${e.value}]]>`)}function F1(t){let e=n=>{var r,i;return n.kind==="element"&&n.attrs.length===0&&n.children.length===1&&n.firstChild.kind==="text"&&!Or.hasWhitespaceCharacter(n.children[0].value)&&!n.firstChild.hasLeadingSpaces&&!n.firstChild.hasTrailingSpaces&&n.isLeadingSpaceSensitive&&!n.hasLeadingSpaces&&n.isTrailingSpaceSensitive&&!n.hasTrailingSpaces&&((r=n.prev)==null?void 0:r.kind)==="text"&&((i=n.next)==null?void 0:i.kind)==="text"};t.walk(n=>{if(n.children)for(let r=0;r<n.children.length;r++){let i=n.children[r];if(!e(i))continue;let s=i.prev,o=i.next;s.value+=`<${i.rawName}>`+i.firstChild.value+`</${i.rawName}>`+o.value,s.sourceSpan=new _e(s.sourceSpan.start,o.sourceSpan.end),s.isTrailingSpaceSensitive=o.isTrailingSpaceSensitive,s.hasTrailingSpaces=o.hasTrailingSpaces,n.removeChild(i),r--,n.removeChild(o)}})}function B1(t,e){if(e.parser==="html")return;let n=/\{\{(.+?)\}\}/su;t.walk(r=>{if(cK(r,e))for(let i of r.children){if(i.kind!=="text")continue;let s=i.sourceSpan.start,o=null,a=i.value.split(n);for(let l=0;l<a.length;l++,s=o){let c=a[l];if(l%2===0){o=s.moveBy(c.length),c.length>0&&r.insertChildBefore(i,{kind:"text",value:c,sourceSpan:new _e(s,o)});continue}o=s.moveBy(c.length+4),r.insertChildBefore(i,{kind:"interpolation",sourceSpan:new _e(s,o),children:c.length===0?[]:[{kind:"text",value:c,sourceSpan:new _e(s.moveBy(2),o.moveBy(-2))}]})}r.removeChild(i)}})}function j1(t,e){t.walk(n=>{let r=n.$children;if(!r)return;if(r.length===0||r.length===1&&r[0].kind==="text"&&Or.trim(r[0].value).length===0){n.hasDanglingSpaces=r.length>0,n.$children=[];return}let i=uK(n,e),s=i2(n);if(!i)for(let o=0;o<r.length;o++){let a=r[o];if(a.kind!=="text")continue;let{leadingWhitespace:l,text:c,trailingWhitespace:u}=aK(a.value),h=a.prev,d=a.next;c?(a.value=c,a.sourceSpan=new _e(a.sourceSpan.start.moveBy(l.length),a.sourceSpan.end.moveBy(-u.length)),l&&(h&&(h.hasTrailingSpaces=!0),a.hasLeadingSpaces=!0),u&&(a.hasTrailingSpaces=!0,d&&(d.hasLeadingSpaces=!0))):(n.removeChild(a),o--,(l||u)&&(h&&(h.hasTrailingSpaces=!0),d&&(d.hasLeadingSpaces=!0)))}n.isWhitespaceSensitive=i,n.isIndentationSensitive=s})}function z1(t){t.walk(e=>{e.isSelfClosing=!e.children||e.kind==="element"&&(e.tagDefinition.isVoid||e.endSourceSpan&&e.startSourceSpan.start===e.endSourceSpan.start&&e.startSourceSpan.end===e.endSourceSpan.end)})}function V1(t,e){t.walk(n=>{n.kind==="element"&&(n.hasHtmComponentClosingTag=n.endSourceSpan&&/^<\s*\/\s*\/\s*>$/u.test(e.originalText.slice(n.endSourceSpan.start.offset,n.endSourceSpan.end.offset)))})}function U1(t,e){t.walk(n=>{n.cssDisplay=_K(n,e)})}function H1(t,e){t.walk(n=>{let{children:r}=n;if(r){if(r.length===0){n.isDanglingSpaceSensitive=pK(n,e);return}for(let i of r)i.isLeadingSpaceSensitive=hK(i,e),i.isTrailingSpaceSensitive=dK(i,e);for(let i=0;i<r.length;i++){let s=r[i];s.isLeadingSpaceSensitive=(i===0||s.prev.isTrailingSpaceSensitive)&&s.isLeadingSpaceSensitive,s.isTrailingSpaceSensitive=(i===r.length-1||s.next.isLeadingSpaceSensitive)&&s.isTrailingSpaceSensitive}}})}var X1=M1;function q1(t,e,n){let{node:r}=t;switch(r.kind){case"root":return e.__onHtmlRoot&&e.__onHtmlRoot(r),[$t(cT(t,e,n)),Ot];case"element":case"ieConditionalComment":return HJ(t,e,n);case"angularControlFlowBlock":return BJ(t,e,n);case"angularControlFlowBlockParameters":return zJ(t,e,n);case"angularControlFlowBlockParameter":return Or.trim(r.expression);case"angularLetDeclaration":return $t(["@let ",$t([r.id," =",$t(mi([kt,n("init")]))]),";"]);case"angularLetDeclarationInitializer":return r.value;case"angularIcuExpression":return VJ(t,e,n);case"angularIcuCase":return UJ(t,e,n);case"ieConditionalStartComment":case"ieConditionalEndComment":return[kc(r),wc(r)];case"interpolation":return[kc(r,e),...t.map(n,"children"),wc(r,e)];case"text":{if(r.parent.kind==="interpolation"){let a=/\n[^\S\n]*$/u,l=a.test(r.value),c=l?r.value.replace(a,""):r.value;return[ai(c),l?Ot:""]}let i=Xo(r,e),s=p2(r),o=Uo(r,e);return s[0]=[i,s[0]],s.push([s.pop(),o]),YL(s)}case"docType":return[$t([kc(r,e)," ",kn(0,r.value.replace(/^html\b/iu,"html"),/\s+/gu," ")]),wc(r,e)];case"comment":return[Xo(r,e),ai(e.originalText.slice(Ku(r),mm(r))),Uo(r,e)];case"attribute":{if(r.value===null)return r.rawName;let i=d2(r.value),s=x9(i,'"');return[r.rawName,"=",s,ai(s==='"'?kn(0,i,'"',"&quot;"):kn(0,i,"'","&apos;")),s]}case"frontMatter":case"cdata":default:throw new M9(r,"HTML")}}var Z1={features:{experimental_frontMatterSupport:{massageAstNode:!0,embed:!0,print:!0}},preprocess:X1,print:q1,insertPragma:$J,massageAstNode:Q9,embed:wJ,getVisitorKeys:NJ},W1=Z1,G1=[{name:"Angular",type:"markup",aceMode:"html",extensions:[".component.html"],tmScope:"text.html.basic",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["angular"],vscodeLanguageIds:["html"],filenames:[],linguistLanguageId:146},{name:"HTML",type:"markup",aceMode:"html",extensions:[".html",".hta",".htm",".html.hl",".inc",".xht",".xhtml"],tmScope:"text.html.basic",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["html"],vscodeLanguageIds:["html"],linguistLanguageId:146},{name:"Lightning Web Components",type:"markup",aceMode:"html",extensions:[],tmScope:"text.html.basic",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["lwc"],vscodeLanguageIds:["html"],filenames:[],linguistLanguageId:146},{name:"MJML",type:"markup",aceMode:"html",extensions:[".mjml"],tmScope:"text.mjml.basic",aliases:["MJML","mjml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["mjml"],filenames:[],vscodeLanguageIds:["mjml"],linguistLanguageId:146},{name:"Vue",type:"markup",aceMode:"vue",extensions:[".vue"],tmScope:"source.vue",codemirrorMode:"vue",codemirrorMimeType:"text/x-vue",parsers:["vue"],vscodeLanguageIds:["vue"],linguistLanguageId:391}],Mx={bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},Ix="HTML",Y1={bracketSameLine:Mx.bracketSameLine,htmlWhitespaceSensitivity:{category:Ix,type:"choice",default:"css",description:"How to handle whitespaces in HTML.",choices:[{value:"css",description:"Respect the default value of CSS display property."},{value:"strict",description:"Whitespaces are considered sensitive."},{value:"ignore",description:"Whitespaces are considered insensitive."}]},singleAttributePerLine:Mx.singleAttributePerLine,vueIndentScriptAndStyle:{category:Ix,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},K1=Y1,D2={};FL(D2,{angular:()=>_ee,html:()=>See,lwc:()=>Cee,mjml:()=>kee,vue:()=>xee});function J1(t,e){let n=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(n,e)}var eee=J1,tee={canSelfClose:!0,normalizeTagName:!1,normalizeAttributeName:!1,allowHtmComponentClosingTags:!1,isTagNameCaseSensitive:!1,shouldParseFrontMatter:!0};function A2(t){return{...tee,...t}}function P2(t){let{canSelfClose:e,allowHtmComponentClosingTags:n,isTagNameCaseSensitive:r,shouldParseAsRawText:i,tokenizeAngularBlocks:s,tokenizeAngularLetDeclaration:o}=t;return{canSelfClose:e,allowHtmComponentClosingTags:n,isTagNameCaseSensitive:r,getTagContentType:i?(...a)=>i(...a)?Mi.RAW_TEXT:void 0:void 0,tokenizeAngularBlocks:s,tokenizeAngularLetDeclaration:o}}var uO=new Map([["*",new Set(["accesskey","autocapitalize","autocorrect","autofocus","class","contenteditable","dir","draggable","enterkeyhint","exportparts","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","part","popover","slot","spellcheck","style","tabindex","title","translate","writingsuggestions"])],["a",new Set(["charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","target","type"])],["applet",new Set(["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"])],["area",new Set(["alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","target","type"])],["audio",new Set(["autoplay","controls","crossorigin","loop","muted","preload","src"])],["base",new Set(["href","target"])],["basefont",new Set(["color","face","size"])],["blockquote",new Set(["cite"])],["body",new Set(["alink","background","bgcolor","link","text","vlink"])],["br",new Set(["clear"])],["button",new Set(["command","commandfor","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"])],["canvas",new Set(["height","width"])],["caption",new Set(["align"])],["col",new Set(["align","char","charoff","span","valign","width"])],["colgroup",new Set(["align","char","charoff","span","valign","width"])],["data",new Set(["value"])],["del",new Set(["cite","datetime"])],["details",new Set(["name","open"])],["dialog",new Set(["closedby","open"])],["dir",new Set(["compact"])],["div",new Set(["align"])],["dl",new Set(["compact"])],["embed",new Set(["height","src","type","width"])],["fieldset",new Set(["disabled","form","name"])],["font",new Set(["color","face","size"])],["form",new Set(["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"])],["frame",new Set(["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"])],["frameset",new Set(["cols","rows"])],["h1",new Set(["align"])],["h2",new Set(["align"])],["h3",new Set(["align"])],["h4",new Set(["align"])],["h5",new Set(["align"])],["h6",new Set(["align"])],["head",new Set(["profile"])],["hr",new Set(["align","noshade","size","width"])],["html",new Set(["manifest","version"])],["iframe",new Set(["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","loading","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"])],["img",new Set(["align","alt","border","crossorigin","decoding","fetchpriority","height","hspace","ismap","loading","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"])],["input",new Set(["accept","align","alpha","alt","autocomplete","checked","colorspace","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","popovertarget","popovertargetaction","readonly","required","size","src","step","type","usemap","value","width"])],["ins",new Set(["cite","datetime"])],["isindex",new Set(["prompt"])],["label",new Set(["for","form"])],["legend",new Set(["align"])],["li",new Set(["type","value"])],["link",new Set(["as","blocking","charset","color","crossorigin","disabled","fetchpriority","href","hreflang","imagesizes","imagesrcset","integrity","media","referrerpolicy","rel","rev","sizes","target","type"])],["map",new Set(["name"])],["menu",new Set(["compact"])],["meta",new Set(["charset","content","http-equiv","media","name","scheme"])],["meter",new Set(["high","low","max","min","optimum","value"])],["object",new Set(["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","type","typemustmatch","usemap","vspace","width"])],["ol",new Set(["compact","reversed","start","type"])],["optgroup",new Set(["disabled","label"])],["option",new Set(["disabled","label","selected","value"])],["output",new Set(["for","form","name"])],["p",new Set(["align"])],["param",new Set(["name","type","value","valuetype"])],["pre",new Set(["width"])],["progress",new Set(["max","value"])],["q",new Set(["cite"])],["script",new Set(["async","blocking","charset","crossorigin","defer","fetchpriority","integrity","language","nomodule","referrerpolicy","src","type"])],["select",new Set(["autocomplete","disabled","form","multiple","name","required","size"])],["slot",new Set(["name"])],["source",new Set(["height","media","sizes","src","srcset","type","width"])],["style",new Set(["blocking","media","type"])],["table",new Set(["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"])],["tbody",new Set(["align","char","charoff","valign"])],["td",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["template",new Set(["shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootmode","shadowrootserializable"])],["textarea",new Set(["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","wrap"])],["tfoot",new Set(["align","char","charoff","valign"])],["th",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["thead",new Set(["align","char","charoff","valign"])],["time",new Set(["datetime"])],["tr",new Set(["align","bgcolor","char","charoff","valign"])],["track",new Set(["default","kind","label","src","srclang"])],["ul",new Set(["compact","type"])],["video",new Set(["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"])]]),nee=new Set(["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","em","embed","fencedframe","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","search","section","select","selectedcontent","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]),Kh={attrs:!0,children:!0,cases:!0,expression:!0},Lx=new Set(["parent"]),va,Sb,wb,ree=class cc{constructor(e={}){a9(this,va),lx(this,"kind"),lx(this,"parent");for(let n of new Set([...Lx,...Object.keys(e)]))this.setProperty(n,e[n]);if(dm(e))for(let n of Object.getOwnPropertySymbols(e))this.setProperty(n,e[n])}setProperty(e,n){if(this[e]!==n){if(e in Kh&&(n=n.map(r=>this.createChild(r))),!Lx.has(e)){this[e]=n;return}Object.defineProperty(this,e,{value:n,enumerable:!1,configurable:!0})}}map(e){let n;for(let r in Kh){let i=this[r];if(i){let s=see(i,o=>o.map(e));n!==i&&(n||(n=new cc({parent:this.parent})),n.setProperty(r,s))}}if(n)for(let r in this)r in Kh||(n[r]=this[r]);return e(n||this)}walk(e){for(let n in Kh){let r=this[n];if(r)for(let i=0;i<r.length;i++)r[i].walk(e)}e(this)}createChild(e){let n=e instanceof cc?e.clone():new cc(e);return n.setProperty("parent",this),n}insertChildBefore(e,n){let r=this.$children;r.splice(r.indexOf(e),0,this.createChild(n))}removeChild(e){let n=this.$children;n.splice(n.indexOf(e),1)}replaceChild(e,n){let r=this.$children;r[r.indexOf(e)]=this.createChild(n)}clone(){return new cc(this)}get $children(){return this[qh(this,va,Sb)]}set $children(e){this[qh(this,va,Sb)]=e}get firstChild(){var e;return(e=this.$children)==null?void 0:e[0]}get lastChild(){return bl(1,this.$children,-1)}get prev(){let e=qh(this,va,wb);return e[e.indexOf(this)-1]}get next(){let e=qh(this,va,wb);return e[e.indexOf(this)+1]}get rawName(){return this.hasExplicitNamespace?this.fullName:this.name}get fullName(){return this.namespace?this.namespace+":"+this.name:this.name}get attrMap(){return Object.fromEntries(this.attrs.map(e=>[e.fullName,e.value]))}};va=new WeakSet,Sb=function(){return this.kind==="angularIcuCase"?"expression":this.kind==="angularIcuExpression"?"cases":"children"},wb=function(){var t;return((t=this.parent)==null?void 0:t.$children)??[]};var iee=ree;function see(t,e){let n=t.map(e);return n.some((r,i)=>r!==t[i])?n:t}var oee=[{regex:/^(?<openingTagSuffix>\[if(?<condition>[^\]]*)\]>)(?<data>.*?)<!\s*\[endif\]$/su,parse:lee},{regex:/^\[if(?<condition>[^\]]*)\]><!$/u,parse:cee},{regex:/^<!\s*\[endif\]$/u,parse:uee}];function aee(t,e){if(t.value)for(let{regex:n,parse:r}of oee){let i=t.value.match(n);if(i)return r(t,i,e)}return null}function lee(t,e,n){let{openingTagSuffix:r,condition:i,data:s}=e.groups,o=4+r.length,a=t.sourceSpan.start.moveBy(o),l=a.moveBy(s.length),[c,u]=(()=>{try{return[!0,n(s,a).children]}catch{return[!1,[{kind:"text",value:s,sourceSpan:new _e(a,l)}]]}})();return{kind:"ieConditionalComment",complete:c,children:u,condition:kn(0,i.trim(),/\s+/gu," "),sourceSpan:t.sourceSpan,startSourceSpan:new _e(t.sourceSpan.start,a),endSourceSpan:new _e(l,t.sourceSpan.end)}}function cee(t,e){let{condition:n}=e.groups;return{kind:"ieConditionalStartComment",condition:kn(0,n.trim(),/\s+/gu," "),sourceSpan:t.sourceSpan}}function uee(t){return{kind:"ieConditionalEndComment",sourceSpan:t.sourceSpan}}var hee=class extends d1{visitExpansionCase(t,e){e.parseOptions.name==="angular"&&this.visitChildren(e,n=>{n(t.expression)})}visit(t,{parseOptions:e}){gee(t),Oee(t,e),bee(t,e),yee(t)}};function dee(t,e,n,r){k2(new hee,t.children,{parseOptions:n}),e&&t.children.unshift(e);let i=new iee(t);return i.walk(s=>{if(s.kind==="comment"){let o=aee(s,r);o&&s.parent.replaceChild(s,o)}pee(s),fee(s),mee(s)}),i}function pee(t){if(t.kind==="block"){if(t.name=kn(0,t.name.toLowerCase(),/\s+/gu," ").trim(),t.kind="angularControlFlowBlock",!nT(t.parameters)){delete t.parameters;return}for(let e of t.parameters)e.kind="angularControlFlowBlockParameter";t.parameters={kind:"angularControlFlowBlockParameters",children:t.parameters,sourceSpan:new _e(t.parameters[0].sourceSpan.start,bl(0,t.parameters,-1).sourceSpan.end)}}}function fee(t){t.kind==="letDeclaration"&&(t.kind="angularLetDeclaration",t.id=t.name,t.init={kind:"angularLetDeclarationInitializer",sourceSpan:new _e(t.valueSpan.start,t.valueSpan.end),value:t.value},delete t.name,delete t.value)}function mee(t){t.kind==="expansion"&&(t.kind="angularIcuExpression"),t.kind==="expansionCase"&&(t.kind="angularIcuCase")}function Qx(t,e){let n=t.toLowerCase();return e(n)?n:t}function $x(t){let e=t.name.startsWith(":")?t.name.slice(1).split(":")[0]:null,n=t.nameSpan.toString(),r=e!==null&&n.startsWith(`${e}:`),i=r?n.slice(e.length+1):n;t.name=i,t.namespace=e,t.hasExplicitNamespace=r}function gee(t){switch(t.kind){case"element":$x(t);for(let e of t.attrs)$x(e),e.valueSpan?(e.value=e.valueSpan.toString(),/["']/u.test(e.value[0])&&(e.value=e.value.slice(1,-1))):e.value=null;break;case"comment":t.value=t.sourceSpan.toString().slice(4,-3);break;case"text":t.value=t.sourceSpan.toString();break}}function Oee(t,e){if(t.kind==="element"){let n=Ob(e.isTagNameCaseSensitive?t.name:t.name.toLowerCase());!t.namespace||t.namespace===n.implicitNamespacePrefix||Gu(t)?t.tagDefinition=n:t.tagDefinition=Ob("")}}function yee(t){t.sourceSpan&&t.endSourceSpan&&(t.sourceSpan=new _e(t.sourceSpan.start,t.endSourceSpan.end))}function bee(t,e){if(t.kind==="element"&&(e.normalizeTagName&&(!t.namespace||t.namespace===t.tagDefinition.implicitNamespacePrefix||Gu(t))&&(t.name=Qx(t.name,n=>nee.has(n))),e.normalizeAttributeName))for(let n of t.attrs)n.namespace||(n.name=Qx(n.name,r=>uO.has(t.name)&&(uO.get("*").has(r)||uO.get(t.name).has(r))))}function N2(t,e){let{rootNodes:n,errors:r}=Tb(t,P2(e));return r.length>0&&kb(r[0]),{parseOptions:e,rootNodes:n}}function Eee(t,e){let n=P2(e),{rootNodes:r,errors:i}=Tb(t,n);if(r.some(l=>l.kind==="docType"&&l.value==="html"||l.kind==="element"&&l.name.toLowerCase()==="html"))return N2(t,hT);let s,o=()=>s??(s=Tb(t,{...n,getTagContentType:void 0})),a=l=>{let{offset:c}=l.startSourceSpan.start;return o().rootNodes.find(u=>u.kind==="element"&&u.startSourceSpan.start.offset===c)??l};for(let[l,c]of r.entries())if(c.kind==="element"){if(c.isVoid)i=o().errors,r[l]=a(c);else if(vee(c)){let{endSourceSpan:u,startSourceSpan:h}=c,d=o().errors.find(p=>p.span.start.offset>h.start.offset&&p.span.start.offset<u.end.offset);d&&kb(d),r[l]=a(c)}}return i.length>0&&kb(i[0]),{parseOptions:e,rootNodes:r}}function vee(t){var n;if(t.kind!=="element"||t.name!=="template")return!1;let e=(n=t.attrs.find(r=>r.name==="lang"))==null?void 0:n.value;return!e||e==="html"}function kb(t){let{msg:e,span:{start:n,end:r}}=t;throw eee(e,{loc:{start:{line:n.line+1,column:n.col+1},end:{line:r.line+1,column:r.col+1}},cause:t})}function Tee(t,e,n,r,i,s){let{offset:o}=r,a=kn(0,e.slice(0,o),/[^\n]/gu," ")+n,l=R2(a,t,{...i,shouldParseFrontMatter:!1},s);l.sourceSpan=new _e(r,bl(0,l.children,-1).sourceSpan.end);let c=l.children[0];return c.length===o?l.children.shift():(c.sourceSpan=new _e(c.sourceSpan.start.moveBy(o),c.sourceSpan.end),c.value=c.value.slice(o)),l}function R2(t,e,n,r={}){let{frontMatter:i,content:s}=n.shouldParseFrontMatter?nK(t):{content:t},o=new w2(t,r.filepath),a=new yb(o,0,0,0),l=a.moveBy(t.length),{parseOptions:c,rootNodes:u}=e(s,n),h={kind:"root",sourceSpan:new _e(a,l),children:u},d;if(i){let[p,f]=[i.start,i.end].map(m=>new yb(o,m.index,m.line-1,m.column));d={...i,kind:"frontMatter",sourceSpan:new _e(p,f)}}return dee(h,d,c,(p,f)=>Tee(e,t,p,f,c,r))}var hT=A2({name:"html",normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0});function th(t){let e=A2(t),n=e.name==="vue"?Eee:N2;return{parse:(r,i)=>R2(r,n,e,i),hasPragma:LJ,hasIgnorePragma:QJ,astFormat:"html",locStart:Ku,locEnd:mm}}var See=th(hT),wee=new Set(["mj-style","mj-raw"]),kee=th({...hT,name:"mjml",shouldParseAsRawText:t=>wee.has(t)}),_ee=th({name:"angular",tokenizeAngularBlocks:!0,tokenizeAngularLetDeclaration:!0}),xee=th({name:"vue",isTagNameCaseSensitive:!0,shouldParseAsRawText(t,e,n,r){return t.toLowerCase()!=="html"&&!n&&(t!=="template"||r.some(({name:i,value:s})=>i==="lang"&&s!=="html"&&s!==""&&s!==void 0))}}),Cee=th({name:"lwc",canSelfClose:!1}),Dee={html:W1},Aee=Object.create,dT=Object.defineProperty,Pee=Object.getOwnPropertyDescriptor,Nee=Object.getOwnPropertyNames,Ree=Object.getPrototypeOf,Mee=Object.prototype.hasOwnProperty,Iee=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),pT=(t,e)=>{for(var n in e)dT(t,n,{get:e[n],enumerable:!0})},Lee=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Nee(e))!Mee.call(t,i)&&i!==n&&dT(t,i,{get:()=>e[i],enumerable:!(r=Pee(e,i))||r.enumerable});return t},Qee=(t,e,n)=>(n=t!=null?Aee(Ree(t)):{},Lee(dT(n,"default",{value:t,enumerable:!0}),t)),$ee=Iee((t,e)=>{var n,r,i,s,o,a,l,c,u,h,d,p,f,m,g,y,b,T,S;f=/\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]|[^\/\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu,p=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,n=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu,g=/(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y,d=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,y=/[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y,S=/[\t\v\f\ufeff\p{Zs}]+/yu,c=/\r?\n|[\r\u2028\u2029]/y,u=/\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y,m=/\/\/.*/y,i=/[<>.:={}]|\/(?![\/*])/y,r=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu,s=/(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y,o=/[^<>{}]+/y,T=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,b=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,a=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,l=/^(?:return|throw|yield)$/,h=RegExp(c.source),e.exports=function*(w,{jsx:A=!1}={}){var C,N,$,I,L,Z,B,j,U,J,fe,z,ne,Oe;for({length:Z}=w,I=0,L="",Oe=[{tag:"JS"}],C=[],fe=0,z=!1;I<Z;){switch(j=Oe[Oe.length-1],j.tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":if(w[I]==="/"&&(T.test(L)||a.test(L))&&(f.lastIndex=I,B=f.exec(w))){I=f.lastIndex,L=B[0],z=!0,yield{type:"RegularExpressionLiteral",value:B[0],closed:B[1]!==void 0&&B[1]!=="\\"};continue}if(p.lastIndex=I,B=p.exec(w)){switch(ne=B[0],U=p.lastIndex,J=ne,ne){case"(":L==="?NonExpressionParenKeyword"&&Oe.push({tag:"JSNonExpressionParen",nesting:fe}),fe++,z=!1;break;case")":fe--,z=!0,j.tag==="JSNonExpressionParen"&&fe===j.nesting&&(Oe.pop(),J="?NonExpressionParenEnd",z=!1);break;case"{":p.lastIndex=0,$=!b.test(L)&&(T.test(L)||a.test(L)),C.push($),z=!1;break;case"}":switch(j.tag){case"InterpolationInTemplate":if(C.length===j.nesting){y.lastIndex=I,B=y.exec(w),I=y.lastIndex,L=B[0],B[1]==="${"?(L="?InterpolationInTemplate",z=!1,yield{type:"TemplateMiddle",value:B[0]}):(Oe.pop(),z=!0,yield{type:"TemplateTail",value:B[0],closed:B[1]==="`"});continue}break;case"InterpolationInJSX":if(C.length===j.nesting){Oe.pop(),I+=1,L="}",yield{type:"JSXPunctuator",value:"}"};continue}}z=C.pop(),J=z?"?ExpressionBraceEnd":"}";break;case"]":z=!0;break;case"++":case"--":J=z?"?PostfixIncDec":"?UnaryIncDec";break;case"<":if(A&&(T.test(L)||a.test(L))){Oe.push({tag:"JSXTag"}),I+=1,L="<",yield{type:"JSXPunctuator",value:ne};continue}z=!1;break;default:z=!1}I=U,L=J,yield{type:"Punctuator",value:ne};continue}if(n.lastIndex=I,B=n.exec(w)){switch(I=n.lastIndex,J=B[0],B[0]){case"for":case"if":case"while":case"with":L!=="."&&L!=="?."&&(J="?NonExpressionParenKeyword")}L=J,z=!a.test(B[0]),yield{type:B[1]==="#"?"PrivateIdentifier":"IdentifierName",value:B[0]};continue}if(g.lastIndex=I,B=g.exec(w)){I=g.lastIndex,L=B[0],z=!0,yield{type:"StringLiteral",value:B[0],closed:B[2]!==void 0};continue}if(d.lastIndex=I,B=d.exec(w)){I=d.lastIndex,L=B[0],z=!0,yield{type:"NumericLiteral",value:B[0]};continue}if(y.lastIndex=I,B=y.exec(w)){I=y.lastIndex,L=B[0],B[1]==="${"?(L="?InterpolationInTemplate",Oe.push({tag:"InterpolationInTemplate",nesting:C.length}),z=!1,yield{type:"TemplateHead",value:B[0]}):(z=!0,yield{type:"NoSubstitutionTemplate",value:B[0],closed:B[1]==="`"});continue}break;case"JSXTag":case"JSXTagEnd":if(i.lastIndex=I,B=i.exec(w)){switch(I=i.lastIndex,J=B[0],B[0]){case"<":Oe.push({tag:"JSXTag"});break;case">":Oe.pop(),L==="/"||j.tag==="JSXTagEnd"?(J="?JSX",z=!0):Oe.push({tag:"JSXChildren"});break;case"{":Oe.push({tag:"InterpolationInJSX",nesting:C.length}),J="?InterpolationInJSX",z=!1;break;case"/":L==="<"&&(Oe.pop(),Oe[Oe.length-1].tag==="JSXChildren"&&Oe.pop(),Oe.push({tag:"JSXTagEnd"}))}L=J,yield{type:"JSXPunctuator",value:B[0]};continue}if(r.lastIndex=I,B=r.exec(w)){I=r.lastIndex,L=B[0],yield{type:"JSXIdentifier",value:B[0]};continue}if(s.lastIndex=I,B=s.exec(w)){I=s.lastIndex,L=B[0],yield{type:"JSXString",value:B[0],closed:B[2]!==void 0};continue}break;case"JSXChildren":if(o.lastIndex=I,B=o.exec(w)){I=o.lastIndex,L=B[0],yield{type:"JSXText",value:B[0]};continue}switch(w[I]){case"<":Oe.push({tag:"JSXTag"}),I++,L="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":Oe.push({tag:"InterpolationInJSX",nesting:C.length}),I++,L="?InterpolationInJSX",z=!1,yield{type:"JSXPunctuator",value:"{"};continue}}if(S.lastIndex=I,B=S.exec(w)){I=S.lastIndex,yield{type:"WhiteSpace",value:B[0]};continue}if(c.lastIndex=I,B=c.exec(w)){I=c.lastIndex,z=!1,l.test(L)&&(L="?NoLineTerminatorHere"),yield{type:"LineTerminatorSequence",value:B[0]};continue}if(u.lastIndex=I,B=u.exec(w)){I=u.lastIndex,h.test(B[0])&&(z=!1,l.test(L)&&(L="?NoLineTerminatorHere")),yield{type:"MultiLineComment",value:B[0],closed:B[1]!==void 0};continue}if(m.lastIndex=I,B=m.exec(w)){I=m.lastIndex,z=!1,yield{type:"SingleLineComment",value:B[0]};continue}N=String.fromCodePoint(w.codePointAt(I)),I+=N.length,L=N,z=!1,yield{type:j.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:N}}}}),M2={};pT(M2,{__debug:()=>bie,check:()=>Oie,doc:()=>xQ,format:()=>AQ,formatWithCursor:()=>DQ,getSupportInfo:()=>yie,util:()=>CQ,version:()=>Xre});var nh=(t,e)=>(n,r,...i)=>n|1&&r==null?void 0:(e.call(r)??r[t]).apply(r,i),Fee=String.prototype.replaceAll??function(t,e){return t.global?this.replace(t,e):this.split(t).join(e)},Bee=nh("replaceAll",function(){if(typeof this=="string")return Fee}),Em=Bee,jee=class{diff(t,e,n={}){let r;typeof n=="function"?(r=n,n={}):"callback"in n&&(r=n.callback);let i=this.castInput(t,n),s=this.castInput(e,n),o=this.removeEmpty(this.tokenize(i,n)),a=this.removeEmpty(this.tokenize(s,n));return this.diffWithOptionsObj(o,a,n,r)}diffWithOptionsObj(t,e,n,r){var i;let s=y=>{if(y=this.postProcess(y,n),r){setTimeout(function(){r(y)},0);return}else return y},o=e.length,a=t.length,l=1,c=o+a;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let u=(i=n.timeout)!==null&&i!==void 0?i:1/0,h=Date.now()+u,d=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(d[0],e,t,0,n);if(d[0].oldPos+1>=a&&p+1>=o)return s(this.buildValues(d[0].lastComponent,e,t));let f=-1/0,m=1/0,g=()=>{for(let y=Math.max(f,-l);y<=Math.min(m,l);y+=2){let b,T=d[y-1],S=d[y+1];T&&(d[y-1]=void 0);let w=!1;if(S){let C=S.oldPos-y;w=S&&0<=C&&C<o}let A=T&&T.oldPos+1<a;if(!w&&!A){d[y]=void 0;continue}if(!A||w&&T.oldPos<S.oldPos?b=this.addToPath(S,!0,!1,0,n):b=this.addToPath(T,!1,!0,1,n),p=this.extractCommon(b,e,t,y,n),b.oldPos+1>=a&&p+1>=o)return s(this.buildValues(b.lastComponent,e,t))||!0;d[y]=b,b.oldPos+1>=a&&(m=Math.min(m,y-1)),p+1>=o&&(f=Math.max(f,y+1))}l++};if(r)(function y(){setTimeout(function(){if(l>c||Date.now()>h)return r(void 0);g()||y()},0)})();else for(;l<=c&&Date.now()<=h;){let y=g();if(y)return y}}addToPath(t,e,n,r,i){let s=t.lastComponent;return s&&!i.oneChangePerToken&&s.added===e&&s.removed===n?{oldPos:t.oldPos+r,lastComponent:{count:s.count+1,added:e,removed:n,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+r,lastComponent:{count:1,added:e,removed:n,previousComponent:s}}}extractCommon(t,e,n,r,i){let s=e.length,o=n.length,a=t.oldPos,l=a-r,c=0;for(;l+1<s&&a+1<o&&this.equals(n[a+1],e[l+1],i);)l++,a++,c++,i.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return c&&!i.oneChangePerToken&&(t.lastComponent={count:c,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=a,l}equals(t,e,n){return n.comparator?n.comparator(t,e):t===e||!!n.ignoreCase&&t.toLowerCase()===e.toLowerCase()}removeEmpty(t){let e=[];for(let n=0;n<t.length;n++)t[n]&&e.push(t[n]);return e}castInput(t,e){return t}tokenize(t,e){return Array.from(t)}join(t){return t.join("")}postProcess(t,e){return t}get useLongestToken(){return!1}buildValues(t,e,n){let r=[],i;for(;t;)r.push(t),i=t.previousComponent,delete t.previousComponent,t=i;r.reverse();let s=r.length,o=0,a=0,l=0;for(;o<s;o++){let c=r[o];if(c.removed)c.value=this.join(n.slice(l,l+c.count)),l+=c.count;else{if(!c.added&&this.useLongestToken){let u=e.slice(a,a+c.count);u=u.map(function(h,d){let p=n[l+d];return p.length>h.length?p:h}),c.value=this.join(u)}else c.value=this.join(e.slice(a,a+c.count));a+=c.count,c.added||(l+=c.count)}}return r}},zee=class extends jee{tokenize(t){return t.slice()}join(t){return t}removeEmpty(t){return t}},Vee=new zee;function Uee(t,e,n){return Vee.diff(t,e,n)}function Hee(t){let e=t.indexOf("\r");return e!==-1?t.charAt(e+1)===`
`?"crlf":"cr":"lf"}function fT(t){switch(t){case"cr":return"\r";case"crlf":return`\r
`;default:return`
`}}function I2(t,e){let n;switch(e){case`
`:n=/\n/gu;break;case"\r":n=/\r/gu;break;case`\r
`:n=/\r\n/gu;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(e)}.`)}let r=t.match(n);return r?r.length:0}function Xee(t){return Em(0,t,/\r\n?/gu,`
`)}function qee(t){return this[t<0?this.length+t:t]}var Zee=nh("at",function(){if(Array.isArray(this)||typeof this=="string")return qee}),Lt=Zee,Wee=()=>{},Gee=Wee,ta="string",Ji="array",no="cursor",ts="indent",ns="align",rs="trim",Qn="group",gi="fill",Gn="if-break",is="indent-if-break",ss="line-suffix",as="line-suffix-boundary",on="line",Oi="label",br="break-parent",L2=new Set([no,ts,ns,rs,Qn,gi,Gn,is,ss,as,on,Oi,br]);function Yee(t){let e=t.length;for(;e>0&&(t[e-1]==="\r"||t[e-1]===`
`);)e--;return e<t.length?t.slice(0,e):t}function Kee(t){if(typeof t=="string")return ta;if(Array.isArray(t))return Ji;if(!t)return;let{type:e}=t;if(L2.has(e))return e}var na=Kee,Jee=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function ete(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
Expected it to be 'string' or 'object'.`;if(na(t))throw new Error("doc is valid.");let n=Object.prototype.toString.call(t);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let r=Jee([...L2].map(i=>`'${i}'`));return`Unexpected doc.type '${t.type}'.
Expected it to be ${r}.`}var tte=class extends Error{constructor(e){super(ete(e));V(this,"name","InvalidDocError");this.doc=e}},cl=tte,Fx={};function nte(t,e,n,r){let i=[t];for(;i.length>0;){let s=i.pop();if(s===Fx){n(i.pop());continue}n&&i.push(s,Fx);let o=na(s);if(!o)throw new cl(s);if((e==null?void 0:e(s))!==!1)switch(o){case Ji:case gi:{let a=o===Ji?s:s.parts;for(let l=a.length,c=l-1;c>=0;--c)i.push(a[c]);break}case Gn:i.push(s.flatContents,s.breakContents);break;case Qn:if(r&&s.expandedStates)for(let a=s.expandedStates.length,l=a-1;l>=0;--l)i.push(s.expandedStates[l]);else i.push(s.contents);break;case ns:case ts:case is:case Oi:case ss:i.push(s.contents);break;case ta:case no:case rs:case as:case on:case br:break;default:throw new cl(s)}}}var mT=nte;function vm(t,e){if(typeof t=="string")return e(t);let n=new Map;return r(t);function r(s){if(n.has(s))return n.get(s);let o=i(s);return n.set(s,o),o}function i(s){switch(na(s)){case Ji:return e(s.map(r));case gi:return e({...s,parts:s.parts.map(r)});case Gn:return e({...s,breakContents:r(s.breakContents),flatContents:r(s.flatContents)});case Qn:{let{expandedStates:o,contents:a}=s;return o?(o=o.map(r),a=o[0]):a=r(a),e({...s,contents:a,expandedStates:o})}case ns:case ts:case is:case Oi:case ss:return e({...s,contents:r(s.contents)});case ta:case no:case rs:case as:case on:case br:return e(s);default:throw new cl(s)}}}function gT(t,e,n){let r=n,i=!1;function s(o){if(i)return!1;let a=e(o);a!==void 0&&(i=!0,r=a)}return mT(t,s),r}function rte(t){if(t.type===Qn&&t.break||t.type===on&&t.hard||t.type===br)return!0}function ite(t){return gT(t,rte,!1)}function Bx(t){if(t.length>0){let e=Lt(0,t,-1);!e.expandedStates&&!e.break&&(e.break="propagated")}return null}function ste(t){let e=new Set,n=[];function r(s){if(s.type===br&&Bx(n),s.type===Qn){if(n.push(s),e.has(s))return!1;e.add(s)}}function i(s){s.type===Qn&&n.pop().break&&Bx(n)}mT(t,r,i,!0)}function ote(t){return t.type===on&&!t.hard?t.soft?"":" ":t.type===Gn?t.flatContents:t}function ate(t){return vm(t,ote)}function jx(t){for(t=[...t];t.length>=2&&Lt(0,t,-2).type===on&&Lt(0,t,-1).type===br;)t.length-=2;if(t.length>0){let e=Cc(Lt(0,t,-1));t[t.length-1]=e}return t}function Cc(t){switch(na(t)){case ts:case is:case Qn:case ss:case Oi:{let e=Cc(t.contents);return{...t,contents:e}}case Gn:return{...t,breakContents:Cc(t.breakContents),flatContents:Cc(t.flatContents)};case gi:return{...t,parts:jx(t.parts)};case Ji:return jx(t);case ta:return Yee(t);case ns:case no:case rs:case as:case on:case br:break;default:throw new cl(t)}return t}function Q2(t){return Cc(cte(t))}function lte(t){switch(na(t)){case gi:if(t.parts.every(e=>e===""))return"";break;case Qn:if(!t.contents&&!t.id&&!t.break&&!t.expandedStates)return"";if(t.contents.type===Qn&&t.contents.id===t.id&&t.contents.break===t.break&&t.contents.expandedStates===t.expandedStates)return t.contents;break;case ns:case ts:case is:case ss:if(!t.contents)return"";break;case Gn:if(!t.flatContents&&!t.breakContents)return"";break;case Ji:{let e=[];for(let n of t){if(!n)continue;let[r,...i]=Array.isArray(n)?n:[n];typeof r=="string"&&typeof Lt(0,e,-1)=="string"?e[e.length-1]+=r:e.push(r),e.push(...i)}return e.length===0?"":e.length===1?e[0]:e}case ta:case no:case rs:case as:case on:case Oi:case br:break;default:throw new cl(t)}return t}function cte(t){return vm(t,e=>lte(e))}function ute(t,e=U2){return vm(t,n=>typeof n=="string"?j2(e,n.split(`
`)):n)}function hte(t){if(t.type===on)return!0}function dte(t){return gT(t,hte,!1)}function $d(t,e){return t.type===Oi?{...t,contents:e(t.contents)}:e(t)}var pte=Gee;function Pp(t){return{type:ts,contents:t}}function ul(t,e){return{type:ns,contents:e,n:t}}function fte(t){return ul(Number.NEGATIVE_INFINITY,t)}function $2(t){return ul({type:"root"},t)}function mte(t){return ul(-1,t)}function F2(t,e,n){let r=t;if(e>0){for(let i=0;i<Math.floor(e/n);++i)r=Pp(r);r=ul(e%n,r),r=ul(Number.NEGATIVE_INFINITY,r)}return r}var Tm={type:br},wo={type:no};function gte(t){return{type:gi,parts:t}}function B2(t,e={}){return pte(e.expandedStates),{type:Qn,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function Ote(t,e){return B2(t[0],{...e,expandedStates:t})}function yte(t,e="",n={}){return{type:Gn,breakContents:t,flatContents:e,groupId:n.groupId}}function bte(t,e){return{type:is,contents:t,groupId:e.groupId,negate:e.negate}}function j2(t,e){let n=[];for(let r=0;r<e.length;r++)r!==0&&n.push(t),n.push(e[r]);return n}function Ete(t,e){return t?{type:Oi,label:t,contents:e}:e}var z2={type:on},vte={type:on,soft:!0},OT={type:on,hard:!0},qi=[OT,Tm],V2={type:on,hard:!0,literal:!0},U2=[V2,Tm];function _b(t){return{type:ss,contents:t}}var Tte={type:as},Ste={type:rs};function xi(t){var e;if(!t)return"";if(Array.isArray(t)){let n=[];for(let r of t)if(Array.isArray(r))n.push(...xi(r));else{let i=xi(r);i!==""&&n.push(i)}return n}return t.type===Gn?{...t,breakContents:xi(t.breakContents),flatContents:xi(t.flatContents)}:t.type===Qn?{...t,contents:xi(t.contents),expandedStates:(e=t.expandedStates)==null?void 0:e.map(xi)}:t.type===gi?{type:"fill",parts:t.parts.map(xi)}:t.contents?{...t,contents:xi(t.contents)}:t}function wte(t){let e=Object.create(null),n=new Set;return r(xi(t));function r(s,o,a){var l,c;if(typeof s=="string")return JSON.stringify(s);if(Array.isArray(s)){let u=s.map(r).filter(Boolean);return u.length===1?u[0]:`[${u.join(", ")}]`}if(s.type===on){let u=((l=a==null?void 0:a[o+1])==null?void 0:l.type)===br;return s.literal?u?"literalline":"literallineWithoutBreakParent":s.hard?u?"hardline":"hardlineWithoutBreakParent":s.soft?"softline":"line"}if(s.type===br)return((c=a==null?void 0:a[o-1])==null?void 0:c.type)===on&&a[o-1].hard?void 0:"breakParent";if(s.type===rs)return"trim";if(s.type===ts)return"indent("+r(s.contents)+")";if(s.type===ns)return s.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+r(s.contents)+")":s.n<0?"dedent("+r(s.contents)+")":s.n.type==="root"?"markAsRoot("+r(s.contents)+")":"align("+JSON.stringify(s.n)+", "+r(s.contents)+")";if(s.type===Gn)return"ifBreak("+r(s.breakContents)+(s.flatContents?", "+r(s.flatContents):"")+(s.groupId?(s.flatContents?"":', ""')+`, { groupId: ${i(s.groupId)} }`:"")+")";if(s.type===is){let u=[];s.negate&&u.push("negate: true"),s.groupId&&u.push(`groupId: ${i(s.groupId)}`);let h=u.length>0?`, { ${u.join(", ")} }`:"";return`indentIfBreak(${r(s.contents)}${h})`}if(s.type===Qn){let u=[];s.break&&s.break!=="propagated"&&u.push("shouldBreak: true"),s.id&&u.push(`id: ${i(s.id)}`);let h=u.length>0?`, { ${u.join(", ")} }`:"";return s.expandedStates?`conditionalGroup([${s.expandedStates.map(d=>r(d)).join(",")}]${h})`:`group(${r(s.contents)}${h})`}if(s.type===gi)return`fill([${s.parts.map(u=>r(u)).join(", ")}])`;if(s.type===ss)return"lineSuffix("+r(s.contents)+")";if(s.type===as)return"lineSuffixBoundary";if(s.type===Oi)return`label(${JSON.stringify(s.label)}, ${r(s.contents)})`;if(s.type===no)return"cursor";throw new Error("Unknown doc type "+s.type)}function i(s){if(typeof s!="symbol")return JSON.stringify(String(s));if(s in e)return e[s];let o=s.description||"symbol";for(let a=0;;a++){let l=o+(a>0?` #${a}`:"");if(!n.has(l))return n.add(l),e[s]=`Symbol.for(${JSON.stringify(l)})`}}}var kte=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function _te(t){return t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510}function xte(t){return t>=4352&&t<=4447||t===8986||t===8987||t===9001||t===9002||t>=9193&&t<=9196||t===9200||t===9203||t===9725||t===9726||t===9748||t===9749||t>=9776&&t<=9783||t>=9800&&t<=9811||t===9855||t>=9866&&t<=9871||t===9875||t===9889||t===9898||t===9899||t===9917||t===9918||t===9924||t===9925||t===9934||t===9940||t===9962||t===9970||t===9971||t===9973||t===9978||t===9981||t===9989||t===9994||t===9995||t===10024||t===10060||t===10062||t>=10067&&t<=10069||t===10071||t>=10133&&t<=10135||t===10160||t===10175||t===11035||t===11036||t===11088||t===11093||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12773||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=94176&&t<=94180||t>=94192&&t<=94198||t>=94208&&t<=101589||t>=101631&&t<=101662||t>=101760&&t<=101874||t>=110576&&t<=110579||t>=110581&&t<=110587||t===110589||t===110590||t>=110592&&t<=110882||t===110898||t>=110928&&t<=110930||t===110933||t>=110948&&t<=110951||t>=110960&&t<=111355||t>=119552&&t<=119638||t>=119648&&t<=119670||t===126980||t===127183||t===127374||t>=127377&&t<=127386||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t===127568||t===127569||t>=127584&&t<=127589||t>=127744&&t<=127776||t>=127789&&t<=127797||t>=127799&&t<=127868||t>=127870&&t<=127891||t>=127904&&t<=127946||t>=127951&&t<=127955||t>=127968&&t<=127984||t===127988||t>=127992&&t<=128062||t===128064||t>=128066&&t<=128252||t>=128255&&t<=128317||t>=128331&&t<=128334||t>=128336&&t<=128359||t===128378||t===128405||t===128406||t===128420||t>=128507&&t<=128591||t>=128640&&t<=128709||t===128716||t>=128720&&t<=128722||t>=128725&&t<=128728||t>=128732&&t<=128735||t===128747||t===128748||t>=128756&&t<=128764||t>=128992&&t<=129003||t===129008||t>=129292&&t<=129338||t>=129340&&t<=129349||t>=129351&&t<=129535||t>=129648&&t<=129660||t>=129664&&t<=129674||t>=129678&&t<=129734||t===129736||t>=129741&&t<=129756||t>=129759&&t<=129770||t>=129775&&t<=129784||t>=131072&&t<=196605||t>=196608&&t<=262141}var Cte="©®‼⁉™ℹ↔↕↖↗↘↙↩↪⌨⏏⏱⏲⏸⏹⏺▪▫▶◀◻◼☀☁☂☃☄☎☑☘☝☠☢☣☦☪☮☯☸☹☺♀♂♟♠♣♥♦♨♻♾⚒⚔⚕⚖⚗⚙⚛⚜⚠⚧⚰⚱⛈⛏⛑⛓⛩⛱⛷⛸⛹✂✈✉✌✍✏✒✔✖✝✡✳✴❄❇❣❤➡⤴⤵⬅⬆⬇",Dte=/[^\x20-\x7F]/u,Ate=new Set(Cte);function Pte(t){if(!t)return 0;if(!Dte.test(t))return t.length;t=t.replace(kte(),n=>Ate.has(n)?" ":" ");let e=0;for(let n of t){let r=n.codePointAt(0);r<=31||r>=127&&r<=159||r>=768&&r<=879||r>=65024&&r<=65039||(e+=_te(r)||xte(r)?2:1)}return e}var yT=Pte,Nte={type:0},Rte={type:1},H2={value:"",length:0,queue:[],get root(){return H2}};function X2(t,e,n){let r=e.type===1?t.queue.slice(0,-1):[...t.queue,e],i="",s=0,o=0,a=0;for(let f of r)switch(f.type){case 0:u(),n.useTabs?l(1):c(n.tabWidth);break;case 3:{let{string:m}=f;u(),i+=m,s+=m.length;break}case 2:{let{width:m}=f;o+=1,a+=m;break}default:throw new Error(`Unexpected indent comment '${f.type}'.`)}return d(),{...t,value:i,length:s,queue:r};function l(f){i+=" ".repeat(f),s+=n.tabWidth*f}function c(f){i+=" ".repeat(f),s+=f}function u(){n.useTabs?h():d()}function h(){o>0&&l(o),p()}function d(){a>0&&c(a),p()}function p(){o=0,a=0}}function Mte(t,e,n){if(!e)return t;if(e.type==="root")return{...t,root:t};if(e===Number.NEGATIVE_INFINITY)return t.root;let r;return typeof e=="number"?e<0?r=Rte:r={type:2,width:e}:r={type:3,string:e},X2(t,r,n)}function Ite(t,e){return X2(t,Nte,e)}function Lte(t){let e=0;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r===" "||r===" ")e++;else break}return e}function q2(t){let e=Lte(t);return{text:e===0?t:t.slice(0,t.length-e),count:e}}var Rn=Symbol("MODE_BREAK"),Hr=Symbol("MODE_FLAT"),xb=Symbol("DOC_FILL_PRINTED_LENGTH");function Jh(t,e,n,r,i,s){if(n===Number.POSITIVE_INFINITY)return!0;let o=e.length,a=!1,l=[t],c="";for(;n>=0;){if(l.length===0){if(o===0)return!0;l.push(e[--o]);continue}let{mode:u,doc:h}=l.pop(),d=na(h);switch(d){case ta:h&&(a&&(c+=" ",n-=1,a=!1),c+=h,n-=yT(h));break;case Ji:case gi:{let p=d===Ji?h:h.parts,f=h[xb]??0;for(let m=p.length-1;m>=f;m--)l.push({mode:u,doc:p[m]});break}case ts:case ns:case is:case Oi:l.push({mode:u,doc:h.contents});break;case rs:{let{text:p,count:f}=q2(c);c=p,n+=f;break}case Qn:{if(s&&h.break)return!1;let p=h.break?Rn:u,f=h.expandedStates&&p===Rn?Lt(0,h.expandedStates,-1):h.contents;l.push({mode:p,doc:f});break}case Gn:{let p=(h.groupId?i[h.groupId]||Hr:u)===Rn?h.breakContents:h.flatContents;p&&l.push({mode:u,doc:p});break}case on:if(u===Rn||h.hard)return!0;h.soft||(a=!0);break;case ss:r=!0;break;case as:if(r)return!1;break}}return!1}function Sm(t,e){let n=Object.create(null),r=e.printWidth,i=fT(e.endOfLine),s=0,o=[{indent:H2,mode:Rn,doc:t}],a="",l=!1,c=[],u=[],h=[],d=[],p=0;for(ste(t);o.length>0;){let{indent:b,mode:T,doc:S}=o.pop();switch(na(S)){case ta:{let w=i!==`
`?Em(0,S,`
`,i):S;w&&(a+=w,o.length>0&&(s+=yT(w)));break}case Ji:for(let w=S.length-1;w>=0;w--)o.push({indent:b,mode:T,doc:S[w]});break;case no:if(u.length>=2)throw new Error("There are too many 'cursor' in doc.");u.push(p+a.length);break;case ts:o.push({indent:Ite(b,e),mode:T,doc:S.contents});break;case ns:o.push({indent:Mte(b,S.n,e),mode:T,doc:S.contents});break;case rs:y();break;case Qn:switch(T){case Hr:if(!l){o.push({indent:b,mode:S.break?Rn:Hr,doc:S.contents});break}case Rn:{l=!1;let w={indent:b,mode:Hr,doc:S.contents},A=r-s,C=c.length>0;if(!S.break&&Jh(w,o,A,C,n))o.push(w);else if(S.expandedStates){let N=Lt(0,S.expandedStates,-1);if(S.break){o.push({indent:b,mode:Rn,doc:N});break}else for(let $=1;$<S.expandedStates.length+1;$++)if($>=S.expandedStates.length){o.push({indent:b,mode:Rn,doc:N});break}else{let I=S.expandedStates[$],L={indent:b,mode:Hr,doc:I};if(Jh(L,o,A,C,n)){o.push(L);break}}}else o.push({indent:b,mode:Rn,doc:S.contents});break}}S.id&&(n[S.id]=Lt(0,o,-1).mode);break;case gi:{let w=r-s,A=S[xb]??0,{parts:C}=S,N=C.length-A;if(N===0)break;let $=C[A+0],I=C[A+1],L={indent:b,mode:Hr,doc:$},Z={indent:b,mode:Rn,doc:$},B=Jh(L,[],w,c.length>0,n,!0);if(N===1){B?o.push(L):o.push(Z);break}let j={indent:b,mode:Hr,doc:I},U={indent:b,mode:Rn,doc:I};if(N===2){B?o.push(j,L):o.push(U,Z);break}let J=C[A+2],fe={indent:b,mode:T,doc:{...S,[xb]:A+2}},z=Jh({indent:b,mode:Hr,doc:[$,I,J]},[],w,c.length>0,n,!0);o.push(fe),z?o.push(j,L):B?o.push(U,L):o.push(U,Z);break}case Gn:case is:{let w=S.groupId?n[S.groupId]:T;if(w===Rn){let A=S.type===Gn?S.breakContents:S.negate?S.contents:Pp(S.contents);A&&o.push({indent:b,mode:T,doc:A})}if(w===Hr){let A=S.type===Gn?S.flatContents:S.negate?Pp(S.contents):S.contents;A&&o.push({indent:b,mode:T,doc:A})}break}case ss:c.push({indent:b,mode:T,doc:S.contents});break;case as:c.length>0&&o.push({indent:b,mode:T,doc:OT});break;case on:switch(T){case Hr:if(S.hard)l=!0;else{S.soft||(a+=" ",s+=1);break}case Rn:if(c.length>0){o.push({indent:b,mode:T,doc:S},...c.reverse()),c.length=0;break}S.literal?(a+=i,s=0,b.root&&(b.root.value&&(a+=b.root.value),s=b.root.length)):(y(),a+=i+b.value,s=b.length);break}break;case Oi:o.push({indent:b,mode:T,doc:S.contents});break;case br:break;default:throw new cl(S)}o.length===0&&c.length>0&&(o.push(...c.reverse()),c.length=0)}let f=h.join("")+a,m=[...d,...u];if(m.length!==2)return{formatted:f};let g=m[0];return{formatted:f,cursorNodeStart:g,cursorNodeText:f.slice(g,Lt(0,m,-1))};function y(){let{text:b,count:T}=q2(a);b&&(h.push(b),p+=b.length),a="",s-=T,u.length>0&&(d.push(...u.map(S=>Math.min(S,p))),u.length=0)}}function Qte(t,e,n=0){let r=0;for(let i=n;i<t.length;++i)t[i]===" "?r=r+e-r%e:r++;return r}var bT=Qte,Zi,Cb,Fd,rA,$te=(rA=class{constructor(t){Oh(this,Zi);this.stack=[t]}get key(){let{stack:t,siblings:e}=this;return Lt(0,t,e===null?-2:-4)??null}get index(){return this.siblings===null?null:Lt(0,this.stack,-2)}get node(){return Lt(0,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:t}=this,e=Lt(0,t,-3);return Array.isArray(e)?e:null}get next(){let{siblings:t}=this;return t===null?null:t[this.index+1]}get previous(){let{siblings:t}=this;return t===null?null:t[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:t,index:e}=this;return t!==null&&e===t.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...co(this,Zi,Fd).call(this)]}getName(){let{stack:t}=this,{length:e}=t;return e>1?Lt(0,t,-2):null}getValue(){return Lt(0,this.stack,-1)}getNode(t=0){let e=co(this,Zi,Cb).call(this,t);return e===-1?null:this.stack[e]}getParentNode(t=0){return this.getNode(t+1)}call(t,...e){let{stack:n}=this,{length:r}=n,i=Lt(0,n,-1);for(let s of e)i=i==null?void 0:i[s],n.push(s,i);try{return t(this)}finally{n.length=r}}callParent(t,e=0){let n=co(this,Zi,Cb).call(this,e+1),r=this.stack.splice(n+1);try{return t(this)}finally{this.stack.push(...r)}}each(t,...e){let{stack:n}=this,{length:r}=n,i=Lt(0,n,-1);for(let s of e)i=i[s],n.push(s,i);try{for(let s=0;s<i.length;++s)n.push(s,i[s]),t(this,s,i),n.length-=2}finally{n.length=r}}map(t,...e){let n=[];return this.each((r,i,s)=>{n[i]=t(r,i,s)},...e),n}match(...t){let e=this.stack.length-1,n=null,r=this.stack[e--];for(let i of t){if(r===void 0)return!1;let s=null;if(typeof n=="number"&&(s=n,n=this.stack[e--],r=this.stack[e--]),i&&!i(r,n,s))return!1;n=this.stack[e--],r=this.stack[e--]}return!0}findAncestor(t){for(let e of co(this,Zi,Fd).call(this))if(t(e))return e}hasAncestor(t){for(let e of co(this,Zi,Fd).call(this))if(t(e))return!0;return!1}},Zi=new WeakSet,Cb=function(t){let{stack:e}=this;for(let n=e.length-1;n>=0;n-=2)if(!Array.isArray(e[n])&&--t<0)return n;return-1},Fd=function*(){let{stack:t}=this;for(let e=t.length-3;e>=0;e-=2){let n=t[e];Array.isArray(n)||(yield n)}},rA),Fte=$te;function rh(t){return(e,n,r)=>{let i=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:s}=e,o=n;for(;o>=0&&o<s;){let a=e.charAt(o);if(t instanceof RegExp){if(!t.test(a))return o}else if(!t.includes(a))return o;i?o--:o++}return o===-1||o===s?o:!1}}var Bte=rh(/\s/u),Gs=rh(" "),Z2=rh(",; "),W2=rh(/[^\n\r]/u),zx=t=>t===`
`||t==="\r"||t==="\u2028"||t==="\u2029";function jte(t,e,n){let r=!!(n!=null&&n.backwards);if(e===!1)return!1;let i=t.charAt(e);if(r){if(t.charAt(e-1)==="\r"&&i===`
`)return e-2;if(zx(i))return e-1}else{if(i==="\r"&&t.charAt(e+1)===`
`)return e+2;if(zx(i))return e+1}return e}var qo=jte;function zte(t,e,n={}){let r=Gs(t,n.backwards?e-1:e,n),i=qo(t,r,n);return r!==i}var js=zte;function Vte(t){return Array.isArray(t)&&t.length>0}var Ute=Vte;function Hte(t){return t!==null&&typeof t=="object"}var G2=Hte;function*wm(t,e){let{getVisitorKeys:n,filter:r=()=>!0}=e,i=s=>G2(s)&&r(s);for(let s of n(t)){let o=t[s];if(Array.isArray(o))for(let a of o)i(a)&&(yield a);else i(o)&&(yield o)}}function*Xte(t,e){let n=[t];for(let r=0;r<n.length;r++){let i=n[r];for(let s of wm(i,e))yield s,n.push(s)}}function qte(t,e){return wm(t,e).next().done}function Y2(t,e,n){var c;let{cache:r}=n;if(r.has(t))return r.get(t);let{filter:i}=n;if(!i)return[];let s,o=(((c=n.getChildren)==null?void 0:c.call(n,t,n))??[...wm(t,{getVisitorKeys:n.getVisitorKeys})]).flatMap(u=>(s??(s=[t,...e]),i(u,s)?[u]:Y2(u,s,n))),{locStart:a,locEnd:l}=n;return o.sort((u,h)=>a(u)-a(h)||l(u)-l(h)),r.set(t,o),o}var K2=Y2;function Zte(t){let e=t.type||t.kind||"(unknown type)",n=String(t.name||t.id&&(typeof t.id=="object"?t.id.name:t.id)||t.key&&(typeof t.key=="object"?t.key.name:t.key)||t.value&&(typeof t.value=="object"?"":String(t.value))||t.operator||"");return n.length>20&&(n=n.slice(0,19)+"…"),e+(n?" "+n:"")}function ET(t,e){(t.comments??(t.comments=[])).push(e),e.printed=!1,e.nodeDescription=Zte(t)}function Dc(t,e){e.leading=!0,e.trailing=!1,ET(t,e)}function Bd(t,e,n){e.leading=!1,e.trailing=!1,n&&(e.marker=n),ET(t,e)}function Ac(t,e){e.leading=!1,e.trailing=!0,ET(t,e)}var J2=new WeakMap;function eQ(t,e,n,r,i=[]){let{locStart:s,locEnd:o}=n,a=s(e),l=o(e),c=K2(t,i,{cache:J2,locStart:s,locEnd:o,getVisitorKeys:n.getVisitorKeys,filter:n.printer.canAttachComment,getChildren:n.printer.getCommentChildNodes}),u,h,d=0,p=c.length;for(;d<p;){let f=d+p>>1,m=c[f],g=s(m),y=o(m);if(g<=a&&l<=y)return eQ(m,e,n,m,[m,...i]);if(y<=a){u=m,d=f+1;continue}if(l<=g){h=m,p=f;continue}throw new Error("Comment location overlaps with node location")}if((r==null?void 0:r.type)==="TemplateLiteral"){let{quasis:f}=r,m=dO(f,e,n);u&&dO(f,u,n)!==m&&(u=null),h&&dO(f,h,n)!==m&&(h=null)}return{enclosingNode:r,precedingNode:u,followingNode:h}}var hO=()=>!1;function Wte(t,e){let{comments:n}=t;if(delete t.comments,!Ute(n)||!e.printer.canAttachComment)return;let r=[],{printer:{features:{experimental_avoidAstMutation:i},handleComments:s={}},originalText:o}=e,{ownLine:a=hO,endOfLine:l=hO,remaining:c=hO}=s,u=n.map((h,d)=>({...eQ(t,h,e),comment:h,text:o,options:e,ast:t,isLastComment:n.length-1===d}));for(let[h,d]of u.entries()){let{comment:p,precedingNode:f,enclosingNode:m,followingNode:g,text:y,options:b,ast:T,isLastComment:S}=d,w;if(i?w=[d]:(p.enclosingNode=m,p.precedingNode=f,p.followingNode=g,w=[p,y,b,T,S]),Gte(y,b,u,h))p.placement="ownLine",a(...w)||(g?Dc(g,p):f?Ac(f,p):Bd(m||T,p));else if(Yte(y,b,u,h))p.placement="endOfLine",l(...w)||(f?Ac(f,p):g?Dc(g,p):Bd(m||T,p));else if(p.placement="remaining",!c(...w))if(f&&g){let A=r.length;A>0&&r[A-1].followingNode!==g&&Vx(r,b),r.push(d)}else f?Ac(f,p):g?Dc(g,p):Bd(m||T,p)}if(Vx(r,e),!i)for(let h of n)delete h.precedingNode,delete h.enclosingNode,delete h.followingNode}var tQ=t=>!/[\S\n\u2028\u2029]/u.test(t);function Gte(t,e,n,r){let{comment:i,precedingNode:s}=n[r],{locStart:o,locEnd:a}=e,l=o(i);if(s)for(let c=r-1;c>=0;c--){let{comment:u,precedingNode:h}=n[c];if(h!==s||!tQ(t.slice(a(u),l)))break;l=o(u)}return js(t,l,{backwards:!0})}function Yte(t,e,n,r){let{comment:i,followingNode:s}=n[r],{locStart:o,locEnd:a}=e,l=a(i);if(s)for(let c=r+1;c<n.length;c++){let{comment:u,followingNode:h}=n[c];if(h!==s||!tQ(t.slice(l,o(u))))break;l=a(u)}return js(t,l)}function Vx(t,e){var a,l;let n=t.length;if(n===0)return;let{precedingNode:r,followingNode:i}=t[0],s=e.locStart(i),o;for(o=n;o>0;--o){let{comment:c,precedingNode:u,followingNode:h}=t[o-1],d=e.originalText.slice(e.locEnd(c),s);if(((l=(a=e.printer).isGap)==null?void 0:l.call(a,d,e))??/^[\s(]*$/u.test(d))s=e.locStart(c);else break}for(let[c,{comment:u}]of t.entries())c<o?Ac(r,u):Dc(i,u);for(let c of[r,i])c.comments&&c.comments.length>1&&c.comments.sort((u,h)=>e.locStart(u)-e.locStart(h));t.length=0}function dO(t,e,n){let r=n.locStart(e)-1;for(let i=1;i<t.length;++i)if(r<n.locStart(t[i]))return i-1;return 0}function Kte(t,e){let n=e-1;n=Gs(t,n,{backwards:!0}),n=qo(t,n,{backwards:!0}),n=Gs(t,n,{backwards:!0});let r=qo(t,n,{backwards:!0});return n!==r}var vT=Kte;function nQ(t,e){let n=t.node;return n.printed=!0,e.printer.printComment(t,e)}function Jte(t,e){var c;let n=t.node,r=[nQ(t,e)],{printer:i,originalText:s,locStart:o,locEnd:a}=e;if((c=i.isBlockComment)!=null&&c.call(i,n)){let u=js(s,a(n))?js(s,o(n),{backwards:!0})?qi:z2:" ";r.push(u)}else r.push(qi);let l=qo(s,Gs(s,a(n)));return l!==!1&&js(s,l)&&r.push(qi),r}function ene(t,e,n){var c;let r=t.node,i=nQ(t,e),{printer:s,originalText:o,locStart:a}=e,l=(c=s.isBlockComment)==null?void 0:c.call(s,r);if(n!=null&&n.hasLineSuffix&&!(n!=null&&n.isBlock)||js(o,a(r),{backwards:!0})){let u=vT(o,a(r));return{doc:_b([qi,u?qi:"",i]),isBlock:l,hasLineSuffix:!0}}return!l||n!=null&&n.hasLineSuffix?{doc:[_b([" ",i]),Tm],isBlock:l,hasLineSuffix:!0}:{doc:[" ",i],isBlock:l,hasLineSuffix:!1}}function tne(t,e){let n=t.node;if(!n)return{};let r=e[Symbol.for("printedComments")];if((n.comments||[]).filter(a=>!r.has(a)).length===0)return{leading:"",trailing:""};let i=[],s=[],o;return t.each(()=>{let a=t.node;if(r!=null&&r.has(a))return;let{leading:l,trailing:c}=a;l?i.push(Jte(t,e)):c&&(o=ene(t,e,o),s.push(o.doc))},"comments"),{leading:i,trailing:s}}function nne(t,e,n){let{leading:r,trailing:i}=tne(t,n);return!r&&!i?e:$d(e,s=>[r,s,i])}function rne(t){let{[Symbol.for("comments")]:e,[Symbol.for("printedComments")]:n}=t;for(let r of e){if(!r.printed&&!n.has(r))throw new Error('Comment "'+r.value.trim()+'" was not printed. Please report this error!');delete r.printed}}var rQ=class extends Error{constructor(){super(...arguments);V(this,"name","ConfigError")}},Ux=class extends Error{constructor(){super(...arguments);V(this,"name","UndefinedParserError")}},ine={checkIgnorePragma:{category:"Special",type:"boolean",default:!1,description:"Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.",cliCategory:"Other"},cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing
(mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:t=>typeof t=="string"||typeof t=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"},{value:"mjml",description:"MJML"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:t=>typeof t=="string"||typeof t=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive).
The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset.
The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:"Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.",cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function iQ({plugins:t=[],showDeprecated:e=!1}={}){let n=t.flatMap(i=>i.languages??[]),r=[];for(let i of one(Object.assign({},...t.map(({options:s})=>s),ine)))!e&&i.deprecated||(Array.isArray(i.choices)&&(e||(i.choices=i.choices.filter(s=>!s.deprecated)),i.name==="parser"&&(i.choices=[...i.choices,...sne(i.choices,n,t)])),i.pluginDefaults=Object.fromEntries(t.filter(s=>{var o;return((o=s.defaultOptions)==null?void 0:o[i.name])!==void 0}).map(s=>[s.name,s.defaultOptions[i.name]])),r.push(i));return{languages:n,options:r}}function*sne(t,e,n){let r=new Set(t.map(i=>i.value));for(let i of e)if(i.parsers){for(let s of i.parsers)if(!r.has(s)){r.add(s);let o=n.find(l=>l.parsers&&Object.prototype.hasOwnProperty.call(l.parsers,s)),a=i.name;o!=null&&o.name&&(a+=` (plugin: ${o.name})`),yield{value:s,description:a}}}}function one(t){let e=[];for(let[n,r]of Object.entries(t)){let i={name:n,...r};Array.isArray(i.default)&&(i.default=Lt(0,i.default,-1).value),e.push(i)}return e}var ane=Array.prototype.toReversed??function(){return[...this].reverse()},lne=nh("toReversed",function(){if(Array.isArray(this))return ane}),cne=lne;function une(){var n,r,i,s,o,a;let t=globalThis,e=(r=(n=t.Deno)==null?void 0:n.build)==null?void 0:r.os;return typeof e=="string"?e==="windows":((s=(i=t.navigator)==null?void 0:i.platform)==null?void 0:s.startsWith("Win"))??((a=(o=t.process)==null?void 0:o.platform)==null?void 0:a.startsWith("win"))??!1}var hne=une();function sQ(t){if(t=t instanceof URL?t:new URL(t),t.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${t.protocol}"`);return t}function dne(t){return t=sQ(t),decodeURIComponent(t.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function pne(t){t=sQ(t);let e=decodeURIComponent(t.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return t.hostname!==""&&(e=`\\\\${t.hostname}${e}`),e}function fne(t){return hne?pne(t):dne(t)}var mne=t=>String(t).split(/[/\\]/u).pop(),gne=t=>String(t).startsWith("file:");function Hx(t,e){if(!e)return;let n=mne(e).toLowerCase();return t.find(({filenames:r})=>r==null?void 0:r.some(i=>i.toLowerCase()===n))??t.find(({extensions:r})=>r==null?void 0:r.some(i=>n.endsWith(i)))}function One(t,e){if(e)return t.find(({name:n})=>n.toLowerCase()===e)??t.find(({aliases:n})=>n==null?void 0:n.includes(e))??t.find(({extensions:n})=>n==null?void 0:n.includes(`.${e}`))}var pO=void 0;function Xx(t,e){if(e){if(gne(e))try{e=fne(e)}catch{return}if(typeof e=="string")return t.find(({isSupported:n})=>n==null?void 0:n({filepath:e}))}}function yne(t,e){var r;let n=cne(0,t.plugins).flatMap(i=>i.languages??[]);return(r=One(n,e.language)??Hx(n,e.physicalFile)??Hx(n,e.file)??Xx(n,e.physicalFile)??Xx(n,e.file)??(pO==null?void 0:pO(n,e.physicalFile)))==null?void 0:r.parsers[0]}var oQ=yne,_a={key:t=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(t)?t:JSON.stringify(t),value(t){if(t===null||typeof t!="object")return JSON.stringify(t);if(Array.isArray(t))return`[${t.map(n=>_a.value(n)).join(", ")}]`;let e=Object.keys(t);return e.length===0?"{}":`{ ${e.map(n=>`${_a.key(n)}: ${_a.value(t[n])}`).join(", ")} }`},pair:({key:t,value:e})=>_a.value({[t]:e})},TT=new Proxy(String,{get:()=>TT}),ii=TT,aQ=()=>TT,bne=(t,e,{descriptor:n})=>{let r=[`${ii.yellow(typeof t=="string"?n.key(t):n.pair(t))} is deprecated`];return e&&r.push(`we now treat it as ${ii.blue(typeof e=="string"?n.key(e):n.pair(e))}`),r.join("; ")+"."},lQ=Symbol.for("vnopts.VALUE_NOT_EXIST"),jd=Symbol.for("vnopts.VALUE_UNCHANGED"),qx=" ".repeat(2),Ene=(t,e,n)=>{let{text:r,list:i}=n.normalizeExpectedResult(n.schemas[t].expected(n)),s=[];return r&&s.push(Zx(t,e,r,n.descriptor)),i&&s.push([Zx(t,e,i.title,n.descriptor)].concat(i.values.map(o=>cQ(o,n.loggerPrintWidth))).join(`
`)),uQ(s,n.loggerPrintWidth)};function Zx(t,e,n,r){return[`Invalid ${ii.red(r.key(t))} value.`,`Expected ${ii.blue(n)},`,`but received ${e===lQ?ii.gray("nothing"):ii.red(r.value(e))}.`].join(" ")}function cQ({text:t,list:e},n){let r=[];return t&&r.push(`- ${ii.blue(t)}`),e&&r.push([`- ${ii.blue(e.title)}:`].concat(e.values.map(i=>cQ(i,n-qx.length).replace(/^|\n/g,`$&${qx}`))).join(`
`)),uQ(r,n)}function uQ(t,e){if(t.length===1)return t[0];let[n,r]=t,[i,s]=t.map(o=>o.split(`
`,1)[0].length);return i>e&&i>s?r:n}var fa=[],fO=[];function mO(t,e,n){if(t===e)return 0;let r=n==null?void 0:n.maxDistance,i=t;t.length>e.length&&(t=e,e=i);let s=t.length,o=e.length;for(;s>0&&t.charCodeAt(~-s)===e.charCodeAt(~-o);)s--,o--;let a=0;for(;a<s&&t.charCodeAt(a)===e.charCodeAt(a);)a++;if(s-=a,o-=a,r!==void 0&&o-s>r)return r;if(s===0)return r!==void 0&&o>r?r:o;let l,c,u,h,d=0,p=0;for(;d<s;)fO[d]=t.charCodeAt(a+d),fa[d]=++d;for(;p<o;){for(l=e.charCodeAt(a+p),u=p++,c=p,d=0;d<s;d++)h=l===fO[d]?u:u+1,u=fa[d],c=fa[d]=u>c?h>c?c+1:h:h>u?u+1:h;if(r!==void 0){let f=c;for(d=0;d<s;d++)fa[d]<f&&(f=fa[d]);if(f>r)return r}}return fa.length=s,fO.length=s,r!==void 0&&c>r?r:c}function vne(t,e,n){if(!Array.isArray(e)||e.length===0)return;let r=n==null?void 0:n.maxDistance,i=t.length;for(let l of e)if(l===t)return l;let s,o=Number.POSITIVE_INFINITY,a=new Set;for(let l of e){if(a.has(l))continue;a.add(l);let c=Math.abs(l.length-i);if(c>=o||c>r)continue;let u=Number.isFinite(o)?Math.min(o,r):r,h=u===void 0?mO(t,l):mO(t,l,{maxDistance:u});if(h>r)continue;let d=h;if(u!==void 0&&h===u&&u===r&&(d=mO(t,l)),d<o&&(o=d,s=l,o===0))break}if(!(o>r))return s}var hQ=(t,e,{descriptor:n,logger:r,schemas:i})=>{let s=[`Ignored unknown option ${ii.yellow(n.pair({key:t,value:e}))}.`],o=vne(t,Object.keys(i),{maxDistance:3});o&&s.push(`Did you mean ${ii.blue(n.key(o))}?`),r.warn(s.join(" "))},Tne=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function Sne(t,e){let n=new t(e),r=Object.create(n);for(let i of Tne)i in e&&(r[i]=wne(e[i],n,ro.prototype[i].length));return r}var ro=class{static create(t){return Sne(this,t)}constructor(t){this.name=t.name}default(t){}expected(t){return"nothing"}validate(t,e){return!1}deprecated(t,e){return!1}forward(t,e){}redirect(t,e){}overlap(t,e,n){return t}preprocess(t,e){return t}postprocess(t,e){return jd}};function wne(t,e,n){return typeof t=="function"?(...r)=>t(...r.slice(0,n-1),e,...r.slice(n-1)):()=>t}var kne=class extends ro{constructor(t){super(t),this._sourceName=t.sourceName}expected(t){return t.schemas[this._sourceName].expected(t)}validate(t,e){return e.schemas[this._sourceName].validate(t,e)}redirect(t,e){return this._sourceName}},_ne=class extends ro{expected(){return"anything"}validate(){return!0}},xne=class extends ro{constructor({valueSchema:t,name:e=t.name,...n}){super({...n,name:e}),this._valueSchema=t}expected(t){let{text:e,list:n}=t.normalizeExpectedResult(this._valueSchema.expected(t));return{text:e&&`an array of ${e}`,list:n&&{title:"an array of the following values",values:[{list:n}]}}}validate(t,e){if(!Array.isArray(t))return!1;let n=[];for(let r of t){let i=e.normalizeValidateResult(this._valueSchema.validate(r,e),r);i!==!0&&n.push(i.value)}return n.length===0?!0:{value:n}}deprecated(t,e){let n=[];for(let r of t){let i=e.normalizeDeprecatedResult(this._valueSchema.deprecated(r,e),r);i!==!1&&n.push(...i.map(({value:s})=>({value:[s]})))}return n}forward(t,e){let n=[];for(let r of t){let i=e.normalizeForwardResult(this._valueSchema.forward(r,e),r);n.push(...i.map(Wx))}return n}redirect(t,e){let n=[],r=[];for(let i of t){let s=e.normalizeRedirectResult(this._valueSchema.redirect(i,e),i);"remain"in s&&n.push(s.remain),r.push(...s.redirect.map(Wx))}return n.length===0?{redirect:r}:{redirect:r,remain:n}}overlap(t,e){return t.concat(e)}};function Wx({from:t,to:e}){return{from:[t],to:e}}var Cne=class extends ro{expected(){return"true or false"}validate(t){return typeof t=="boolean"}};function Dne(t,e){let n=Object.create(null);for(let r of t){let i=r[e];if(n[i])throw new Error(`Duplicate ${e} ${JSON.stringify(i)}`);n[i]=r}return n}function Ane(t,e){let n=new Map;for(let r of t){let i=r[e];if(n.has(i))throw new Error(`Duplicate ${e} ${JSON.stringify(i)}`);n.set(i,r)}return n}function Pne(){let t=Object.create(null);return e=>{let n=JSON.stringify(e);return t[n]?!0:(t[n]=!0,!1)}}function Nne(t,e){let n=[],r=[];for(let i of t)e(i)?n.push(i):r.push(i);return[n,r]}function Rne(t){return t===Math.floor(t)}function Mne(t,e){if(t===e)return 0;let n=typeof t,r=typeof e,i=["undefined","object","boolean","number","string"];return n!==r?i.indexOf(n)-i.indexOf(r):n!=="string"?Number(t)-Number(e):t.localeCompare(e)}function Ine(t){return(...e)=>{let n=t(...e);return typeof n=="string"?new Error(n):n}}function Gx(t){return t===void 0?{}:t}function dQ(t){if(typeof t=="string")return{text:t};let{text:e,list:n}=t;return Lne((e||n)!==void 0,"Unexpected `expected` result, there should be at least one field."),n?{text:e,list:{title:n.title,values:n.values.map(dQ)}}:{text:e}}function Yx(t,e){return t===!0?!0:t===!1?{value:e}:t}function Kx(t,e,n=!1){return t===!1?!1:t===!0?n?!0:[{value:e}]:"value"in t?[t]:t.length===0?!1:t}function Jx(t,e){return typeof t=="string"||"key"in t?{from:e,to:t}:"from"in t?{from:t.from,to:t.to}:{from:e,to:t.to}}function Db(t,e){return t===void 0?[]:Array.isArray(t)?t.map(n=>Jx(n,e)):[Jx(t,e)]}function eC(t,e){let n=Db(typeof t=="object"&&"redirect"in t?t.redirect:t,e);return n.length===0?{remain:e,redirect:n}:typeof t=="object"&&"remain"in t?{remain:t.remain,redirect:n}:{redirect:n}}function Lne(t,e){if(!t)throw new Error(e)}var Qne=class extends ro{constructor(t){super(t),this._choices=Ane(t.choices.map(e=>e&&typeof e=="object"?e:{value:e}),"value")}expected({descriptor:t}){let e=Array.from(this._choices.keys()).map(i=>this._choices.get(i)).filter(({hidden:i})=>!i).map(i=>i.value).sort(Mne).map(t.value),n=e.slice(0,-2),r=e.slice(-2);return{text:n.concat(r.join(" or ")).join(", "),list:{title:"one of the following values",values:e}}}validate(t){return this._choices.has(t)}deprecated(t){let e=this._choices.get(t);return e&&e.deprecated?{value:t}:!1}forward(t){let e=this._choices.get(t);return e?e.forward:void 0}redirect(t){let e=this._choices.get(t);return e?e.redirect:void 0}},$ne=class extends ro{expected(){return"a number"}validate(t,e){return typeof t=="number"}},Fne=class extends $ne{expected(){return"an integer"}validate(t,e){return e.normalizeValidateResult(super.validate(t,e),t)===!0&&Rne(t)}},tC=class extends ro{expected(){return"a string"}validate(t){return typeof t=="string"}},Bne=_a,jne=hQ,zne=Ene,Vne=bne,Une=class{constructor(t,e){let{logger:n=console,loggerPrintWidth:r=80,descriptor:i=Bne,unknown:s=jne,invalid:o=zne,deprecated:a=Vne,missing:l=()=>!1,required:c=()=>!1,preprocess:u=d=>d,postprocess:h=()=>jd}=e||{};this._utils={descriptor:i,logger:n||{warn:()=>{}},loggerPrintWidth:r,schemas:Dne(t,"name"),normalizeDefaultResult:Gx,normalizeExpectedResult:dQ,normalizeDeprecatedResult:Kx,normalizeForwardResult:Db,normalizeRedirectResult:eC,normalizeValidateResult:Yx},this._unknownHandler=s,this._invalidHandler=Ine(o),this._deprecatedHandler=a,this._identifyMissing=(d,p)=>!(d in p)||l(d,p),this._identifyRequired=c,this._preprocess=u,this._postprocess=h,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=Pne()}normalize(t){let e={},n=[this._preprocess(t,this._utils)],r=()=>{for(;n.length!==0;){let i=n.shift(),s=this._applyNormalization(i,e);n.push(...s)}};r();for(let i of Object.keys(this._utils.schemas)){let s=this._utils.schemas[i];if(!(i in e)){let o=Gx(s.default(this._utils));"value"in o&&n.push({[i]:o.value})}}r();for(let i of Object.keys(this._utils.schemas)){if(!(i in e))continue;let s=this._utils.schemas[i],o=e[i],a=s.postprocess(o,this._utils);a!==jd&&(this._applyValidation(a,i,s),e[i]=a)}return this._applyPostprocess(e),this._applyRequiredCheck(e),e}_applyNormalization(t,e){let n=[],{knownKeys:r,unknownKeys:i}=this._partitionOptionKeys(t);for(let s of r){let o=this._utils.schemas[s],a=o.preprocess(t[s],this._utils);this._applyValidation(a,s,o);let l=({from:h,to:d})=>{n.push(typeof d=="string"?{[d]:h}:{[d.key]:d.value})},c=({value:h,redirectTo:d})=>{let p=Kx(o.deprecated(h,this._utils),a,!0);if(p!==!1)if(p===!0)this._hasDeprecationWarned(s)||this._utils.logger.warn(this._deprecatedHandler(s,d,this._utils));else for(let{value:f}of p){let m={key:s,value:f};if(!this._hasDeprecationWarned(m)){let g=typeof d=="string"?{key:d,value:f}:d;this._utils.logger.warn(this._deprecatedHandler(m,g,this._utils))}}};Db(o.forward(a,this._utils),a).forEach(l);let u=eC(o.redirect(a,this._utils),a);if(u.redirect.forEach(l),"remain"in u){let h=u.remain;e[s]=s in e?o.overlap(e[s],h,this._utils):h,c({value:h})}for(let{from:h,to:d}of u.redirect)c({value:h,redirectTo:d})}for(let s of i){let o=t[s];this._applyUnknownHandler(s,o,e,(a,l)=>{n.push({[a]:l})})}return n}_applyRequiredCheck(t){for(let e of Object.keys(this._utils.schemas))if(this._identifyMissing(e,t)&&this._identifyRequired(e))throw this._invalidHandler(e,lQ,this._utils)}_partitionOptionKeys(t){let[e,n]=Nne(Object.keys(t).filter(r=>!this._identifyMissing(r,t)),r=>r in this._utils.schemas);return{knownKeys:e,unknownKeys:n}}_applyValidation(t,e,n){let r=Yx(n.validate(t,this._utils),t);if(r!==!0)throw this._invalidHandler(e,r.value,this._utils)}_applyUnknownHandler(t,e,n,r){let i=this._unknownHandler(t,e,this._utils);if(i)for(let s of Object.keys(i)){if(this._identifyMissing(s,i))continue;let o=i[s];s in this._utils.schemas?r(s,o):n[s]=o}}_applyPostprocess(t){let e=this._postprocess(t,this._utils);if(e!==jd){if(e.delete)for(let n of e.delete)delete t[n];if(e.override){let{knownKeys:n,unknownKeys:r}=this._partitionOptionKeys(e.override);for(let i of n){let s=e.override[i];this._applyValidation(s,i,this._utils.schemas[i]),t[i]=s}for(let i of r){let s=e.override[i];this._applyUnknownHandler(i,s,t,(o,a)=>{let l=this._utils.schemas[o];this._applyValidation(a,o,l),t[o]=a})}}}}},gO;function Hne(t,e,{logger:n=!1,isCLI:r=!1,passThrough:i=!1,FlagSchema:s,descriptor:o}={}){if(r){if(!s)throw new Error("'FlagSchema' option is required.");if(!o)throw new Error("'descriptor' option is required.")}else o=_a;let a=i?Array.isArray(i)?(d,p)=>i.includes(d)?{[d]:p}:void 0:(d,p)=>({[d]:p}):(d,p,f)=>{let{_:m,...g}=f.schemas;return hQ(d,p,{...f,schemas:g})},l=Xne(e,{isCLI:r,FlagSchema:s}),c=new Une(l,{logger:n,unknown:a,descriptor:o}),u=n!==!1;u&&gO&&(c._hasDeprecationWarned=gO);let h=c.normalize(t);return u&&(gO=c._hasDeprecationWarned),h}function Xne(t,{isCLI:e,FlagSchema:n}){let r=[];e&&r.push(_ne.create({name:"_"}));for(let i of t)r.push(qne(i,{isCLI:e,optionInfos:t,FlagSchema:n})),i.alias&&e&&r.push(kne.create({name:i.alias,sourceName:i.name}));return r}function qne(t,{isCLI:e,optionInfos:n,FlagSchema:r}){let{name:i}=t,s={name:i},o,a={};switch(t.type){case"int":o=Fne,e&&(s.preprocess=Number);break;case"string":o=tC;break;case"choice":o=Qne,s.choices=t.choices.map(l=>l!=null&&l.redirect?{...l,redirect:{to:{key:t.name,value:l.redirect}}}:l);break;case"boolean":o=Cne;break;case"flag":o=r,s.flags=n.flatMap(l=>[l.alias,l.description&&l.name,l.oppositeDescription&&`no-${l.name}`].filter(Boolean));break;case"path":o=tC;break;default:throw new Error(`Unexpected type ${t.type}`)}if(t.exception?s.validate=(l,c,u)=>t.exception(l)||c.validate(l,u):s.validate=(l,c,u)=>l===void 0||c.validate(l,u),t.redirect&&(a.redirect=l=>l?{to:typeof t.redirect=="string"?t.redirect:{key:t.redirect.option,value:t.redirect.value}}:void 0),t.deprecated&&(a.deprecated=!0),e&&!t.array){let l=s.preprocess||(c=>c);s.preprocess=(c,u,h)=>u.preprocess(l(Array.isArray(c)?Lt(0,c,-1):c),h)}return t.array?xne.create({...e?{preprocess:l=>Array.isArray(l)?l:[l]}:{},...a,valueSchema:o.create(s)}):o.create({...s,...a})}var Zne=Hne,Wne=Array.prototype.findLast??function(t){for(let e=this.length-1;e>=0;e--){let n=this[e];if(t(n,e,this))return n}},Gne=nh("findLast",function(){if(Array.isArray(this))return Wne}),pQ=Gne,Yne=Symbol.for("PRETTIER_IS_FRONT_MATTER"),Kne=[];function Jne(t){return!!(t!=null&&t[Yne])}var ST=Jne,fQ=new Set(["yaml","toml"]),mQ=({node:t})=>ST(t)&&fQ.has(t.language);async function ere(t,e,n,r){let{node:i}=n,{language:s}=i;if(!fQ.has(s))return;let o=i.value.trim(),a;if(o){let l=s==="yaml"?s:oQ(r,{language:s});if(!l)return;a=o?await t(o,{parser:l}):""}else a=o;return $2([i.startDelimiter,i.explicitLanguage??"",qi,a,a?qi:"",i.endDelimiter])}function tre(t,e){return mQ({node:t})&&(delete e.end,delete e.raw,delete e.value),e}var nre=tre;function rre({node:t}){return t.raw}var ire=rre,gQ=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),sre=t=>Object.keys(t).filter(e=>!gQ.has(e));function ore(t,e){let n=t?r=>t(r,gQ):sre;return e?new Proxy(n,{apply:(r,i,s)=>ST(s[0])?Kne:Reflect.apply(r,i,s)}):n}var nC=ore;function OQ(t,e){if(!e)throw new Error("parserName is required.");let n=pQ(0,t,i=>i.parsers&&Object.prototype.hasOwnProperty.call(i.parsers,e));if(n)return n;let r=`Couldn't resolve parser "${e}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new rQ(r)}function are(t,e){if(!e)throw new Error("astFormat is required.");let n=pQ(0,t,i=>i.printers&&Object.prototype.hasOwnProperty.call(i.printers,e));if(n)return n;let r=`Couldn't find plugin for AST format "${e}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new rQ(r)}function wT({plugins:t,parser:e}){let n=OQ(t,e);return yQ(n,e)}function yQ(t,e){let n=t.parsers[e];return typeof n=="function"?n():n}async function lre(t,e){let n=t.printers[e],r=typeof n=="function"?await n():n;return cre(r)}var OO=new WeakMap;function cre(t){if(OO.has(t))return OO.get(t);let{features:e,getVisitorKeys:n,embed:r,massageAstNode:i,print:s,...o}=t;e=pre(e);let a=e.experimental_frontMatterSupport;n=nC(n,a.massageAstNode||a.embed||a.print);let l=i;i&&a.massageAstNode&&(l=new Proxy(i,{apply(d,p,f){return nre(...f),Reflect.apply(d,p,f)}}));let c=r;if(r){let d;c=new Proxy(r,{get(p,f,m){return f==="getVisitorKeys"?(d??(d=r.getVisitorKeys?nC(r.getVisitorKeys,a.massageAstNode||a.embed):n),d):Reflect.get(p,f,m)},apply:(p,f,m)=>a.embed&&mQ(...m)?ere:Reflect.apply(p,f,m)})}let u=s;a.print&&(u=new Proxy(s,{apply(d,p,f){let[m]=f;return ST(m.node)?ire(m):Reflect.apply(d,p,f)}}));let h={features:e,getVisitorKeys:n,embed:c,massageAstNode:l,print:u,...o};return OO.set(t,h),h}var ure=["clean","embed","print"],hre=Object.fromEntries(ure.map(t=>[t,!1]));function dre(t){return{...hre,...t}}function pre(t){return{experimental_avoidAstMutation:!1,...t,experimental_frontMatterSupport:dre(t==null?void 0:t.experimental_frontMatterSupport)}}var rC={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null};async function fre(t,e={}){var h;let n={...t};if(!n.parser)if(n.filepath){if(n.parser=oQ(n,{physicalFile:n.filepath}),!n.parser)throw new Ux(`No parser could be inferred for file "${n.filepath}".`)}else throw new Ux("No parser and no file path given, couldn't infer a parser.");let r=iQ({plugins:t.plugins,showDeprecated:!0}).options,i={...rC,...Object.fromEntries(r.filter(d=>d.default!==void 0).map(d=>[d.name,d.default]))},s=OQ(n.plugins,n.parser),o=await yQ(s,n.parser);n.astFormat=o.astFormat,n.locEnd=o.locEnd,n.locStart=o.locStart;let a=(h=s.printers)!=null&&h[o.astFormat]?s:are(n.plugins,o.astFormat),l=await lre(a,o.astFormat);n.printer=l,n.getVisitorKeys=l.getVisitorKeys;let c=a.defaultOptions?Object.fromEntries(Object.entries(a.defaultOptions).filter(([,d])=>d!==void 0)):{},u={...i,...c};for(let[d,p]of Object.entries(u))(n[d]===null||n[d]===void 0)&&(n[d]=p);return n.parser==="json"&&(n.trailingComma="none"),Zne(n,r,{passThrough:Object.keys(rC),...e})}var kl=fre;Qee($ee());var kT={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]};new Set(kT.keyword);new Set(kT.strict);new Set(kT.strictBind);var ed=(t,e)=>n=>t(e(n));function bQ(t){return{keyword:t.cyan,capitalized:t.yellow,jsxIdentifier:t.yellow,punctuator:t.yellow,number:t.magenta,string:t.green,regex:t.magenta,comment:t.gray,invalid:ed(ed(t.white,t.bgRed),t.bold),gutter:t.gray,marker:ed(t.red,t.bold),message:ed(t.red,t.bold),reset:t.reset}}bQ(aQ());bQ(aQ());function mre(){return new Proxy({},{get:()=>t=>t})}var iC=/\r\n|[\n\r\u2028\u2029]/;function gre(t,e,n){let r=Object.assign({column:0,line:-1},t.start),i=Object.assign({},r,t.end),{linesAbove:s=2,linesBelow:o=3}=n||{},a=r.line,l=r.column,c=i.line,u=i.column,h=Math.max(a-(s+1),0),d=Math.min(e.length,c+o);a===-1&&(h=0),c===-1&&(d=e.length);let p=c-a,f={};if(p)for(let m=0;m<=p;m++){let g=m+a;if(!l)f[g]=!0;else if(m===0){let y=e[g-1].length;f[g]=[l,y-l+1]}else if(m===p)f[g]=[0,u];else{let y=e[g-m].length;f[g]=[0,y]}}else l===u?l?f[a]=[l,0]:f[a]=!0:f[a]=[l,u-l];return{start:h,end:d,markerLines:f}}function Ore(t,e,n={}){let r=mre(),i=t.split(iC),{start:s,end:o,markerLines:a}=gre(e,i,n),l=e.start&&typeof e.start.column=="number",c=String(o).length,u=t.split(iC,o).slice(s,o).map((h,d)=>{let p=s+1+d,f=` ${` ${p}`.slice(-c)} |`,m=a[p],g=!a[p+1];if(m){let y="";if(Array.isArray(m)){let b=h.slice(0,Math.max(m[0]-1,0)).replace(/[^\t]/g," "),T=m[1]||1;y=[`
`,r.gutter(f.replace(/\d/g," "))," ",b,r.marker("^").repeat(T)].join(""),g&&n.message&&(y+=" "+r.message(n.message))}return[r.marker(">"),r.gutter(f),h.length>0?` ${h}`:"",y].join("")}else return` ${r.gutter(f)}${h.length>0?` ${h}`:""}`}).join(`
`);return n.message&&!l&&(u=`${" ".repeat(c+1)}${n.message}
${u}`),u}async function yre(t,e){let n=await wT(e),r=n.preprocess?await n.preprocess(t,e):t;e.originalText=r;let i;try{i=await n.parse(r,e,e)}catch(s){bre(s,t)}return{text:r,ast:i}}function bre(t,e){let{loc:n}=t;if(n){let r=Ore(e,n,{});throw t.message+=`
`+r,t.codeFrame=r,t}throw t}var ih=yre;async function Ere(t,e,n,r,i){if(n.embeddedLanguageFormatting!=="auto")return;let{printer:s}=n,{embed:o}=s;if(!o)return;if(o.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");let{hasPrettierIgnore:a}=s,{getVisitorKeys:l}=o,c=[];d();let u=t.stack;for(let{print:p,node:f,pathStack:m}of c)try{t.stack=m;let g=await p(h,e,t,n);g&&i.set(f,g)}catch(g){if(globalThis.PRETTIER_DEBUG)throw g}t.stack=u;function h(p,f){return vre(p,f,n,r)}function d(){let{node:p}=t;if(p===null||typeof p!="object"||a!=null&&a(t))return;for(let m of l(p))Array.isArray(p[m])?t.each(d,m):t.call(d,m);let f=o(t,n);if(f){if(typeof f=="function"){c.push({print:f,node:p,pathStack:[...t.stack]});return}i.set(p,f)}}}async function vre(t,e,n,r){let i=await kl({...n,...e,parentParser:n.parser,originalText:t,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:s}=await ih(t,i),o=await r(s,i);return Q2(o)}function Tre(t,e,n,r){let{originalText:i,[Symbol.for("comments")]:s,locStart:o,locEnd:a,[Symbol.for("printedComments")]:l}=e,{node:c}=t,u=o(c),h=a(c);for(let p of s)o(p)>=u&&a(p)<=h&&l.add(p);let{printPrettierIgnored:d}=e.printer;return d?d(t,e,n,r):i.slice(u,h)}var Sre=Tre;async function km(t,e){({ast:t}=await EQ(t,e));let n=new Map,r=new Fte(t),i=new Map;await Ere(r,o,e,km,i);let s=await sC(r,e,o,void 0,i);if(rne(e),e.cursorOffset>=0){if(e.nodeAfterCursor&&!e.nodeBeforeCursor)return[wo,s];if(e.nodeBeforeCursor&&!e.nodeAfterCursor)return[s,wo]}return s;function o(l,c){return l===void 0||l===r?a(c):Array.isArray(l)?r.call(()=>a(c),...l):r.call(()=>a(c),l)}function a(l){let c=r.node;if(c==null)return"";let u=c&&typeof c=="object"&&l===void 0;if(u&&n.has(c))return n.get(c);let h=sC(r,e,o,l,i);return u&&n.set(c,h),h}}function sC(t,e,n,r,i){var l,c;let{node:s}=t,{printer:o}=e,a;switch((l=o.hasPrettierIgnore)!=null&&l.call(o,t)?a=Sre(t,e,n,r):i.has(s)?a=i.get(s):a=o.print(t,e,n,r),s){case e.cursorNode:a=$d(a,u=>[wo,u,wo]);break;case e.nodeBeforeCursor:a=$d(a,u=>[u,wo]);break;case e.nodeAfterCursor:a=$d(a,u=>[wo,u]);break}return o.printComment&&!((c=o.willPrintOwnComments)!=null&&c.call(o,t,e))&&(a=nne(t,a,e)),a}async function EQ(t,e){let n=t.comments??[];e[Symbol.for("comments")]=n,e[Symbol.for("printedComments")]=new Set,Wte(t,e);let{printer:{preprocess:r}}=e;return t=r?await r(t,e):t,{ast:t,comments:n}}function wre(t,e){let{cursorOffset:n,locStart:r,locEnd:i,getVisitorKeys:s}=e,o=p=>r(p)<=n&&i(p)>=n,a=t,l=[t];for(let p of Xte(t,{getVisitorKeys:s,filter:o}))l.push(p),a=p;if(qte(a,{getVisitorKeys:s}))return{cursorNode:a};let c,u,h=-1,d=Number.POSITIVE_INFINITY;for(;l.length>0&&(c===void 0||u===void 0);){a=l.pop();let p=c!==void 0,f=u!==void 0;for(let m of wm(a,{getVisitorKeys:s})){if(!p){let g=i(m);g<=n&&g>h&&(c=m,h=g)}if(!f){let g=r(m);g>=n&&g<d&&(u=m,d=g)}}}return{nodeBeforeCursor:c,nodeAfterCursor:u}}var vQ=wre;function kre(t,e){let{printer:n}=e,r=n.massageAstNode;if(!r)return t;let{getVisitorKeys:i}=n,{ignoredProperties:s}=r;return o(t);function o(a,l){if(!G2(a))return a;if(Array.isArray(a))return a.map(d=>o(d,l)).filter(Boolean);let c={},u=new Set(i(a));for(let d in a)!Object.prototype.hasOwnProperty.call(a,d)||s!=null&&s.has(d)||(u.has(d)?c[d]=o(a[d],a):c[d]=a[d]);let h=r(a,c,l);if(h!==null)return h??c}}var _re=kre,xre=Array.prototype.findLastIndex??function(t){for(let e=this.length-1;e>=0;e--){let n=this[e];if(t(n,e,this))return e}return-1},Cre=nh("findLastIndex",function(){if(Array.isArray(this))return xre}),Dre=Cre,Are=({parser:t})=>t==="json"||t==="json5"||t==="jsonc"||t==="json-stringify";function Pre(t,e){return e=new Set(e),t.find(n=>TQ.has(n.type)&&e.has(n))}function oC(t){let e=Dre(0,t,n=>n.type!=="Program"&&n.type!=="File");return e===-1?t:t.slice(0,e+1)}function Nre(t,e,{locStart:n,locEnd:r}){let[i,...s]=t,[o,...a]=e;if(i===o)return[i,o];let l=n(i);for(let u of oC(a))if(n(u)>=l)o=u;else break;let c=r(o);for(let u of oC(s)){if(r(u)<=c)i=u;else break;if(i===o)break}return[i,o]}function Ab(t,e,n,r,i=[],s){let{locStart:o,locEnd:a}=n,l=o(t),c=a(t);if(e>c||e<l||s==="rangeEnd"&&e===l||s==="rangeStart"&&e===c)return;let u=[t,...i],h=K2(t,u,{cache:J2,locStart:o,locEnd:a,getVisitorKeys:n.getVisitorKeys,filter:n.printer.canAttachComment,getChildren:n.printer.getCommentChildNodes});for(let d of h){let p=Ab(d,e,n,r,u,s);if(p)return p}if(r(t,i[0]))return u}function Rre(t,e){return e!=="DeclareExportDeclaration"&&t!=="TypeParameterDeclaration"&&(t==="Directive"||t==="TypeAlias"||t==="TSExportAssignment"||t.startsWith("Declare")||t.startsWith("TSDeclare")||t.endsWith("Statement")||t.endsWith("Declaration"))}var TQ=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),Mre=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);function aC(t,e,n){if(!e)return!1;switch(t.parser){case"flow":case"hermes":case"babel":case"babel-flow":case"babel-ts":case"typescript":case"acorn":case"espree":case"meriyah":case"oxc":case"oxc-ts":case"__babel_estree":return Rre(e.type,n==null?void 0:n.type);case"json":case"json5":case"jsonc":case"json-stringify":return TQ.has(e.type);case"graphql":return Mre.has(e.kind);case"vue":return e.tag!=="root"}return!1}function Ire(t,e,n){let{rangeStart:r,rangeEnd:i,locStart:s,locEnd:o}=e,a=t.slice(r,i).search(/\S/u),l=a===-1;if(!l)for(r+=a;i>r&&!/\S/u.test(t[i-1]);--i);let c=Ab(n,r,e,(p,f)=>aC(e,p,f),[],"rangeStart");if(!c)return;let u=l?c:Ab(n,i,e,p=>aC(e,p),[],"rangeEnd");if(!u)return;let h,d;if(Are(e)){let p=Pre(c,u);h=p,d=p}else[h,d]=Nre(c,u,e);return[Math.min(s(h),s(d)),Math.max(o(h),o(d))]}var SQ="\uFEFF",lC=Symbol("cursor");async function wQ(t,e,n=0){if(!t||t.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:r,text:i}=await ih(t,e);e.cursorOffset>=0&&(e={...e,...vQ(r,e)});let s=await km(r,e);n>0&&(s=F2([qi,s],n,e.tabWidth));let o=Sm(s,e);if(n>0){let l=o.formatted.trim();o.cursorNodeStart!==void 0&&(o.cursorNodeStart-=o.formatted.indexOf(l),o.cursorNodeStart<0&&(o.cursorNodeStart=0,o.cursorNodeText=o.cursorNodeText.trimStart()),o.cursorNodeStart+o.cursorNodeText.length>l.length&&(o.cursorNodeText=o.cursorNodeText.trimEnd())),o.formatted=l+fT(e.endOfLine)}let a=e[Symbol.for("comments")];if(e.cursorOffset>=0){let l,c,u,h;if((e.cursorNode||e.nodeBeforeCursor||e.nodeAfterCursor)&&o.cursorNodeText)if(u=o.cursorNodeStart,h=o.cursorNodeText,e.cursorNode)l=e.locStart(e.cursorNode),c=i.slice(l,e.locEnd(e.cursorNode));else{if(!e.nodeBeforeCursor&&!e.nodeAfterCursor)throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");l=e.nodeBeforeCursor?e.locEnd(e.nodeBeforeCursor):0;let y=e.nodeAfterCursor?e.locStart(e.nodeAfterCursor):i.length;c=i.slice(l,y)}else l=0,c=i,u=0,h=o.formatted;let d=e.cursorOffset-l;if(c===h)return{formatted:o.formatted,cursorOffset:u+d,comments:a};let p=c.split("");p.splice(d,0,lC);let f=h.split(""),m=Uee(p,f),g=u;for(let y of m)if(y.removed){if(y.value.includes(lC))break}else g+=y.count;return{formatted:o.formatted,cursorOffset:g,comments:a}}return{formatted:o.formatted,cursorOffset:-1,comments:a}}async function Lre(t,e){let{ast:n,text:r}=await ih(t,e),[i,s]=Ire(r,e,n)??[0,0],o=r.slice(i,s),a=Math.min(i,r.lastIndexOf(`
`,i)+1),l=r.slice(a,i).match(/^\s*/u)[0],c=bT(l,e.tabWidth),u=await wQ(o,{...e,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:e.cursorOffset>i&&e.cursorOffset<=s?e.cursorOffset-i:-1,endOfLine:"lf"},c),h=u.formatted.trimEnd(),{cursorOffset:d}=e;d>s?d+=h.length-o.length:u.cursorOffset>=0&&(d=u.cursorOffset+i);let p=r.slice(0,i)+h+r.slice(s);if(e.endOfLine!=="lf"){let f=fT(e.endOfLine);d>=0&&f===`\r
`&&(d+=I2(p.slice(0,d),`
`)),p=Em(0,p,`
`,f)}return{formatted:p,cursorOffset:d,comments:u.comments}}function yO(t,e,n){return typeof e!="number"||Number.isNaN(e)||e<0||e>t.length?n:e}function cC(t,e){let{cursorOffset:n,rangeStart:r,rangeEnd:i}=e;return n=yO(t,n,-1),r=yO(t,r,0),i=yO(t,i,t.length),{...e,cursorOffset:n,rangeStart:r,rangeEnd:i}}function kQ(t,e){let{cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:s}=cC(t,e),o=t.charAt(0)===SQ;if(o&&(t=t.slice(1),n--,r--,i--),s==="auto"&&(s=Hee(t)),t.includes("\r")){let a=l=>I2(t.slice(0,Math.max(l,0)),`\r
`);n-=a(n),r-=a(r),i-=a(i),t=Xee(t)}return{hasBOM:o,text:t,options:cC(t,{...e,cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:s})}}async function uC(t,e){let n=await wT(e);return!n.hasPragma||n.hasPragma(t)}async function Qre(t,e){var n,r;return(r=(n=await wT(e)).hasIgnorePragma)==null?void 0:r.call(n,t)}async function _Q(t,e){let{hasBOM:n,text:r,options:i}=kQ(t,await kl(e));if(i.rangeStart>=i.rangeEnd&&r!==""||i.requirePragma&&!await uC(r,i)||i.checkIgnorePragma&&await Qre(r,i))return{formatted:t,cursorOffset:e.cursorOffset,comments:[]};let s;return i.rangeStart>0||i.rangeEnd<r.length?s=await Lre(r,i):(!i.requirePragma&&i.insertPragma&&i.printer.insertPragma&&!await uC(r,i)&&(r=i.printer.insertPragma(r)),s=await wQ(r,i)),n&&(s.formatted=SQ+s.formatted,s.cursorOffset>=0&&s.cursorOffset++),s}async function $re(t,e,n){let{text:r,options:i}=kQ(t,await kl(e)),s=await ih(r,i);return n&&(n.preprocessForPrint&&(s.ast=await EQ(s.ast,i)),n.massage&&(s.ast=_re(s.ast,i))),s}async function Fre(t,e){e=await kl(e);let n=await km(t,e);return Sm(n,e)}async function Bre(t,e){let n=wte(t),{formatted:r}=await _Q(n,{...e,parser:"__js_expression"});return r}async function jre(t,e){e=await kl(e);let{ast:n}=await ih(t,e);return e.cursorOffset>=0&&(e={...e,...vQ(n,e)}),km(n,e)}async function zre(t,e){return Sm(t,await kl(e))}var xQ={};pT(xQ,{builders:()=>Vre,printer:()=>Ure,utils:()=>Hre});var Vre={join:j2,line:z2,softline:vte,hardline:qi,literalline:U2,group:B2,conditionalGroup:Ote,fill:gte,lineSuffix:_b,lineSuffixBoundary:Tte,cursor:wo,breakParent:Tm,ifBreak:yte,trim:Ste,indent:Pp,indentIfBreak:bte,align:ul,addAlignmentToDoc:F2,markAsRoot:$2,dedentToRoot:fte,dedent:mte,hardlineWithoutBreakParent:OT,literallineWithoutBreakParent:V2,label:Ete,concat:t=>t},Ure={printDocToString:Sm},Hre={willBreak:ite,traverseDoc:mT,findInDoc:gT,mapDoc:vm,removeLines:ate,stripTrailingHardline:Q2,replaceEndOfLine:ute,canBreak:dte},Xre="3.7.1",CQ={};pT(CQ,{addDanglingComment:()=>Bd,addLeadingComment:()=>Dc,addTrailingComment:()=>Ac,getAlignmentSize:()=>bT,getIndentSize:()=>Kre,getMaxContinuousCount:()=>tie,getNextNonSpaceNonCommentCharacter:()=>rie,getNextNonSpaceNonCommentCharacterIndex:()=>hie,getPreferredQuote:()=>sie,getStringWidth:()=>yT,hasNewline:()=>js,hasNewlineInRange:()=>aie,hasSpaces:()=>cie,isNextLineEmpty:()=>gie,isNextLineEmptyAfterIndex:()=>DT,isPreviousLineEmpty:()=>pie,makeString:()=>mie,skip:()=>rh,skipEverythingButNewLine:()=>W2,skipInlineComment:()=>_T,skipNewline:()=>qo,skipSpaces:()=>Gs,skipToLineEnd:()=>Z2,skipTrailingComment:()=>xT,skipWhitespace:()=>Bte});function qre(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let n=e+2;n<t.length;++n)if(t.charAt(n)==="*"&&t.charAt(n+1)==="/")return n+2}return e}var _T=qre;function Zre(t,e){return e===!1?!1:t.charAt(e)==="/"&&t.charAt(e+1)==="/"?W2(t,e):e}var xT=Zre;function Wre(t,e){let n=null,r=e;for(;r!==n;)n=r,r=Gs(t,r),r=_T(t,r),r=xT(t,r),r=qo(t,r);return r}var CT=Wre;function Gre(t,e){let n=null,r=e;for(;r!==n;)n=r,r=Z2(t,r),r=_T(t,r),r=Gs(t,r);return r=xT(t,r),r=qo(t,r),r!==!1&&js(t,r)}var DT=Gre;function Yre(t,e){let n=t.lastIndexOf(`
`);return n===-1?0:bT(t.slice(n+1).match(/^[\t ]*/u)[0],e)}var Kre=Yre;function Jre(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function eie(t,e){let n=t.matchAll(new RegExp(`(?:${Jre(e)})+`,"gu"));return n.reduce||(n=[...n]),n.reduce((r,[i])=>Math.max(r,i.length),0)/e.length}var tie=eie;function nie(t,e){let n=CT(t,e);return n===!1?"":t.charAt(n)}var rie=nie;function iie(t,e){let n=e===!0||e==="'"?"'":'"',r=n==="'"?'"':"'",i=0,s=0;for(let o of t)o===n?i++:o===r&&s++;return i>s?r:n}var sie=iie;function oie(t,e,n){for(let r=e;r<n;++r)if(t.charAt(r)===`
`)return!0;return!1}var aie=oie;function lie(t,e,n={}){return Gs(t,n.backwards?e-1:e,n)!==e}var cie=lie;function uie(t,e,n){return CT(t,n(e))}function hie(t,e){return arguments.length===2||typeof e=="number"?CT(t,e):uie(...arguments)}function die(t,e,n){return vT(t,n(e))}function pie(t,e){return arguments.length===2||typeof e=="number"?vT(t,e):die(...arguments)}function fie(t,e,n){return DT(t,n(e))}function mie(t,e,n){let r=e==='"'?"'":'"',i=Em(0,t,/\\(.)|(["'])/gsu,(s,o,a)=>o===r?o:a===e?"\\"+a:a||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(o)?o:"\\"+o));return e+i+e}function gie(t,e){return arguments.length===2||typeof e=="number"?DT(t,e):fie(...arguments)}function Eo(t,e=1){return async(...n)=>{let r=n[e]??{},i=r.plugins??[];return n[e]={...r,plugins:Array.isArray(i)?i:Object.values(i)},t(...n)}}var DQ=Eo(_Q);async function AQ(t,e){let{formatted:n}=await DQ(t,{...e,cursorOffset:-1});return n}async function Oie(t,e){return await AQ(t,e)===t}var yie=Eo(iQ,0),bie={parse:Eo($re),formatAST:Eo(Fre),formatDoc:Eo(Bre),printToDoc:Eo(jre),printDocToString:Eo(zre)};function Eie(t){const e=document.createElement("textarea");return e.innerHTML=t,e.value}const vie=async t=>{try{const e=Eie(t).trim();return await M2.format(e,{parser:"html",plugins:[BL],printWidth:80,htmlWhitespaceSensitivity:"ignore",bracketSameLine:!0,singleAttributePerLine:!0,useTabs:!1,tabWidth:2})}catch{return t}},PQ=v.forwardRef(({initialContent:t,onChange:e},n)=>{const[r,i]=v.useState(""),s=i9({initialContent:r});return v.useEffect(()=>{vie(t).then(i)},[t]),v.useImperativeHandle(n,()=>s.current,[s]),E.jsx("div",{ref:s})});PQ.displayName="SourceEditor";function Tie(){const[,t]=v.useState({});return v.useCallback(()=>t({}),[])}function Sie({ref:t,placeholder:e,...n}){const r=Tie(),i=PX(n,[]);return v.useImperativeHandle(t,()=>({getInstance:()=>i}),[i]),v.useEffect(()=>{const s=n.editable;!i||i.isEditable===s||(i.setOptions({editable:!!s}),r())},[i,n.editable]),v.useEffect(()=>{i&&(i.setOptions({editorProps:{placeholder:e}}),r())},[i,e]),v.useEffect(()=>()=>{i==null||i.destroy()},[]),i}const NQ=v.createContext({}),$e=()=>v.useContext(NQ),wie=({children:t,editorOptions:e,slotBefore:n,slotAfter:r})=>{const i=v.useRef(null),s=Sie(e),[o,a]=v.useState(!1),[l,c]=v.useState(!1),[u,h]=v.useState(!1);if(!s)return null;const d=f=>{const m=f.target,g=i.current;g&&m.contains(g)&&(g.style.display="flex",setTimeout(()=>{g.style.display=""},0))},p=E.jsxs("div",{className:bn("rte-editor",o&&"rte-editor--fullscreen"),children:[n,E.jsx("div",{className:"rte-editor__container",onMouseDown:d,children:l?E.jsx(PQ,{initialContent:s.getHTML()||""}):E.jsx(kX,{ref:i,editor:s,className:"rte-editor__content"})}),t,r]});return E.jsx(NQ.Provider,{value:{editor:s,contentElement:i,isFullScreen:o,isResizing:u,isSourceMode:l,setIsResizing:h,toggleFullScreen:()=>a(f=>!f),toggleSourceMode:()=>c(f=>!f)},children:p})},RQ=Ne.forwardRef(({active:t,icon:e,text:n,shortcuts:r,className:i,children:s,type:o,buttonType:a,hideText:l=!0,hideArrow:c=!1,tooltip:u=!0,buttonClass:h,buttonStyle:d,dropdownClass:p,dropdownStyle:f,disabled:m,...g},y)=>{var I;const{editor:b,contentElement:T}=$e(),S=o==="dropdown"||o==="popover"&&!c,w=l&&!S,A=v.useMemo(()=>{if(u===!1)return null;const L={title:typeof u=="string"?u:n,shortcuts:r?`(${r.map(yZ).join(" + ")})`:""};return`${L.title} ${L.shortcuts}`},[u,n,r]),C=v.useMemo(()=>e?E.jsx(iu,{name:e,className:"rte-button-icon"}):null,[e]),N=E.jsx(Vi,{ref:y,type:a,variant:"ghost",className:bn("rte-menu__button",h),style:d,iconOnly:w,slotBefore:!w&&C,slotAfter:S&&E.jsx("span",{className:"rte-icon-arrow",children:E.jsx(iu,{name:"ChevronDown",size:16})}),onFocusCapture:L=>L.stopPropagation(),"data-active":b.isEditable&&t||void 0,"aria-label":typeof u=="string"?u:n,disabled:!b.isEditable||m,...g,children:w?C:!l&&n}),$=A?E.jsx(Ev,{content:A,options:{collisionBoundary:(I=T.current)==null?void 0:I.parentElement},children:N}):N;return o==="dropdown"?E.jsxs(qq,{modal:!1,children:[E.jsx(Zq,{asChild:!0,children:$}),E.jsx(fM,{className:p,style:f,onCloseAutoFocus:L=>L.preventDefault(),children:s})]}):o==="popover"?E.jsxs(Yq,{modal:!1,children:[E.jsx(Kq,{asChild:!0,children:$}),E.jsx(mM,{className:p,style:f,onCloseAutoFocus:L=>L.preventDefault(),children:s})]}):$});RQ.displayName="MenuButton";const be=v.memo(RQ),kie=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:()=>({})});return E.jsx(be,{icon:"Table",tooltip:"Table",type:"popover",hideArrow:!0,...e,children:E.jsx(cj,{onCreate:({rows:n,cols:r})=>t.chain().insertTable({rows:n,cols:r,withHeaderRow:!1}).focus().run()})})},_ie=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:n=>({active:n.editor.isActive({textAlign:"center"}),disabled:!n.editor.can().setTextAlign("center")})});return E.jsx(be,{icon:"AlignCenter",tooltip:"Center",shortcuts:["Mod","Shift","E"],onClick:()=>t.chain().focus().setTextAlign("center").run(),...e})},xie=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:n=>({active:n.editor.isActive({textAlign:"justify"}),disabled:!n.editor.can().setTextAlign("justify")})});return E.jsx(be,{icon:"AlignJustify",tooltip:"Justify",shortcuts:["Mod","Shift","F"],onClick:()=>t.chain().focus().setTextAlign("justify").run(),...e})},Cie=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:n=>({active:n.editor.isActive({textAlign:"left"}),disabled:!n.editor.can().setTextAlign("left")})});return E.jsx(be,{icon:"AlignLeft",tooltip:"Left",shortcuts:["Mod","Shift","L"],onClick:()=>t.chain().focus().setTextAlign("left").run(),...e})},Die=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:n=>({active:n.editor.isActive({textAlign:"right"}),disabled:!n.editor.can().setTextAlign("right")})});return E.jsx(be,{icon:"AlignRight",tooltip:"Right",shortcuts:["Mod","Shift","R"],onClick:()=>t.chain().focus().setTextAlign("right").run(),...e})},Aie=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:r=>r.editor.isActive({textAlign:"right"})?"AlignRight":r.editor.isActive({textAlign:"center"})?"AlignCenter":r.editor.isActive({textAlign:"justify"})?"AlignJustify":"AlignLeft"}),n=!t.isEditable||!t.can().setTextAlign("left");return E.jsx(be,{type:"popover",icon:e,tooltip:"Alignment",disabled:n,children:E.jsx(Ov,{asChild:!0,children:E.jsxs(li,{dense:!0,children:[E.jsx(Cie,{}),E.jsx(_ie,{}),E.jsx(Die,{}),E.jsx(xie,{})]})})})},Pie=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:n=>({active:n.editor.isActive("bold"),disabled:!n.editor.can().toggleBold()})});return E.jsx(be,{icon:"Bold",tooltip:"Bold",shortcuts:["Mod","B"],onClick:()=>t.chain().focus().toggleBold().run(),...e})},Nie=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:n=>({active:n.editor.isActive("bulletList"),disabled:!n.editor.isEditable})});return E.jsx(be,{icon:"BulletList",tooltip:"Bullet List",shortcuts:["Mod","Shift","8"],onClick:()=>t.chain().focus().toggleBulletList().run(),...e})},Rie=[1,2,3,4,5,6],Mie=()=>{var s;const{editor:t}=$e(),e=Ue({editor:t,selector:o=>{const{editor:a}=o;if(a.isActive("paragraph"))return"p";const l=Rie.find(c=>a.isActive("heading",{level:c}));return l?`h${l}`:null}}),n=v.useMemo(()=>[{value:"p",label:"Paragraph"},{value:"h1",label:"Heading 1"},{value:"h2",label:"Heading 2"},{value:"h3",label:"Heading 3"},{value:"h4",label:"Heading 4"}],[]),r=v.useCallback(o=>{o.startsWith("h")?t.chain().focus().setHeading({level:+o[1]}).run():t.chain().focus().setParagraph().run()},[t]),i=((s=n.find(o=>o.value===e))==null?void 0:s.label)||"Headings";return E.jsx(be,{type:"dropdown",text:i,tooltip:"Headings",hideText:!1,disabled:!t.isEditable||!e,buttonStyle:{minWidth:"6.5rem"},dropdownClass:"rte-heading-dropdown",children:n.map(o=>E.jsx(gv,{"data-active":o.value===e||void 0,"data-heading":o.value,onSelect:()=>r(o.value),children:o.label},o.value))})},Iie=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:n=>({active:n.editor.isActive("italic"),disabled:!n.editor.can().toggleItalic()})});return E.jsx(be,{icon:"Italic",tooltip:"Italic",shortcuts:["Mod","I"],onClick:()=>t.chain().focus().toggleItalic().run(),...e})},Lie=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:n=>({active:n.editor.isActive("link"),disabled:!n.editor.can().setLink({href:""})})});return E.jsx(be,{icon:"Link",tooltip:"Link",shortcuts:["Mod","K"],onClick:()=>t.commands.startEditLink(),...e})},Qie=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:n=>({active:n.editor.isActive("code"),disabled:!n.editor.can().toggleCode()})});return E.jsx(be,{icon:"CodeInline",tooltip:"Inline code",shortcuts:["Mod","E"],onClick:()=>t.chain().focus().toggleCode().run(),...e})},$ie=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:n=>({active:n.editor.isActive("strike"),disabled:!n.editor.can().toggleStrike()})});return E.jsx(be,{icon:"Strike",tooltip:"Strikethrough",shortcuts:["Mod","Shift","S"],onClick:()=>t.chain().focus().toggleStrike().run(),...e})},Fie=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:n=>({active:n.editor.isActive("subscript"),disabled:!n.editor.can().toggleSubscript()})});return E.jsx(be,{icon:"Subscript",tooltip:"Subscript",shortcuts:["Mod",","],onClick:()=>t.chain().focus().toggleSubscript().run(),...e})},Bie=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:n=>({active:n.editor.isActive("superscript"),disabled:!n.editor.can().toggleSuperscript()})});return E.jsx(be,{icon:"Superscript",tooltip:"Superscript",shortcuts:["Mod","."],onClick:()=>t.chain().focus().toggleSuperscript().run(),...e})},jie=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:n=>!n.editor.can().setStrike()&&!n.editor.can().setSuperscript()&&!n.editor.can().setSubscript()&&!n.editor.can().setCode()});return E.jsx(be,{type:"popover",icon:"LetterCase",tooltip:"More format",disabled:e,children:E.jsx(Ov,{asChild:!0,children:E.jsxs(li,{dense:!0,children:[E.jsx($ie,{}),E.jsx(Bie,{}),E.jsx(Fie,{}),E.jsx(Qie,{})]})})})},zie=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:n=>({active:n.editor.isActive("orderedList"),disabled:!n.editor.isEditable})});return E.jsx(be,{icon:"OrderedList",tooltip:"Numbered List",shortcuts:["Mod","Shift","7"],onClick:()=>t.chain().focus().toggleOrderedList().run(),...e})},Vie=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:n=>({disabled:!n.editor.can().redo()})});return E.jsx(be,{icon:"Redo",tooltip:"Redo",shortcuts:["Mod","Y"],onClick:()=>t.chain().focus().redo().run(),...e})};function MQ(){const[t,e]=v.useState(!1);return v.useEffect(()=>e(!0),[]),t}const Uie=["#B12318","#EB3323","#F6C143","#FFFE55","#A0CD63","#4FAD5B","#4CAFEA","#2D70BA","#68389B"],Hie=["#FFFFFF","#000000","#3B74EC","#45A2EF","#529867","#CD4A3F","#EA8D40","#EEC543","#8E45D0","#F2F2F2","#7F7F7F","#CBDCFC","#E8F6FE","#EDFAF2","#FCEAE9","#FDF3EC","#FEF9E5","#FAECFE","#EEEEEE","#595959","#CEEBFD","#DDE9FE","#CBE9D7","#F7CBC9","#FADDC7","#FDEEB5","#EBCAFC","#BFBFBF","#3F3F3F","#A0BEFA","#A7DCFC","#A6D5B8","#F2A19C","#F5BC8C","#FBE281","#CB94F9","#A5A5A5","#262626","#2452B2","#3473A1","#417A53","#922B22","#AD642A","#9E8329","#57297D","#939393","#0D0D0D","#15316A","#1C415A","#284D34","#511712","#573213","#635217","#36194E"];function _m(){return(_m=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function IQ(t,e){if(t==null)return{};var n,r,i={},s=Object.keys(t);for(r=0;r<s.length;r++)e.indexOf(n=s[r])>=0||(i[n]=t[n]);return i}function Pb(t){var e=v.useRef(t),n=v.useRef(function(r){e.current&&e.current(r)});return e.current=t,n.current}var Tu=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=1),t>n?n:t<e?e:t},Pc=function(t){return"touches"in t},Nb=function(t){return t&&t.ownerDocument.defaultView||self},hC=function(t,e,n){var r=t.getBoundingClientRect(),i=Pc(e)?(function(s,o){for(var a=0;a<s.length;a++)if(s[a].identifier===o)return s[a];return s[0]})(e.touches,n):e;return{left:Tu((i.pageX-(r.left+Nb(t).pageXOffset))/r.width),top:Tu((i.pageY-(r.top+Nb(t).pageYOffset))/r.height)}},dC=function(t){!Pc(t)&&t.preventDefault()},LQ=Ne.memo(function(t){var e=t.onMove,n=t.onKey,r=IQ(t,["onMove","onKey"]),i=v.useRef(null),s=Pb(e),o=Pb(n),a=v.useRef(null),l=v.useRef(!1),c=v.useMemo(function(){var p=function(g){dC(g),(Pc(g)?g.touches.length>0:g.buttons>0)&&i.current?s(hC(i.current,g,a.current)):m(!1)},f=function(){return m(!1)};function m(g){var y=l.current,b=Nb(i.current),T=g?b.addEventListener:b.removeEventListener;T(y?"touchmove":"mousemove",p),T(y?"touchend":"mouseup",f)}return[function(g){var y=g.nativeEvent,b=i.current;if(b&&(dC(y),!(function(S,w){return w&&!Pc(S)})(y,l.current)&&b)){if(Pc(y)){l.current=!0;var T=y.changedTouches||[];T.length&&(a.current=T[0].identifier)}b.focus(),s(hC(b,y,a.current)),m(!0)}},function(g){var y=g.which||g.keyCode;y<37||y>40||(g.preventDefault(),o({left:y===39?.05:y===37?-.05:0,top:y===40?.05:y===38?-.05:0}))},m]},[o,s]),u=c[0],h=c[1],d=c[2];return v.useEffect(function(){return d},[d]),Ne.createElement("div",_m({},r,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:i,onKeyDown:h,tabIndex:0,role:"slider"}))}),AT=function(t){return t.filter(Boolean).join(" ")},QQ=function(t){var e=t.color,n=t.left,r=t.top,i=r===void 0?.5:r,s=AT(["react-colorful__pointer",t.className]);return Ne.createElement("div",{className:s,style:{top:100*i+"%",left:100*n+"%"}},Ne.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:e}}))},rn=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=Math.pow(10,e)),Math.round(n*t)/n},Xie=function(t){return Yie(Rb(t))},Rb=function(t){return t[0]==="#"&&(t=t.substring(1)),t.length<6?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?rn(parseInt(t[3]+t[3],16)/255,2):1}:{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16),a:t.length===8?rn(parseInt(t.substring(6,8),16)/255,2):1}},qie=function(t){return Gie(Wie(t))},Zie=function(t){var e=t.s,n=t.v,r=t.a,i=(200-e)*n/100;return{h:rn(t.h),s:rn(i>0&&i<200?e*n/100/(i<=100?i:200-i)*100:0),l:rn(i/2),a:rn(r,2)}},Mb=function(t){var e=Zie(t);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},Wie=function(t){var e=t.h,n=t.s,r=t.v,i=t.a;e=e/360*6,n/=100,r/=100;var s=Math.floor(e),o=r*(1-n),a=r*(1-(e-s)*n),l=r*(1-(1-e+s)*n),c=s%6;return{r:rn(255*[r,a,o,o,l,r][c]),g:rn(255*[l,r,r,a,o,o][c]),b:rn(255*[o,o,l,r,r,a][c]),a:rn(i,2)}},td=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},Gie=function(t){var e=t.r,n=t.g,r=t.b,i=t.a,s=i<1?td(rn(255*i)):"";return"#"+td(e)+td(n)+td(r)+s},Yie=function(t){var e=t.r,n=t.g,r=t.b,i=t.a,s=Math.max(e,n,r),o=s-Math.min(e,n,r),a=o?s===e?(n-r)/o:s===n?2+(r-e)/o:4+(e-n)/o:0;return{h:rn(60*(a<0?a+6:a)),s:rn(s?o/s*100:0),v:rn(s/255*100),a:i}},Kie=Ne.memo(function(t){var e=t.hue,n=t.onChange,r=AT(["react-colorful__hue",t.className]);return Ne.createElement("div",{className:r},Ne.createElement(LQ,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:Tu(e+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":rn(e),"aria-valuemax":"360","aria-valuemin":"0"},Ne.createElement(QQ,{className:"react-colorful__hue-pointer",left:e/360,color:Mb({h:e,s:100,v:100,a:1})})))}),Jie=Ne.memo(function(t){var e=t.hsva,n=t.onChange,r={backgroundColor:Mb({h:e.h,s:100,v:100,a:1})};return Ne.createElement("div",{className:"react-colorful__saturation",style:r},Ne.createElement(LQ,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:Tu(e.s+100*i.left,0,100),v:Tu(e.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+rn(e.s)+"%, Brightness "+rn(e.v)+"%"},Ne.createElement(QQ,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:Mb(e)})))}),$Q=function(t,e){if(t===e)return!0;for(var n in t)if(t[n]!==e[n])return!1;return!0},ese=function(t,e){return t.toLowerCase()===e.toLowerCase()||$Q(Rb(t),Rb(e))};function tse(t,e,n){var r=Pb(n),i=v.useState(function(){return t.toHsva(e)}),s=i[0],o=i[1],a=v.useRef({color:e,hsva:s});v.useEffect(function(){if(!t.equal(e,a.current.color)){var c=t.toHsva(e);a.current={hsva:c,color:e},o(c)}},[e,t]),v.useEffect(function(){var c;$Q(s,a.current.hsva)||t.equal(c=t.fromHsva(s),a.current.color)||(a.current={hsva:s,color:c},r(c))},[s,t,r]);var l=v.useCallback(function(c){o(function(u){return Object.assign({},u,c)})},[]);return[s,l]}var nse=typeof window<"u"?v.useLayoutEffect:v.useEffect,rse=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},pC=new Map,ise=function(t){nse(function(){var e=t.current?t.current.ownerDocument:document;if(e!==void 0&&!pC.has(e)){var n=e.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,pC.set(e,n);var r=rse();r&&n.setAttribute("nonce",r),e.head.appendChild(n)}},[])},sse=function(t){var e=t.className,n=t.colorModel,r=t.color,i=r===void 0?n.defaultColor:r,s=t.onChange,o=IQ(t,["className","colorModel","color","onChange"]),a=v.useRef(null);ise(a);var l=tse(n,i,s),c=l[0],u=l[1],h=AT(["react-colorful",e]);return Ne.createElement("div",_m({},o,{ref:a,className:h}),Ne.createElement(Jie,{hsva:c,onChange:u}),Ne.createElement(Kie,{hue:c.h,onChange:u,className:"react-colorful__last-control"}))},ose={defaultColor:"000",toHsva:Xie,fromHsva:function(t){return qie({h:t.h,s:t.s,v:t.v,a:1})},equal:ese},ase=function(t){return Ne.createElement(sse,_m({},t,{colorModel:ose}))};const Zo=v.forwardRef(({className:t,type:e="text",...n},r)=>E.jsx("input",{type:e,className:bn("rte-input",t),ref:r,...n}));Zo.displayName="Input";const Np=({as:t="label",children:e,className:n=""})=>E.jsx(t,{className:bn("rte-label",n),children:e}),fC=({color:t,tooltip:e=!0,active:n,onClick:r})=>{const i=E.jsx("button",{type:"button",tabIndex:-1,"data-active":n?"true":void 0,className:"rte-color__btn",style:{background:t},onClick:()=>r==null?void 0:r(t)});return e?E.jsx(Ev,{content:t,children:i}):i},FQ=t=>{const[e,n]=v.useState("swatches"),[r,i]=v.useState(t.color),s=u=>{const h=u.startsWith("#")?u:`#${u}`;return h.length===4?`${h}${h.slice(1)}`:h},o=(u,h)=>s(u).toUpperCase()===s(h).toUpperCase(),a=u=>{i(u)},l=()=>{var u;r&&/^#?[0-9A-F]{3,6}$/i.test(r)&&((u=t.onChange)==null||u.call(t,s(r)))},c=(u,h)=>E.jsxs("div",{children:[E.jsx(Np,{as:"span",children:h}),E.jsx("div",{className:"rte-color__list",children:u.map(d=>E.jsx(fC,{active:o(d,r),color:d,onClick:()=>a(d)},d))})]});return E.jsxs("div",{className:"rte-cp",children:[E.jsx("div",{className:"rte-cp__tabs",children:["swatches","custom"].map(u=>E.jsx(Vi,{type:"button",variant:"ghost","data-active":e===u||void 0,onClick:()=>n(u),className:"rte-cp__tab",children:u.charAt(0).toUpperCase()+u.slice(1)},u))}),E.jsxs("div",{className:"rte-cp__main",children:[e==="swatches"&&E.jsxs("div",{className:"rte-cp-swatches",children:[c(Uie,"Default Colors"),c(Hie,"More Colors")]}),e==="custom"&&E.jsxs("div",{className:"rte-cp-custom",children:[E.jsx(ase,{className:"rte-cp-custom__picker",style:{width:"100%"},color:r,onChange:a}),E.jsxs("div",{className:"rte-cp-custom__preview",children:[E.jsx(fC,{color:r,tooltip:!1}),E.jsx(Zo,{value:r,style:{textTransform:"uppercase"},onChange:u=>a(u.target.value),autoFocus:!0})]})]})]}),E.jsx(Qf,{asChild:!0,children:E.jsxs("div",{className:"rte-cp__actions",children:[E.jsx(Vi,{variant:"secondary",iconOnly:!0,type:"button",onClick:t.onReset,children:E.jsx(iu,{name:"PaletteOff"})}),E.jsx(Vi,{style:{width:"100%"},type:"button",onClick:l,children:"Apply"})]})})]})},lse=()=>{const t=v.useRef(null),e=MQ(),{editor:n}=$e(),r=Ue({editor:n,selector:o=>({color:o.editor.getAttributes("textStyle").color||"DEFAULT",disabled:!o.editor.can().setColor("")})}),i={position:"absolute",bottom:1.5,insetInline:4,height:4,borderRadius:4,pointerEvents:"none",background:r.color==="DEFAULT"?"var(--rte-fg, black)":r.color},s=e&&t.current?pl.createPortal(E.jsx("div",{style:i}),t.current):null;return E.jsxs(E.Fragment,{children:[E.jsx(be,{ref:t,type:"popover",icon:"TextColor",hideArrow:!0,tooltip:"Color",disabled:r.disabled,children:E.jsx(FQ,{color:r.color,onChange:o=>n.chain().focus().setColor(o).run(),onReset:()=>n.chain().focus().unsetColor().run()})}),s]})},cse=()=>{const t=v.useRef(null),e=MQ(),{editor:n}=$e(),r=Ue({editor:n,selector:o=>({color:o.editor.getAttributes("highlight").color||"DEFAULT",disabled:!o.editor.can().setHighlight()})}),i={position:"absolute",bottom:1.5,insetInline:4,height:4,borderRadius:4,pointerEvents:"none",background:r.color==="DEFAULT"?"var(--rte-bg, white)":r.color},s=e&&t.current?pl.createPortal(E.jsx("div",{style:i}),t.current):null;return E.jsxs(E.Fragment,{children:[E.jsx(be,{ref:t,type:"popover",icon:"TextHighlight",hideArrow:!0,tooltip:"Highlight",disabled:r.disabled,children:E.jsx(FQ,{color:r.color,onChange:o=>n.chain().focus().setHighlight({color:o}).run(),onReset:()=>n.chain().focus().unsetHighlight().run()})}),s]})},use=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:n=>({active:n.editor.isActive("underline"),disabled:!n.editor.can().toggleUnderline()})});return E.jsx(be,{icon:"Underline",tooltip:"Underline",shortcuts:["Mod","U"],onClick:()=>t.chain().focus().toggleUnderline().run(),...e})},hse=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:n=>({disabled:!n.editor.can().undo()})});return E.jsx(be,{icon:"Undo",tooltip:"Undo",shortcuts:["Mod","Z"],onClick:()=>t.chain().focus().undo().run(),...e})},dse=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:s=>({active:s.editor.isActive("image"),disabled:!s.editor.isEditable})}),n=v.useRef(null),r=v.useCallback(()=>{var s;(s=n.current)==null||s.click()},[]),i=v.useCallback(s=>{var a;const o=(a=s.target.files)==null?void 0:a[0];if(o!=null&&o.type.startsWith("image/")){const l=URL.createObjectURL(o);t.chain().setImage({src:l}).focus().run()}},[t]);return E.jsxs(v.Fragment,{children:[E.jsx(be,{icon:"Image",tooltip:"Image",...e,onClick:r}),E.jsx("input",{style:{display:"none"},type:"file",accept:"image/*",ref:n,onChange:i})]})};var xm="Dialog",[BQ]=Ys(xm),[pse,Mr]=BQ(xm),jQ=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:o=!0}=t,a=v.useRef(null),l=v.useRef(null),[c,u]=Iu({prop:r,defaultProp:i??!1,onChange:s,caller:xm});return E.jsx(pse,{scope:e,triggerRef:a,contentRef:l,contentId:Is(),titleId:Is(),descriptionId:Is(),open:c,onOpenChange:u,onOpenToggle:v.useCallback(()=>u(h=>!h),[u]),modal:o,children:n})};jQ.displayName=xm;var zQ="DialogTrigger",fse=v.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Mr(zQ,n),s=_t(e,i.triggerRef);return E.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":RT(i.open),...r,ref:s,onClick:ve(t.onClick,i.onOpenToggle)})});fse.displayName=zQ;var PT="DialogPortal",[mse,VQ]=BQ(PT,{forceMount:void 0}),UQ=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:i}=t,s=Mr(PT,e);return E.jsx(mse,{scope:e,forceMount:n,children:v.Children.map(r,o=>E.jsx(fi,{present:n||s.open,children:E.jsx(PE,{asChild:!0,container:i,children:o})}))})};UQ.displayName=PT;var Rp="DialogOverlay",HQ=v.forwardRef((t,e)=>{const n=VQ(Rp,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,s=Mr(Rp,t.__scopeDialog);return s.modal?E.jsx(fi,{present:r||s.open,children:E.jsx(Ose,{...i,ref:e})}):null});HQ.displayName=Rp;var gse=Ba("DialogOverlay.RemoveScroll"),Ose=v.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Mr(Rp,n);return E.jsx(If,{as:gse,allowPinchZoom:!0,shards:[i.contentRef],children:E.jsx(pt.div,{"data-state":RT(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Wo="DialogContent",XQ=v.forwardRef((t,e)=>{const n=VQ(Wo,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,s=Mr(Wo,t.__scopeDialog);return E.jsx(fi,{present:r||s.open,children:s.modal?E.jsx(yse,{...i,ref:e}):E.jsx(bse,{...i,ref:e})})});XQ.displayName=Wo;var yse=v.forwardRef((t,e)=>{const n=Mr(Wo,t.__scopeDialog),r=v.useRef(null),i=_t(e,n.contentRef,r);return v.useEffect(()=>{const s=r.current;if(s)return NE(s)},[]),E.jsx(qQ,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ve(t.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ve(t.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:ve(t.onFocusOutside,s=>s.preventDefault())})}),bse=v.forwardRef((t,e)=>{const n=Mr(Wo,t.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return E.jsx(qQ,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,s),s.defaultPrevented||(r.current||((a=n.triggerRef.current)==null||a.focus()),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var a,l;(a=t.onInteractOutside)==null||a.call(t,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=s.target;(l=n.triggerRef.current)!=null&&l.contains(o)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),qQ=v.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=t,a=Mr(Wo,n),l=v.useRef(null),c=_t(e,l);return yE(),E.jsxs(E.Fragment,{children:[E.jsx(Cf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:E.jsx(Ru,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":RT(a.open),...o,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),E.jsxs(E.Fragment,{children:[E.jsx(Ese,{titleId:a.titleId}),E.jsx(Tse,{contentRef:l,descriptionId:a.descriptionId})]})]})}),NT="DialogTitle",ZQ=v.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Mr(NT,n);return E.jsx(pt.h2,{id:i.titleId,...r,ref:e})});ZQ.displayName=NT;var WQ="DialogDescription",GQ=v.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Mr(WQ,n);return E.jsx(pt.p,{id:i.descriptionId,...r,ref:e})});GQ.displayName=WQ;var YQ="DialogClose",KQ=v.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Mr(YQ,n);return E.jsx(pt.button,{type:"button",...r,ref:e,onClick:ve(t.onClick,()=>i.onOpenChange(!1))})});KQ.displayName=YQ;function RT(t){return t?"open":"closed"}var JQ="DialogTitleWarning",[oye,e$]=m3(JQ,{contentName:Wo,titleName:NT,docsSlug:"dialog"}),Ese=({titleId:t})=>{const e=e$(JQ),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return v.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},vse="DialogDescriptionWarning",Tse=({contentRef:t,descriptionId:e})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${e$(vse).contentName}}.`;return v.useEffect(()=>{var i;const r=(i=t.current)==null?void 0:i.getAttribute("aria-describedby");e&&r&&(document.getElementById(e)||console.warn(n))},[n,t,e]),null},Sse=jQ,wse=UQ,kse=HQ,_se=XQ,xse=ZQ,Cse=GQ,t$=KQ;const Dse=(t,e)=>{const n=new Array(t.length+e.length);for(let r=0;r<t.length;r++)n[r]=t[r];for(let r=0;r<e.length;r++)n[t.length+r]=e[r];return n},Ase=(t,e)=>({classGroupId:t,validator:e}),n$=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),Mp="-",mC=[],Pse="arbitrary..",Nse=t=>{const e=Mse(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Rse(i);const s=i.split(Mp),o=s[0]===""&&s.length>1?1:0;return r$(s,o,e)},getConflictingClassGroupIds:(i,s)=>{if(s){const o=r[i],a=n[i];return o?a?Dse(a,o):o:a||mC}return n[i]||mC}}},r$=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const r=t[e],i=n.nextPart.get(r);if(i){const l=r$(t,e+1,i);if(l)return l}const s=n.validators;if(s===null)return;const o=e===0?t.join(Mp):t.slice(e).join(Mp),a=s.length;for(let l=0;l<a;l++){const c=s[l];if(c.validator(o))return c.classGroupId}},Rse=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),r=e.slice(0,n);return r?Pse+r:void 0})(),Mse=t=>{const{theme:e,classGroups:n}=t;return Ise(n,e)},Ise=(t,e)=>{const n=n$();for(const r in t){const i=t[r];MT(i,n,r,e)}return n},MT=(t,e,n,r)=>{const i=t.length;for(let s=0;s<i;s++){const o=t[s];Lse(o,e,n,r)}},Lse=(t,e,n,r)=>{if(typeof t=="string"){Qse(t,e,n);return}if(typeof t=="function"){$se(t,e,n,r);return}Fse(t,e,n,r)},Qse=(t,e,n)=>{const r=t===""?e:i$(e,t);r.classGroupId=n},$se=(t,e,n,r)=>{if(Bse(t)){MT(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(Ase(n,t))},Fse=(t,e,n,r)=>{const i=Object.entries(t),s=i.length;for(let o=0;o<s;o++){const[a,l]=i[o];MT(l,i$(e,a),n,r)}},i$=(t,e)=>{let n=t;const r=e.split(Mp),i=r.length;for(let s=0;s<i;s++){const o=r[s];let a=n.nextPart.get(o);a||(a=n$(),n.nextPart.set(o,a)),n=a}return n},Bse=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,jse=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null);const i=(s,o)=>{n[s]=o,e++,e>t&&(e=0,r=n,n=Object.create(null))};return{get(s){let o=n[s];if(o!==void 0)return o;if((o=r[s])!==void 0)return i(s,o),o},set(s,o){s in n?n[s]=o:i(s,o)}}},Ib="!",gC=":",zse=[],OC=(t,e,n,r,i)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Vse=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=i=>{const s=[];let o=0,a=0,l=0,c;const u=i.length;for(let m=0;m<u;m++){const g=i[m];if(o===0&&a===0){if(g===gC){s.push(i.slice(l,m)),l=m+1;continue}if(g==="/"){c=m;continue}}g==="["?o++:g==="]"?o--:g==="("?a++:g===")"&&a--}const h=s.length===0?i:i.slice(l);let d=h,p=!1;h.endsWith(Ib)?(d=h.slice(0,-1),p=!0):h.startsWith(Ib)&&(d=h.slice(1),p=!0);const f=c&&c>l?c-l:void 0;return OC(s,p,d,f)};if(e){const i=e+gC,s=r;r=o=>o.startsWith(i)?s(o.slice(i.length)):OC(zse,!1,o,void 0,!0)}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},Use=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let s=0;s<n.length;s++){const o=n[s],a=o[0]==="[",l=e.has(o);a||l?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(o)):i.push(o)}return i.length>0&&(i.sort(),r.push(...i)),r}},Hse=t=>({cache:jse(t.cacheSize),parseClassName:Vse(t),sortModifiers:Use(t),...Nse(t)}),Xse=/\s+/,qse=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=e,o=[],a=t.trim().split(Xse);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:h,modifiers:d,hasImportantModifier:p,baseClassName:f,maybePostfixModifierPosition:m}=n(u);if(h){l=u+(l.length>0?" "+l:l);continue}let g=!!m,y=r(g?f.substring(0,m):f);if(!y){if(!g){l=u+(l.length>0?" "+l:l);continue}if(y=r(f),!y){l=u+(l.length>0?" "+l:l);continue}g=!1}const b=d.length===0?"":d.length===1?d[0]:s(d).join(":"),T=p?b+Ib:b,S=T+y;if(o.indexOf(S)>-1)continue;o.push(S);const w=i(y,g);for(let A=0;A<w.length;++A){const C=w[A];o.push(T+C)}l=u+(l.length>0?" "+l:l)}return l},Zse=(...t)=>{let e=0,n,r,i="";for(;e<t.length;)(n=t[e++])&&(r=s$(n))&&(i&&(i+=" "),i+=r);return i},s$=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=s$(t[r]))&&(n&&(n+=" "),n+=e);return n},Wse=(t,...e)=>{let n,r,i,s;const o=l=>{const c=e.reduce((u,h)=>h(u),t());return n=Hse(c),r=n.cache.get,i=n.cache.set,s=a,a(l)},a=l=>{const c=r(l);if(c)return c;const u=qse(l,n);return i(l,u),u};return s=o,(...l)=>s(Zse(...l))},Gse=[],It=t=>{const e=n=>n[t]||Gse;return e.isThemeGetter=!0,e},o$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,a$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Yse=/^\d+\/\d+$/,Kse=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Jse=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,eoe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,toe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,noe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ma=t=>Yse.test(t),Me=t=>!!t&&!Number.isNaN(Number(t)),ds=t=>!!t&&Number.isInteger(Number(t)),bO=t=>t.endsWith("%")&&Me(t.slice(0,-1)),wi=t=>Kse.test(t),roe=()=>!0,ioe=t=>Jse.test(t)&&!eoe.test(t),l$=()=>!1,soe=t=>toe.test(t),ooe=t=>noe.test(t),aoe=t=>!le(t)&&!ce(t),loe=t=>_l(t,h$,l$),le=t=>o$.test(t),mo=t=>_l(t,d$,ioe),EO=t=>_l(t,poe,Me),yC=t=>_l(t,c$,l$),coe=t=>_l(t,u$,ooe),nd=t=>_l(t,p$,soe),ce=t=>a$.test(t),Hl=t=>xl(t,d$),uoe=t=>xl(t,foe),bC=t=>xl(t,c$),hoe=t=>xl(t,h$),doe=t=>xl(t,u$),rd=t=>xl(t,p$,!0),_l=(t,e,n)=>{const r=o$.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},xl=(t,e,n=!1)=>{const r=a$.exec(t);return r?r[1]?e(r[1]):n:!1},c$=t=>t==="position"||t==="percentage",u$=t=>t==="image"||t==="url",h$=t=>t==="length"||t==="size"||t==="bg-size",d$=t=>t==="length",poe=t=>t==="number",foe=t=>t==="family-name",p$=t=>t==="shadow",moe=()=>{const t=It("color"),e=It("font"),n=It("text"),r=It("font-weight"),i=It("tracking"),s=It("leading"),o=It("breakpoint"),a=It("container"),l=It("spacing"),c=It("radius"),u=It("shadow"),h=It("inset-shadow"),d=It("text-shadow"),p=It("drop-shadow"),f=It("blur"),m=It("perspective"),g=It("aspect"),y=It("ease"),b=It("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...S(),ce,le],A=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],N=()=>[ce,le,l],$=()=>[ma,"full","auto",...N()],I=()=>[ds,"none","subgrid",ce,le],L=()=>["auto",{span:["full",ds,ce,le]},ds,ce,le],Z=()=>[ds,"auto",ce,le],B=()=>["auto","min","max","fr",ce,le],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],J=()=>["auto",...N()],fe=()=>[ma,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],z=()=>[t,ce,le],ne=()=>[...S(),bC,yC,{position:[ce,le]}],Oe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],He=()=>["auto","cover","contain",hoe,loe,{size:[ce,le]}],it=()=>[bO,Hl,mo],Le=()=>["","none","full",c,ce,le],Xe=()=>["",Me,Hl,mo],vt=()=>["solid","dashed","dotted","double"],An=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ge=()=>[Me,bO,bC,yC],Qr=()=>["","none",f,ce,le],mt=()=>["none",Me,ce,le],Jn=()=>["none",Me,ce,le],ls=()=>[Me,ce,le],bi=()=>[ma,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[wi],breakpoint:[wi],color:[roe],container:[wi],"drop-shadow":[wi],ease:["in","out","in-out"],font:[aoe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[wi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[wi],shadow:[wi],spacing:["px",Me],text:[wi],"text-shadow":[wi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ma,le,ce,g]}],container:["container"],columns:[{columns:[Me,le,ce,a]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[ds,"auto",ce,le]}],basis:[{basis:[ma,"full","auto",a,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Me,ma,"auto","initial","none",le]}],grow:[{grow:["",Me,ce,le]}],shrink:[{shrink:["",Me,ce,le]}],order:[{order:[ds,"first","last","none",ce,le]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:J()}],mx:[{mx:J()}],my:[{my:J()}],ms:[{ms:J()}],me:[{me:J()}],mt:[{mt:J()}],mr:[{mr:J()}],mb:[{mb:J()}],ml:[{ml:J()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:fe()}],w:[{w:[a,"screen",...fe()]}],"min-w":[{"min-w":[a,"screen","none",...fe()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...fe()]}],h:[{h:["screen","lh",...fe()]}],"min-h":[{"min-h":["screen","lh","none",...fe()]}],"max-h":[{"max-h":["screen","lh",...fe()]}],"font-size":[{text:["base",n,Hl,mo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ce,EO]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",bO,le]}],"font-family":[{font:[uoe,le,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ce,le]}],"line-clamp":[{"line-clamp":[Me,"none",ce,EO]}],leading:[{leading:[s,...N()]}],"list-image":[{"list-image":["none",ce,le]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,le]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...vt(),"wavy"]}],"text-decoration-thickness":[{decoration:[Me,"from-font","auto",ce,mo]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[Me,"auto",ce,le]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,le]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce,le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ne()}],"bg-repeat":[{bg:Oe()}],"bg-size":[{bg:He()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ds,ce,le],radial:["",ce,le],conic:[ds,ce,le]},doe,coe]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:it()}],"gradient-via-pos":[{via:it()}],"gradient-to-pos":[{to:it()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:Le()}],"rounded-s":[{"rounded-s":Le()}],"rounded-e":[{"rounded-e":Le()}],"rounded-t":[{"rounded-t":Le()}],"rounded-r":[{"rounded-r":Le()}],"rounded-b":[{"rounded-b":Le()}],"rounded-l":[{"rounded-l":Le()}],"rounded-ss":[{"rounded-ss":Le()}],"rounded-se":[{"rounded-se":Le()}],"rounded-ee":[{"rounded-ee":Le()}],"rounded-es":[{"rounded-es":Le()}],"rounded-tl":[{"rounded-tl":Le()}],"rounded-tr":[{"rounded-tr":Le()}],"rounded-br":[{"rounded-br":Le()}],"rounded-bl":[{"rounded-bl":Le()}],"border-w":[{border:Xe()}],"border-w-x":[{"border-x":Xe()}],"border-w-y":[{"border-y":Xe()}],"border-w-s":[{"border-s":Xe()}],"border-w-e":[{"border-e":Xe()}],"border-w-t":[{"border-t":Xe()}],"border-w-r":[{"border-r":Xe()}],"border-w-b":[{"border-b":Xe()}],"border-w-l":[{"border-l":Xe()}],"divide-x":[{"divide-x":Xe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Xe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...vt(),"hidden","none"]}],"divide-style":[{divide:[...vt(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...vt(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Me,ce,le]}],"outline-w":[{outline:["",Me,Hl,mo]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",u,rd,nd]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",h,rd,nd]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:Xe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[Me,mo]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":Xe()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",d,rd,nd]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[Me,ce,le]}],"mix-blend":[{"mix-blend":[...An(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":An()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Me]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ge()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":Ge()}],"mask-image-t-to-pos":[{"mask-t-to":Ge()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":Ge()}],"mask-image-r-to-pos":[{"mask-r-to":Ge()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":Ge()}],"mask-image-b-to-pos":[{"mask-b-to":Ge()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":Ge()}],"mask-image-l-to-pos":[{"mask-l-to":Ge()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":Ge()}],"mask-image-x-to-pos":[{"mask-x-to":Ge()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":Ge()}],"mask-image-y-to-pos":[{"mask-y-to":Ge()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[ce,le]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ge()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[Me]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ge()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ne()}],"mask-repeat":[{mask:Oe()}],"mask-size":[{mask:He()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,le]}],filter:[{filter:["","none",ce,le]}],blur:[{blur:Qr()}],brightness:[{brightness:[Me,ce,le]}],contrast:[{contrast:[Me,ce,le]}],"drop-shadow":[{"drop-shadow":["","none",p,rd,nd]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",Me,ce,le]}],"hue-rotate":[{"hue-rotate":[Me,ce,le]}],invert:[{invert:["",Me,ce,le]}],saturate:[{saturate:[Me,ce,le]}],sepia:[{sepia:["",Me,ce,le]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,le]}],"backdrop-blur":[{"backdrop-blur":Qr()}],"backdrop-brightness":[{"backdrop-brightness":[Me,ce,le]}],"backdrop-contrast":[{"backdrop-contrast":[Me,ce,le]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Me,ce,le]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Me,ce,le]}],"backdrop-invert":[{"backdrop-invert":["",Me,ce,le]}],"backdrop-opacity":[{"backdrop-opacity":[Me,ce,le]}],"backdrop-saturate":[{"backdrop-saturate":[Me,ce,le]}],"backdrop-sepia":[{"backdrop-sepia":["",Me,ce,le]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,le]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Me,"initial",ce,le]}],ease:[{ease:["linear","initial",y,ce,le]}],delay:[{delay:[Me,ce,le]}],animate:[{animate:["none",b,ce,le]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ce,le]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:mt()}],"rotate-x":[{"rotate-x":mt()}],"rotate-y":[{"rotate-y":mt()}],"rotate-z":[{"rotate-z":mt()}],scale:[{scale:Jn()}],"scale-x":[{"scale-x":Jn()}],"scale-y":[{"scale-y":Jn()}],"scale-z":[{"scale-z":Jn()}],"scale-3d":["scale-3d"],skew:[{skew:ls()}],"skew-x":[{"skew-x":ls()}],"skew-y":[{"skew-y":ls()}],transform:[{transform:[ce,le,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:bi()}],"translate-x":[{"translate-x":bi()}],"translate-y":[{"translate-y":bi()}],"translate-z":[{"translate-z":bi()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ce,le]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ce,le]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[Me,Hl,mo,EO]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},goe=Wse(moe);function Cl(...t){return goe(bn(t))}function Ooe({...t}){return E.jsx(Sse,{"data-slot":"dialog",...t})}function yoe({...t}){return E.jsx(wse,{"data-slot":"dialog-portal",...t})}function boe({...t}){return E.jsx(t$,{"data-slot":"dialog-close",...t})}function Eoe({className:t,...e}){return E.jsx(kse,{"data-slot":"dialog-overlay",className:Cl("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...e})}function voe({className:t,children:e,showCloseButton:n=!0,...r}){return E.jsxs(yoe,{"data-slot":"dialog-portal",children:[E.jsx(Eoe,{}),E.jsxs(_se,{"data-slot":"dialog-content",className:Cl("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...r,children:[e,n&&E.jsxs(t$,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[E.jsx(lM,{}),E.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Toe({className:t,...e}){return E.jsx("div",{"data-slot":"dialog-header",className:Cl("flex flex-col gap-2 text-center sm:text-left",t),...e})}function Soe({className:t,...e}){return E.jsx("div",{"data-slot":"dialog-footer",className:Cl("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...e})}function woe({className:t,...e}){return E.jsx(xse,{"data-slot":"dialog-title",className:Cl("text-lg leading-none font-semibold",t),...e})}function koe({className:t,...e}){return E.jsx(Cse,{"data-slot":"dialog-description",className:Cl("text-muted-foreground text-sm",t),...e})}const _oe=()=>{const{editor:t}=$e(),[e,n]=v.useState(!1),[r,i]=v.useState("https://www.youtube.com/watch?v=DupfnOCH-JI"),s=Ue({editor:t,selector:a=>({active:a.editor.isActive("youtube"),disabled:!a.editor.isEditable})}),o=()=>{r.trim()&&(t.chain().focus().embedYoutube({src:r}).run(),i("https://www.youtube.com/watch?v=DupfnOCH-JI"),n(!1))};return E.jsxs(Ooe,{open:e,onOpenChange:n,children:[E.jsx(be,{icon:"Youtube",tooltip:"Youtube",onClick:()=>n(!0),...s}),E.jsxs(voe,{className:"sm:max-w-[425px]",children:[E.jsxs(Toe,{children:[E.jsx(woe,{children:"Embed YouTube Video"}),E.jsx(koe,{children:"Enter the YouTube video URL to embed it in your content."})]}),E.jsx("div",{className:"grid gap-4 py-4",children:E.jsxs("div",{className:"grid gap-3",children:[E.jsx(Np,{children:"YouTube URL"}),E.jsx(Zo,{id:"youtube-url",placeholder:"https://www.youtube.com/watch?v=...",value:r,onChange:a=>i(a.target.value),autoFocus:!0})]})}),E.jsxs(Soe,{children:[E.jsx(boe,{asChild:!0,children:E.jsx(Vi,{type:"button",variant:"outline",children:"Cancel"})}),E.jsx(Vi,{onClick:o,type:"button",variant:"primary",children:"Embed Video"})]})]})]})},xoe=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:n=>({active:n.editor.isActive("codeBlock"),disabled:!n.editor.can().toggleCodeBlock()})});return E.jsx(be,{icon:"Code",tooltip:"Code block",onClick:()=>t.chain().focus().setCodeBlock().run(),...e})},Coe=()=>{const{editor:t}=$e(),e=Ue({editor:t,selector:n=>({active:n.editor.isActive("blockquote"),disabled:!n.editor.can().toggleBlockquote()})});return E.jsx(be,{icon:"Quote",tooltip:"Quote",shortcuts:["Mod","Shift","B"],onClick:()=>t.chain().focus().toggleBlockquote().run(),...e})},Doe=()=>E.jsx("div",{className:"rte-menu-bar",children:E.jsxs(li,{dense:!0,children:[E.jsx(hse,{}),E.jsx(Vie,{}),E.jsx(Ni,{}),E.jsx(Mie,{}),E.jsx(Ni,{}),E.jsx(Pie,{}),E.jsx(Iie,{}),E.jsx(use,{}),E.jsx(jie,{}),E.jsx(Ni,{}),E.jsx(lse,{}),E.jsx(cse,{}),E.jsx(Ni,{}),E.jsx(Aie,{}),E.jsx(Nie,{}),E.jsx(zie,{}),E.jsx(Ni,{}),E.jsx(Coe,{}),E.jsx(Lie,{}),E.jsx(dse,{}),E.jsx(_oe,{}),E.jsx(xoe,{}),E.jsx(kie,{})]})}),Aoe=v.memo(Doe),Poe=(t,e,n)=>Math.min(n,Math.max(e,t)),Noe=()=>{const{editor:t,contentElement:e,setIsResizing:n}=$e(),r=v.useRef(null),i=v.useRef({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),s=Ue({editor:t,selector:p=>{if(!p.editor.isFocused||!p.editor.isEditable)return null;const f=p.editor.isActive("image")?"image":p.editor.isActive("youtube")?"youtube":null;if(!f)return null;const{selection:m}=p.editor.state;return{node:p.editor.view.nodeDOM(m.anchor),nodeType:f,nodePos:m.anchor}}}),{maxWidth:o,minWidth:a}=v.useMemo(()=>{var f;const p=((f=e.current)==null?void 0:f.getBoundingClientRect().width)||0;return{maxWidth:p,minWidth:p*.25}},[e.current]),l=(p,f)=>{p.preventDefault();const m=i.current;m.startX=p.clientX,m.startY=p.clientY,m.isResizing=!0,m.direction=f,document.addEventListener("pointermove",c),document.addEventListener("pointerup",u),n(!0)},c=p=>{const f=s==null?void 0:s.node,m=i.current;if(!f||!m.isResizing)return;let g=m.startX-p.clientX;g=m.direction?-g:g;const y=Poe(m.startWidth+g,a,o),b=y/m.ratio;m.currentWidth=y,m.currentHeight=b,f.style.width=`${y}px`,f.style.height=`${b}px`,h()},u=()=>{const p=i.current;p.isResizing&&(p.isResizing=!1,document.removeEventListener("pointermove",c),document.removeEventListener("pointerup",u),n(!1),requestAnimationFrame(()=>t==null?void 0:t.commands.updateAttributes(s.nodeType,{width:Math.round(p.currentWidth/o*100)})))},h=v.useCallback(()=>{const p=s.node,f=r.current,{offsetTop:m,offsetLeft:g,offsetWidth:y,offsetHeight:b}=p;requestAnimationFrame(()=>{f.style.width=`${y}px`,f.style.height=`${b}px`,f.style.transform=`translate(${g}px, ${m}px)`})},[s]);if(v.useEffect(()=>{const p=s==null?void 0:s.node;if(!p)return;const{width:f,height:m}=p.getBoundingClientRect(),g=i.current;g.startWidth=f,g.startHeight=m,g.currentWidth=f,g.currentHeight=m,g.ratio=f/m,h()},[s]),!s||!e.current)return;const d=(p,f,m)=>E.jsx("div",{className:"rte-resizer__control",style:{cursor:p,...m},onPointerDown:g=>l(g,f)});return pl.createPortal(E.jsxs("div",{ref:r,className:"rte-resizer",children:[d("nw-resize",0,{width:12,left:-10,top:-10}),d("sw-resize",0,{width:12,left:-10,bottom:-10}),d("sw-resize",1,{width:12,right:-10,top:-10}),d("nw-resize",1,{width:12,right:-10,bottom:-10})]}),e.current)},Roe=v.memo(Noe),Moe=()=>{const{editor:t,isFullScreen:e,toggleFullScreen:n}=$e(),r=Ue({editor:t,selector:i=>({words:i.editor.storage.characterCount.words(),characters:i.editor.storage.characterCount.characters()})});return E.jsxs("div",{className:"rte-status-bar",children:[E.jsx(li,{dense:!0,children:E.jsx(be,{icon:e?"Minimize":"Maximize",text:"Fullscreen",active:e,onClick:n})}),E.jsxs("div",{className:"rte-counter",children:[E.jsxs("span",{className:"rte-word-count",children:["Words: ",r.words]}),E.jsxs("span",{className:"rte-charater",children:["Characters: ",r.characters]})]})]})},Ioe=v.memo(Moe);function f$(){const[t,e]=v.useState(!1),n=v.useRef(null),r=async i=>{if(!t)try{await navigator.clipboard.writeText(i),e(!0),n.current=setTimeout(()=>e(!1),2500)}catch{e(!1),n.current&&clearTimeout(n.current)}};return v.useEffect(()=>()=>{n.current&&clearTimeout(n.current)},[]),{isCopied:t,copy:r}}const Ip=(t,e)=>{const{view:n,state:{selection:{from:r}}}=t;let i=n.nodeDOM(r)||n.domAtPos(r).node;for(;i&&(i==null?void 0:i.nodeName.toLocaleLowerCase())!==e.toLocaleLowerCase();)i=i.parentElement;return i};var Lb,Qb;if(typeof WeakMap<"u"){let t=new WeakMap;Lb=e=>t.get(e),Qb=(e,n)=>(t.set(e,n),n)}else{const t=[];let e=0;Lb=n=>{for(let r=0;r<t.length;r+=2)if(t[r]==n)return t[r+1]},Qb=(n,r)=>(e==10&&(e=0),t[e++]=n,t[e++]=r)}var bt=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const r=e%this.width,i=e/this.width|0;let s=r+1,o=i+1;for(let a=1;s<this.width&&this.map[e+a]==n;a++)s++;for(let a=1;o<this.height&&this.map[e+this.width*a]==n;a++)o++;return{left:r,top:i,right:s,bottom:o}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:r,right:i,top:s,bottom:o}=this.findCell(t);return e=="horiz"?(n<0?r==0:i==this.width)?null:this.map[s*this.width+(n<0?r-1:i)]:(n<0?s==0:o==this.height)?null:this.map[r+this.width*(n<0?s-1:o)]}rectBetween(t,e){const{left:n,right:r,top:i,bottom:s}=this.findCell(t),{left:o,right:a,top:l,bottom:c}=this.findCell(e);return{left:Math.min(n,o),top:Math.min(i,l),right:Math.max(r,a),bottom:Math.max(s,c)}}cellsInRect(t){const e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let i=t.left;i<t.right;i++){const s=r*this.width+i,o=this.map[s];n[o]||(n[o]=!0,!(i==t.left&&i&&this.map[s-1]==o||r==t.top&&r&&this.map[s-this.width]==o)&&e.push(o))}return e}positionAt(t,e,n){for(let r=0,i=0;;r++){const s=i+n.child(r).nodeSize;if(r==t){let o=e+t*this.width;const a=(t+1)*this.width;for(;o<a&&this.map[o]<i;)o++;return o==a?s-1:this.map[o]}i=s}}static get(t){return Lb(t)||Qb(t,Loe(t))}};function Loe(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=Qoe(t),n=t.childCount,r=[];let i=0,s=null;const o=[];for(let c=0,u=e*n;c<u;c++)r[c]=0;for(let c=0,u=0;c<n;c++){const h=t.child(c);u++;for(let f=0;;f++){for(;i<r.length&&r[i]!=0;)i++;if(f==h.childCount)break;const m=h.child(f),{colspan:g,rowspan:y,colwidth:b}=m.attrs;for(let T=0;T<y;T++){if(T+c>=n){(s||(s=[])).push({type:"overlong_rowspan",pos:u,n:y-T});break}const S=i+T*e;for(let w=0;w<g;w++){r[S+w]==0?r[S+w]=u:(s||(s=[])).push({type:"collision",row:c,pos:u,n:g-w});const A=b&&b[w];if(A){const C=(S+w)%e*2,N=o[C];N==null||N!=A&&o[C+1]==1?(o[C]=A,o[C+1]=1):N==A&&o[C+1]++}}}i+=g,u+=m.nodeSize}const d=(c+1)*e;let p=0;for(;i<d;)r[i++]==0&&p++;p&&(s||(s=[])).push({type:"missing",row:c,n:p}),u++}(e===0||n===0)&&(s||(s=[])).push({type:"zero_sized"});const a=new bt(e,n,r,s);let l=!1;for(let c=0;!l&&c<o.length;c+=2)o[c]!=null&&o[c+1]<n&&(l=!0);return l&&$oe(a,o,t),a}function Qoe(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){const i=t.child(r);let s=0;if(n)for(let o=0;o<r;o++){const a=t.child(o);for(let l=0;l<a.childCount;l++){const c=a.child(l);o+c.attrs.rowspan>r&&(s+=c.attrs.colspan)}}for(let o=0;o<i.childCount;o++){const a=i.child(o);s+=a.attrs.colspan,a.attrs.rowspan>1&&(n=!0)}e==-1?e=s:e!=s&&(e=Math.max(e,s))}return e}function $oe(t,e,n){t.problems||(t.problems=[]);const r={};for(let i=0;i<t.map.length;i++){const s=t.map[i];if(r[s])continue;r[s]=!0;const o=n.nodeAt(s);if(!o)throw new RangeError(`No cell with offset ${s} found`);let a=null;const l=o.attrs;for(let c=0;c<l.colspan;c++){const u=(i+c)%t.width,h=e[u*2];h!=null&&(!l.colwidth||l.colwidth[c]!=h)&&((a||(a=Foe(l)))[c]=h)}a&&t.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:a})}}function Foe(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function yn(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const r=t.nodes[n],i=r.spec.tableRole;i&&(e[i]=r)}}return e}var ks=new rt("selectingCells");function Dl(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function Boe(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if(n==="cell"||n==="header_cell")return t.node(e)}return null}function Ir(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function Cm(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=Dl(e.$head)||joe(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function joe(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function $b(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function zoe(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function IT(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function m$(t,e,n){const r=t.node(-1),i=bt.get(r),s=t.start(-1),o=i.nextCell(t.pos-s,e,n);return o==null?null:t.node(0).resolve(s+o)}function Go(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function g$(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;i<n;i++)r.colwidth.splice(e,0,0)}return r}function Voe(t,e,n){const r=yn(e.type.schema).header_cell;for(let i=0;i<t.height;i++)if(e.nodeAt(t.map[n+i*t.width]).type!=r)return!1;return!0}var nt=class Ci extends Te{constructor(e,n=e){const r=e.node(-1),i=bt.get(r),s=e.start(-1),o=i.rectBetween(e.pos-s,n.pos-s),a=e.node(0),l=i.cellsInRect(o).filter(u=>u!=n.pos-s);l.unshift(n.pos-s);const c=l.map(u=>{const h=r.nodeAt(u);if(!h)throw RangeError(`No cell with offset ${u} found`);const d=s+u+1;return new $P(a.resolve(d),a.resolve(d+h.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=n}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),i=e.resolve(n.map(this.$headCell.pos));if($b(r)&&$b(i)&&IT(r,i)){const s=this.$anchorCell.node(-1)!=r.node(-1);return s&&this.isRowSelection()?Ci.rowSelection(r,i):s&&this.isColSelection()?Ci.colSelection(r,i):new Ci(r,i)}return de.between(r,i)}content(){const e=this.$anchorCell.node(-1),n=bt.get(e),r=this.$anchorCell.start(-1),i=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),s={},o=[];for(let l=i.top;l<i.bottom;l++){const c=[];for(let u=l*n.width+i.left,h=i.left;h<i.right;h++,u++){const d=n.map[u];if(s[d])continue;s[d]=!0;const p=n.findCell(d);let f=e.nodeAt(d);if(!f)throw RangeError(`No cell with offset ${d} found`);const m=i.left-p.left,g=p.right-i.right;if(m>0||g>0){let y=f.attrs;if(m>0&&(y=Go(y,0,m)),g>0&&(y=Go(y,y.colspan-g,g)),p.left<i.left){if(f=f.type.createAndFill(y),!f)throw RangeError(`Could not create cell with attrs ${JSON.stringify(y)}`)}else f=f.type.create(y,f.content)}if(p.top<i.top||p.bottom>i.bottom){const y={...f.attrs,rowspan:Math.min(p.bottom,i.bottom)-Math.max(p.top,i.top)};p.top<i.top?f=f.type.createAndFill(y):f=f.type.create(y,f.content)}c.push(f)}o.push(e.child(l).copy(X.from(c)))}const a=this.isColSelection()&&this.isRowSelection()?e:o;return new te(X.from(a),1,1)}replace(e,n=te.empty){const r=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){const{$from:a,$to:l}=i[o],c=e.mapping.slice(r);e.replace(c.map(a.pos),c.map(l.pos),o?te.empty:n)}const s=Te.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);s&&e.setSelection(s)}replaceWith(e,n){this.replace(e,new te(X.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=bt.get(n),i=this.$anchorCell.start(-1),s=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let o=0;o<s.length;o++)e(n.nodeAt(s[o]),i+s[o])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,i=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,i)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),i=bt.get(r),s=e.start(-1),o=i.findCell(e.pos-s),a=i.findCell(n.pos-s),l=e.node(0);return o.top<=a.top?(o.top>0&&(e=l.resolve(s+i.map[o.left])),a.bottom<i.height&&(n=l.resolve(s+i.map[i.width*(i.height-1)+a.right-1]))):(a.top>0&&(n=l.resolve(s+i.map[a.left])),o.bottom<i.height&&(e=l.resolve(s+i.map[i.width*(i.height-1)+o.right-1]))),new Ci(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=bt.get(e),r=this.$anchorCell.start(-1),i=n.colCount(this.$anchorCell.pos-r),s=n.colCount(this.$headCell.pos-r);if(Math.min(i,s)>0)return!1;const o=i+this.$anchorCell.nodeAfter.attrs.colspan,a=s+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,a)==n.width}eq(e){return e instanceof Ci&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),i=bt.get(r),s=e.start(-1),o=i.findCell(e.pos-s),a=i.findCell(n.pos-s),l=e.node(0);return o.left<=a.left?(o.left>0&&(e=l.resolve(s+i.map[o.top*i.width])),a.right<i.width&&(n=l.resolve(s+i.map[i.width*(a.top+1)-1]))):(a.left>0&&(n=l.resolve(s+i.map[a.top*i.width])),o.right<i.width&&(e=l.resolve(s+i.map[i.width*(o.top+1)-1]))),new Ci(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new Ci(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new Ci(e.resolve(n),e.resolve(r))}getBookmark(){return new Uoe(this.$anchorCell.pos,this.$headCell.pos)}};nt.prototype.visible=!1;Te.jsonID("cell",nt);var Uoe=class O${constructor(e,n){this.anchor=e,this.head=n}map(e){return new O$(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),r=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&IT(n,r)?new nt(n,r):Te.near(r,1)}};function Hoe(t){if(!(t.selection instanceof nt))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(sn.node(r,r+n.nodeSize,{class:"selectedCell"}))}),je.create(t.doc,e)}function Xoe({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let n=t.pos,r=e.pos,i=t.depth;for(;i>=0&&!(t.after(i+1)<t.end(i));i--,n++);for(let s=e.depth;s>=0&&!(e.before(s+1)>e.start(s));s--,r--);return n==r&&/row|table/.test(t.node(i).type.spec.tableRole)}function qoe({$from:t,$to:e}){let n,r;for(let i=t.depth;i>0;i--){const s=t.node(i);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){n=s;break}}for(let i=e.depth;i>0;i--){const s=e.node(i);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){r=s;break}}return n!==r&&e.parentOffset===0}function Zoe(t,e,n){const r=(e||t).selection,i=(e||t).doc;let s,o;if(r instanceof pe&&(o=r.node.type.spec.tableRole)){if(o=="cell"||o=="header_cell")s=nt.create(i,r.from);else if(o=="row"){const a=i.resolve(r.from+1);s=nt.rowSelection(a,a)}else if(!n){const a=bt.get(r.node),l=r.from+1,c=l+a.map[a.width*a.height-1];s=nt.create(i,l+1,c)}}else r instanceof de&&Xoe(r)?s=de.create(i,r.from):r instanceof de&&qoe(r)&&(s=de.create(i,r.$from.start(),r.$from.end()));return s&&(e||(e=t.tr)).setSelection(s),e}var Woe=new rt("fix-tables");function y$(t,e,n,r){const i=t.childCount,s=e.childCount;e:for(let o=0,a=0;o<s;o++){const l=e.child(o);for(let c=a,u=Math.min(i,o+3);c<u;c++)if(t.child(c)==l){a=c+1,n+=l.nodeSize;continue e}r(l,n),a<i&&t.child(a).sameMarkup(l)?y$(t.child(a),l,n+1,r):l.nodesBetween(0,l.content.size,r,n+1),n+=l.nodeSize}}function b$(t,e){let n;const r=(i,s)=>{i.type.spec.tableRole=="table"&&(n=Goe(t,i,s,n))};return e?e.doc!=t.doc&&y$(e.doc,t.doc,0,r):t.doc.descendants(r),n}function Goe(t,e,n,r){const i=bt.get(e);if(!i.problems)return r;r||(r=t.tr);const s=[];for(let l=0;l<i.height;l++)s.push(0);for(let l=0;l<i.problems.length;l++){const c=i.problems[l];if(c.type=="collision"){const u=e.nodeAt(c.pos);if(!u)continue;const h=u.attrs;for(let d=0;d<h.rowspan;d++)s[c.row+d]+=c.n;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,Go(h,h.colspan-c.n,c.n))}else if(c.type=="missing")s[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const u=e.nodeAt(c.pos);if(!u)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...u.attrs,rowspan:u.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const u=e.nodeAt(c.pos);if(!u)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...u.attrs,colwidth:c.colwidth})}else if(c.type=="zero_sized"){const u=r.mapping.map(n);r.delete(u,u+e.nodeSize)}}let o,a;for(let l=0;l<s.length;l++)s[l]&&(o==null&&(o=l),a=l);for(let l=0,c=n+1;l<i.height;l++){const u=e.child(l),h=c+u.nodeSize,d=s[l];if(d>0){let p="cell";u.firstChild&&(p=u.firstChild.type.spec.tableRole);const f=[];for(let g=0;g<d;g++){const y=yn(t.schema)[p].createAndFill();y&&f.push(y)}const m=(l==0||o==l-1)&&a==l?c+1:h-1;r.insert(r.mapping.map(m),f)}c=h}return r.setMeta(Woe,{fixTables:!0})}function yi(t){const e=t.selection,n=Cm(t),r=n.node(-1),i=n.start(-1),s=bt.get(r);return{...e instanceof nt?s.rectBetween(e.$anchorCell.pos-i,e.$headCell.pos-i):s.findCell(n.pos-i),tableStart:i,map:s,table:r}}function E$(t,{map:e,tableStart:n,table:r},i){let s=i>0?-1:0;Voe(e,r,i+s)&&(s=i==0||i==e.width?null:0);for(let o=0;o<e.height;o++){const a=o*e.width+i;if(i>0&&i<e.width&&e.map[a-1]==e.map[a]){const l=e.map[a],c=r.nodeAt(l);t.setNodeMarkup(t.mapping.map(n+l),null,g$(c.attrs,i-e.colCount(l))),o+=c.attrs.rowspan-1}else{const l=s==null?yn(r.type.schema).cell:r.nodeAt(e.map[a+s]).type,c=e.positionAt(o,i,r);t.insert(t.mapping.map(n+c),l.createAndFill())}}return t}function Yoe(t,e){if(!Ir(t))return!1;if(e){const n=yi(t);e(E$(t.tr,n,n.left))}return!0}function Koe(t,e){if(!Ir(t))return!1;if(e){const n=yi(t);e(E$(t.tr,n,n.right))}return!0}function Joe(t,{map:e,table:n,tableStart:r},i){const s=t.mapping.maps.length;for(let o=0;o<e.height;){const a=o*e.width+i,l=e.map[a],c=n.nodeAt(l),u=c.attrs;if(i>0&&e.map[a-1]==l||i<e.width-1&&e.map[a+1]==l)t.setNodeMarkup(t.mapping.slice(s).map(r+l),null,Go(u,i-e.colCount(l)));else{const h=t.mapping.slice(s).map(r+l);t.delete(h,h+c.nodeSize)}o+=u.rowspan}}function eae(t,e){if(!Ir(t))return!1;if(e){const n=yi(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let i=n.right-1;Joe(r,n,i),i!=n.left;i--){const s=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!s)throw RangeError("No table found");n.table=s,n.map=bt.get(s)}e(r)}return!0}function tae(t,e,n){var r;const i=yn(e.type.schema).header_cell;for(let s=0;s<t.width;s++)if(((r=e.nodeAt(t.map[s+n*t.width]))==null?void 0:r.type)!=i)return!1;return!0}function v$(t,{map:e,tableStart:n,table:r},i){var s;let o=n;for(let c=0;c<i;c++)o+=r.child(c).nodeSize;const a=[];let l=i>0?-1:0;tae(e,r,i+l)&&(l=i==0||i==e.height?null:0);for(let c=0,u=e.width*i;c<e.width;c++,u++)if(i>0&&i<e.height&&e.map[u]==e.map[u-e.width]){const h=e.map[u],d=r.nodeAt(h).attrs;t.setNodeMarkup(n+h,null,{...d,rowspan:d.rowspan+1}),c+=d.colspan-1}else{const h=l==null?yn(r.type.schema).cell:(s=r.nodeAt(e.map[u+l*e.width]))==null?void 0:s.type,d=h==null?void 0:h.createAndFill();d&&a.push(d)}return t.insert(o,yn(r.type.schema).row.create(null,a)),t}function nae(t,e){if(!Ir(t))return!1;if(e){const n=yi(t);e(v$(t.tr,n,n.top))}return!0}function rae(t,e){if(!Ir(t))return!1;if(e){const n=yi(t);e(v$(t.tr,n,n.bottom))}return!0}function iae(t,{map:e,table:n,tableStart:r},i){let s=0;for(let c=0;c<i;c++)s+=n.child(c).nodeSize;const o=s+n.child(i).nodeSize,a=t.mapping.maps.length;t.delete(s+r,o+r);const l=new Set;for(let c=0,u=i*e.width;c<e.width;c++,u++){const h=e.map[u];if(!l.has(h)){if(l.add(h),i>0&&h==e.map[u-e.width]){const d=n.nodeAt(h).attrs;t.setNodeMarkup(t.mapping.slice(a).map(h+r),null,{...d,rowspan:d.rowspan-1}),c+=d.colspan-1}else if(i<e.height&&h==e.map[u+e.width]){const d=n.nodeAt(h),p=d.attrs,f=d.type.create({...p,rowspan:d.attrs.rowspan-1},d.content),m=e.positionAt(i+1,c,n);t.insert(t.mapping.slice(a).map(r+m),f),c+=p.colspan-1}}}}function sae(t,e){if(!Ir(t))return!1;if(e){const n=yi(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let i=n.bottom-1;iae(r,n,i),i!=n.top;i--){const s=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!s)throw RangeError("No table found");n.table=s,n.map=bt.get(n.table)}e(r)}return!0}function EC(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function oae({width:t,height:e,map:n},r){let i=r.top*t+r.left,s=i,o=(r.bottom-1)*t+r.left,a=i+(r.right-r.left-1);for(let l=r.top;l<r.bottom;l++){if(r.left>0&&n[s]==n[s-1]||r.right<t&&n[a]==n[a+1])return!0;s+=t,a+=t}for(let l=r.left;l<r.right;l++){if(r.top>0&&n[i]==n[i-t]||r.bottom<e&&n[o]==n[o+t])return!0;i++,o++}return!1}function vC(t,e){const n=t.selection;if(!(n instanceof nt)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=yi(t),{map:i}=r;if(oae(i,r))return!1;if(e){const s=t.tr,o={};let a=X.empty,l,c;for(let u=r.top;u<r.bottom;u++)for(let h=r.left;h<r.right;h++){const d=i.map[u*i.width+h],p=r.table.nodeAt(d);if(!(o[d]||!p))if(o[d]=!0,l==null)l=d,c=p;else{EC(p)||(a=a.append(p.content));const f=s.mapping.map(d+r.tableStart);s.delete(f,f+p.nodeSize)}}if(l==null||c==null)return!0;if(s.setNodeMarkup(l+r.tableStart,null,{...g$(c.attrs,c.attrs.colspan,r.right-r.left-c.attrs.colspan),rowspan:r.bottom-r.top}),a.size){const u=l+1+c.content.size,h=EC(c)?l+1:u;s.replaceWith(h+r.tableStart,u+r.tableStart,a)}s.setSelection(new nt(s.doc.resolve(l+r.tableStart))),e(s)}return!0}function TC(t,e){const n=yn(t.schema);return aae(({node:r})=>n[r.type.spec.tableRole])(t,e)}function aae(t){return(e,n)=>{var r;const i=e.selection;let s,o;if(i instanceof nt){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;s=i.$anchorCell.nodeAfter,o=i.$anchorCell.pos}else{if(s=Boe(i.$from),!s)return!1;o=(r=Dl(i.$from))==null?void 0:r.pos}if(s==null||o==null||s.attrs.colspan==1&&s.attrs.rowspan==1)return!1;if(n){let a=s.attrs;const l=[],c=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});const u=yi(e),h=e.tr;for(let p=0;p<u.right-u.left;p++)l.push(c?{...a,colwidth:c&&c[p]?[c[p]]:null}:a);let d;for(let p=u.top;p<u.bottom;p++){let f=u.map.positionAt(p,u.left,u.table);p==u.top&&(f+=s.nodeSize);for(let m=u.left,g=0;m<u.right;m++,g++)m==u.left&&p==u.top||h.insert(d=h.mapping.map(f+u.tableStart,1),t({node:s,row:p,col:m}).createAndFill(l[g]))}h.setNodeMarkup(o,t({node:s,row:u.top,col:u.left}),l[0]),i instanceof nt&&h.setSelection(new nt(h.doc.resolve(i.$anchorCell.pos),d?h.doc.resolve(d):void 0)),n(h)}return!0}}function lae(t,e){return function(n,r){if(!Ir(n))return!1;const i=Cm(n);if(i.nodeAfter.attrs[t]===e)return!1;if(r){const s=n.tr;n.selection instanceof nt?n.selection.forEachCell((o,a)=>{o.attrs[t]!==e&&s.setNodeMarkup(a,null,{...o.attrs,[t]:e})}):s.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[t]:e}),r(s)}return!0}}function cae(t){return function(e,n){if(!Ir(e))return!1;if(n){const r=yn(e.schema),i=yi(e),s=e.tr,o=i.map.cellsInRect(t=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:t=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=o.map(l=>i.table.nodeAt(l));for(let l=0;l<o.length;l++)a[l].type==r.header_cell&&s.setNodeMarkup(i.tableStart+o[l],r.cell,a[l].attrs);if(s.steps.length==0)for(let l=0;l<o.length;l++)s.setNodeMarkup(i.tableStart+o[l],r.header_cell,a[l].attrs);n(s)}return!0}}function SC(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let i=0;i<r.length;i++){const s=e.table.nodeAt(r[i]);if(s&&s.type!==n.header_cell)return!1}return!0}function Su(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?cae(t):function(n,r){if(!Ir(n))return!1;if(r){const i=yn(n.schema),s=yi(n),o=n.tr,a=SC("row",s,i),l=SC("column",s,i),c=(t==="column"?a:t==="row"&&l)?1:0,u=t=="column"?{left:0,top:c,right:1,bottom:s.map.height}:t=="row"?{left:c,top:0,right:s.map.width,bottom:1}:s,h=t=="column"?l?i.cell:i.header_cell:t=="row"?a?i.cell:i.header_cell:i.cell;s.map.cellsInRect(u).forEach(d=>{const p=d+s.tableStart,f=o.doc.nodeAt(p);f&&o.setNodeMarkup(p,h,f.attrs)}),r(o)}return!0}}Su("row",{useDeprecatedLogic:!0});Su("column",{useDeprecatedLogic:!0});var uae=Su("cell",{useDeprecatedLogic:!0});function hae(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let r=t.index(-1)-1,i=t.before();r>=0;r--){const s=t.node(-1).child(r),o=s.lastChild;if(o)return i-1-o.nodeSize;i-=s.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let r=t.indexAfter(-1),i=t.after();r<n.childCount;r++){const s=n.child(r);if(s.childCount)return i+1;i+=s.nodeSize}}return null}function wC(t){return function(e,n){if(!Ir(e))return!1;const r=hae(Cm(e),t);if(r==null)return!1;if(n){const i=e.doc.resolve(r);n(e.tr.setSelection(de.between(i,zoe(i))).scrollIntoView())}return!0}}function dae(t,e){const n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function id(t,e){const n=t.selection;if(!(n instanceof nt))return!1;if(e){const r=t.tr,i=yn(t.schema).cell.createAndFill().content;n.forEachCell((s,o)=>{s.content.eq(i)||r.replace(r.mapping.map(o+1),r.mapping.map(o+s.nodeSize-1),new te(i,0,0))}),r.docChanged&&e(r)}return!0}function pae(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:r}=t;for(;e.childCount==1&&(n>0&&r>0||e.child(0).type.spec.tableRole=="table");)n--,r--,e=e.child(0).content;const i=e.child(0),s=i.type.spec.tableRole,o=i.type.schema,a=[];if(s=="row")for(let l=0;l<e.childCount;l++){let c=e.child(l).content;const u=l?0:Math.max(0,n-1),h=l<e.childCount-1?0:Math.max(0,r-1);(u||h)&&(c=Fb(yn(o).row,new te(c,u,h)).content),a.push(c)}else if(s=="cell"||s=="header_cell")a.push(n||r?Fb(yn(o).row,new te(e,n,r)).content:e);else return null;return fae(o,a)}function fae(t,e){const n=[];for(let i=0;i<e.length;i++){const s=e[i];for(let o=s.childCount-1;o>=0;o--){const{rowspan:a,colspan:l}=s.child(o).attrs;for(let c=i;c<i+a;c++)n[c]=(n[c]||0)+l}}let r=0;for(let i=0;i<n.length;i++)r=Math.max(r,n[i]);for(let i=0;i<n.length;i++)if(i>=e.length&&e.push(X.empty),n[i]<r){const s=yn(t).cell.createAndFill(),o=[];for(let a=n[i];a<r;a++)o.push(s);e[i]=e[i].append(X.from(o))}return{height:e.length,width:r,rows:e}}function Fb(t,e){const n=t.createAndFill();return new LE(n).replace(0,n.content.size,e).doc}function mae({width:t,height:e,rows:n},r,i){if(t!=r){const s=[],o=[];for(let a=0;a<n.length;a++){const l=n[a],c=[];for(let u=s[a]||0,h=0;u<r;h++){let d=l.child(h%l.childCount);u+d.attrs.colspan>r&&(d=d.type.createChecked(Go(d.attrs,d.attrs.colspan,u+d.attrs.colspan-r),d.content)),c.push(d),u+=d.attrs.colspan;for(let p=1;p<d.attrs.rowspan;p++)s[a+p]=(s[a+p]||0)+d.attrs.colspan}o.push(X.from(c))}n=o,t=r}if(e!=i){const s=[];for(let o=0,a=0;o<i;o++,a++){const l=[],c=n[a%e];for(let u=0;u<c.childCount;u++){let h=c.child(u);o+h.attrs.rowspan>i&&(h=h.type.create({...h.attrs,rowspan:Math.max(1,i-h.attrs.rowspan)},h.content)),l.push(h)}s.push(X.from(l))}n=s,e=i}return{width:t,height:e,rows:n}}function gae(t,e,n,r,i,s,o){const a=t.doc.type.schema,l=yn(a);let c,u;if(i>e.width)for(let h=0,d=0;h<e.height;h++){const p=n.child(h);d+=p.nodeSize;const f=[];let m;p.lastChild==null||p.lastChild.type==l.cell?m=c||(c=l.cell.createAndFill()):m=u||(u=l.header_cell.createAndFill());for(let g=e.width;g<i;g++)f.push(m);t.insert(t.mapping.slice(o).map(d-1+r),f)}if(s>e.height){const h=[];for(let f=0,m=(e.height-1)*e.width;f<Math.max(e.width,i);f++){const g=f>=e.width?!1:n.nodeAt(e.map[m+f]).type==l.header_cell;h.push(g?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const d=l.row.create(null,X.from(h)),p=[];for(let f=e.height;f<s;f++)p.push(d);t.insert(t.mapping.slice(o).map(r+n.nodeSize-2),p)}return!!(c||u)}function kC(t,e,n,r,i,s,o,a){if(o==0||o==e.height)return!1;let l=!1;for(let c=i;c<s;c++){const u=o*e.width+c,h=e.map[u];if(e.map[u-e.width]==h){l=!0;const d=n.nodeAt(h),{top:p,left:f}=e.findCell(h);t.setNodeMarkup(t.mapping.slice(a).map(h+r),null,{...d.attrs,rowspan:o-p}),t.insert(t.mapping.slice(a).map(e.positionAt(o,f,n)),d.type.createAndFill({...d.attrs,rowspan:p+d.attrs.rowspan-o})),c+=d.attrs.colspan-1}}return l}function _C(t,e,n,r,i,s,o,a){if(o==0||o==e.width)return!1;let l=!1;for(let c=i;c<s;c++){const u=c*e.width+o,h=e.map[u];if(e.map[u-1]==h){l=!0;const d=n.nodeAt(h),p=e.colCount(h),f=t.mapping.slice(a).map(h+r);t.setNodeMarkup(f,null,Go(d.attrs,o-p,d.attrs.colspan-(o-p))),t.insert(f+d.nodeSize,d.type.createAndFill(Go(d.attrs,0,o-p))),c+=d.attrs.rowspan-1}}return l}function xC(t,e,n,r,i){let s=n?t.doc.nodeAt(n-1):t.doc;if(!s)throw new Error("No table found");let o=bt.get(s);const{top:a,left:l}=r,c=l+i.width,u=a+i.height,h=t.tr;let d=0;function p(){if(s=n?h.doc.nodeAt(n-1):h.doc,!s)throw new Error("No table found");o=bt.get(s),d=h.mapping.maps.length}gae(h,o,s,n,c,u,d)&&p(),kC(h,o,s,n,l,c,a,d)&&p(),kC(h,o,s,n,l,c,u,d)&&p(),_C(h,o,s,n,a,u,l,d)&&p(),_C(h,o,s,n,a,u,c,d)&&p();for(let f=a;f<u;f++){const m=o.positionAt(f,l,s),g=o.positionAt(f,c,s);h.replace(h.mapping.slice(d).map(m+n),h.mapping.slice(d).map(g+n),new te(i.rows[f-a],0,0))}p(),h.setSelection(new nt(h.doc.resolve(n+o.positionAt(a,l,s)),h.doc.resolve(n+o.positionAt(u-1,c-1,s)))),e(h)}var Oae=YE({ArrowLeft:sd("horiz",-1),ArrowRight:sd("horiz",1),ArrowUp:sd("vert",-1),ArrowDown:sd("vert",1),"Shift-ArrowLeft":od("horiz",-1),"Shift-ArrowRight":od("horiz",1),"Shift-ArrowUp":od("vert",-1),"Shift-ArrowDown":od("vert",1),Backspace:id,"Mod-Backspace":id,Delete:id,"Mod-Delete":id});function zd(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function sd(t,e){return(n,r,i)=>{if(!i)return!1;const s=n.selection;if(s instanceof nt)return zd(n,r,Te.near(s.$headCell,e));if(t!="horiz"&&!s.empty)return!1;const o=T$(i,t,e);if(o==null)return!1;if(t=="horiz")return zd(n,r,Te.near(n.doc.resolve(s.head+e),e));{const a=n.doc.resolve(o),l=m$(a,t,e);let c;return l?c=Te.near(l,1):e<0?c=Te.near(n.doc.resolve(a.before(-1)),-1):c=Te.near(n.doc.resolve(a.after(-1)),1),zd(n,r,c)}}}function od(t,e){return(n,r,i)=>{if(!i)return!1;const s=n.selection;let o;if(s instanceof nt)o=s;else{const l=T$(i,t,e);if(l==null)return!1;o=new nt(n.doc.resolve(l))}const a=m$(o.$headCell,t,e);return a?zd(n,r,new nt(o.$anchorCell,a)):!1}}function yae(t,e){const n=t.state.doc,r=Dl(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new nt(r))),!0):!1}function bae(t,e,n){if(!Ir(t.state))return!1;let r=pae(n);const i=t.state.selection;if(i instanceof nt){r||(r={width:1,height:1,rows:[X.from(Fb(yn(t.state.schema).cell,n))]});const s=i.$anchorCell.node(-1),o=i.$anchorCell.start(-1),a=bt.get(s).rectBetween(i.$anchorCell.pos-o,i.$headCell.pos-o);return r=mae(r,a.right-a.left,a.bottom-a.top),xC(t.state,t.dispatch,o,a,r),!0}else if(r){const s=Cm(t.state),o=s.start(-1);return xC(t.state,t.dispatch,o,bt.get(s.node(-1)).findCell(s.pos-o),r),!0}else return!1}function Eae(t,e){var n;if(e.ctrlKey||e.metaKey)return;const r=CC(t,e.target);let i;if(e.shiftKey&&t.state.selection instanceof nt)s(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(i=Dl(t.state.selection.$anchor))!=null&&((n=vO(t,e))==null?void 0:n.pos)!=i.pos)s(i,e),e.preventDefault();else if(!r)return;function s(l,c){let u=vO(t,c);const h=ks.getState(t.state)==null;if(!u||!IT(l,u))if(h)u=l;else return;const d=new nt(l,u);if(h||!t.state.selection.eq(d)){const p=t.state.tr.setSelection(d);h&&p.setMeta(ks,l.pos),t.dispatch(p)}}function o(){t.root.removeEventListener("mouseup",o),t.root.removeEventListener("dragstart",o),t.root.removeEventListener("mousemove",a),ks.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(ks,-1))}function a(l){const c=l,u=ks.getState(t.state);let h;if(u!=null)h=t.state.doc.resolve(u);else if(CC(t,c.target)!=r&&(h=vO(t,e),!h))return o();h&&s(h,c)}t.root.addEventListener("mouseup",o),t.root.addEventListener("dragstart",o),t.root.addEventListener("mousemove",a)}function T$(t,e,n){if(!(t.state.selection instanceof de))return null;const{$head:r}=t.state.selection;for(let i=r.depth-1;i>=0;i--){const s=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:s.childCount))return null;if(s.type.spec.tableRole=="cell"||s.type.spec.tableRole=="header_cell"){const o=r.before(i),a=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(a)?o:null}}return null}function CC(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function vO(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?Dl(t.state.doc.resolve(n.pos)):null}var vae=class{constructor(t,e){this.node=t,this.defaultCellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${e}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Bb(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,Bb(t,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function Bb(t,e,n,r,i,s){var o;let a=0,l=!0,c=e.firstChild;const u=t.firstChild;if(u){for(let h=0,d=0;h<u.childCount;h++){const{colspan:p,colwidth:f}=u.child(h).attrs;for(let m=0;m<p;m++,d++){const g=i==d?s:f&&f[m],y=g?g+"px":"";if(a+=g||r,g||(l=!1),c)c.style.width!=y&&(c.style.width=y),c=c.nextSibling;else{const b=document.createElement("col");b.style.width=y,e.appendChild(b)}}}for(;c;){const h=c.nextSibling;(o=c.parentNode)==null||o.removeChild(c),c=h}l?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}}var qn=new rt("tableColumnResizing");function Tae({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=vae,lastColumnResizable:i=!0}={}){const s=new ze({key:qn,state:{init(o,a){var l,c;const u=(c=(l=s.spec)==null?void 0:l.props)==null?void 0:c.nodeViews,h=yn(a.schema).table.name;return r&&u&&(u[h]=(d,p)=>new r(d,n,p)),new Sae(-1,!1)},apply(o,a){return a.apply(o)}},props:{attributes:o=>{const a=qn.getState(o);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,a)=>{wae(o,a,t,i)},mouseleave:o=>{kae(o)},mousedown:(o,a)=>{_ae(o,a,e,n)}},decorations:o=>{const a=qn.getState(o);if(a&&a.activeHandle>-1)return Pae(o,a.activeHandle)},nodeViews:{}}});return s}var Sae=class Vd{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(qn);if(r&&r.setHandle!=null)return new Vd(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Vd(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let i=e.mapping.map(n.activeHandle,-1);return $b(e.doc.resolve(i))||(i=-1),new Vd(i,n.dragging)}return n}};function wae(t,e,n,r){if(!t.editable)return;const i=qn.getState(t.state);if(i&&!i.dragging){const s=Cae(e.target);let o=-1;if(s){const{left:a,right:l}=s.getBoundingClientRect();e.clientX-a<=n?o=DC(t,e,"left",n):l-e.clientX<=n&&(o=DC(t,e,"right",n))}if(o!=i.activeHandle){if(!r&&o!==-1){const a=t.state.doc.resolve(o),l=a.node(-1),c=bt.get(l),u=a.start(-1);if(c.colCount(a.pos-u)+a.nodeAfter.attrs.colspan-1==c.width-1)return}S$(t,o)}}}function kae(t){if(!t.editable)return;const e=qn.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&S$(t,-1)}function _ae(t,e,n,r){var i;if(!t.editable)return!1;const s=(i=t.dom.ownerDocument.defaultView)!=null?i:window,o=qn.getState(t.state);if(!o||o.activeHandle==-1||o.dragging)return!1;const a=t.state.doc.nodeAt(o.activeHandle),l=xae(t,o.activeHandle,a.attrs);t.dispatch(t.state.tr.setMeta(qn,{setDragging:{startX:e.clientX,startWidth:l}}));function c(h){s.removeEventListener("mouseup",c),s.removeEventListener("mousemove",u);const d=qn.getState(t.state);d!=null&&d.dragging&&(Dae(t,d.activeHandle,AC(d.dragging,h,n)),t.dispatch(t.state.tr.setMeta(qn,{setDragging:null})))}function u(h){if(!h.which)return c(h);const d=qn.getState(t.state);if(d&&d.dragging){const p=AC(d.dragging,h,n);PC(t,d.activeHandle,p,r)}}return PC(t,o.activeHandle,l,r),s.addEventListener("mouseup",c),s.addEventListener("mousemove",u),e.preventDefault(),!0}function xae(t,e,{colspan:n,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const s=t.domAtPos(e);let o=s.node.childNodes[s.offset].offsetWidth,a=n;if(r)for(let l=0;l<n;l++)r[l]&&(o-=r[l],a--);return o/a}function Cae(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function DC(t,e,n,r){const i=n=="right"?-r:r,s=t.posAtCoords({left:e.clientX+i,top:e.clientY});if(!s)return-1;const{pos:o}=s,a=Dl(t.state.doc.resolve(o));if(!a)return-1;if(n=="right")return a.pos;const l=bt.get(a.node(-1)),c=a.start(-1),u=l.map.indexOf(a.pos-c);return u%l.width==0?-1:c+l.map[u-1]}function AC(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function S$(t,e){t.dispatch(t.state.tr.setMeta(qn,{setHandle:e}))}function Dae(t,e,n){const r=t.state.doc.resolve(e),i=r.node(-1),s=bt.get(i),o=r.start(-1),a=s.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1,l=t.state.tr;for(let c=0;c<s.height;c++){const u=c*s.width+a;if(c&&s.map[u]==s.map[u-s.width])continue;const h=s.map[u],d=i.nodeAt(h).attrs,p=d.colspan==1?0:a-s.colCount(h);if(d.colwidth&&d.colwidth[p]==n)continue;const f=d.colwidth?d.colwidth.slice():Aae(d.colspan);f[p]=n,l.setNodeMarkup(o+h,null,{...d,colwidth:f})}l.docChanged&&t.dispatch(l)}function PC(t,e,n,r){const i=t.state.doc.resolve(e),s=i.node(-1),o=i.start(-1),a=bt.get(s).colCount(i.pos-o)+i.nodeAfter.attrs.colspan-1;let l=t.domAtPos(i.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&Bb(s,l.firstChild,l,r,a,n)}function Aae(t){return Array(t).fill(0)}function Pae(t,e){var n;const r=[],i=t.doc.resolve(e),s=i.node(-1);if(!s)return je.empty;const o=bt.get(s),a=i.start(-1),l=o.colCount(i.pos-a)+i.nodeAfter.attrs.colspan-1;for(let c=0;c<o.height;c++){const u=l+c*o.width;if((l==o.width-1||o.map[u]!=o.map[u+1])&&(c==0||o.map[u]!=o.map[u-o.width])){const h=o.map[u],d=a+h+s.nodeAt(h).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",(n=qn.getState(t))!=null&&n.dragging&&r.push(sn.node(a+h,a+h+s.nodeAt(h).nodeSize,{class:"column-resize-dragging"})),r.push(sn.widget(d,p))}}return je.create(t.doc,r)}function Nae({allowTableNodeSelection:t=!1}={}){return new ze({key:ks,state:{init(){return null},apply(e,n){const r=e.getMeta(ks);if(r!=null)return r==-1?null:r;if(n==null||!e.docChanged)return n;const{deleted:i,pos:s}=e.mapping.mapResult(n);return i?null:s}},props:{decorations:Hoe,handleDOMEvents:{mousedown:Eae},createSelectionBetween(e){return ks.getState(e.state)!=null?e.state.selection:null},handleTripleClick:yae,handleKeyDown:Oae,handlePaste:bae},appendTransaction(e,n,r){return Zoe(r,b$(r,n),t)}})}function Rae(t,e){const n=Math.min(t.top,e.top),r=Math.max(t.bottom,e.bottom),i=Math.min(t.left,e.left),s=Math.max(t.right,e.right)-i,o=r-n,a=i,l=n;return new DOMRect(a,l,s,o)}var Mae=class{constructor({editor:t,element:e,view:n,updateDelay:r=250,resizeDelay:i=60,shouldShow:s,appendTo:o,getReferencedVirtualElement:a,options:l}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:u,state:h,from:d,to:p})=>{const{doc:f,selection:m}=h,{empty:g}=m,y=!f.textBetween(d,p).length&&ev(h.selection),b=this.element.contains(document.activeElement);return!(!(u.hasFocus()||b)||g||y||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:u})=>{var h;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}u!=null&&u.relatedTarget&&(h=this.element.parentNode)!=null&&h.contains(u.relatedTarget)||(u==null?void 0:u.relatedTarget)!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(u,h)=>{const d=!(h!=null&&h.selection.eq(u.state.selection)),p=!(h!=null&&h.doc.eq(u.state.doc));!d&&!p||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(u,d,p,h)},this.updateDelay))},this.updateHandler=(u,h,d,p)=>{const{composing:f}=u;if(!(f||!h&&!d)){if(!this.getShouldShow(p)){this.hide();return}this.updatePosition(),this.show()}},this.transactionHandler=({transaction:u})=>{u.getMeta("bubbleMenu")==="updatePosition"&&this.updatePosition()};var c;this.editor=t,this.element=e,this.view=n,this.updateDelay=r,this.resizeDelay=i,this.appendTo=o,this.scrollTarget=(c=l==null?void 0:l.scrollTarget)!=null?c:window,this.getReferencedVirtualElement=a,this.floatingUIOptions={...this.floatingUIOptions,...l},this.element.tabIndex=0,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(_A(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(kA(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(wA(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(ny(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(xA(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(M5(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(CA(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(I5(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}get virtualElement(){var t;const{selection:e}=this.editor.state,n=(t=this.getReferencedVirtualElement)==null?void 0:t.call(this);if(n)return n;const r=vH(this.view,e.from,e.to);let i={getBoundingClientRect:()=>r,getClientRects:()=>[r]};if(e instanceof pe){let s=this.view.nodeDOM(e.from);const o=s.dataset.nodeViewWrapper?s:s.querySelector("[data-node-view-wrapper]");o&&(s=o),s&&(i={getBoundingClientRect:()=>s.getBoundingClientRect(),getClientRects:()=>[s.getBoundingClientRect()]})}if(e instanceof nt){const{$anchorCell:s,$headCell:o}=e,a=s?s.pos:o.pos,l=o?o.pos:s.pos,c=this.view.nodeDOM(a),u=this.view.nodeDOM(l);if(!c||!u)return;const h=c===u?c.getBoundingClientRect():Rae(c.getBoundingClientRect(),u.getBoundingClientRect());i={getBoundingClientRect:()=>h,getClientRects:()=>[h]}}return i}updatePosition(){const t=this.virtualElement;t&&DA(t,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:n,strategy:r})=>{this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${e}px`,this.element.style.top=`${n}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(t,e){const{state:n}=t,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(t,e);return}const i=!(e!=null&&e.selection.eq(t.state.selection)),s=!(e!=null&&e.doc.eq(t.state.doc));this.updateHandler(t,i,s,e)}getShouldShow(t){var e;const{state:n}=this.view,{selection:r}=n,{ranges:i}=r,s=Math.min(...i.map(a=>a.$from.pos)),o=Math.max(...i.map(a=>a.$to.pos));return((e=this.shouldShow)==null?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:n,oldState:t,from:s,to:o}))||!1}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1",(t=(typeof this.appendTo=="function"?this.appendTo():this.appendTo)??this.view.dom.parentElement)==null||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},w$=t=>new ze({key:typeof t.pluginKey=="string"?new rt(t.pluginKey):t.pluginKey,view:e=>new Mae({view:e,...t})});Ve.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[w$({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});const Dm=({editor:t,className:e,children:n,...r})=>{const i=v.useRef(document.createElement("div"));return v.useEffect(()=>{if(t!=null&&t.isDestroyed)return;const{pluginKey:s="bubbleMenu",options:o={},updateDelay:a,resizeDelay:l,shouldShow:c=null,appendTo:u,getReferencedVirtualElement:h}=r,d=t;if(!d){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const p=w$({updateDelay:a,resizeDelay:l,editor:d||t,element:i.current,pluginKey:s,shouldShow:c,appendTo:u,getReferencedVirtualElement:h,options:o});return d.registerPlugin(p),()=>{d.unregisterPlugin(s),window.requestAnimationFrame(()=>{i.current.parentNode&&i.current.parentNode.removeChild(i.current)})}},[t]),pl.createPortal(E.jsx("div",{className:bn("rte-bubble-menu",e),children:n}),i.current)},Qa="plaintext",k$=[{syntax:"bash",alias:"sh",label:"Bash"},{syntax:"c",alias:"h",label:"C"},{syntax:"csharp",alias:"cs, c#, dotnet",label:"C#"},{syntax:"css",label:"CSS"},{syntax:"go",alias:"golang",label:"Go"},{syntax:"graphql",alias:"gql",label:"GraphQL"},{syntax:"java",alias:"jsp",label:"Java"},{syntax:"javascript",alias:"js, jsx, mjs, cjs",label:"Javascript"},{syntax:"json",label:"JSON"},{syntax:"kotlin",alias:"kt, kts",label:"Kotlin"},{syntax:"less",label:"Less"},{syntax:"makefile",alias:"mk, mak, make",label:"Makefile"},{syntax:"markdown",alias:"md, mkdown, mkd",label:"Markdown"},{syntax:"objectivec",alias:"mm, objc, obj-c, obj-c++, objective-c++",label:"Objective-C"},{syntax:"php",label:"PHP"},{syntax:"plaintext",alias:"text, txt",label:"Text"},{syntax:"python",alias:"py, gyp, ipython",label:"Python"},{syntax:"scss",label:"SCSS"},{syntax:"shell",alias:"console, shellsession",label:"Shell"},{syntax:"sql",label:"SQL"},{syntax:"typescript",alias:"ts, tsx",label:"TypeScript"},{syntax:"vbnet",alias:"vb",label:"VB .NET"},{syntax:"xml",alias:"html, xhtml, rss, atom, xjb, xsd, xsl, plist, wsf, svg",label:"HTML, XML"}],Iae=({value:t,onSelect:e})=>{var a,l;const{contentElement:n}=$e(),[r,i]=v.useState(""),s=k$.map(c=>({label:c.label,value:c.syntax})),o=v.useMemo(()=>r?s.filter(c=>c.label.includes(r)):s,[s,r]);return E.jsxs(be,{type:"popover",text:(a=s.find(c=>c.value===t))==null?void 0:a.label,hideText:!1,tooltip:!1,buttonStyle:{minWidth:"6rem"},dropdownClass:"rte-code-dropdown",dropdownStyle:{minWidth:"10rem"},children:[E.jsx(Zo,{className:"code-search",placeholder:"Seach language...",style:{width:"10rem"},value:r,onChange:c=>i(c.target.value.trim())}),E.jsx("div",{className:"code-list",style:{maxHeight:`${(((l=n.current)==null?void 0:l.clientHeight)||0)*.375}px`},children:o.map(c=>E.jsx(Ov,{asChild:!0,children:E.jsxs("div",{className:"code-item",onClick:()=>{e(c.value),i("")},children:[c.label,c.value===t&&E.jsx(iu,{name:"Check",className:"code-item__indicator",size:14,strokeWidth:2.5})]})},c.value))})]})},_$=()=>{const{editor:t,contentElement:e}=$e(),{isCopied:n,copy:r}=f$(),i=Ue({editor:t,selector:u=>u.editor.isActive("codeBlock")?u.editor.getAttributes("codeBlock").language:null}),s=v.useCallback(({editor:u})=>u.isActive("codeBlock"),[]),o=v.useCallback(u=>t.commands.updateAttributes("codeBlock",{language:u}),[t]),a=v.useCallback(()=>{const u=Ip(t,"pre");u!=null&&u.textContent&&r(u.textContent)},[t]),l=v.useCallback(()=>{t.chain().focus().deleteNode("codeBlock").run()},[t]),c=v.useCallback(()=>{const u=Ip(t,"pre");return u?{getBoundingClientRect:()=>u.getBoundingClientRect()}:null},[t]);return E.jsx(Dm,{editor:t,pluginKey:"code-block-bubble",shouldShow:s,updateDelay:100,appendTo:()=>e.current,getReferencedVirtualElement:c,options:{placement:"top"},children:E.jsxs(li,{children:[E.jsx(Iae,{value:i,onSelect:o}),E.jsx(Ni,{}),E.jsx(be,{icon:n?"Check":"Clipboard",tooltip:"Copy code",onClick:a}),E.jsx(be,{icon:"Trash",tooltip:"Delete code",onClick:l})]})})};v.memo(_$);const Lae=({initialText:t,onApply:e,onCancel:n})=>{const[r,i]=v.useState(t||"");return E.jsxs("form",{className:"rte-text-alternative__form",onSubmit:s=>{s.preventDefault(),e(r)},children:[E.jsx(Zo,{value:r,onChange:s=>i(s.target.value),placeholder:"Text alternative",autoFocus:!0}),E.jsx(be,{buttonType:"submit",icon:"Check",tooltip:!1}),E.jsx(be,{icon:"Close",tooltip:!1,onClick:n})]})},Qae=({value:t,onChange:e})=>{const n=[null,25,50,75,100];return E.jsx(be,{type:"dropdown",buttonStyle:{width:"6.5rem"},dropdownStyle:{width:"7rem"},icon:"Ruler",text:t?`${t}%`:"Default",hideText:!1,tooltip:!1,children:n.map((r,i)=>E.jsx(gv,{"data-active":r==t||void 0,onSelect:()=>e(r),children:r?`${r}% width`:"Default"},i))})},$ae=()=>{const t=v.useRef(null),{editor:e,isResizing:n,contentElement:r}=$e(),[i,s]=v.useState(!1),o=Ue({editor:e,selector:m=>{if(!m.editor.isActive("image")&&!m.editor.isActive("imageFigure"))return null;const{node:g,pos:y}=Fae(m.editor.state.selection);return g?{pos:y,src:g.attrs.src,alt:g.attrs.alt,width:g.attrs.width,hasCaption:m.editor.isActive("imageFigure")}:null}}),a=v.useCallback(()=>{const m=e.isActive("imageFigure")?"figure":"img",g=Ip(e,m);return g?{getBoundingClientRect:()=>g.getBoundingClientRect()}:null},[e]),l=(m,g)=>{const{state:{selection:y}}=e;return e.chain().command(({commands:b})=>o!=null&&o.pos&&y.from!==o.pos?b.setNodeSelection(o.pos):!0).updateAttributes("image",{[m]:g}).focus().run()},c=()=>e.chain().focus()[o!=null&&o.hasCaption?"figureToImage":"imageToFigure"]().run(),u=()=>{s(m=>!m),requestAnimationFrame(()=>{var m,g;return(g=(m=t.current)==null?void 0:m.updatePosition)==null?void 0:g.call(m)})},h=m=>{l("alt",m),u()},d=m=>l("width",m),p=()=>e.chain().focus().removeImage().run(),f=v.useCallback(async()=>{if(o!=null&&o.src)try{const m=await fetch(o.src);if(!m.ok)throw new Error("Failed to fetch the image.");const g=await m.blob(),y=g.type.split(/\/|\+/)[1],b=URL.createObjectURL(g),T=document.createElement("a");T.href=b,T.download=`image.${y}`,document.body.appendChild(T),T.click(),document.body.removeChild(T),URL.revokeObjectURL(b)}catch{}},[o]);return n?null:E.jsx(Dm,{editor:e,pluginKey:"image-bubble",shouldShow:({editor:m})=>m.isActive("imageFigure")||m.isActive("image"),updateDelay:100,appendTo:()=>r.current,getReferencedVirtualElement:a,options:{offset:15,onShow:()=>{t.current={updatePosition:()=>{}}},onDestroy:()=>t.current=null,onHide:()=>s(!1)},children:i?E.jsx(Lae,{initialText:o==null?void 0:o.alt,onApply:h,onCancel:()=>{e.commands.focus(),u()}}):E.jsxs(li,{children:[E.jsx(be,{text:"Alt text",hideText:!1,tooltip:"Alternative text",onClick:u}),E.jsx(be,{icon:"ImageCaption",tooltip:`Caption: ${o!=null&&o.hasCaption?"ON":"OFF"}`,active:o==null?void 0:o.hasCaption,onClick:c}),E.jsx(Ni,{}),E.jsx(Qae,{value:o==null?void 0:o.width,onChange:d}),E.jsx(Ni,{}),E.jsx(be,{icon:"Download",tooltip:"Download",onClick:f}),E.jsx(be,{icon:"Trash",tooltip:"Delete",onClick:p})]})})},Fae=t=>{let e=null,n=null;if(t instanceof de){const r=t.$anchor;e=r.node(-1).firstChild,n=r.before(-1)+1}else t instanceof pe&&(e=t.node,n=t.from,e.type.name==="imageFigure"&&(e=e.firstChild,n+=1));return{node:e,pos:n}},Bae=({initialUrl:t,initialText:e,isCreate:n,onApply:r,onCancel:i})=>{const[s,o]=v.useState(t||""),[a,l]=v.useState(e||""),[c,u]=v.useState(n),h=()=>{c&&r(s,a)};return v.useEffect(()=>{n||u(s&&s!==t||a!==e)},[a,s]),E.jsxs("div",{className:"rte-link__form",onSubmit:h,children:[E.jsx(Np,{className:"rte-link__label",children:"URL"}),E.jsx(Zo,{value:s,onChange:d=>o(d.target.value),className:"rte-link__input",placeholder:"Paste link",type:"url",required:!0,autoFocus:!0}),E.jsx(Np,{className:"rte-link__label",children:"Display Text"}),E.jsx(Zo,{value:a,onChange:d=>l(d.target.value),className:"rte-link__input",placeholder:"Enter link text"}),E.jsxs("div",{className:"rte-link__actions",children:[E.jsx(Vi,{type:"button",variant:"secondary",onClick:i,children:"Cancel"}),E.jsx(Vi,{type:"button",disabled:!c,onClick:h,children:"Apply"})]})]})},jae=({url:t,onEdit:e,onRemove:n})=>{const{copy:r,isCopied:i}=f$();return E.jsxs(li,{children:[E.jsx(be,{text:"Edit link",hideText:!1,onClick:e}),E.jsx(be,{icon:"ExternalLink",text:"Open in new tab",onClick:()=>window.open(t,"_blank")}),E.jsx(be,{icon:i?"Check":"Clipboard",text:i?"Copied":"Copy link",onClick:()=>r(t)}),E.jsx(be,{icon:"Unlink",text:"Remove link",onClick:n})]})},x$=()=>{const{editor:t,contentElement:e}=$e(),[n,r]=v.useState(!1),i=v.useRef(0),s=Ue({editor:t,selector:h=>{var g;if(i.current=((g=h.editor.storage.link)==null?void 0:g.mode)||0,!h.editor.isActive("link"))return null;const{state:{selection:d,doc:p}}=h.editor,f=h.editor.getAttributes("link").href,m=p.textBetween(d.from,d.to);return{url:f,text:m}}}),o=v.useCallback(({editor:h,from:d,to:p})=>(r(i.current==-1),h.isActive("link")&&(i.current==-1||d!==p)),[]),a=v.useCallback((h,d)=>{t.chain().confirmEditLink({href:h,text:d||h}).run(),r(!1)},[]),l=v.useCallback(()=>{t.chain().focus().unsetLink().run()},[t]),c=v.useCallback(()=>{r(!0)},[]),u=v.useCallback(()=>{i.current==-1?t.commands.confirmEditLink():r(!1)},[t]);return E.jsx(Dm,{editor:t,pluginKey:"link-menu",updateDelay:100,shouldShow:o,appendTo:()=>e.current,options:{placement:"bottom-start",onHide:()=>r(!1)},children:n?E.jsx(Bae,{initialUrl:s==null?void 0:s.url,initialText:s==null?void 0:s.text,isCreate:i.current===-1,onApply:a,onCancel:u}):E.jsx(jae,{url:s==null?void 0:s.url,onEdit:c,onRemove:l})})};v.memo(x$);var zae=Object.defineProperty,Vae=(t,e)=>{for(var n in e)zae(t,n,{get:e[n],enumerable:!0})},Uae="listItem",NC="textStyle",RC=/^\s*([-+*])\s$/,C$=xt.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",Be(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Uae,this.editor.getAttributes(NC)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Ga({find:RC,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Ga({find:RC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(NC),editor:this.editor})),[t]}}),D$=xt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Be(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{if(t.type!=="list_item")return[];let n=[];if(t.tokens&&t.tokens.length>0)if(t.tokens.some(r=>r.type==="paragraph"))n=e.parseChildren(t.tokens);else{const r=t.tokens[0];if(r&&r.type==="text"&&r.tokens&&r.tokens.length>0){if(n=[{type:"paragraph",content:e.parseInline(r.tokens)}],t.tokens.length>1){const i=t.tokens.slice(1),s=e.parseChildren(i);n.push(...s)}}else n=e.parseChildren(t.tokens)}return n.length===0&&(n=[{type:"paragraph",content:[]}]),{type:"listItem",content:n}},renderMarkdown:(t,e,n)=>cv(t,e,r=>r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${r.index+1}. `:"- ",n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Hae={};Vae(Hae,{findListItemPos:()=>sh,getNextListDepth:()=>LT,handleBackspace:()=>jb,handleDelete:()=>zb,hasListBefore:()=>A$,hasListItemAfter:()=>Xae,hasListItemBefore:()=>P$,listItemHasSubList:()=>N$,nextListIsDeeper:()=>R$,nextListIsHigher:()=>M$});var sh=(t,e)=>{const{$from:n}=e.selection,r=Rt(t,e.schema);let i=null,s=n.depth,o=n.pos,a=null;for(;s>0&&a===null;)i=n.node(s),i.type===r?a=s:(s-=1,o-=1);return a===null?null:{$pos:e.doc.resolve(o),depth:a}},LT=(t,e)=>{const n=sh(t,e);if(!n)return!1;const[,r]=gH(e,t,n.$pos.pos+4);return r},A$=(t,e,n)=>{const{$anchor:r}=t.selection,i=Math.max(0,r.pos-2),s=t.doc.resolve(i).node();return!(!s||!n.includes(s.type.name))},P$=(t,e)=>{var n;const{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-2);return!(i.index()===0||((n=i.nodeBefore)==null?void 0:n.type.name)!==t)},N$=(t,e,n)=>{if(!n)return!1;const r=Rt(t,e.schema);let i=!1;return n.descendants(s=>{s.type===r&&(i=!0)}),i},jb=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!Dr(t.state,e)&&A$(t.state,e,n)){const{$anchor:o}=t.state.selection,a=t.state.doc.resolve(o.before()-1),l=[];a.node().descendants((h,d)=>{h.type.name===e&&l.push({node:h,pos:d})});const c=l.at(-1);if(!c)return!1;const u=t.state.doc.resolve(a.start()+c.pos+1);return t.chain().cut({from:o.start()-1,to:o.end()+1},u.end()).joinForward().run()}if(!Dr(t.state,e)||!EH(t.state))return!1;const r=sh(e,t.state);if(!r)return!1;const i=t.state.doc.resolve(r.$pos.pos-2).node(r.depth),s=N$(e,t.state,i);return P$(e,t.state)&&!s?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},R$=(t,e)=>{const n=LT(t,e),r=sh(t,e);return!r||!n?!1:n>r.depth},M$=(t,e)=>{const n=LT(t,e),r=sh(t,e);return!r||!n?!1:n<r.depth},zb=(t,e)=>{if(!Dr(t.state,e)||!bH(t.state,e))return!1;const{selection:n}=t.state,{$from:r,$to:i}=n;return!n.empty&&r.sameParent(i)?!1:R$(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():M$(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},Xae=(t,e)=>{var n;const{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-r.parentOffset-2);return!(i.index()===i.parent.childCount-1||((n=i.nodeAfter)==null?void 0:n.type.name)!==t)},QT=Ve.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&zb(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&zb(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&jb(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&jb(t,n,r)&&(e=!0)}),e}}}}),MC=/^(\s*)(\d+)\.\s+(.*)$/,qae=/^\s/;function Zae(t){const e=[];let n=0,r=0;for(;n<t.length;){const i=t[n],s=i.match(MC);if(!s)break;const[,o,a,l]=s,c=o.length;let u=l,h=n+1;const d=[i];for(;h<t.length;){const p=t[h];if(p.match(MC))break;if(p.trim()==="")d.push(p),u+=`
`,h+=1;else if(p.match(qae))d.push(p),u+=`
${p.slice(c+2)}`,h+=1;else break}e.push({indent:c,number:parseInt(a,10),content:u.trim(),raw:d.join(`
`)}),r=h,n=h}return[e,r]}function I$(t,e,n){var r;const i=[];let s=0;for(;s<t.length;){const o=t[s];if(o.indent===e){const a=o.content.split(`
`),l=((r=a[0])==null?void 0:r.trim())||"",c=[];l&&c.push({type:"paragraph",raw:l,tokens:n.inlineTokens(l)});const u=a.slice(1).join(`
`).trim();if(u){const p=n.blockTokens(u);c.push(...p)}let h=s+1;const d=[];for(;h<t.length&&t[h].indent>e;)d.push(t[h]),h+=1;if(d.length>0){const p=Math.min(...d.map(m=>m.indent)),f=I$(d,p,n);c.push({type:"list",ordered:!0,start:d[0].number,items:f,raw:d.map(m=>m.raw).join(`
`)})}i.push({type:"list_item",raw:o.raw,tokens:c}),s=h}else s+=1}return i}function Wae(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];const r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(i=>{if(i.type==="paragraph"||i.type==="list"||i.type==="blockquote"||i.type==="code")r.push(...e.parseChildren([i]));else if(i.type==="text"&&i.tokens){const s=e.parseChildren([i]);r.push({type:"paragraph",content:s})}else{const s=e.parseChildren([i]);s.length>0&&r.push(...s)}}),{type:"listItem",content:r}})}var Gae="listItem",IC="textStyle",LC=/^(\d+)\.\s$/,L$=xt.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",Be(this.options.HTMLAttributes,n),0]:["ol",Be(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];const n=t.start||1,r=t.items?Wae(t.items,e):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
`):"",markdownTokenizer:{name:"orderedList",level:"block",start:t=>{const e=t.match(/^(\s*)(\d+)\.\s+/),n=e==null?void 0:e.index;return n!==void 0?n:-1},tokenize:(t,e,n)=>{var r;const i=t.split(`
`),[s,o]=Zae(i);if(s.length===0)return;const a=I$(s,0,n);return a.length===0?void 0:{type:"list",ordered:!0,start:((r=s[0])==null?void 0:r.number)||1,items:a,raw:i.slice(0,o).join(`
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Gae,this.editor.getAttributes(IC)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Ga({find:LC,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Ga({find:LC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(IC)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),Yae=/^\s*(\[([( |x])?\])\s$/,Kae=xt.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",Be(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const r=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return cv(t,e,r)},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const i=document.createElement("li"),s=document.createElement("label"),o=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div"),c=u=>{var h,d;a.ariaLabel=((d=(h=this.options.a11y)==null?void 0:h.checkboxLabel)==null?void 0:d.call(h,u,a.checked))||`Task item checkbox for ${u.textContent||"empty task item"}`};return c(t),s.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",u=>u.preventDefault()),a.addEventListener("change",u=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:h}=u.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:d})=>{const p=n();if(typeof p!="number")return!1;const f=d.doc.nodeAt(p);return d.setNodeMarkup(p,void 0,{...f==null?void 0:f.attrs,checked:h}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,h)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([u,h])=>{i.setAttribute(u,h)}),i.dataset.checked=t.attrs.checked,a.checked=t.attrs.checked,s.append(a,o),i.append(s,l),Object.entries(e).forEach(([u,h])=>{i.setAttribute(u,h)}),{dom:i,contentDOM:l,update:u=>u.type!==this.type?!1:(i.dataset.checked=u.attrs.checked,a.checked=u.attrs.checked,c(u),!0)}}},addInputRules(){return[Ga({find:Yae,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),Jae=xt.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",Be(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=s=>{const o=Sy(s,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:n.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:r},n);return o?[{type:"taskList",raw:o.raw,items:o.items}]:n.blockTokens(s)},i=Sy(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:s=>({indentLevel:s[1].length,mainContent:s[4],checked:s[3].toLowerCase()==="x"}),createToken:(s,o)=>({type:"taskItem",raw:"",mainContent:s.mainContent,indentLevel:s.indentLevel,checked:s.checked,text:s.mainContent,tokens:n.inlineTokens(s.mainContent),nestedTokens:o}),customNestedParser:r},n);if(i)return{type:"taskList",raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});Ve.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(C$.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(D$.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(QT.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(L$.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(Kae.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(Jae.configure(this.options.taskList)),t}});function ele(t={}){return new ze({view(e){return new tle(e,t)}})}class tle{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let s=o=>{this[i](o)};return e.dom.addEventListener(i,s),{name:i,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,i=this.editorView.dom,s=i.getBoundingClientRect(),o=s.width/i.offsetWidth,a=s.height/i.offsetHeight;if(n){let h=e.nodeBefore,d=e.nodeAfter;if(h||d){let p=this.editorView.nodeDOM(this.cursorPos-(h?h.nodeSize:0));if(p){let f=p.getBoundingClientRect(),m=h?f.bottom:f.top;h&&d&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let g=this.width/2*a;r={left:f.left,right:f.right,top:m-g,bottom:m+g}}}}if(!r){let h=this.editorView.coordsAtPos(this.cursorPos),d=this.width/2*o;r={left:h.left-d,right:h.left+d,top:h.top,bottom:h.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let c,u;if(!l||l==document.body&&getComputedStyle(l).position=="static")c=-pageXOffset,u=-pageYOffset;else{let h=l.getBoundingClientRect(),d=h.width/l.offsetWidth,p=h.height/l.offsetHeight;c=h.left-l.scrollLeft*d,u=h.top-l.scrollTop*p}this.element.style.left=(r.left-c)/o+"px",this.element.style.top=(r.top-u)/a+"px",this.element.style.width=(r.right-r.left)/o+"px",this.element.style.height=(r.bottom-r.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),i=r&&r.type.spec.disableDropCursor,s=typeof i=="function"?i(this.editorView,n,e):i;if(n&&!s){let o=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=RP(this.editorView.state.doc,o,this.editorView.dragging.slice);a!=null&&(o=a)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class yt extends Te{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return yt.valid(r)?new yt(r):Te.near(r)}content(){return te.empty}eq(e){return e instanceof yt&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new yt(e.resolve(n.pos))}getBookmark(){return new $T(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!nle(e)||!rle(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let i=n.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&yt.valid(e))return e;let i=e.pos,s=null;for(let o=e.depth;;o--){let a=e.node(o);if(n>0?e.indexAfter(o)<a.childCount:e.index(o)>0){s=a.child(n>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;i+=n;let l=e.doc.resolve(i);if(yt.valid(l))return l}for(;;){let o=n>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!pe.isSelectable(s)){e=e.doc.resolve(i+s.nodeSize*n),r=!1;continue e}break}s=o,i+=n;let a=e.doc.resolve(i);if(yt.valid(a))return a}return null}}}yt.prototype.visible=!1;yt.findFrom=yt.findGapCursorFrom;Te.jsonID("gapcursor",yt);class $T{constructor(e){this.pos=e}map(e){return new $T(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return yt.valid(n)?new yt(n):Te.near(n)}}function Q$(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function nle(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||Q$(i.type))return!0;if(i.inlineContent)return!1}}return!0}function rle(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||Q$(i.type))return!0;if(i.inlineContent)return!1}}return!0}function ile(){return new ze({props:{decorations:lle,createSelectionBetween(t,e,n){return e.pos==n.pos&&yt.valid(n)?new yt(n):null},handleClick:ole,handleKeyDown:sle,handleDOMEvents:{beforeinput:ale}}})}const sle=YE({ArrowLeft:ad("horiz",-1),ArrowRight:ad("horiz",1),ArrowUp:ad("vert",-1),ArrowDown:ad("vert",1)});function ad(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,s){let o=r.selection,a=e>0?o.$to:o.$from,l=o.empty;if(o instanceof de){if(!s.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let c=yt.findGapCursorFrom(a,e,l);return c?(i&&i(r.tr.setSelection(new yt(c))),!0):!1}}function ole(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!yt.valid(r))return!1;let i=t.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&pe.isSelectable(t.state.doc.nodeAt(i.inside))?!1:(t.dispatch(t.state.tr.setSelection(new yt(r))),!0)}function ale(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof yt))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let i=X.empty;for(let o=r.length-1;o>=0;o--)i=X.from(r[o].createAndFill(null,i));let s=t.state.tr.replace(n.pos,n.pos,new te(i,0,0));return s.setSelection(de.near(s.doc.resolve(n.pos+1))),t.dispatch(s),!1}function lle(t){if(!(t.selection instanceof yt))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",je.create(t.doc,[sn.widget(t.selection.head,e,{key:"gapcursor"})])}var Lp=200,Gt=function(){};Gt.prototype.append=function(t){return t.length?(t=Gt.from(t),!this.length&&t||t.length<Lp&&this.leafAppend(t)||this.length<Lp&&t.leafPrepend(this)||this.appendInner(t)):this};Gt.prototype.prepend=function(t){return t.length?Gt.from(t).append(this):this};Gt.prototype.appendInner=function(t){return new cle(this,t)};Gt.prototype.slice=function(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.length),t>=e?Gt.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))};Gt.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};Gt.prototype.forEach=function(t,e,n){e===void 0&&(e=0),n===void 0&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)};Gt.prototype.map=function(t,e,n){e===void 0&&(e=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(i,s){return r.push(t(i,s))},e,n),r};Gt.from=function(t){return t instanceof Gt?t:t&&t.length?new $$(t):Gt.empty};var $$=(function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(r,i){return r==0&&i==this.length?this:new e(this.values.slice(r,i))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,i,s,o){for(var a=i;a<s;a++)if(r(this.values[a],o+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,s,o){for(var a=i-1;a>=s;a--)if(r(this.values[a],o+a)===!1)return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=Lp)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=Lp)return new e(r.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(Gt);Gt.empty=new $$([]);var cle=(function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},e.prototype.forEachInner=function(n,r,i,s){var o=this.left.length;if(r<o&&this.left.forEachInner(n,r,Math.min(i,o),s)===!1||i>o&&this.right.forEachInner(n,Math.max(r-o,0),Math.min(this.length,i)-o,s+o)===!1)return!1},e.prototype.forEachInvertedInner=function(n,r,i,s){var o=this.left.length;if(r>o&&this.right.forEachInvertedInner(n,r-o,Math.max(i,o)-o,s+o)===!1||i<o&&this.left.forEachInvertedInner(n,Math.min(r,o),i,s)===!1)return!1},e.prototype.sliceInner=function(n,r){if(n==0&&r==this.length)return this;var i=this.left.length;return r<=i?this.left.slice(n,r):n>=i?this.right.slice(n-i,r-i):this.left.slice(n,i).append(this.right.slice(0,r-i))},e.prototype.leafAppend=function(n){var r=this.right.leafAppend(n);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(n){var r=this.left.leafPrepend(n);if(r)return new e(r,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e})(Gt);const ule=500;class Er{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,s;n&&(i=this.remapping(r,this.items.length),s=i.maps.length);let o=e.tr,a,l,c=[],u=[];return this.items.forEach((h,d)=>{if(!h.step){i||(i=this.remapping(r,d+1),s=i.maps.length),s--,u.push(h);return}if(i){u.push(new Zr(h.map));let p=h.step.map(i.slice(s)),f;p&&o.maybeStep(p).doc&&(f=o.mapping.maps[o.mapping.maps.length-1],c.push(new Zr(f,void 0,void 0,c.length+u.length))),s--,f&&i.appendMap(f,s)}else o.maybeStep(h.step);if(h.selection)return a=i?h.selection.map(i.slice(s)):h.selection,l=new Er(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:a}}addTransform(e,n,r,i){let s=[],o=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let u=0;u<e.steps.length;u++){let h=e.steps[u].invert(e.docs[u]),d=new Zr(e.mapping.maps[u],h,n),p;(p=l&&l.merge(d))&&(d=p,u?s.pop():a=a.slice(0,a.length-1)),s.push(d),n&&(o++,n=void 0),i||(l=d)}let c=o-r.depth;return c>dle&&(a=hle(a,c),o-=c),new Er(a.append(s),o)}remapping(e,n){let r=new qc;return this.items.forEach((i,s)=>{let o=i.mirrorOffset!=null&&s-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,o)},e,n),r}addMaps(e){return this.eventCount==0?this:new Er(this.items.append(e.map(n=>new Zr(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),s=e.mapping,o=e.steps.length,a=this.eventCount;this.items.forEach(d=>{d.selection&&a--},i);let l=n;this.items.forEach(d=>{let p=s.getMirror(--l);if(p==null)return;o=Math.min(o,p);let f=s.maps[p];if(d.step){let m=e.steps[p].invert(e.docs[p]),g=d.selection&&d.selection.map(s.slice(l+1,p));g&&a++,r.push(new Zr(f,m,g))}else r.push(new Zr(f))},i);let c=[];for(let d=n;d<o;d++)c.push(new Zr(s.maps[d]));let u=this.items.slice(0,i).append(c).append(r),h=new Er(u,a);return h.emptyItemCount()>ule&&(h=h.compress(this.items.length-r.length)),h}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,i=[],s=0;return this.items.forEach((o,a)=>{if(a>=e)i.push(o),o.selection&&s++;else if(o.step){let l=o.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=o.selection&&o.selection.map(n.slice(r));u&&s++;let h=new Zr(c.invert(),l,u),d,p=i.length-1;(d=i.length&&i[p].merge(h))?i[p]=d:i.push(h)}}else o.map&&r--},this.items.length,0),new Er(Gt.from(i.reverse()),s)}}Er.empty=new Er(Gt.empty,0);function hle(t,e){let n;return t.forEach((r,i)=>{if(r.selection&&e--==0)return n=i,!1}),t.slice(n)}class Zr{constructor(e,n,r,i){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Zr(n.getMap().invert(),n,this.selection)}}}class vs{constructor(e,n,r,i,s){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=s}}const dle=20;function ple(t,e,n,r){let i=n.getMeta(Po),s;if(i)return i.historyState;n.getMeta(gle)&&(t=new vs(t.done,t.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(o&&o.getMeta(Po))return o.getMeta(Po).redo?new vs(t.done.addTransform(n,void 0,r,Ud(e)),t.undone,QC(n.mapping.maps),t.prevTime,t.prevComposition):new vs(t.done,t.undone.addTransform(n,void 0,r,Ud(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!o&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!fle(n,t.prevRanges)),c=o?TO(t.prevRanges,n.mapping):QC(n.mapping.maps);return new vs(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,Ud(e)),Er.empty,c,n.time,a??t.prevComposition)}else return(s=n.getMeta("rebased"))?new vs(t.done.rebased(n,s),t.undone.rebased(n,s),TO(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new vs(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),TO(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function fle(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,i)=>{for(let s=0;s<e.length;s+=2)r<=e[s+1]&&i>=e[s]&&(n=!0)}),n}function QC(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,i,s,o)=>e.push(s,o));return e}function TO(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),s=e.map(t[r+1],-1);i<=s&&n.push(i,s)}return n}function mle(t,e,n){let r=Ud(e),i=Po.get(e).spec.config,s=(n?t.undone:t.done).popEvent(e,r);if(!s)return null;let o=s.selection.resolve(s.transform.doc),a=(n?t.done:t.undone).addTransform(s.transform,e.selection.getBookmark(),i,r),l=new vs(n?a:s.remaining,n?s.remaining:a,null,0,-1);return s.transform.setSelection(o).setMeta(Po,{redo:n,historyState:l})}let SO=!1,$C=null;function Ud(t){let e=t.plugins;if($C!=e){SO=!1,$C=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){SO=!0;break}}return SO}const Po=new rt("history"),gle=new rt("closeHistory");function Ole(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new ze({key:Po,state:{init(){return new vs(Er.empty,Er.empty,null,0,-1)},apply(e,n,r){return ple(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?B$:r=="historyRedo"?j$:null;return!i||!e.editable?!1:(n.preventDefault(),i(e.state,e.dispatch))}}}})}function F$(t,e){return(n,r)=>{let i=Po.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let s=mle(i,n,t);s&&r(s.scrollIntoView())}return!0}}const B$=F$(!1),j$=F$(!0);var yle=Ve.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const n=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(n)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new ze({key:new rt("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const i=this.options.limit;if(i==null||i===0){t=!0;return}const s=this.storage.characters({node:r.doc});if(s>i){const o=s-i,a=0,l=o;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);const c=r.tr.deleteRange(a,l);return t=!0,c}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const i=this.storage.characters({node:n.doc}),s=this.storage.characters({node:e.doc});if(s<=r||i>r&&s>r&&s<=i)return!0;if(i>r&&s>r&&s>i||!e.getMeta("paste"))return!1;const o=e.selection.$head.pos,a=s-r,l=o-a,c=o;return e.deleteRange(l,c),!(this.storage.characters({node:e.doc})>r)}})]}}),ble=Ve.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[ele(this.options)]}});Ve.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new ze({key:new rt("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:i}=e,s=[];if(!n||!r)return je.create(t,[]);let o=0;this.options.mode==="deepest"&&t.descendants((l,c)=>{if(!l.isText){if(!(i>=c&&i<=c+l.nodeSize-1))return!1;o+=1}});let a=0;return t.descendants((l,c)=>{if(l.isText||!(i>=c&&i<=c+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&o-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";s.push(sn.node(c,c+l.nodeSize,{class:this.options.className}))}),je.create(t,s)}}})]}});var Ele=Ve.create({name:"gapCursor",addProseMirrorPlugins(){return[ile()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=qe(ge(t,"allowGapCursor",n)))!=null?e:null}}}),vle=Ve.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new ze({key:new rt("placeholder"),props:{decorations:({doc:t,selection:e})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,i=[];if(!n)return null;const s=this.editor.isEmpty;return t.descendants((o,a)=>{const l=r>=a&&r<=a+o.nodeSize,c=!o.isLeaf&&Gf(o);if((l||!this.options.showOnlyCurrent)&&c){const u=[this.options.emptyNodeClass];s&&u.push(this.options.emptyEditorClass);const h=sn.node(a,a+o.nodeSize,{class:u.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:o,pos:a,hasAnchor:l}):this.options.placeholder});i.push(h)}return this.options.includeChildren}),je.create(t,i)}}})]}});Ve.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new ze({key:new rt("selection"),props:{decorations(n){return n.selection.empty||t.isFocused||!t.isEditable||YN(n.selection)||t.view.dragging?null:je.create(n.doc,[sn.inline(n.selection.from,n.selection.to,{class:e.className})])}}})]}});function FC({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(e==null?void 0:e.type)===t}var Tle=Ve.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new rt(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,i])=>i).filter(i=>(this.options.notAfter||[]).concat(n).includes(i.name));return[new ze({key:e,appendTransaction:(i,s,o)=>{const{doc:a,tr:l,schema:c}=o,u=e.getState(o),h=a.content.size,d=c.nodes[n];if(u)return l.insert(h,d.create())},state:{init:(i,s)=>{const o=s.tr.doc.lastChild;return!FC({node:o,types:r})},apply:(i,s)=>{if(!i.docChanged||i.getMeta("__uniqueIDTransaction"))return s;const o=i.doc.lastChild;return!FC({node:o,types:r})}}})]}}),Sle=Ve.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>B$(t,e),redo:()=>({state:t,dispatch:e})=>j$(t,e)}},addProseMirrorPlugins(){return[Ole(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),wle=20,z$=(t,e=0)=>{const n=[];return!t.children.length||e>wle||Array.from(t.children).forEach(r=>{r.tagName==="SPAN"?n.push(r):r.children.length&&n.push(...z$(r,e+1))}),n},kle=t=>{if(!t.children.length)return;const e=z$(t);e&&e.forEach(n=>{var r,i;const s=n.getAttribute("style"),o=(i=(r=n.parentElement)==null?void 0:r.closest("span"))==null?void 0:i.getAttribute("style");n.setAttribute("style",`${o};${s}`)})},V$=Rr.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!0}},parseHTML(){return[{tag:"span",consuming:!1,getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&kle(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",Be(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleTextStyle:t=>({commands:e})=>e.toggleMark(this.name,t),removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(n,r)=>{if(n.isTextblock)return!0;n.marks.filter(i=>i.type===this.type).some(i=>Object.values(i.attrs).some(s=>!!s))||t.removeMark(r,r+n.nodeSize,this.type)}),!0}}}}),_le=Ve.create({name:"backgroundColor",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:t=>{var e;const n=t.getAttribute("style");if(n){const r=n.split(";").map(i=>i.trim()).filter(Boolean);for(let i=r.length-1;i>=0;i-=1){const s=r[i].split(":");if(s.length>=2){const o=s[0].trim().toLowerCase(),a=s.slice(1).join(":").trim();if(o==="background-color")return a.replace(/['"]+/g,"")}}}return(e=t.style.backgroundColor)==null?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.backgroundColor?{style:`background-color: ${t.backgroundColor}`}:{}}}}]},addCommands(){return{setBackgroundColor:t=>({chain:e})=>e().setMark("textStyle",{backgroundColor:t}).run(),unsetBackgroundColor:()=>({chain:t})=>t().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}}}),U$=Ve.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;const n=t.getAttribute("style");if(n){const r=n.split(";").map(i=>i.trim()).filter(Boolean);for(let i=r.length-1;i>=0;i-=1){const s=r[i].split(":");if(s.length>=2){const o=s[0].trim().toLowerCase(),a=s.slice(1).join(":").trim();if(o==="color")return a.replace(/['"]+/g,"")}}}return(e=t.style.color)==null?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),xle=Ve.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily,renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),Cle=Ve.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>t.style.fontSize,renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),Dle=Ve.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>t.style.lineHeight,renderHTML:t=>t.lineHeight?{style:`line-height: ${t.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:t=>({chain:e})=>e().setMark("textStyle",{lineHeight:t}).run(),unsetLineHeight:()=>({chain:t})=>t().setMark("textStyle",{lineHeight:null}).removeEmptyTextStyle().run()}}});Ve.create({name:"textStyleKit",addExtensions(){const t=[];return this.options.backgroundColor!==!1&&t.push(_le.configure(this.options.backgroundColor)),this.options.color!==!1&&t.push(U$.configure(this.options.color)),this.options.fontFamily!==!1&&t.push(xle.configure(this.options.fontFamily)),this.options.fontSize!==!1&&t.push(Cle.configure(this.options.fontSize)),this.options.lineHeight!==!1&&t.push(Dle.configure(this.options.lineHeight)),this.options.textStyle!==!1&&t.push(V$.configure(this.options.textStyle)),t}});var Ale=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,Ple=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,Nle=Rr.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",Be(this.options.HTMLAttributes,t),0]},renderMarkdown:(t,e)=>`==${e.renderChildren(t)}==`,parseMarkdown:(t,e)=>e.applyMark("highlight",e.parseInline(t.tokens||[])),markdownTokenizer:{name:"highlight",level:"inline",start:t=>t.indexOf("=="),tokenize(t,e,n){const r=/^(==)([^=]+)(==)/.exec(t);if(r){const i=r[2].trim(),s=n.inlineTokens(i);return{type:"highlight",raw:r[0],text:i,tokens:s}}}},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[$o({find:Ale,type:this.type})]},addPasteRules(){return[Hs({find:Ple,type:this.type})]}}),Rle=Rr.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(t){return t!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sub",Be(this.options.HTMLAttributes,t),0]},addCommands(){return{setSubscript:()=>({commands:t})=>t.setMark(this.name),toggleSubscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSubscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),Mle=Rr.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(t){return t!=="super"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sup",Be(this.options.HTMLAttributes,t),0]},addCommands(){return{setSuperscript:()=>({commands:t})=>t.setMark(this.name),toggleSuperscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSuperscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),Ile=Ve.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).some(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).some(e=>e),toggleTextAlign:t=>({editor:e,commands:n})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?n.unsetTextAlign():n.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),H$=Rr.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",Be(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){const r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!r)return;const i=r[2].trim();return{type:"underline",raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),Qp=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]},Lle=/^\s*>\s$/,Qle=xt.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return Qp("blockquote",{...Be(this.options.HTMLAttributes,t),children:Qp("slot",{})})},parseMarkdown:(t,e)=>e.createNode("blockquote",void 0,e.parseChildren(t.tokens||[])),renderMarkdown:(t,e)=>{if(!t.content)return"";const n=">",r=[];return t.content.forEach(i=>{const s=e.renderChildren([i]).split(`
`).map(o=>o.trim()===""?n:`${n} ${o}`);r.push(s.join(`
`))}),r.join(`
${n}
`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Ga({find:Lle,type:this.type})]}}),$le=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Fle=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Ble=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,jle=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,zle=Rr.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return Qp("strong",{...Be(this.options.HTMLAttributes,t),children:Qp("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[$o({find:$le,type:this.type}),$o({find:Ble,type:this.type})]},addPasteRules(){return[Hs({find:Fle,type:this.type}),Hs({find:jle,type:this.type})]}}),Vle=/(^|[^`])`([^`]+)`(?!`)$/,Ule=/(^|[^`])`([^`]+)`(?!`)/g,Hle=Rr.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Be(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[$o({find:Vle,type:this.type})]},addPasteRules(){return[Hs({find:Ule,type:this.type})]}}),wO=4,Xle=/^```([a-z]+)?[\s\n]$/,qle=/^~~~([a-z]+)?[\s\n]$/,X$=xt.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:wO,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;return n&&[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(i=>i.startsWith(n)).map(i=>i.replace(n,""))[0]||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",Be(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n;return((n=t.raw)==null?void 0:n.startsWith("```"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="";const i=((n=t.attrs)==null?void 0:n.language)||"";return t.content?r=[`\`\`\`${i}`,e.renderChildren(t.content),"```"].join(`
`):r=`\`\`\`${i}
\`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:wO,{state:r}=t,{selection:i}=r,{$from:s,empty:o}=i;if(s.parent.type!==this.type)return!1;const a=" ".repeat(n);return o?t.commands.insertContent(a):t.commands.command(({tr:l})=>{const{from:c,to:u}=i,h=r.doc.textBetween(c,u,`
`,`
`).split(`
`).map(d=>a+d).join(`
`);return l.replaceWith(c,u,r.schema.text(h)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:wO,{state:r}=t,{selection:i}=r,{$from:s,empty:o}=i;return s.parent.type!==this.type?!1:o?t.commands.command(({tr:a})=>{var l;const{pos:c}=s,u=s.start(),h=s.end(),d=r.doc.textBetween(u,h,`
`,`
`).split(`
`);let p=0,f=0;const m=c-u;for(let T=0;T<d.length;T+=1){if(f+d[T].length>=m){p=T;break}f+=d[T].length+1}const g=((l=d[p].match(/^ */))==null?void 0:l[0])||"",y=Math.min(g.length,n);if(y===0)return!0;let b=u;for(let T=0;T<p;T+=1)b+=d[T].length+1;return a.delete(b,b+y),c-b<=y&&a.setSelection(de.create(a.doc,b)),!0}):t.commands.command(({tr:a})=>{const{from:l,to:c}=i,u=r.doc.textBetween(l,c,`
`,`
`).split(`
`).map(h=>{var d;const p=((d=h.match(/^ */))==null?void 0:d[0])||"",f=Math.min(p.length,n);return h.slice(f)}).join(`
`);return a.replaceWith(l,c,r.schema.text(u)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;const s=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith(`
`);return!s||!o?!1:t.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:i,empty:s}=n;if(!s||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;const o=i.after();return o===void 0?!1:r.nodeAt(o)?t.commands.command(({tr:a})=>(a.setSelection(Te.near(r.resolve(o))),!0)):t.commands.exitCode()}}},addInputRules(){return[tu({find:Xle,type:this.type,getAttributes:t=>({language:t[1]})}),tu({find:qle,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new ze({key:new rt("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,s=i==null?void 0:i.mode;if(!n||!s)return!1;const{tr:o,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,`
`));return o.replaceSelectionWith(this.type.create({language:s},l)),o.selection.$from.parent.type!==this.type&&o.setSelection(de.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),t.dispatch(o),!0}}})]}}),Zle=X$,Wle=xt.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
`):""}),Gle=xt.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",Be(this.options.HTMLAttributes,t)]},renderText(){return`
`},renderMarkdown:()=>`
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:i,storedMarks:s}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:a}=r.extensionManager,l=s||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&o){const h=l.filter(d=>a.includes(d.type.name));c.ensureMarks(h)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Yle=xt.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Be(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;const r=(n=t.attrs)!=null&&n.level?parseInt(t.attrs.level,10):1,i="#".repeat(r);return t.content?`${i} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>tu({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),Kle=xt.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Be(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!oX(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$to:r}=n,i=t();return YN(n)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:s,tr:o,dispatch:a})=>{if(a){const{$to:l}=o.selection,c=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?o.setSelection(de.create(o.doc,l.pos+1)):l.nodeAfter.isBlock?o.setSelection(pe.create(o.doc,l.pos)):o.setSelection(de.create(o.doc,l.pos));else{const u=s.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,h=u==null?void 0:u.create();h&&(o.insert(c,h),o.setSelection(de.create(o.doc,c+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[dR({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),Jle=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,ece=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,tce=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,nce=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,rce=Rr.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Be(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[$o({find:Jle,type:this.type}),$o({find:tce,type:this.type})]},addPasteRules(){return[Hs({find:ece,type:this.type}),Hs({find:nce,type:this.type})]}});const ice="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",sce="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3украз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراهاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരത5ලකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Vb="numeric",Ub="ascii",Hb="alpha",Nc="asciinumeric",uc="alphanumeric",Xb="domain",q$="emoji",oce="scheme",ace="slashscheme",kO="whitespace";function lce(t,e){return t in e||(e[t]=[]),e[t]}function ko(t,e,n){e[Vb]&&(e[Nc]=!0,e[uc]=!0),e[Ub]&&(e[Nc]=!0,e[Hb]=!0),e[Nc]&&(e[uc]=!0),e[Hb]&&(e[uc]=!0),e[uc]&&(e[Xb]=!0),e[q$]&&(e[Xb]=!0);for(const r in e){const i=lce(r,n);i.indexOf(t)<0&&i.push(t)}}function cce(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function Mn(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Mn.groups={};Mn.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const i=e.jr[r][0],s=e.jr[r][1];if(s&&i.test(t))return s}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let i=0;i<t.length;i++)this.tt(t[i],e,n,r)},tr(t,e,n,r){r=r||Mn.groups;let i;return e&&e.j?i=e:(i=new Mn(e),n&&r&&ko(e,n,r)),this.jr.push([t,i]),i},ts(t,e,n,r){let i=this;const s=t.length;if(!s)return i;for(let o=0;o<s-1;o++)i=i.tt(t[o]);return i.tt(t[s-1],e,n,r)},tt(t,e,n,r){r=r||Mn.groups;const i=this;if(e&&e.j)return i.j[t]=e,e;const s=e;let o,a=i.go(t);if(a?(o=new Mn,Object.assign(o.j,a.j),o.jr.push.apply(o.jr,a.jr),o.jd=a.jd,o.t=a.t):o=new Mn,s){if(r)if(o.t&&typeof o.t=="string"){const l=Object.assign(cce(o.t,r),n);ko(s,l,r)}else n&&ko(s,n,r);o.t=s}return i.j[t]=o,o}};const Pe=(t,e,n,r,i)=>t.ta(e,n,r,i),gt=(t,e,n,r,i)=>t.tr(e,n,r,i),BC=(t,e,n,r,i)=>t.ts(e,n,r,i),G=(t,e,n,r,i)=>t.tt(e,n,r,i),Di="WORD",qb="UWORD",Z$="ASCIINUMERICAL",W$="ALPHANUMERICAL",wu="LOCALHOST",Zb="TLD",Wb="UTLD",Hd="SCHEME",Ta="SLASH_SCHEME",FT="NUM",Gb="WS",BT="NL",Rc="OPENBRACE",Mc="CLOSEBRACE",$p="OPENBRACKET",Fp="CLOSEBRACKET",Bp="OPENPAREN",jp="CLOSEPAREN",zp="OPENANGLEBRACKET",Vp="CLOSEANGLEBRACKET",Up="FULLWIDTHLEFTPAREN",Hp="FULLWIDTHRIGHTPAREN",Xp="LEFTCORNERBRACKET",qp="RIGHTCORNERBRACKET",Zp="LEFTWHITECORNERBRACKET",Wp="RIGHTWHITECORNERBRACKET",Gp="FULLWIDTHLESSTHAN",Yp="FULLWIDTHGREATERTHAN",Kp="AMPERSAND",Jp="APOSTROPHE",ef="ASTERISK",Ts="AT",tf="BACKSLASH",nf="BACKTICK",rf="CARET",_s="COLON",jT="COMMA",sf="DOLLAR",Wr="DOT",of="EQUALS",zT="EXCLAMATION",nr="HYPHEN",Ic="PERCENT",af="PIPE",lf="PLUS",cf="POUND",Lc="QUERY",VT="QUOTE",G$="FULLWIDTHMIDDLEDOT",UT="SEMI",Gr="SLASH",Qc="TILDE",uf="UNDERSCORE",Y$="EMOJI",hf="SYM";var K$=Object.freeze({__proto__:null,ALPHANUMERICAL:W$,AMPERSAND:Kp,APOSTROPHE:Jp,ASCIINUMERICAL:Z$,ASTERISK:ef,AT:Ts,BACKSLASH:tf,BACKTICK:nf,CARET:rf,CLOSEANGLEBRACKET:Vp,CLOSEBRACE:Mc,CLOSEBRACKET:Fp,CLOSEPAREN:jp,COLON:_s,COMMA:jT,DOLLAR:sf,DOT:Wr,EMOJI:Y$,EQUALS:of,EXCLAMATION:zT,FULLWIDTHGREATERTHAN:Yp,FULLWIDTHLEFTPAREN:Up,FULLWIDTHLESSTHAN:Gp,FULLWIDTHMIDDLEDOT:G$,FULLWIDTHRIGHTPAREN:Hp,HYPHEN:nr,LEFTCORNERBRACKET:Xp,LEFTWHITECORNERBRACKET:Zp,LOCALHOST:wu,NL:BT,NUM:FT,OPENANGLEBRACKET:zp,OPENBRACE:Rc,OPENBRACKET:$p,OPENPAREN:Bp,PERCENT:Ic,PIPE:af,PLUS:lf,POUND:cf,QUERY:Lc,QUOTE:VT,RIGHTCORNERBRACKET:qp,RIGHTWHITECORNERBRACKET:Wp,SCHEME:Hd,SEMI:UT,SLASH:Gr,SLASH_SCHEME:Ta,SYM:hf,TILDE:Qc,TLD:Zb,UNDERSCORE:uf,UTLD:Wb,UWORD:qb,WORD:Di,WS:Gb});const ki=/[a-z]/,Xl=new RegExp("\\p{L}","u"),_O=new RegExp("\\p{Emoji}","u"),_i=/\d/,xO=/\s/,jC="\r",CO=`
`,uce="",hce="",DO="";let ld=null,cd=null;function dce(t=[]){const e={};Mn.groups=e;const n=new Mn;ld==null&&(ld=zC(ice)),cd==null&&(cd=zC(sce)),G(n,"'",Jp),G(n,"{",Rc),G(n,"}",Mc),G(n,"[",$p),G(n,"]",Fp),G(n,"(",Bp),G(n,")",jp),G(n,"<",zp),G(n,">",Vp),G(n,"",Up),G(n,"",Hp),G(n,"「",Xp),G(n,"」",qp),G(n,"『",Zp),G(n,"』",Wp),G(n,"",Gp),G(n,"",Yp),G(n,"&",Kp),G(n,"*",ef),G(n,"@",Ts),G(n,"`",nf),G(n,"^",rf),G(n,":",_s),G(n,",",jT),G(n,"$",sf),G(n,".",Wr),G(n,"=",of),G(n,"!",zT),G(n,"-",nr),G(n,"%",Ic),G(n,"|",af),G(n,"+",lf),G(n,"#",cf),G(n,"?",Lc),G(n,'"',VT),G(n,"/",Gr),G(n,";",UT),G(n,"~",Qc),G(n,"_",uf),G(n,"\\",tf),G(n,"・",G$);const r=gt(n,_i,FT,{[Vb]:!0});gt(r,_i,r);const i=gt(r,ki,Z$,{[Nc]:!0}),s=gt(r,Xl,W$,{[uc]:!0}),o=gt(n,ki,Di,{[Ub]:!0});gt(o,_i,i),gt(o,ki,o),gt(i,_i,i),gt(i,ki,i);const a=gt(n,Xl,qb,{[Hb]:!0});gt(a,ki),gt(a,_i,s),gt(a,Xl,a),gt(s,_i,s),gt(s,ki),gt(s,Xl,s);const l=G(n,CO,BT,{[kO]:!0}),c=G(n,jC,Gb,{[kO]:!0}),u=gt(n,xO,Gb,{[kO]:!0});G(n,DO,u),G(c,CO,l),G(c,DO,u),gt(c,xO,u),G(u,jC),G(u,CO),gt(u,xO,u),G(u,DO,u);const h=gt(n,_O,Y$,{[q$]:!0});G(h,"#"),gt(h,_O,h),G(h,uce,h);const d=G(h,hce);G(d,"#"),gt(d,_O,h);const p=[[ki,o],[_i,i]],f=[[ki,null],[Xl,a],[_i,s]];for(let m=0;m<ld.length;m++)ps(n,ld[m],Zb,Di,p);for(let m=0;m<cd.length;m++)ps(n,cd[m],Wb,qb,f);ko(Zb,{tld:!0,ascii:!0},e),ko(Wb,{utld:!0,alpha:!0},e),ps(n,"file",Hd,Di,p),ps(n,"mailto",Hd,Di,p),ps(n,"http",Ta,Di,p),ps(n,"https",Ta,Di,p),ps(n,"ftp",Ta,Di,p),ps(n,"ftps",Ta,Di,p),ko(Hd,{scheme:!0,ascii:!0},e),ko(Ta,{slashscheme:!0,ascii:!0},e),t=t.sort((m,g)=>m[0]>g[0]?1:-1);for(let m=0;m<t.length;m++){const g=t[m][0],y=t[m][1]?{[oce]:!0}:{[ace]:!0};g.indexOf("-")>=0?y[Xb]=!0:ki.test(g)?_i.test(g)?y[Nc]=!0:y[Ub]=!0:y[Vb]=!0,BC(n,g,g,y)}return BC(n,"localhost",wu,{ascii:!0}),n.jd=new Mn(hf),{start:n,tokens:Object.assign({groups:e},K$)}}function J$(t,e){const n=pce(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,i=[];let s=0,o=0;for(;o<r;){let a=t,l=null,c=0,u=null,h=-1,d=-1;for(;o<r&&(l=a.go(n[o]));)a=l,a.accepts()?(h=0,d=0,u=a):h>=0&&(h+=n[o].length,d++),c+=n[o].length,s+=n[o].length,o++;s-=h,o-=d,c-=h,i.push({t:u.t,v:e.slice(s-c,s),s:s-c,e:s})}return i}function pce(t){const e=[],n=t.length;let r=0;for(;r<n;){let i=t.charCodeAt(r),s,o=i<55296||i>56319||r+1===n||(s=t.charCodeAt(r+1))<56320||s>57343?t[r]:t.slice(r,r+2);e.push(o),r+=o.length}return e}function ps(t,e,n,r,i){let s;const o=e.length;for(let a=0;a<o-1;a++){const l=e[a];t.j[l]?s=t.j[l]:(s=new Mn(r),s.jr=i.slice(),t.j[l]=s),t=s}return s=new Mn(n),s.jr=i.slice(),t.j[e[o-1]]=s,s}function zC(t){const e=[],n=[];let r=0,i="0123456789";for(;r<t.length;){let s=0;for(;i.indexOf(t[r+s])>=0;)s++;if(s>0){e.push(n.join(""));for(let o=parseInt(t.substring(r,r+s),10);o>0;o--)n.pop();r+=s}else n.push(t[r]),r++}return e}const ku={defaultProtocol:"http",events:null,format:VC,formatHref:VC,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function HT(t,e=null){let n=Object.assign({},ku);t&&(n=Object.assign(n,t instanceof HT?t.o:t));const r=n.ignoreTags,i=[];for(let s=0;s<r.length;s++)i.push(r[s].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=i}HT.prototype={o:ku,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let i=this.o[t];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:ku[t],typeof i=="function"&&r&&(i=i(e,n))):typeof i=="function"&&r&&(i=i(e,n.t,n)),i)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function VC(t){return t}function eF(t,e){this.t="token",this.v=t,this.tk=e}eF.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=ku.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),i=t.get("tagName",n,e),s=this.toFormattedString(t),o={},a=t.get("className",n,e),l=t.get("target",n,e),c=t.get("rel",n,e),u=t.getObj("attributes",n,e),h=t.getObj("events",n,e);return o.href=r,a&&(o.class=a),l&&(o.target=l),c&&(o.rel=c),u&&Object.assign(o,u),{tagName:i,attributes:o,content:s,eventListeners:h}}};function Am(t,e){class n extends eF{constructor(i,s){super(i,s),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const UC=Am("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),HC=Am("text"),fce=Am("nl"),ud=Am("url",{isLink:!0,toHref(t=ku.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==wu&&t[1].t===_s}}),er=t=>new Mn(t);function mce({groups:t}){const e=t.domain.concat([Kp,ef,Ts,tf,nf,rf,sf,of,nr,FT,Ic,af,lf,cf,Gr,hf,Qc,uf]),n=[Jp,_s,jT,Wr,zT,Ic,Lc,VT,UT,zp,Vp,Rc,Mc,Fp,$p,Bp,jp,Up,Hp,Xp,qp,Zp,Wp,Gp,Yp],r=[Kp,Jp,ef,tf,nf,rf,sf,of,nr,Rc,Mc,Ic,af,lf,cf,Lc,Gr,hf,Qc,uf],i=er(),s=G(i,Qc);Pe(s,r,s),Pe(s,t.domain,s);const o=er(),a=er(),l=er();Pe(i,t.domain,o),Pe(i,t.scheme,a),Pe(i,t.slashscheme,l),Pe(o,r,s),Pe(o,t.domain,o);const c=G(o,Ts);G(s,Ts,c),G(a,Ts,c),G(l,Ts,c);const u=G(s,Wr);Pe(u,r,s),Pe(u,t.domain,s);const h=er();Pe(c,t.domain,h),Pe(h,t.domain,h);const d=G(h,Wr);Pe(d,t.domain,h);const p=er(UC);Pe(d,t.tld,p),Pe(d,t.utld,p),G(c,wu,p);const f=G(h,nr);G(f,nr,f),Pe(f,t.domain,h),Pe(p,t.domain,h),G(p,Wr,d),G(p,nr,f);const m=G(p,_s);Pe(m,t.numeric,UC);const g=G(o,nr),y=G(o,Wr);G(g,nr,g),Pe(g,t.domain,o),Pe(y,r,s),Pe(y,t.domain,o);const b=er(ud);Pe(y,t.tld,b),Pe(y,t.utld,b),Pe(b,t.domain,o),Pe(b,r,s),G(b,Wr,y),G(b,nr,g),G(b,Ts,c);const T=G(b,_s),S=er(ud);Pe(T,t.numeric,S);const w=er(ud),A=er();Pe(w,e,w),Pe(w,n,A),Pe(A,e,w),Pe(A,n,A),G(b,Gr,w),G(S,Gr,w);const C=G(a,_s),N=G(l,_s),$=G(N,Gr),I=G($,Gr);Pe(a,t.domain,o),G(a,Wr,y),G(a,nr,g),Pe(l,t.domain,o),G(l,Wr,y),G(l,nr,g),Pe(C,t.domain,w),G(C,Gr,w),G(C,Lc,w),Pe(I,t.domain,w),Pe(I,e,w),G(I,Gr,w);const L=[[Rc,Mc],[$p,Fp],[Bp,jp],[zp,Vp],[Up,Hp],[Xp,qp],[Zp,Wp],[Gp,Yp]];for(let Z=0;Z<L.length;Z++){const[B,j]=L[Z],U=G(w,B);G(A,B,U),G(U,j,w);const J=er(ud);Pe(U,e,J);const fe=er();Pe(U,n),Pe(J,e,J),Pe(J,n,fe),Pe(fe,e,J),Pe(fe,n,fe),G(J,j,w),G(fe,j,w)}return G(i,wu,b),G(i,BT,fce),{start:i,tokens:K$}}function gce(t,e,n){let r=n.length,i=0,s=[],o=[];for(;i<r;){let a=t,l=null,c=null,u=0,h=null,d=-1;for(;i<r&&!(l=a.go(n[i].t));)o.push(n[i++]);for(;i<r&&(c=l||a.go(n[i].t));)l=null,a=c,a.accepts()?(d=0,h=a):d>=0&&d++,i++,u++;if(d<0)i-=u,i<r&&(o.push(n[i]),i++);else{o.length>0&&(s.push(AO(HC,e,o)),o=[]),i-=d,u-=d;const p=h.t,f=n.slice(i-u,i);s.push(AO(p,e,f))}}return o.length>0&&s.push(AO(HC,e,o)),s}function AO(t,e,n){const r=n[0].s,i=n[n.length-1].e,s=e.slice(r,i);return new t(s,n)}const Oce=typeof console<"u"&&console&&console.warn||(()=>{}),yce="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",ut={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function bce(){return Mn.groups={},ut.scanner=null,ut.parser=null,ut.tokenQueue=[],ut.pluginQueue=[],ut.customSchemes=[],ut.initialized=!1,ut}function XC(t,e=!1){if(ut.initialized&&Oce(`linkifyjs: already initialized - will not register custom scheme "${t}" ${yce}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
1. Must only contain digits, lowercase ASCII letters or "-"
2. Cannot start or end with "-"
3. "-" cannot repeat`);ut.customSchemes.push([t,e])}function Ece(){ut.scanner=dce(ut.customSchemes);for(let t=0;t<ut.tokenQueue.length;t++)ut.tokenQueue[t][1]({scanner:ut.scanner});ut.parser=mce(ut.scanner.tokens);for(let t=0;t<ut.pluginQueue.length;t++)ut.pluginQueue[t][1]({scanner:ut.scanner,parser:ut.parser});return ut.initialized=!0,ut}function XT(t){return ut.initialized||Ece(),gce(ut.parser.start,t,J$(ut.scanner.start,t))}XT.scan=J$;function tF(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new HT(n),i=XT(t),s=[];for(let o=0;o<i.length;o++){const a=i[o];a.isLink&&(!e||a.t===e)&&r.check(a)&&s.push(a.toFormattedObject(r))}return s}var qT="[\0-   -\u2029 ]",vce=new RegExp(qT),Tce=new RegExp(`${qT}$`),Sce=new RegExp(qT,"g");function wce(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function kce(t){return new ze({key:new rt("autolink"),appendTransaction:(e,n,r)=>{const i=e.some(l=>l.docChanged)&&!n.doc.eq(r.doc),s=e.some(l=>l.getMeta("preventAutolink"));if(!i||s)return;const{tr:o}=r,a=zN(n.doc,[...e]);if(GN(a).forEach(({newRange:l})=>{const c=aH(r.doc,l,d=>d.isTextblock);let u,h;if(c.length>1)u=c[0],h=r.doc.textBetween(u.pos,u.pos+u.node.nodeSize,void 0," ");else if(c.length){const d=r.doc.textBetween(l.from,l.to," "," ");if(!Tce.test(d))return;u=c[0],h=r.doc.textBetween(u.pos,l.to,void 0," ")}if(u&&h){const d=h.split(vce).filter(Boolean);if(d.length<=0)return!1;const p=d[d.length-1],f=u.pos+h.lastIndexOf(p);if(!p)return!1;const m=XT(p).map(g=>g.toObject(t.defaultProtocol));if(!wce(m))return!1;m.filter(g=>g.isLink).map(g=>({...g,from:f+g.start+1,to:f+g.end+1})).filter(g=>r.schema.marks.code?!r.doc.rangeHasMark(g.from,g.to,r.schema.marks.code):!0).filter(g=>t.validate(g.value)).filter(g=>t.shouldAutoLink(g.value)).forEach(g=>{sv(g.from,g.to,r.doc).some(y=>y.mark.type===t.type)||o.addMark(g.from,g.to,t.type.create({href:g.href}))})}}),!!o.steps.length)return o}})}function _ce(t){return new ze({key:new rt("handleClickLink"),props:{handleClick:(e,n,r)=>{var i,s;if(r.button!==0||!e.editable)return!1;let o=null;if(r.target instanceof HTMLAnchorElement)o=r.target;else{let u=r.target;const h=[];for(;u.nodeName!=="DIV";)h.push(u),u=u.parentNode;o=h.find(d=>d.nodeName==="A")}if(!o)return!1;const a=WN(e.state,t.type.name),l=(i=o==null?void 0:o.href)!=null?i:a.href,c=(s=o==null?void 0:o.target)!=null?s:a.target;return t.enableClickSelection&&t.editor.commands.extendMarkRange(t.type.name),o&&l?(window.open(l,c),!0):!1}}})}function xce(t){return new ze({key:new rt("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{shouldAutoLink:i}=t,{state:s}=e,{selection:o}=s,{empty:a}=o;if(a)return!1;let l="";r.content.forEach(u=>{l+=u.textContent});const c=tF(l,{defaultProtocol:t.defaultProtocol}).find(u=>u.isLink&&u.value===l);return!l||!c||i!==void 0&&!i(c.href)?!1:t.editor.commands.setMark(t.type,{href:c.href})}}})}function go(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const i=typeof r=="string"?r:r.scheme;i&&n.push(i)}),!t||t.replace(Sce,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var nF=Rr.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){XC(t);return}XC(t.scheme,t.optionalSlashes)})},onDestroy(){bce()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!go(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!go(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!go(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Be(this.options.HTMLAttributes,t),0]:["a",Be(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n;const r=((n=t.attrs)==null?void 0:n.href)||"";return`[${e.renderChildren(t)}](${r})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!go(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!go(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Hs({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,i=tF(t).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:o=>!!go(o,n),protocols:n,defaultProtocol:r}));i.length&&i.forEach(s=>{this.options.shouldAutoLink(s.value)&&e.push({text:s.value,data:{href:s.href},index:s.start})})}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)==null?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(kce({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:i=>!!go(i,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&t.push(_ce({type:this.type,editor:this.editor,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(xce({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),Cce=xt.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Be(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];return n.length===1&&n[0].type==="image"?e.parseChildren([n[0]]):e.createNode("paragraph",void 0,e.parseInline(n))},renderMarkdown:(t,e)=>!t||!Array.isArray(t.content)?"":e.renderChildren(t.content),addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Dce=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Ace=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Pce=Rr.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",Be(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[$o({find:Dce,type:this.type})]},addPasteRules(){return[Hs({find:Ace,type:this.type})]}}),Nce=xt.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),Rce=Ve.create({name:"starterKit",addExtensions(){var t,e,n,r;const i=[];return this.options.bold!==!1&&i.push(zle.configure(this.options.bold)),this.options.blockquote!==!1&&i.push(Qle.configure(this.options.blockquote)),this.options.bulletList!==!1&&i.push(C$.configure(this.options.bulletList)),this.options.code!==!1&&i.push(Hle.configure(this.options.code)),this.options.codeBlock!==!1&&i.push(X$.configure(this.options.codeBlock)),this.options.document!==!1&&i.push(Wle.configure(this.options.document)),this.options.dropcursor!==!1&&i.push(ble.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&i.push(Ele.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&i.push(Gle.configure(this.options.hardBreak)),this.options.heading!==!1&&i.push(Yle.configure(this.options.heading)),this.options.undoRedo!==!1&&i.push(Sle.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&i.push(Kle.configure(this.options.horizontalRule)),this.options.italic!==!1&&i.push(rce.configure(this.options.italic)),this.options.listItem!==!1&&i.push(D$.configure(this.options.listItem)),this.options.listKeymap!==!1&&i.push(QT.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&i.push(nF.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&i.push(L$.configure(this.options.orderedList)),this.options.paragraph!==!1&&i.push(Cce.configure(this.options.paragraph)),this.options.strike!==!1&&i.push(Pce.configure(this.options.strike)),this.options.text!==!1&&i.push(Nce.configure(this.options.text)),this.options.underline!==!1&&i.push(H$.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&i.push(Tle.configure((r=this.options)==null?void 0:r.trailingNode)),i}}),PO,qC;function Mce(){if(qC)return PO;qC=1;function t(P){return P instanceof Map?P.clear=P.delete=P.set=function(){throw new Error("map is read-only")}:P instanceof Set&&(P.add=P.clear=P.delete=function(){throw new Error("set is read-only")}),Object.freeze(P),Object.getOwnPropertyNames(P).forEach(H=>{const ie=P[H],xe=typeof ie;(xe==="object"||xe==="function")&&!Object.isFrozen(ie)&&t(ie)}),P}class e{constructor(H){H.data===void 0&&(H.data={}),this.data=H.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(P){return P.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function r(P,...H){const ie=Object.create(null);for(const xe in P)ie[xe]=P[xe];return H.forEach(function(xe){for(const Tt in xe)ie[Tt]=xe[Tt]}),ie}const i="</span>",s=P=>!!P.scope,o=(P,{prefix:H})=>{if(P.startsWith("language:"))return P.replace("language:","language-");if(P.includes(".")){const ie=P.split(".");return[`${H}${ie.shift()}`,...ie.map((xe,Tt)=>`${xe}${"_".repeat(Tt+1)}`)].join(" ")}return`${H}${P}`};class a{constructor(H,ie){this.buffer="",this.classPrefix=ie.classPrefix,H.walk(this)}addText(H){this.buffer+=n(H)}openNode(H){if(!s(H))return;const ie=o(H.scope,{prefix:this.classPrefix});this.span(ie)}closeNode(H){s(H)&&(this.buffer+=i)}value(){return this.buffer}span(H){this.buffer+=`<span class="${H}">`}}const l=(P={})=>{const H={children:[]};return Object.assign(H,P),H};class c{constructor(){this.rootNode=l(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(H){this.top.children.push(H)}openNode(H){const ie=l({scope:H});this.add(ie),this.stack.push(ie)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(H){return this.constructor._walk(H,this.rootNode)}static _walk(H,ie){return typeof ie=="string"?H.addText(ie):ie.children&&(H.openNode(ie),ie.children.forEach(xe=>this._walk(H,xe)),H.closeNode(ie)),H}static _collapse(H){typeof H!="string"&&H.children&&(H.children.every(ie=>typeof ie=="string")?H.children=[H.children.join("")]:H.children.forEach(ie=>{c._collapse(ie)}))}}class u extends c{constructor(H){super(),this.options=H}addText(H){H!==""&&this.add(H)}startScope(H){this.openNode(H)}endScope(){this.closeNode()}__addSublanguage(H,ie){const xe=H.root;ie&&(xe.scope=`language:${ie}`),this.add(xe)}toHTML(){return new a(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function h(P){return P?typeof P=="string"?P:P.source:null}function d(P){return m("(?=",P,")")}function p(P){return m("(?:",P,")*")}function f(P){return m("(?:",P,")?")}function m(...P){return P.map(H=>h(H)).join("")}function g(P){const H=P[P.length-1];return typeof H=="object"&&H.constructor===Object?(P.splice(P.length-1,1),H):{}}function y(...P){return"("+(g(P).capture?"":"?:")+P.map(H=>h(H)).join("|")+")"}function b(P){return new RegExp(P.toString()+"|").exec("").length-1}function T(P,H){const ie=P&&P.exec(H);return ie&&ie.index===0}const S=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function w(P,{joinWith:H}){let ie=0;return P.map(xe=>{ie+=1;const Tt=ie;let St=h(xe),ue="";for(;St.length>0;){const oe=S.exec(St);if(!oe){ue+=St;break}ue+=St.substring(0,oe.index),St=St.substring(oe.index+oe[0].length),oe[0][0]==="\\"&&oe[1]?ue+="\\"+String(Number(oe[1])+Tt):(ue+=oe[0],oe[0]==="("&&ie++)}return ue}).map(xe=>`(${xe})`).join(H)}const A=/\b\B/,C="[a-zA-Z]\\w*",N="[a-zA-Z_]\\w*",$="\\b\\d+(\\.\\d+)?",I="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",L="\\b(0b[01]+)",Z="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",B=(P={})=>{const H=/^#![ ]*\//;return P.binary&&(P.begin=m(H,/.*\b/,P.binary,/\b.*/)),r({scope:"meta",begin:H,end:/$/,relevance:0,"on:begin":(ie,xe)=>{ie.index!==0&&xe.ignoreMatch()}},P)},j={begin:"\\\\[\\s\\S]",relevance:0},U={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[j]},J={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[j]},fe={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},z=function(P,H,ie={}){const xe=r({scope:"comment",begin:P,end:H,contains:[]},ie);xe.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Tt=y("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return xe.contains.push({begin:m(/[ ]+/,"(",Tt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),xe},ne=z("//","$"),Oe=z("/\\*","\\*/"),He=z("#","$"),it={scope:"number",begin:$,relevance:0},Le={scope:"number",begin:I,relevance:0},Xe={scope:"number",begin:L,relevance:0},vt={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[j,{begin:/\[/,end:/\]/,relevance:0,contains:[j]}]},An={scope:"title",begin:C,relevance:0},Ge={scope:"title",begin:N,relevance:0},Qr={begin:"\\.\\s*"+N,relevance:0};var mt=Object.freeze({__proto__:null,APOS_STRING_MODE:U,BACKSLASH_ESCAPE:j,BINARY_NUMBER_MODE:Xe,BINARY_NUMBER_RE:L,COMMENT:z,C_BLOCK_COMMENT_MODE:Oe,C_LINE_COMMENT_MODE:ne,C_NUMBER_MODE:Le,C_NUMBER_RE:I,END_SAME_AS_BEGIN:function(P){return Object.assign(P,{"on:begin":(H,ie)=>{ie.data._beginMatch=H[1]},"on:end":(H,ie)=>{ie.data._beginMatch!==H[1]&&ie.ignoreMatch()}})},HASH_COMMENT_MODE:He,IDENT_RE:C,MATCH_NOTHING_RE:A,METHOD_GUARD:Qr,NUMBER_MODE:it,NUMBER_RE:$,PHRASAL_WORDS_MODE:fe,QUOTE_STRING_MODE:J,REGEXP_MODE:vt,RE_STARTERS_RE:Z,SHEBANG:B,TITLE_MODE:An,UNDERSCORE_IDENT_RE:N,UNDERSCORE_TITLE_MODE:Ge});function Jn(P,H){P.input[P.index-1]==="."&&H.ignoreMatch()}function ls(P,H){P.className!==void 0&&(P.scope=P.className,delete P.className)}function bi(P,H){H&&P.beginKeywords&&(P.begin="\\b("+P.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",P.__beforeBegin=Jn,P.keywords=P.keywords||P.beginKeywords,delete P.beginKeywords,P.relevance===void 0&&(P.relevance=0))}function so(P,H){Array.isArray(P.illegal)&&(P.illegal=y(...P.illegal))}function Vm(P,H){if(P.match){if(P.begin||P.end)throw new Error("begin & end are not supported with match");P.begin=P.match,delete P.match}}function Um(P,H){P.relevance===void 0&&(P.relevance=1)}const Hm=(P,H)=>{if(!P.beforeMatch)return;if(P.starts)throw new Error("beforeMatch cannot be used with starts");const ie=Object.assign({},P);Object.keys(P).forEach(xe=>{delete P[xe]}),P.keywords=ie.keywords,P.begin=m(ie.beforeMatch,d(ie.begin)),P.starts={relevance:0,contains:[Object.assign(ie,{endsParent:!0})]},P.relevance=0,delete ie.beforeMatch},Xm=["of","and","for","in","not","or","if","then","parent","list","value"],qm="keyword";function oo(P,H,ie=qm){const xe=Object.create(null);return typeof P=="string"?Tt(ie,P.split(" ")):Array.isArray(P)?Tt(ie,P):Object.keys(P).forEach(function(St){Object.assign(xe,oo(P[St],H,St))}),xe;function Tt(St,ue){H&&(ue=ue.map(oe=>oe.toLowerCase())),ue.forEach(function(oe){const we=oe.split("|");xe[we[0]]=[St,$B(we[0],we[1])]})}}function $B(P,H){return H?Number(H):FB(P)?0:1}function FB(P){return Xm.includes(P.toLowerCase())}const pS={},ao=P=>{console.error(P)},fS=(P,...H)=>{console.log(`WARN: ${P}`,...H)},sa=(P,H)=>{pS[`${P}/${H}`]||(console.log(`Deprecated as of ${P}. ${H}`),pS[`${P}/${H}`]=!0)},hh=new Error;function mS(P,H,{key:ie}){let xe=0;const Tt=P[ie],St={},ue={};for(let oe=1;oe<=H.length;oe++)ue[oe+xe]=Tt[oe],St[oe+xe]=!0,xe+=b(H[oe-1]);P[ie]=ue,P[ie]._emit=St,P[ie]._multi=!0}function BB(P){if(Array.isArray(P.begin)){if(P.skip||P.excludeBegin||P.returnBegin)throw ao("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),hh;if(typeof P.beginScope!="object"||P.beginScope===null)throw ao("beginScope must be object"),hh;mS(P,P.begin,{key:"beginScope"}),P.begin=w(P.begin,{joinWith:""})}}function jB(P){if(Array.isArray(P.end)){if(P.skip||P.excludeEnd||P.returnEnd)throw ao("skip, excludeEnd, returnEnd not compatible with endScope: {}"),hh;if(typeof P.endScope!="object"||P.endScope===null)throw ao("endScope must be object"),hh;mS(P,P.end,{key:"endScope"}),P.end=w(P.end,{joinWith:""})}}function zB(P){P.scope&&typeof P.scope=="object"&&P.scope!==null&&(P.beginScope=P.scope,delete P.scope)}function VB(P){zB(P),typeof P.beginScope=="string"&&(P.beginScope={_wrap:P.beginScope}),typeof P.endScope=="string"&&(P.endScope={_wrap:P.endScope}),BB(P),jB(P)}function UB(P){function H(ue,oe){return new RegExp(h(ue),"m"+(P.case_insensitive?"i":"")+(P.unicodeRegex?"u":"")+(oe?"g":""))}class ie{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(oe,we){we.position=this.position++,this.matchIndexes[this.matchAt]=we,this.regexes.push([we,oe]),this.matchAt+=b(oe)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const oe=this.regexes.map(we=>we[1]);this.matcherRe=H(w(oe,{joinWith:"|"}),!0),this.lastIndex=0}exec(oe){this.matcherRe.lastIndex=this.lastIndex;const we=this.matcherRe.exec(oe);if(!we)return null;const jt=we.findIndex((Nl,Wm)=>Wm>0&&Nl!==void 0),Ct=this.matchIndexes[jt];return we.splice(0,jt),Object.assign(we,Ct)}}class xe{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(oe){if(this.multiRegexes[oe])return this.multiRegexes[oe];const we=new ie;return this.rules.slice(oe).forEach(([jt,Ct])=>we.addRule(jt,Ct)),we.compile(),this.multiRegexes[oe]=we,we}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(oe,we){this.rules.push([oe,we]),we.type==="begin"&&this.count++}exec(oe){const we=this.getMatcher(this.regexIndex);we.lastIndex=this.lastIndex;let jt=we.exec(oe);if(this.resumingScanAtSamePosition()&&!(jt&&jt.index===this.lastIndex)){const Ct=this.getMatcher(0);Ct.lastIndex=this.lastIndex+1,jt=Ct.exec(oe)}return jt&&(this.regexIndex+=jt.position+1,this.regexIndex===this.count&&this.considerAll()),jt}}function Tt(ue){const oe=new xe;return ue.contains.forEach(we=>oe.addRule(we.begin,{rule:we,type:"begin"})),ue.terminatorEnd&&oe.addRule(ue.terminatorEnd,{type:"end"}),ue.illegal&&oe.addRule(ue.illegal,{type:"illegal"}),oe}function St(ue,oe){const we=ue;if(ue.isCompiled)return we;[ls,Vm,VB,Hm].forEach(Ct=>Ct(ue,oe)),P.compilerExtensions.forEach(Ct=>Ct(ue,oe)),ue.__beforeBegin=null,[bi,so,Um].forEach(Ct=>Ct(ue,oe)),ue.isCompiled=!0;let jt=null;return typeof ue.keywords=="object"&&ue.keywords.$pattern&&(ue.keywords=Object.assign({},ue.keywords),jt=ue.keywords.$pattern,delete ue.keywords.$pattern),jt=jt||/\w+/,ue.keywords&&(ue.keywords=oo(ue.keywords,P.case_insensitive)),we.keywordPatternRe=H(jt,!0),oe&&(ue.begin||(ue.begin=/\B|\b/),we.beginRe=H(we.begin),!ue.end&&!ue.endsWithParent&&(ue.end=/\B|\b/),ue.end&&(we.endRe=H(we.end)),we.terminatorEnd=h(we.end)||"",ue.endsWithParent&&oe.terminatorEnd&&(we.terminatorEnd+=(ue.end?"|":"")+oe.terminatorEnd)),ue.illegal&&(we.illegalRe=H(ue.illegal)),ue.contains||(ue.contains=[]),ue.contains=[].concat(...ue.contains.map(function(Ct){return HB(Ct==="self"?ue:Ct)})),ue.contains.forEach(function(Ct){St(Ct,we)}),ue.starts&&St(ue.starts,oe),we.matcher=Tt(we),we}if(P.compilerExtensions||(P.compilerExtensions=[]),P.contains&&P.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return P.classNameAliases=r(P.classNameAliases||{}),St(P)}function gS(P){return P?P.endsWithParent||gS(P.starts):!1}function HB(P){return P.variants&&!P.cachedVariants&&(P.cachedVariants=P.variants.map(function(H){return r(P,{variants:null},H)})),P.cachedVariants?P.cachedVariants:gS(P)?r(P,{starts:P.starts?r(P.starts):null}):Object.isFrozen(P)?r(P):P}var XB="11.11.1";class qB extends Error{constructor(H,ie){super(H),this.name="HTMLInjectionError",this.html=ie}}const Zm=n,OS=r,yS=Symbol("nomatch"),ZB=7,bS=function(P){const H=Object.create(null),ie=Object.create(null),xe=[];let Tt=!0;const St="Could not find the language '{}', did you forget to load/include a language module?",ue={disableAutodetect:!0,name:"Plain text",contains:[]};let oe={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:u};function we(K){return oe.noHighlightRe.test(K)}function jt(K){let ye=K.className+" ";ye+=K.parentNode?K.parentNode.className:"";const Ie=oe.languageDetectRe.exec(ye);if(Ie){const st=cs(Ie[1]);return st||(fS(St.replace("{}",Ie[1])),fS("Falling back to no-highlight mode for this block.",K)),st?Ie[1]:"no-highlight"}return ye.split(/\s+/).find(st=>we(st)||cs(st))}function Ct(K,ye,Ie){let st="",Mt="";typeof ye=="object"?(st=K,Ie=ye.ignoreIllegals,Mt=ye.language):(sa("10.7.0","highlight(lang, code, ...args) has been deprecated."),sa("10.7.0",`Please use highlight(code, options) instead.
https://github.com/highlightjs/highlight.js/issues/2277`),Mt=K,st=ye),Ie===void 0&&(Ie=!0);const $r={code:st,language:Mt};ph("before:highlight",$r);const us=$r.result?$r.result:Nl($r.language,$r.code,Ie);return us.code=$r.code,ph("after:highlight",us),us}function Nl(K,ye,Ie,st){const Mt=Object.create(null);function $r(re,me){return re.keywords[me]}function us(){if(!ke.keywords){Yt.addText(ot);return}let re=0;ke.keywordPatternRe.lastIndex=0;let me=ke.keywordPatternRe.exec(ot),Re="";for(;me;){Re+=ot.substring(re,me.index);const Ke=Br.case_insensitive?me[0].toLowerCase():me[0],ln=$r(ke,Ke);if(ln){const[Ei,h3]=ln;if(Yt.addText(Re),Re="",Mt[Ke]=(Mt[Ke]||0)+1,Mt[Ke]<=ZB&&(gh+=h3),Ei.startsWith("_"))Re+=me[0];else{const d3=Br.classNameAliases[Ei]||Ei;Fr(me[0],d3)}}else Re+=me[0];re=ke.keywordPatternRe.lastIndex,me=ke.keywordPatternRe.exec(ot)}Re+=ot.substring(re),Yt.addText(Re)}function fh(){if(ot==="")return;let re=null;if(typeof ke.subLanguage=="string"){if(!H[ke.subLanguage]){Yt.addText(ot);return}re=Nl(ke.subLanguage,ot,!0,xS[ke.subLanguage]),xS[ke.subLanguage]=re._top}else re=Gm(ot,ke.subLanguage.length?ke.subLanguage:null);ke.relevance>0&&(gh+=re.relevance),Yt.__addSublanguage(re._emitter,re.language)}function jn(){ke.subLanguage!=null?fh():us(),ot=""}function Fr(re,me){re!==""&&(Yt.startScope(me),Yt.addText(re),Yt.endScope())}function SS(re,me){let Re=1;const Ke=me.length-1;for(;Re<=Ke;){if(!re._emit[Re]){Re++;continue}const ln=Br.classNameAliases[re[Re]]||re[Re],Ei=me[Re];ln?Fr(Ei,ln):(ot=Ei,us(),ot=""),Re++}}function wS(re,me){return re.scope&&typeof re.scope=="string"&&Yt.openNode(Br.classNameAliases[re.scope]||re.scope),re.beginScope&&(re.beginScope._wrap?(Fr(ot,Br.classNameAliases[re.beginScope._wrap]||re.beginScope._wrap),ot=""):re.beginScope._multi&&(SS(re.beginScope,me),ot="")),ke=Object.create(re,{parent:{value:ke}}),ke}function kS(re,me,Re){let Ke=T(re.endRe,Re);if(Ke){if(re["on:end"]){const ln=new e(re);re["on:end"](me,ln),ln.isMatchIgnored&&(Ke=!1)}if(Ke){for(;re.endsParent&&re.parent;)re=re.parent;return re}}if(re.endsWithParent)return kS(re.parent,me,Re)}function o3(re){return ke.matcher.regexIndex===0?(ot+=re[0],1):(eg=!0,0)}function a3(re){const me=re[0],Re=re.rule,Ke=new e(Re),ln=[Re.__beforeBegin,Re["on:begin"]];for(const Ei of ln)if(Ei&&(Ei(re,Ke),Ke.isMatchIgnored))return o3(me);return Re.skip?ot+=me:(Re.excludeBegin&&(ot+=me),jn(),!Re.returnBegin&&!Re.excludeBegin&&(ot=me)),wS(Re,re),Re.returnBegin?0:me.length}function l3(re){const me=re[0],Re=ye.substring(re.index),Ke=kS(ke,re,Re);if(!Ke)return yS;const ln=ke;ke.endScope&&ke.endScope._wrap?(jn(),Fr(me,ke.endScope._wrap)):ke.endScope&&ke.endScope._multi?(jn(),SS(ke.endScope,re)):ln.skip?ot+=me:(ln.returnEnd||ln.excludeEnd||(ot+=me),jn(),ln.excludeEnd&&(ot=me));do ke.scope&&Yt.closeNode(),!ke.skip&&!ke.subLanguage&&(gh+=ke.relevance),ke=ke.parent;while(ke!==Ke.parent);return Ke.starts&&wS(Ke.starts,re),ln.returnEnd?0:me.length}function c3(){const re=[];for(let me=ke;me!==Br;me=me.parent)me.scope&&re.unshift(me.scope);re.forEach(me=>Yt.openNode(me))}let mh={};function _S(re,me){const Re=me&&me[0];if(ot+=re,Re==null)return jn(),0;if(mh.type==="begin"&&me.type==="end"&&mh.index===me.index&&Re===""){if(ot+=ye.slice(me.index,me.index+1),!Tt){const Ke=new Error(`0 width match regex (${K})`);throw Ke.languageName=K,Ke.badRule=mh.rule,Ke}return 1}if(mh=me,me.type==="begin")return a3(me);if(me.type==="illegal"&&!Ie){const Ke=new Error('Illegal lexeme "'+Re+'" for mode "'+(ke.scope||"<unnamed>")+'"');throw Ke.mode=ke,Ke}else if(me.type==="end"){const Ke=l3(me);if(Ke!==yS)return Ke}if(me.type==="illegal"&&Re==="")return ot+=`
`,1;if(Jm>1e5&&Jm>me.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ot+=Re,Re.length}const Br=cs(K);if(!Br)throw ao(St.replace("{}",K)),new Error('Unknown language: "'+K+'"');const u3=UB(Br);let Km="",ke=st||u3;const xS={},Yt=new oe.__emitter(oe);c3();let ot="",gh=0,lo=0,Jm=0,eg=!1;try{if(Br.__emitTokens)Br.__emitTokens(ye,Yt);else{for(ke.matcher.considerAll();;){Jm++,eg?eg=!1:ke.matcher.considerAll(),ke.matcher.lastIndex=lo;const re=ke.matcher.exec(ye);if(!re)break;const me=ye.substring(lo,re.index),Re=_S(me,re);lo=re.index+Re}_S(ye.substring(lo))}return Yt.finalize(),Km=Yt.toHTML(),{language:K,value:Km,relevance:gh,illegal:!1,_emitter:Yt,_top:ke}}catch(re){if(re.message&&re.message.includes("Illegal"))return{language:K,value:Zm(ye),illegal:!0,relevance:0,_illegalBy:{message:re.message,index:lo,context:ye.slice(lo-100,lo+100),mode:re.mode,resultSoFar:Km},_emitter:Yt};if(Tt)return{language:K,value:Zm(ye),illegal:!1,relevance:0,errorRaised:re,_emitter:Yt,_top:ke};throw re}}function Wm(K){const ye={value:Zm(K),illegal:!1,relevance:0,_top:ue,_emitter:new oe.__emitter(oe)};return ye._emitter.addText(K),ye}function Gm(K,ye){ye=ye||oe.languages||Object.keys(H);const Ie=Wm(K),st=ye.filter(cs).filter(TS).map(jn=>Nl(jn,K,!1));st.unshift(Ie);const Mt=st.sort((jn,Fr)=>{if(jn.relevance!==Fr.relevance)return Fr.relevance-jn.relevance;if(jn.language&&Fr.language){if(cs(jn.language).supersetOf===Fr.language)return 1;if(cs(Fr.language).supersetOf===jn.language)return-1}return 0}),[$r,us]=Mt,fh=$r;return fh.secondBest=us,fh}function WB(K,ye,Ie){const st=ye&&ie[ye]||Ie;K.classList.add("hljs"),K.classList.add(`language-${st}`)}function Ym(K){let ye=null;const Ie=jt(K);if(we(Ie))return;if(ph("before:highlightElement",{el:K,language:Ie}),K.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",K);return}if(K.children.length>0&&(oe.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(K)),oe.throwUnescapedHTML))throw new qB("One of your code blocks includes unescaped HTML.",K.innerHTML);ye=K;const st=ye.textContent,Mt=Ie?Ct(st,{language:Ie,ignoreIllegals:!0}):Gm(st);K.innerHTML=Mt.value,K.dataset.highlighted="yes",WB(K,Ie,Mt.language),K.result={language:Mt.language,re:Mt.relevance,relevance:Mt.relevance},Mt.secondBest&&(K.secondBest={language:Mt.secondBest.language,relevance:Mt.secondBest.relevance}),ph("after:highlightElement",{el:K,result:Mt,text:st})}function GB(K){oe=OS(oe,K)}const YB=()=>{dh(),sa("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function KB(){dh(),sa("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let ES=!1;function dh(){function K(){dh()}if(document.readyState==="loading"){ES||window.addEventListener("DOMContentLoaded",K,!1),ES=!0;return}document.querySelectorAll(oe.cssSelector).forEach(Ym)}function JB(K,ye){let Ie=null;try{Ie=ye(P)}catch(st){if(ao("Language definition for '{}' could not be registered.".replace("{}",K)),Tt)ao(st);else throw st;Ie=ue}Ie.name||(Ie.name=K),H[K]=Ie,Ie.rawDefinition=ye.bind(null,P),Ie.aliases&&vS(Ie.aliases,{languageName:K})}function e3(K){delete H[K];for(const ye of Object.keys(ie))ie[ye]===K&&delete ie[ye]}function t3(){return Object.keys(H)}function cs(K){return K=(K||"").toLowerCase(),H[K]||H[ie[K]]}function vS(K,{languageName:ye}){typeof K=="string"&&(K=[K]),K.forEach(Ie=>{ie[Ie.toLowerCase()]=ye})}function TS(K){const ye=cs(K);return ye&&!ye.disableAutodetect}function n3(K){K["before:highlightBlock"]&&!K["before:highlightElement"]&&(K["before:highlightElement"]=ye=>{K["before:highlightBlock"](Object.assign({block:ye.el},ye))}),K["after:highlightBlock"]&&!K["after:highlightElement"]&&(K["after:highlightElement"]=ye=>{K["after:highlightBlock"](Object.assign({block:ye.el},ye))})}function r3(K){n3(K),xe.push(K)}function i3(K){const ye=xe.indexOf(K);ye!==-1&&xe.splice(ye,1)}function ph(K,ye){const Ie=K;xe.forEach(function(st){st[Ie]&&st[Ie](ye)})}function s3(K){return sa("10.7.0","highlightBlock will be removed entirely in v12.0"),sa("10.7.0","Please use highlightElement now."),Ym(K)}Object.assign(P,{highlight:Ct,highlightAuto:Gm,highlightAll:dh,highlightElement:Ym,highlightBlock:s3,configure:GB,initHighlighting:YB,initHighlightingOnLoad:KB,registerLanguage:JB,unregisterLanguage:e3,listLanguages:t3,getLanguage:cs,registerAliases:vS,autoDetection:TS,inherit:OS,addPlugin:r3,removePlugin:i3}),P.debugMode=function(){Tt=!1},P.safeMode=function(){Tt=!0},P.versionString=XB,P.regex={concat:m,lookahead:d,either:y,optional:f,anyNumberOfTimes:p};for(const K in mt)typeof mt[K]=="object"&&t(mt[K]);return Object.assign(P,mt),P},oa=bS({});return oa.newInstance=()=>bS({}),PO=oa,oa.HighlightJS=oa,oa.default=oa,PO}var Ice=Mce();const ZT=$f(Ice);function rF(t,e=[]){return t.flatMap(n=>{const r=[...e,...n.properties?n.properties.className:[]];return n.children?rF(n.children,r):{text:n.value,classes:r}})}function ZC(t){return t.value||t.children||[]}function Lce(t){return!!ZT.getLanguage(t)}function WC({doc:t,name:e,lowlight:n,defaultLanguage:r}){const i=[];return As(t,s=>s.type.name===e).forEach(s=>{var o;let a=s.pos+1;const l=s.node.attrs.language||r,c=n.listLanguages(),u=l&&(c.includes(l)||Lce(l)||(o=n.registered)!=null&&o.call(n,l))?ZC(n.highlight(l,s.node.textContent)):ZC(n.highlightAuto(s.node.textContent));rF(u).forEach(h=>{const d=a+h.text.length;if(h.classes.length){const p=sn.inline(a,d,{class:h.classes.join(" ")});i.push(p)}a=d})}),je.create(t,i)}function Qce(t){return typeof t=="function"}function $ce({name:t,lowlight:e,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every(i=>Qce(e[i])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const r=new ze({key:new rt("lowlight"),state:{init:(i,{doc:s})=>WC({doc:s,name:t,lowlight:e,defaultLanguage:n}),apply:(i,s,o,a)=>{const l=o.selection.$head.parent.type.name,c=a.selection.$head.parent.type.name,u=As(o.doc,d=>d.type.name===t),h=As(a.doc,d=>d.type.name===t);return i.docChanged&&([l,c].includes(t)||h.length!==u.length||i.steps.some(d=>d.from!==void 0&&d.to!==void 0&&u.some(p=>p.pos>=d.from&&p.pos+p.node.nodeSize<=d.to)))?WC({doc:i.doc,name:t,lowlight:e,defaultLanguage:n}):s.map(i.mapping,i.doc)}},props:{decorations(i){return r.getState(i)}}});return r}var Fce=Zle.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),lowlight:{},languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}},addProseMirrorPlugins(){var t;return[...((t=this.parent)==null?void 0:t.call(this))||[],$ce({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}});const NO={bash:()=>k(()=>import("./bash-CPB87Egg-CNRaZOoC.js"),[]),c:()=>k(()=>import("./c-Bz1-FJiA-Dq9oV4GL.js"),[]),csharp:()=>k(()=>import("./csharp-AnFv7wyC-DNqFovD5.js"),[]),css:()=>k(()=>import("./css-BCTOmdxR-Dpuu0f0D.js"),[]),go:()=>k(()=>import("./go-CkZ9_bn0-DXtVqsAL.js"),[]),graphql:()=>k(()=>import("./graphql-CHx1gYw6-DPQANhhf.js"),[]),java:()=>k(()=>import("./java-BicX26Pg-UnUiHiX5.js"),[]),javascript:()=>k(()=>import("./javascript-DII1YQGr-YJsj2bTD.js"),[]),json:()=>k(()=>import("./json-C_6Prymp-CUUUyAin.js"),[]),kotlin:()=>k(()=>import("./kotlin-BwB8b-YX-B6aZBE1U.js"),[]),less:()=>k(()=>import("./less-DeNOeXmL-DuFT_IpY.js"),[]),makefile:()=>k(()=>import("./makefile-D-gl0qMV-DycfiXgX.js"),[]),markdown:()=>k(()=>import("./markdown-ga2-2-T7-DSyCmCK6.js"),[]),objectivec:()=>k(()=>import("./objectivec-CnyrJ13Z-BxPo7QIL.js"),[]),php:()=>k(()=>import("./php-BL35ZHWM-BDcG8-sQ.js"),[]),plaintext:()=>Promise.resolve().then(()=>Vce),python:()=>k(()=>import("./python-CymlFLB0-CoghfyFO.js"),[]),scss:()=>k(()=>import("./scss-CknrYxoA-3If383Hj.js"),[]),shell:()=>k(()=>import("./shell-DYrX6oL5-k1ee8ZNu.js"),[]),sql:()=>k(()=>import("./sql-IeKX8fQ8-D2McoYQw.js"),[]),typescript:()=>k(()=>import("./typescript-SNUkGeOU-BN-27m8j.js"),[]),vbnet:()=>k(()=>import("./vbnet-D7PCGZRn-ixdmBJh7.js"),[]),xml:()=>k(()=>import("./xml-B7THKYqr-rU06iLML.js"),[])};async function Yb(t,e){var n;if(e.registered(t))return!1;try{const{default:r}=await((n=NO[t])==null?void 0:n.call(NO));return e.register(t,r),!0}catch{return!1}}function Bce(t){const e=(t==null?void 0:t.toLowerCase())||Qa;return k$.find(n=>{var r;return n.syntax===e||((r=n.alias)==null?void 0:r.split(", ").includes(e))})}const hd=new rt("lowlight");function jce({name:t,lowlight:e,defaultLanguage:n}){return new ze({key:hd,state:{init(r,{doc:i}){return YC({doc:i,name:t,lowlight:e,defaultLanguage:n})},apply(r,i,s,o){const a=s.selection.$head.parent.type.name,l=o.selection.$head.parent.type.name,c=As(s.doc,d=>d.type.name===t),u=As(o.doc,d=>d.type.name===t),h=r.docChanged&&([a,l].includes(t)||u.length!==c.length||r.steps.some(d=>d.from!==void 0&&d.to!==void 0&&c.some(p=>p.pos>=d.from&&p.pos+p.node.nodeSize<=d.to)));return r.getMeta(hd)||h?YC({doc:r.doc,name:t,lowlight:e,defaultLanguage:n}):i.map(r.mapping,r.doc)}},view(r){class i{constructor(){this.initDecorations()}update(){this.checkUndecoratedBlocks()}async initDecorations(){const o=r.state.doc,a=[...As(o,c=>c.type.name===t).map(c=>c.node.attrs.language||Qa),n];await Promise.all(a.map(c=>Yb(c,e)));const l=r.state.tr.setMeta(hd,!0);r.dispatch(l)}async checkUndecoratedBlocks(){const o=As(r.state.doc,a=>a.type.name===t);if((await Promise.all(o.flatMap(a=>[Yb(a.node.attrs.language||Qa,e)]))).includes(!0)){const a=r.state.tr.setMeta(hd,!0);r.dispatch(a)}}}return new i},props:{decorations(r){return this.getState(r)}}})}function iF(t,e=[]){return t.map(n=>{const r=[...e,...n.properties?n.properties.className:[]];return n.children?iF(n.children,r):{text:n.value,classes:r}}).flat()}function GC(t){return t.value||t.children||[]}function zce(t){return!!ZT.getLanguage(t)}function YC({doc:t,name:e,lowlight:n,defaultLanguage:r}){const i=[];return As(t,s=>s.type.name===e).forEach(s=>{let o=s.pos+1;const a=s.node.attrs.language||r,l=n.listLanguages().includes(a)||zce(a)?GC(n.highlight(a,s.node.textContent)):GC(n.highlightAuto(s.node.textContent));iF(l).forEach(c=>{const u=o+c.text.length;if(c.classes.length){const h=sn.inline(o,u,{class:c.classes.join(" ")});i.push(h)}o=u})}),je.create(t,i)}function sF(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}const Vce=Object.freeze(Object.defineProperty({__proto__:null,default:sF},Symbol.toStringTag,{value:"Module"})),KC={},Uce="hljs-";function Hce(t){const e=ZT.newInstance();return{highlight:n,highlightAuto:r,listLanguages:i,register:s,registerAlias:o,registered:a};function n(l,c,u){const h=u||KC,d=typeof h.prefix=="string"?h.prefix:Uce;if(!e.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");e.configure({__emitter:Xce,classPrefix:d});const p=e.highlight(c,{ignoreIllegals:!0,language:l});if(p.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:p.errorRaised});const f=p._emitter.root,m=f.data;return m.language=p.language,m.relevance=p.relevance,f}function r(l,c){const u=(c||KC).subset||i();let h=-1,d=0,p;for(;++h<u.length;){const f=u[h];if(!e.getLanguage(f))continue;const m=n(f,l,c);m.data&&m.data.relevance!==void 0&&m.data.relevance>d&&(d=m.data.relevance,p=m)}return p||{type:"root",children:[],data:{language:void 0,relevance:d}}}function i(){return e.listLanguages()}function s(l,c){if(typeof l=="string")e.registerLanguage(l,c);else{let u;for(u in l)Object.hasOwn(l,u)&&e.registerLanguage(u,l[u])}}function o(l,c){if(typeof l=="string")e.registerAliases(typeof c=="string"?c:[...c],{languageName:l});else{let u;for(u in l)if(Object.hasOwn(l,u)){const h=l[u];e.registerAliases(typeof h=="string"?h:[...h],{languageName:u})}}}function a(l){return!!e.getLanguage(l)}}class Xce{constructor(e){this.options=e,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(e){if(e==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=e:n.children.push({type:"text",value:e})}startScope(e){this.openNode(String(e))}endScope(){this.closeNode()}__addSublanguage(e,n){const r=this.stack[this.stack.length-1],i=e.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:i}):r.children.push(...i)}openNode(e){const n=this,r=e.split(".").map(function(o,a){return a?o+"_".repeat(a):n.options.classPrefix+o}),i=this.stack[this.stack.length-1],s={type:"element",tagName:"span",properties:{className:r},children:[]};i.children.push(s),this.stack.push(s)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const qce=/^```([a-z]+)?[\s\n]$/,Zce=/^~~~([a-z]+)?[\s\n]$/,hc=Hce();hc.register("plaintext",sF);const Wce=Fce.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),lowlight:hc,languageClassPrefix:"language-",defaultLanguage:Qa}},addInputRules(){const t=e=>{var r;const n=((r=Bce(e[1]))==null?void 0:r.syntax)||Qa;return Yb(n,hc),{language:n}};return[tu({find:qce,type:this.type,getAttributes:t}),tu({find:Zce,type:this.type,getAttributes:t})]},addProseMirrorPlugins(){return[jce({lowlight:hc,name:this.name,defaultLanguage:Qa})]},addKeyboardShortcuts(){var t;return{...(t=this.parent)==null?void 0:t.call(this),Tab:({editor:e})=>{const{state:n,view:r}=e;return Dr(e.state,this.type)?(r.dispatch(n.tr.insertText(" ")),!0):!1}}}}).configure({lowlight:hc}),Gce=xt.create({name:"figcaption",group:"block",inline:!1,content:"inline*",marks:"",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"figcaption"}]},renderHTML({HTMLAttributes:t}){return["figcaption",Be(t),0]},addKeyboardShortcuts(){return{"Mod-a":({editor:t})=>Yce(t,this.type),Backspace:({editor:t})=>JC(t,"Backspace",this.type),Delete:({editor:t})=>JC(t,"Delete",this.type)}}});function Yce(t,e){const{state:n,view:r}=t,{selection:i}=n,{$anchor:s}=i;if(s.parent.type!==e)return!1;const o=n.tr,a=s.start(),l=s.end();return r.dispatch(o.setSelection(de.create(o.doc,a,l))),!0}function JC(t,e,n){const{selection:r}=t.state,{$from:i,empty:s}=r;return i.parent.type!==n?!1:e==="Delete"?s&&i.parentOffset===i.parent.nodeSize-2:e==="Backspace"?s&&i.parentOffset===0:!1}const Kce=xt.create({name:"figure",group:"block",content:"block figcaption",selectable:!0,draggable:!0,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"figure"}]},renderHTML({HTMLAttributes:t}){return["figure",Be(t),0]},addKeyboardShortcuts(){return{Backspace:({editor:t})=>tue(t,this.type),Delete:({editor:t})=>eue(t,this.type),Enter:({editor:t})=>Jce(t,this.type)}}}),Jce=(t,e)=>{const{selection:n}=t.state,{$from:r}=n;if(r.parent.type===e){const i=r.end();return t.chain().focus(i).insertContentAt(i,{type:"paragraph"}).run()}return!1},eue=(t,e)=>{var s;const{selection:n,doc:r}=t.state,{$from:i}=n;if(i.pos===1)return!1;if(i.parent.type===e)return t.commands.deleteNode(e);if(n.empty&&i.parentOffset===i.parent.nodeSize-2){const o=r.resolve(i.pos+1);return((s=o.nodeAfter)==null?void 0:s.type)!==e?!1:t.chain().setNodeSelection(o.pos).run()}return!1},tue=(t,e)=>{const{selection:n,doc:r}=t.state,{$from:i}=n;if(i.parent.type===e)return t.commands.deleteNode(e);if(n.empty&&i.parentOffset===0){const s=r.resolve(i.pos-1),o=s.nodeBefore;return(o==null?void 0:o.type)!==e?!1:t.chain().command(({chain:a})=>i.parent.textContent.length>0||a().deleteCurrentNode().run()).setNodeSelection(s.pos-o.nodeSize).run()}return!1};var nue=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,rue=xt.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",Be(this.options.HTMLAttributes,t)]},parseMarkdown:(t,e)=>e.createNode("image",{src:t.href,title:t.title,alt:t.text}),renderMarkdown:t=>{var e,n,r,i,s,o;const a=(n=(e=t.attrs)==null?void 0:e.src)!=null?n:"",l=(i=(r=t.attrs)==null?void 0:r.alt)!=null?i:"",c=(o=(s=t.attrs)==null?void 0:s.title)!=null?o:"";return c?`![${l}](${a} "${c}")`:`![${l}](${a})`},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u"||!this.editor.isEditable)return null;const{directions:t,minWidth:e,minHeight:n,alwaysPreserveAspectRatio:r}=this.options.resize;return({node:i,getPos:s,HTMLAttributes:o})=>{const a=document.createElement("img");Object.entries(o).forEach(([u,h])=>{if(h!=null)switch(u){case"width":case"height":break;default:a.setAttribute(u,h);break}}),a.src=o.src;const l=new sX({element:a,node:i,getPos:s,onResize:(u,h)=>{a.style.width=`${u}px`,a.style.height=`${h}px`},onCommit:(u,h)=>{const d=s();d!==void 0&&this.editor.chain().setNodeSelection(d).updateAttributes(this.name,{width:u,height:h}).run()},onUpdate:(u,h,d)=>u.type===i.type,options:{directions:t,min:{width:e,height:n},preserveAspectRatio:r===!0}}),c=l.dom;return c.style.visibility="hidden",c.style.pointerEvents="none",a.onload=()=>{c.style.visibility="",c.style.pointerEvents=""},l}},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[dR({find:nue,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}});const dc=rue.extend({addAttributes(){return{src:{default:"",parseHTML:t=>t.getAttribute("src"),renderHTML:t=>({src:t.src})},alt:{default:void 0,parseHTML:t=>t.getAttribute("alt"),renderHTML:t=>t.alt?{alt:t.alt}:{}},width:{default:null,parseHTML:t=>Number.parseInt(t.style.width)||null,renderHTML:t=>t.width?{style:`width: ${t.width}%`}:{}},naturalWidth:{default:null,parseHTML:t=>t.getAttribute("data-width"),renderHTML:t=>({"data-width":t.naturalWidth})},naturalHeight:{default:null,parseHTML:t=>t.getAttribute("data-height"),renderHTML:t=>({"data-height":t.naturalHeight})}}},parseHTML(){return[{tag:"img"}]},renderHTML({HTMLAttributes:t}){return["img",Be(this.options.HTMLAttributes,t)]},addCommands(){var t;return{...(t=this.parent)==null?void 0:t.call(this),insertImage:({width:e,height:n,...r})=>({commands:i})=>i.setImage({...r,naturalWidth:e,naturalHeight:n})}}}),oF=Kce.extend({name:"imageFigure",content:"image imageCaption?",addExtensions(){return[Xd]},addCommands(){return{setImageFigure:({src:t,caption:e})=>({chain:n})=>{const r=[{type:dc.name,attrs:{src:t}},e==null?{}:{type:Xd.name,content:e===""?void 0:[{type:"text",text:e}]}];return n().insertContent({type:this.name,content:r}).run()},imageToFigure:()=>({state:t,chain:e})=>{const{selection:n}=t,{$anchor:r}=n,i=r.pos,s=t.doc.nodeAt(i);if(!s||s.type.name!==dc.name)return!1;const o={from:i,to:i+s.nodeSize},a=[{type:dc.name,attrs:s.attrs},{type:Xd.name,content:void 0}];return e().insertContentAt(o,{type:this.name,content:a}).setTextSelection(o.to+a.length).run()},figureToImage:()=>({state:t,commands:e})=>{const{selection:n}=t,{$anchor:r}=n;let i=r.depth,s=r.pos;for(;i>0;)s=r.before(i),i--;const o=t.doc.nodeAt(s);if(!o||o.type.name!==this.name)return!1;const a={from:s,to:s+o.nodeSize},l=o.firstChild;return e.insertContentAt(a,l)},removeImage:()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=t,{$anchor:i}=r;let s=i.depth,o=i.pos;for(;s>0;)o=i.before(s),s--;const a=t.doc.nodeAt(o);return!a||a.type.name!==this.name&&a.type.name!==dc.name?!1:(n&&(e.deleteRange(o,o+a.nodeSize),n(e)),!0)}}},addProseMirrorPlugins(){let t;return[new ze({props:{handleDOMEvents:{dragstart:(e,n)=>{if(!n.dataTransfer||!n.target||!(n.target instanceof HTMLImageElement))return!1;const r=e.posAtDOM(n.target,0),i=e.state.doc.resolve(r);if(i.parent.type!==this.type)return!1;t=pe.create(e.state.doc,i.before(i.depth));const s=t.content(),o=Ks.fromSchema(e.state.schema),a=document.createElement("div"),l=o.serializeFragment(s.content);a.appendChild(l);const c=a.textContent||"",u=s;return n.dataTransfer.clearData(),n.dataTransfer.setData("text/html",a.innerHTML),n.dataTransfer.setData("text/plain",c),n.dataTransfer.effectAllowed="copyMove",e.dragging={slice:u,move:n.ctrlKey},!0},drop:e=>{t&&(e.dispatch(e.state.tr.setSelection(t)),t=null)},dragend:()=>{t=null}}}})]}}),Xd=Gce.extend({name:"imageCaption",addProseMirrorPlugins(){return[new ze({key:new rt("imageCaptionFocus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{$anchor:i}=e;if(!n||!r||i.parent.type.name!==this.name)return je.create(t,[]);if(i.node(i.depth-1).type.name!==oF.name)return je.create(t,[]);const s=i.before(i.depth),o=i.after(i.depth);return je.create(t,[sn.node(s,o,{class:"ProseMirror-selectednode"})])}}})]}});Ve.create({name:"indent",addOptions(){return{types:["heading","paragraph"],minLevel:0,maxLevel:4}},addGlobalAttributes(){return[{types:this.options.types,attributes:{indent:{default:null,renderHTML:t=>!t.indent||t.indent==this.options.minLevel?{}:{"data-indent":t.indent},parseHTML:t=>{const e=Number.parseInt(t.getAttribute("data-indent")||"",10);return e&&e>this.options.minLevel?e:null}}}}]},addCommands(){const t=(r,i,s)=>{const o=r.doc.nodeAt(i)??null;if(o){const a=(o.attrs.indent||0)+s,{minLevel:l,maxLevel:c}=this.options;let u=a;if(a<l?u=l:a>c&&(u=c),u!==o.attrs.indent){const h={...o.attrs};delete h.indent;const d=u>l?{...h,indent:u}:h;return r.setNodeMarkup(i,o.type,d,o.marks)}}return r},e=(r,i)=>{const{doc:s,selection:o}=r;if(s&&o&&o instanceof de){const{from:a,to:l}=o;s.nodesBetween(a,l,(c,u)=>this.options.types.includes(c.type.name)?(r=t(r,u,i),!1):!0)}return r},n=r=>()=>({tr:i,state:s,dispatch:o})=>{const{selection:a}=s;return i.setSelection(a),i=e(i,r),i.docChanged&&o&&o(i),!0};return{indent:n(1),outdent:n(-1)}},addKeyboardShortcuts(){return{Tab:()=>!Dr(this.editor.state,"listItem")&&this.editor.commands.indent(),"Shift-Tab":()=>!Dr(this.editor.state,"listItem")&&this.editor.commands.outdent(),Backspace:({editor:t})=>{const{selection:e}=t.state,{$anchor:n}=e;if(n.parentOffset!==0)return!1;const r=n.parent,i=this.options.types.includes(r.type.name),s=r.attrs.indent||0;return i&&s>this.options.minLevel?this.editor.commands.outdent():!1}}}});const iue=nF.extend({inclusive:!1,addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),openOnClick:!1,autolink:!0}},addStorage(){return{mode:0,tempPos:null}},onSelectionUpdate(){this.storage.mode==-1&&!this.editor.isActive("link")&&this.editor.commands.confirmEditLink()},addCommands(){var t;return{...(t=this.parent)==null?void 0:t.call(this),startEditLink:()=>({editor:e,chain:n})=>{const r=e.isActive("link")?1:-1;return r===-1&&n().command(({chain:i,tr:s})=>(this.storage.tempPos=s.selection,s.selection.empty?i().blur().focus(s.selection.anchor).insertLink({text:""}).run():i().setLink({href:""}).run())).setMeta("addToHistory",!1).setMeta("preventUpdate",!0).setMeta("preventClearTempLink",!0).run(),this.storage.mode=r,!0},insertLink:e=>({chain:n})=>{const{text:r,href:i}=e;return n().insertContent({type:"text",text:r,marks:[{type:"link",attrs:{href:i,target:"_blank"}}]},{updateSelection:!1}).setLink({href:i}).run()},confirmEditLink:e=>({chain:n,state:r})=>{const{doc:i}=r,s=!!e;return n().command(({tr:o,commands:a})=>s?a.insertLink(e):(eD(o,i,this.storage.tempPos),!0)).setMeta("addToHistory",s).setMeta("preventUpdate",!s).run(),this.storage.mode=0,this.storage.tempPos=null,!0}}},addProseMirrorPlugins(){var t;return[...((t=this.parent)==null?void 0:t.call(this))||[],new ze({props:{handleClick:(e,n,r)=>{var h;if(!e.editable)return!1;const{schema:i,doc:s,tr:o}=e.state,a=Jc(s.resolve(n),i.marks.link);if(!((h=r.target.closest("a"))!=null&&h.href)||!a)return!1;const l=s.resolve(a.from),c=s.resolve(a.to),u=o.setSelection(new de(l,c));e.dispatch(u),this.storage.mode=1}},appendTransaction:(e,n,r)=>{const i=e.some(a=>a.docChanged)&&!n.doc.eq(r.doc),s=e.some(a=>a.getMeta("preventClearTempLink"));if(!i||s)return;const o=r.tr;if(Jc(r.selection.$anchor,r.schema.marks.link)&&(eD(o,r.doc,r.selection),!!o.steps.length))return o}})]},addKeyboardShortcuts(){return{"Mod-k":()=>this.editor.commands.startEditLink()}}});function eD(t,e,n){const{from:r,to:i,empty:s}=n;s?(t.removeMark(r,r+1),t.insertText("",r,r+1)):e.nodesBetween(r,i,(o,a)=>{const l=o.marks.find(c=>c.type.name==="link"&&!c.attrs.href);l&&t.removeMark(a,a+o.nodeSize,l)})}const sue=Ve.create({name:"selection",addProseMirrorPlugins(){const{editor:t}=this;return[new ze({key:new rt("selection"),props:{decorations(e){return e.selection.empty||t.isFocused===!0?null:je.create(e.doc,[sn.inline(e.selection.from,e.selection.to,{class:"selection"})])}}})]}});var aF=xt.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{var e,n;const r=t.getAttribute("colwidth"),i=r?r.split(",").map(s=>parseInt(s,10)):null;if(!i){const s=(e=t.closest("table"))==null?void 0:e.querySelectorAll("colgroup > col"),o=Array.from(((n=t.parentElement)==null?void 0:n.children)||[]).indexOf(t);if(o&&o>-1&&s&&s[o]){const a=s[o].getAttribute("width");return a?[parseInt(a,10)]:null}}return i}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",Be(this.options.HTMLAttributes,t),0]}}),lF=xt.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(n=>parseInt(n,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",Be(this.options.HTMLAttributes,t),0]}}),cF=xt.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",Be(this.options.HTMLAttributes,t),0]}});function Kb(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function tD(t,e,n,r,i,s){var o;let a=0,l=!0,c=e.firstChild;const u=t.firstChild;if(u!==null)for(let d=0,p=0;d<u.childCount;d+=1){const{colspan:f,colwidth:m}=u.child(d).attrs;for(let g=0;g<f;g+=1,p+=1){const y=i===p?s:m&&m[g],b=y?`${y}px`:"";if(a+=y||r,y||(l=!1),c){if(c.style.width!==b){const[T,S]=Kb(r,y);c.style.setProperty(T,S)}c=c.nextSibling}else{const T=document.createElement("col"),[S,w]=Kb(r,y);T.style.setProperty(S,w),e.appendChild(T)}}}for(;c;){const d=c.nextSibling;(o=c.parentNode)==null||o.removeChild(c),c=d}const h=t.attrs.style&&typeof t.attrs.style=="string"&&/\bwidth\s*:/i.test(t.attrs.style);l&&!h?(n.style.width=`${a}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${a}px`)}var oue=class{constructor(t,e){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),t.attrs.style&&(this.table.style.cssText=t.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),tD(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!==this.node.type?!1:(this.node=t,tD(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){const e=t.target,n=this.dom.contains(e),r=this.contentDOM.contains(e);return!!(n&&!r&&(t.type==="attributes"||t.type==="childList"||t.type==="characterData"))}};function aue(t,e,n,r){let i=0,s=!0;const o=[],a=t.firstChild;if(!a)return{};for(let u=0,h=0;u<a.childCount;u+=1){const{colspan:d,colwidth:p}=a.child(u).attrs;for(let f=0;f<d;f+=1,h+=1){const m=n===h?r:p&&p[f];i+=m||e,m||(s=!1);const[g,y]=Kb(e,m);o.push(["col",{style:`${g}: ${y}`}])}}const l=s?`${i}px`:"",c=s?"":`${i}px`;return{colgroup:["colgroup",{},...o],tableWidth:l,tableMinWidth:c}}function nD(t,e){return t.createAndFill()}function lue(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function cue(t,e,n,r,i){const s=lue(t),o=[],a=[];for(let c=0;c<n;c+=1){const u=nD(s.cell);if(u&&a.push(u),r){const h=nD(s.header_cell);h&&o.push(h)}}const l=[];for(let c=0;c<e;c+=1)l.push(s.row.createChecked(null,r&&c===0?o:a));return s.table.createChecked(null,l)}function uue(t){return t instanceof nt}var dd=({editor:t})=>{const{selection:e}=t.state;if(!uue(e))return!1;let n=0;const r=VN(e.ranges[0].$from,i=>i.type.name==="table");return r==null||r.node.descendants(i=>{if(i.type.name==="table")return!1;["tableCell","tableHeader"].includes(i.type.name)&&(n+=1)}),n===e.ranges.length?(t.commands.deleteTable(),!0):!1},hue="";function due(t){return(t||"").replace(/\s+/g," ").trim()}function pue(t,e,n={}){var r;const i=(r=n.cellLineSeparator)!=null?r:hue;if(!t||!t.content||t.content.length===0)return"";const s=[];t.content.forEach(p=>{const f=[];p.content&&p.content.forEach(m=>{let g="";m.content&&Array.isArray(m.content)&&m.content.length>1?g=m.content.map(T=>e.renderChildren(T)).join(i):g=m.content?e.renderChildren(m.content):"";const y=due(g),b=m.type==="tableHeader";f.push({text:y,isHeader:b})}),s.push(f)});const o=s.reduce((p,f)=>Math.max(p,f.length),0);if(o===0)return"";const a=new Array(o).fill(0);s.forEach(p=>{var f;for(let m=0;m<o;m+=1){const g=(((f=p[m])==null?void 0:f.text)||"").length;g>a[m]&&(a[m]=g),a[m]<3&&(a[m]=3)}});const l=(p,f)=>p+" ".repeat(Math.max(0,f-p.length)),c=s[0],u=c.some(p=>p.isHeader);let h=`
`;const d=new Array(o).fill(0).map((p,f)=>u&&c[f]&&c[f].text||"");return h+=`| ${d.map((p,f)=>l(p,a[f])).join(" | ")} |
`,h+=`| ${a.map(p=>"-".repeat(Math.max(3,p))).join(" | ")} |
`,(u?s.slice(1):s).forEach(p=>{h+=`| ${new Array(o).fill(0).map((f,m)=>l(p[m]&&p[m].text||"",a[m])).join(" | ")} |
`}),h}var fue=pue,uF=xt.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:oue,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:n,tableWidth:r,tableMinWidth:i}=aue(t,this.options.cellMinWidth),s=e.style;function o(){return s||(r?`width: ${r}`:`min-width: ${i}`)}const a=["table",Be(this.options.HTMLAttributes,e,{style:o()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},a]:a},parseMarkdown:(t,e)=>{const n=[];if(t.header){const r=[];t.header.forEach(i=>{r.push(e.createNode("tableHeader",{},[{type:"paragraph",content:e.parseInline(i.tokens)}]))}),n.push(e.createNode("tableRow",{},r))}return t.rows&&t.rows.forEach(r=>{const i=[];r.forEach(s=>{i.push(e.createNode("tableCell",{},[{type:"paragraph",content:e.parseInline(s.tokens)}]))}),n.push(e.createNode("tableRow",{},i))}),e.createNode("table",void 0,n)},renderMarkdown:(t,e)=>fue(t,e),addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:i,editor:s})=>{const o=cue(s.schema,t,e,n);if(i){const a=r.selection.from+1;r.replaceSelectionWith(o).scrollIntoView().setSelection(de.near(r.doc.resolve(a)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>Yoe(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>Koe(t,e),deleteColumn:()=>({state:t,dispatch:e})=>eae(t,e),addRowBefore:()=>({state:t,dispatch:e})=>nae(t,e),addRowAfter:()=>({state:t,dispatch:e})=>rae(t,e),deleteRow:()=>({state:t,dispatch:e})=>sae(t,e),deleteTable:()=>({state:t,dispatch:e})=>dae(t,e),mergeCells:()=>({state:t,dispatch:e})=>vC(t,e),splitCell:()=>({state:t,dispatch:e})=>TC(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>Su("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>Su("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>uae(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>vC(t,e)?!0:TC(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>lae(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>wC(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>wC(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&b$(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const r=nt.create(e.doc,t.anchorCell,t.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:dd,"Mod-Backspace":dd,Delete:dd,"Mod-Delete":dd}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[Tae({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],Nae({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:qe(ge(t,"tableRole",e))}}});Ve.create({name:"tableKit",addExtensions(){const t=[];return this.options.table!==!1&&t.push(uF.configure(this.options.table)),this.options.tableCell!==!1&&t.push(aF.configure(this.options.tableCell)),this.options.tableHeader!==!1&&t.push(lF.configure(this.options.tableHeader)),this.options.tableRow!==!1&&t.push(cF.configure(this.options.tableRow)),t}});const mue=uF.extend({addExtensions(){return[cF,lF,aF]}}).configure({cellMinWidth:35,resizable:!0}),gue=/^(https?:\/\/)?(www\.|music\.)?(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(?!channel\/)(?!@)(.+)?$/;function hF(t){return t.match(gue)}function Oue({url:t,nocookie:e,allowFullscreen:n,autoplay:r,controls:i}){if(!hF(t))return null;if(t.includes("/embed/"))return t;const s=/(?:v=|shorts\/)([-\w]+)/gm.exec(t);return!s||!s[1]?null:(e?"https://www.youtube-nocookie.com/embed/":"https://www.youtube.com/embed/")+s[1]}const yue=xt.create({name:"youtube",group:"block",draggable:!0,atom:!0,addOptions(){return{allowFullscreen:!0,autoplay:!1,nocookie:!1,controls:!0,HTMLAttributes:{}}},addAttributes(){return{src:{default:null},width:{default:null,parseHTML:t=>Number.parseInt(t.style.width)||null,renderHTML:t=>t.width?{style:`width: ${t.width}%`}:{}}}},parseHTML(){return[{tag:"iframe[src]"}]},renderHTML({HTMLAttributes:t}){return["iframe",Be(this.options.HTMLAttributes,{with:200,height:120,allowfullscreen:this.options.allowFullscreen?"true":void 0,autoplay:this.options.autoplay?"true":void 0},t)]},addCommands(){return{embedYoutube:t=>({commands:e})=>{if(!hF(t.src))return!1;const n=Oue({url:t.src,allowFullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,controls:this.options.controls,nocookie:this.options.nocookie});return n?e.insertContent({type:this.name,attrs:{...t,src:n}}):!1}}},addNodeView(){return({node:t})=>{const e=document.createElement("iframe");e.src=t.attrs.src;const n=document.createElement("div");return n.style.cursor="default",n.style.marginInline="auto",n.style.width=`${t.attrs.width}%`,n.appendChild(e),{dom:n}}}}),rD=(t,e)=>{document.documentElement.style.setProperty(t,e)};function bue(t,e){let n=null,r=null;return(...i)=>{n?r=i:(t(...i),n=setTimeout(()=>{n=null,r&&(t(...r),r=null)},e))}}const Eue=[Rce.configure({horizontalRule:!1,hardBreak:!1,codeBlock:!1}),vle.configure({includeChildren:!0,showOnlyCurrent:!0,placeholder:({editor:t,node:e})=>{const n=t.options.editorProps.placeholder;switch(e.type.name){case Xd.name:return n==null?void 0:n.imageCaption;default:return n==null?void 0:n.paragraph}}}),sue,yle,H$,Mle,Rle,Ile.configure({types:["heading","paragraph"]}),V$,U$,Nle.configure({multicolor:!0}),QT,iue,dc,oF,Wce,yue,mue],vue=()=>{const{editor:t,contentElement:e}=$e(),n=v.useCallback(({editor:u})=>u.isActive("table"),[]),r=v.useCallback(()=>{const u=Ip(t,"table");return u?{getBoundingClientRect:()=>u.getBoundingClientRect()}:null},[t]),i=v.useCallback((u,h)=>{const d=`add${u}${h}`;return()=>t.chain().focus()[d]().run()},[t]),s=v.useCallback(u=>{const h=`delete${u}`;return()=>t.chain().focus()[h]().run()},[t]),o=v.useCallback(u=>{const h=`toggleHeader${u}`;return()=>t.chain().focus()[h]().run()},[t]),a=v.useCallback(()=>t.chain().focus().mergeCells().run(),[t]),l=v.useCallback(()=>t.chain().focus().splitCell().run(),[t]),c=v.useCallback(()=>t.chain().focus().deleteTable().run(),[t]);return E.jsxs(Dm,{editor:t,pluginKey:"table-bubble",shouldShow:n,updateDelay:100,appendTo:()=>e.current,getReferencedVirtualElement:r,options:{placement:"top"},children:[E.jsxs(li,{children:[E.jsx(be,{icon:"RowInsertTop",tooltip:"Add row above",onClick:i("Row","Before")}),E.jsx(be,{icon:"RowInsertBottom",tooltip:"Add row below",onClick:i("Row","After")}),E.jsx(be,{icon:"ColInsertLeft",tooltip:"Add column before",onClick:i("Column","Before")}),E.jsx(be,{icon:"ColInsertRight",tooltip:"Add column after",onClick:i("Column","After")}),E.jsx(be,{icon:"SplitCell",tooltip:"Split cell",onClick:l}),E.jsx(be,{icon:"MergeCell",tooltip:"Merge cells",onClick:a})]}),E.jsxs(li,{style:{justifyContent:"center"},children:[E.jsx(be,{icon:"RowHeader",tooltip:"Toggle row header",onClick:o("Row")}),E.jsx(be,{icon:"ColHeader",tooltip:"Toggle column header",onClick:o("Column")}),E.jsx(be,{icon:"RowRemove",tooltip:"Delete row",onClick:s("Row")}),E.jsx(be,{icon:"ColRemove",tooltip:"Delete column",onClick:s("Column")}),E.jsx(be,{icon:"Trash",tooltip:"Delete table",onClick:c})]})]})},Tue=v.forwardRef(({ssr:t=!1,output:e="html",readonly:n=!1,disabled:r=!1,initialContent:i,placeholder:s,hideMenuBar:o=!1,hideStatusBar:a=!1,hideBubbleMenu:l=!0,contentMinHeight:c=200,contentMaxHeight:u,onContentChange:h},d)=>{const p=!n&&!r,f=p&&l,m=v.useCallback(bue(b=>h==null?void 0:h(b),1500),[]),g=v.useCallback(b=>{const T=e==="html"?b.isEmpty?"":b.getHTML():b.getJSON();m(T)},[m,e]),y={ref:d,placeholder:s,extensions:Eue,content:i,editable:p,immediatelyRender:!t,shouldRerenderOnTransaction:!1,autofocus:!1,onUpdate:({editor:b})=>g(b)};return v.useEffect(()=>{rD("--rte-editor-min-height",`${c}px`),rD("--rte-editor-max-height",`${u}px`)},[u,c]),E.jsxs(wie,{editorOptions:y,slotBefore:!o&&E.jsx(Aoe,{}),slotAfter:!a&&E.jsx(Ioe,{}),children:[f&&E.jsxs(E.Fragment,{children:[E.jsx(x$,{}),E.jsx($ae,{}),E.jsx(_$,{}),E.jsx(vue,{})]}),E.jsx(Roe,{})]})});Tue.displayName="TiptapEditor";class oh{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}oh.prototype.normal={};oh.prototype.property={};oh.prototype.space=void 0;function dF(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new oh(n,r,e)}function _u(t){return t.toLowerCase()}class Bn{constructor(e,n){this.attribute=n,this.property=e}}Bn.prototype.attribute="";Bn.prototype.booleanish=!1;Bn.prototype.boolean=!1;Bn.prototype.commaOrSpaceSeparated=!1;Bn.prototype.commaSeparated=!1;Bn.prototype.defined=!1;Bn.prototype.mustUseProperty=!1;Bn.prototype.number=!1;Bn.prototype.overloadedBoolean=!1;Bn.prototype.property="";Bn.prototype.spaceSeparated=!1;Bn.prototype.space=void 0;let Sue=0;const Ae=ra(),Dt=ra(),Jb=ra(),Y=ra(),lt=ra(),$a=ra(),Un=ra();function ra(){return 2**++Sue}const eE=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ae,booleanish:Dt,commaOrSpaceSeparated:Un,commaSeparated:$a,number:Y,overloadedBoolean:Jb,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),RO=Object.keys(eE);class WT extends Bn{constructor(e,n,r,i){let s=-1;if(super(e,n),iD(this,"space",i),typeof r=="number")for(;++s<RO.length;){const o=RO[s];iD(this,RO[s],(r&eE[o])===eE[o])}}}WT.prototype.defined=!0;function iD(t,e,n){n&&(t[e]=n)}function Al(t){const e={},n={};for(const[r,i]of Object.entries(t.properties)){const s=new WT(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),e[r]=s,n[_u(r)]=r,n[_u(s.attribute)]=r}return new oh(e,n,t.space)}const pF=Al({properties:{ariaActiveDescendant:null,ariaAtomic:Dt,ariaAutoComplete:null,ariaBusy:Dt,ariaChecked:Dt,ariaColCount:Y,ariaColIndex:Y,ariaColSpan:Y,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:Dt,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:Dt,ariaFlowTo:lt,ariaGrabbed:Dt,ariaHasPopup:null,ariaHidden:Dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:Y,ariaLive:null,ariaModal:Dt,ariaMultiLine:Dt,ariaMultiSelectable:Dt,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:Y,ariaPressed:Dt,ariaReadOnly:Dt,ariaRelevant:null,ariaRequired:Dt,ariaRoleDescription:lt,ariaRowCount:Y,ariaRowIndex:Y,ariaRowSpan:Y,ariaSelected:Dt,ariaSetSize:Y,ariaSort:null,ariaValueMax:Y,ariaValueMin:Y,ariaValueNow:Y,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function fF(t,e){return e in t?t[e]:e}function mF(t,e){return fF(t,e.toLowerCase())}const wue=Al({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:$a,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:Ae,allowPaymentRequest:Ae,allowUserMedia:Ae,alt:null,as:null,async:Ae,autoCapitalize:null,autoComplete:lt,autoFocus:Ae,autoPlay:Ae,blocking:lt,capture:null,charSet:null,checked:Ae,cite:null,className:lt,cols:Y,colSpan:null,content:null,contentEditable:Dt,controls:Ae,controlsList:lt,coords:Y|$a,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ae,defer:Ae,dir:null,dirName:null,disabled:Ae,download:Jb,draggable:Dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ae,formTarget:null,headers:lt,height:Y,hidden:Jb,high:Y,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:Ae,inputMode:null,integrity:null,is:null,isMap:Ae,itemId:null,itemProp:lt,itemRef:lt,itemScope:Ae,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ae,low:Y,manifest:null,max:null,maxLength:Y,media:null,method:null,min:null,minLength:Y,multiple:Ae,muted:Ae,name:null,nonce:null,noModule:Ae,noValidate:Ae,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:Ae,optimum:Y,pattern:null,ping:lt,placeholder:null,playsInline:Ae,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ae,referrerPolicy:null,rel:lt,required:Ae,reversed:Ae,rows:Y,rowSpan:Y,sandbox:lt,scope:null,scoped:Ae,seamless:Ae,selected:Ae,shadowRootClonable:Ae,shadowRootDelegatesFocus:Ae,shadowRootMode:null,shape:null,size:Y,sizes:null,slot:null,span:Y,spellCheck:Dt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Y,step:null,style:null,tabIndex:Y,target:null,title:null,translate:null,type:null,typeMustMatch:Ae,useMap:null,value:Dt,width:Y,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:Y,borderColor:null,bottomMargin:Y,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ae,declare:Ae,event:null,face:null,frame:null,frameBorder:null,hSpace:Y,leftMargin:Y,link:null,longDesc:null,lowSrc:null,marginHeight:Y,marginWidth:Y,noResize:Ae,noHref:Ae,noShade:Ae,noWrap:Ae,object:null,profile:null,prompt:null,rev:null,rightMargin:Y,rules:null,scheme:null,scrolling:Dt,standby:null,summary:null,text:null,topMargin:Y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Y,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ae,disableRemotePlayback:Ae,prefix:null,property:null,results:Y,security:null,unselectable:null},space:"html",transform:mF}),kue=Al({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:Un,accentHeight:Y,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Y,amplitude:Y,arabicForm:null,ascent:Y,attributeName:null,attributeType:null,azimuth:Y,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Y,by:null,calcMode:null,capHeight:Y,className:lt,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:Y,diffuseConstant:Y,direction:null,display:null,dur:null,divisor:Y,dominantBaseline:null,download:Ae,dx:null,dy:null,edgeMode:null,editable:null,elevation:Y,enableBackground:null,end:null,event:null,exponent:Y,externalResourcesRequired:null,fill:null,fillOpacity:Y,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:$a,g2:$a,glyphName:$a,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Y,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Y,horizOriginX:Y,horizOriginY:Y,id:null,ideographic:Y,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Y,k:Y,k1:Y,k2:Y,k3:Y,k4:Y,kernelMatrix:Un,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Y,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:Y,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:Y,overlineThickness:Y,paintOrder:null,panose1:null,path:null,pathLength:Y,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Y,pointsAtY:Y,pointsAtZ:Y,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Un,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Un,rev:Un,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Un,requiredFeatures:Un,requiredFonts:Un,requiredFormats:Un,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:Y,specularExponent:Y,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Y,strikethroughThickness:Y,string:null,stroke:null,strokeDashArray:Un,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Y,strokeOpacity:Y,strokeWidth:null,style:null,surfaceScale:Y,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Un,tabIndex:Y,tableValues:null,target:null,targetX:Y,targetY:Y,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Un,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Y,underlineThickness:Y,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Y,values:null,vAlphabetic:Y,vMathematical:Y,vectorEffect:null,vHanging:Y,vIdeographic:Y,version:null,vertAdvY:Y,vertOriginX:Y,vertOriginY:Y,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Y,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:fF}),gF=Al({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),OF=Al({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:mF}),yF=Al({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),_ue={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"},xue=/[A-Z]/g,sD=/-[a-z]/g,Cue=/^data[-\w.:]+$/i;function Pm(t,e){const n=_u(e);let r=e,i=Bn;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Cue.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(sD,Aue);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!sD.test(s)){let o=s.replace(xue,Due);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}i=WT}return new i(r,e)}function Due(t){return"-"+t.toLowerCase()}function Aue(t){return t.charAt(1).toUpperCase()}const ah=dF([pF,wue,gF,OF,yF],"html"),io=dF([pF,kue,gF,OF,yF],"svg");function oD(t){const e=[],n=String(t||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const o=n.slice(i,r).trim();(o||!s)&&e.push(o),i=r+1,r=n.indexOf(",",i)}return e}function bF(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const aD=/[#.]/g;function Pue(t,e){const n=t||"",r={};let i=0,s,o;for(;i<n.length;){aD.lastIndex=i;const a=aD.exec(n),l=n.slice(i,a?a.index:n.length);l&&(s?s==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:o=l,i+=l.length),a&&(s=a[0],i++)}return{type:"element",tagName:o||e||"div",properties:r,children:[]}}function lD(t){const e=String(t||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function EF(t){return t.join(" ").trim()}function vF(t,e,n){const r=n?Iue(n):void 0;function i(s,o,...a){let l;if(s==null){l={type:"root",children:[]};const c=o;a.unshift(c)}else{l=Pue(s,e);const c=l.tagName.toLowerCase(),u=r?r.get(c):void 0;if(l.tagName=u||c,Nue(o))a.unshift(o);else for(const[h,d]of Object.entries(o))Rue(t,l.properties,h,d)}for(const c of a)tE(l.children,c);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function Nue(t){if(t===null||typeof t!="object"||Array.isArray(t))return!0;if(typeof t.type!="string")return!1;const e=t,n=Object.keys(t);for(const r of n){const i=e[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const s=i;for(const o of s)if(typeof o!="number"&&typeof o!="string")return!0}}return!!("children"in t&&Array.isArray(t.children))}function Rue(t,e,n,r){const i=Pm(t,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=lD(r):i.commaSeparated?s=oD(r):i.commaOrSpaceSeparated?s=lD(oD(r).join(" ")):s=cD(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?Mue(r):String(r);if(Array.isArray(s)){const o=[];for(const a of s)o.push(cD(i,i.property,a));s=o}i.property==="className"&&Array.isArray(e.className)&&(s=e.className.concat(s)),e[i.property]=s}}function tE(t,e){if(e!=null)if(typeof e=="number"||typeof e=="string")t.push({type:"text",value:String(e)});else if(Array.isArray(e))for(const n of e)tE(t,n);else if(typeof e=="object"&&"type"in e)e.type==="root"?tE(t,e.children):t.push(e);else throw new Error("Expected node, nodes, or string, got `"+e+"`")}function cD(t,e,n){if(typeof n=="string"){if(t.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((t.boolean||t.overloadedBoolean)&&(n===""||_u(n)===_u(e)))return!0}return n}function Mue(t){const e=[];for(const[n,r]of Object.entries(t))e.push([n,r].join(": "));return e.join("; ")}function Iue(t){const e=new Map;for(const n of t)e.set(n.toLowerCase(),n);return e}const Lue=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],Que=vF(ah,"div"),$ue=vF(io,"g",Lue);function Fue(t){const e=String(t),n=[];return{toOffset:i,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=e.length){let o=0;for(;;){let a=n[o];if(a===void 0){const l=uD(e,n[o-1]);a=l===-1?e.length+1:l+1,n[o]=a}if(a>s)return{line:o+1,column:s-(o>0?n[o-1]:0)+1,offset:s};o++}}}function i(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const a=n[n.length-1],l=uD(e,a),c=l===-1?e.length+1:l+1;if(a===c)break;n.push(c)}const o=(s.line>1?n[s.line-2]:0)+s.column-1;if(o<n[s.line-1])return o}}}function uD(t,e){const n=t.indexOf("\r",e),r=t.indexOf(`
`,e);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Bue={svg:"http://www.w3.org/2000/svg"},TF={}.hasOwnProperty,jue=Object.prototype;function zue(t,e){const n=e||{};return GT({file:n.file||void 0,location:!1,schema:n.space==="svg"?io:ah,verbose:n.verbose||!1},t)}function GT(t,e){let n;switch(e.nodeName){case"#comment":{const r=e;return n={type:"comment",value:r.data},qd(t,r,n),n}case"#document":case"#document-fragment":{const r=e,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:SF(t,e.childNodes),data:{quirksMode:i}},t.file&&t.location){const s=String(t.file),o=Fue(s),a=o.toPoint(0),l=o.toPoint(s.length);n.position={start:a,end:l}}return n}case"#documentType":{const r=e;return n={type:"doctype"},qd(t,r,n),n}case"#text":{const r=e;return n={type:"text",value:r.value},qd(t,r,n),n}default:return n=Vue(t,e),n}}function SF(t,e){let n=-1;const r=[];for(;++n<e.length;){const i=GT(t,e[n]);r.push(i)}return r}function Vue(t,e){const n=t.schema;t.schema=e.namespaceURI===Bue.svg?io:ah;let r=-1;const i={};for(;++r<e.attrs.length;){const o=e.attrs[r],a=(o.prefix?o.prefix+":":"")+o.name;TF.call(jue,a)||(i[a]=o.value)}const s=(t.schema.space==="svg"?$ue:Que)(e.tagName,i,SF(t,e.childNodes));if(qd(t,e,s),s.tagName==="template"){const o=e,a=o.sourceCodeLocation,l=a&&a.startTag&&xa(a.startTag),c=a&&a.endTag&&xa(a.endTag),u=GT(t,o.content);l&&c&&t.file&&(u.position={start:l.end,end:c.start}),s.content=u}return t.schema=n,s}function qd(t,e,n){if("sourceCodeLocation"in e&&e.sourceCodeLocation&&t.file){const r=Uue(t,n,e.sourceCodeLocation);r&&(t.location=!0,n.position=r)}}function Uue(t,e,n){const r=xa(n);if(e.type==="element"){const i=e.children[e.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),t.verbose){const s={};let o;if(n.attrs)for(o in n.attrs)TF.call(n.attrs,o)&&(s[Pm(t.schema,o).property]=xa(n.attrs[o]));n.startTag;const a=xa(n.startTag),l=n.endTag?xa(n.endTag):void 0,c={opening:a};l&&(c.closing=l),c.properties=s,e.data={position:c}}}return r}function xa(t){const e=hD({line:t.startLine,column:t.startCol,offset:t.startOffset}),n=hD({line:t.endLine,column:t.endCol,offset:t.endOffset});return e||n?{start:e,end:n}:void 0}function hD(t){return t.line&&t.column?t:void 0}const Hue=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),dt="<22>";var _;(function(t){t[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(_||(_={}));const Pn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function wF(t){return t>=55296&&t<=57343}function Xue(t){return t>=56320&&t<=57343}function que(t,e){return(t-55296)*1024+9216+e}function kF(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&t>=1&&t<=31||t>=127&&t<=159}function _F(t){return t>=64976&&t<=65007||Hue.has(t)}var F;(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comment",t.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",t.eofInDoctype="eof-in-doctype",t.nestedComment="nested-comment",t.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",t.eofInComment="eof-in-comment",t.incorrectlyClosedComment="incorrectly-closed-comment",t.eofInCdata="eof-in-cdata",t.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",t.nullCharacterReference="null-character-reference",t.surrogateCharacterReference="surrogate-character-reference",t.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",t.controlCharacterReference="control-character-reference",t.noncharacterCharacterReference="noncharacter-character-reference",t.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",t.missingDoctypeName="missing-doctype-name",t.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",t.duplicateAttribute="duplicate-attribute",t.nonConformingDoctype="non-conforming-doctype",t.missingDoctype="missing-doctype",t.misplacedDoctype="misplaced-doctype",t.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",t.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",t.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",t.openElementsLeftAfterEof="open-elements-left-after-eof",t.abandonedHeadElementChild="abandoned-head-element-child",t.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",t.nestedNoscriptInHead="nested-noscript-in-head",t.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(F||(F={}));const Zue=65536;class Wue{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Zue,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,n){const{line:r,col:i,offset:s}=this,o=i+n,a=s+n;return{code:e,startLine:r,endLine:r,startCol:o,endCol:o,startOffset:a,endOffset:a}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(Xue(n))return this.pos++,this._addGap(),que(e,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,_.EOF;return this._err(F.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,n){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,n){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(e,this.pos);for(let r=0;r<e.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==e.charCodeAt(r))return!1;return!0}peek(e){const n=this.pos+e;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,_.EOF;const r=this.html.charCodeAt(n);return r===_.CARRIAGE_RETURN?_.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,_.EOF;let e=this.html.charCodeAt(this.pos);return e===_.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,_.LINE_FEED):e===_.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,wF(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===_.LINE_FEED||e===_.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){kF(e)?this._err(F.controlCharacterInInputStream):_F(e)&&this._err(F.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Fe;(function(t){t[t.CHARACTER=0]="CHARACTER",t[t.NULL_CHARACTER=1]="NULL_CHARACTER",t[t.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",t[t.START_TAG=3]="START_TAG",t[t.END_TAG=4]="END_TAG",t[t.COMMENT=5]="COMMENT",t[t.DOCTYPE=6]="DOCTYPE",t[t.EOF=7]="EOF",t[t.HIBERNATION=8]="HIBERNATION"})(Fe||(Fe={}));function xF(t,e){for(let n=t.attrs.length-1;n>=0;n--)if(t.attrs[n].name===e)return t.attrs[n].value;return null}const Gue=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎸᏄϨrrowƀ;BDᅐᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ\0ᚕ᚛ᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsuᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ拔;櫙artint;樍Āao⁕Ācsα‰‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0耻¾䂾;慗;慜5;慘ƶ⁌\0;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚ;檒;檥;檤ȀEaes;扩pĀ;p℣檊rox»Ā;q檈Ā;qim;拧pf;쀀𝕘Āci⅃r;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❶❼➅➇ròࢨorneòarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;efभ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛òðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬Āet;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ëĀ;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓pĀ;sᆴ㑵;쀀⊔uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;h㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊;쀀⫋setneqĀ;q㦏㦒쀀⊋;쀀⫌Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(t=>t.charCodeAt(0))),Yue=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function Kue(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=Yue.get(t))!==null&&e!==void 0?e:t}var qt;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(qt||(qt={}));const Jue=32;var Ms;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(Ms||(Ms={}));function nE(t){return t>=qt.ZERO&&t<=qt.NINE}function ehe(t){return t>=qt.UPPER_A&&t<=qt.UPPER_F||t>=qt.LOWER_A&&t<=qt.LOWER_F}function the(t){return t>=qt.UPPER_A&&t<=qt.UPPER_Z||t>=qt.LOWER_A&&t<=qt.LOWER_Z||nE(t)}function nhe(t){return t===qt.EQUALS||the(t)}var Vt;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(Vt||(Vt={}));var Ii;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(Ii||(Ii={}));class rhe{constructor(e,n,r){this.decodeTree=e,this.emitCodePoint=n,this.errors=r,this.state=Vt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ii.Strict}startEntity(e){this.decodeMode=e,this.state=Vt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,n){switch(this.state){case Vt.EntityStart:return e.charCodeAt(n)===qt.NUM?(this.state=Vt.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=Vt.NamedEntity,this.stateNamedEntity(e,n));case Vt.NumericStart:return this.stateNumericStart(e,n);case Vt.NumericDecimal:return this.stateNumericDecimal(e,n);case Vt.NumericHex:return this.stateNumericHex(e,n);case Vt.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|Jue)===qt.LOWER_X?(this.state=Vt.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=Vt.NumericDecimal,this.stateNumericDecimal(e,n))}addToNumericResult(e,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+Number.parseInt(e.substr(n,s),i),this.consumed+=s}}stateNumericHex(e,n){const r=n;for(;n<e.length;){const i=e.charCodeAt(n);if(nE(i)||ehe(i))n+=1;else return this.addToNumericResult(e,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(e,r,n,16),-1}stateNumericDecimal(e,n){const r=n;for(;n<e.length;){const i=e.charCodeAt(n);if(nE(i))n+=1;else return this.addToNumericResult(e,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(e,r,n,10),-1}emitNumericEntity(e,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===qt.SEMI)this.consumed+=1;else if(this.decodeMode===Ii.Strict)return 0;return this.emitCodePoint(Kue(this.result),this.consumed),this.errors&&(e!==qt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&Ms.VALUE_LENGTH)>>14;for(;n<e.length;n++,this.excess++){const o=e.charCodeAt(n);if(this.treeIndex=ihe(r,i,this.treeIndex+Math.max(1,s),o),this.treeIndex<0)return this.result===0||this.decodeMode===Ii.Attribute&&(s===0||nhe(o))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&Ms.VALUE_LENGTH)>>14,s!==0){if(o===qt.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Ii.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:n,decodeTree:r}=this,i=(r[n]&Ms.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[e]&~Ms.VALUE_LENGTH:i[e+1],r),n===3&&this.emitCodePoint(i[e+2],r),r}end(){var e;switch(this.state){case Vt.NamedEntity:return this.result!==0&&(this.decodeMode!==Ii.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Vt.NumericDecimal:return this.emitNumericEntity(0,2);case Vt.NumericHex:return this.emitNumericEntity(0,3);case Vt.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Vt.EntityStart:return 0}}}function ihe(t,e,n,r){const i=(e&Ms.BRANCH_LENGTH)>>7,s=e&Ms.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const l=r-s;return l<0||l>=i?-1:t[n+l]-1}let o=n,a=o+i-1;for(;o<=a;){const l=o+a>>>1,c=t[l];if(c<r)o=l+1;else if(c>r)a=l-1;else return t[l+i]}return-1}var q;(function(t){t.HTML="http://www.w3.org/1999/xhtml",t.MATHML="http://www.w3.org/1998/Math/MathML",t.SVG="http://www.w3.org/2000/svg",t.XLINK="http://www.w3.org/1999/xlink",t.XML="http://www.w3.org/XML/1998/namespace",t.XMLNS="http://www.w3.org/2000/xmlns/"})(q||(q={}));var No;(function(t){t.TYPE="type",t.ACTION="action",t.ENCODING="encoding",t.PROMPT="prompt",t.NAME="name",t.COLOR="color",t.FACE="face",t.SIZE="size"})(No||(No={}));var or;(function(t){t.NO_QUIRKS="no-quirks",t.QUIRKS="quirks",t.LIMITED_QUIRKS="limited-quirks"})(or||(or={}));var M;(function(t){t.A="a",t.ADDRESS="address",t.ANNOTATION_XML="annotation-xml",t.APPLET="applet",t.AREA="area",t.ARTICLE="article",t.ASIDE="aside",t.B="b",t.BASE="base",t.BASEFONT="basefont",t.BGSOUND="bgsound",t.BIG="big",t.BLOCKQUOTE="blockquote",t.BODY="body",t.BR="br",t.BUTTON="button",t.CAPTION="caption",t.CENTER="center",t.CODE="code",t.COL="col",t.COLGROUP="colgroup",t.DD="dd",t.DESC="desc",t.DETAILS="details",t.DIALOG="dialog",t.DIR="dir",t.DIV="div",t.DL="dl",t.DT="dt",t.EM="em",t.EMBED="embed",t.FIELDSET="fieldset",t.FIGCAPTION="figcaption",t.FIGURE="figure",t.FONT="font",t.FOOTER="footer",t.FOREIGN_OBJECT="foreignObject",t.FORM="form",t.FRAME="frame",t.FRAMESET="frameset",t.H1="h1",t.H2="h2",t.H3="h3",t.H4="h4",t.H5="h5",t.H6="h6",t.HEAD="head",t.HEADER="header",t.HGROUP="hgroup",t.HR="hr",t.HTML="html",t.I="i",t.IMG="img",t.IMAGE="image",t.INPUT="input",t.IFRAME="iframe",t.KEYGEN="keygen",t.LABEL="label",t.LI="li",t.LINK="link",t.LISTING="listing",t.MAIN="main",t.MALIGNMARK="malignmark",t.MARQUEE="marquee",t.MATH="math",t.MENU="menu",t.META="meta",t.MGLYPH="mglyph",t.MI="mi",t.MO="mo",t.MN="mn",t.MS="ms",t.MTEXT="mtext",t.NAV="nav",t.NOBR="nobr",t.NOFRAMES="noframes",t.NOEMBED="noembed",t.NOSCRIPT="noscript",t.OBJECT="object",t.OL="ol",t.OPTGROUP="optgroup",t.OPTION="option",t.P="p",t.PARAM="param",t.PLAINTEXT="plaintext",t.PRE="pre",t.RB="rb",t.RP="rp",t.RT="rt",t.RTC="rtc",t.RUBY="ruby",t.S="s",t.SCRIPT="script",t.SEARCH="search",t.SECTION="section",t.SELECT="select",t.SOURCE="source",t.SMALL="small",t.SPAN="span",t.STRIKE="strike",t.STRONG="strong",t.STYLE="style",t.SUB="sub",t.SUMMARY="summary",t.SUP="sup",t.TABLE="table",t.TBODY="tbody",t.TEMPLATE="template",t.TEXTAREA="textarea",t.TFOOT="tfoot",t.TD="td",t.TH="th",t.THEAD="thead",t.TITLE="title",t.TR="tr",t.TRACK="track",t.TT="tt",t.U="u",t.UL="ul",t.SVG="svg",t.VAR="var",t.WBR="wbr",t.XMP="xmp"})(M||(M={}));var O;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.A=1]="A",t[t.ADDRESS=2]="ADDRESS",t[t.ANNOTATION_XML=3]="ANNOTATION_XML",t[t.APPLET=4]="APPLET",t[t.AREA=5]="AREA",t[t.ARTICLE=6]="ARTICLE",t[t.ASIDE=7]="ASIDE",t[t.B=8]="B",t[t.BASE=9]="BASE",t[t.BASEFONT=10]="BASEFONT",t[t.BGSOUND=11]="BGSOUND",t[t.BIG=12]="BIG",t[t.BLOCKQUOTE=13]="BLOCKQUOTE",t[t.BODY=14]="BODY",t[t.BR=15]="BR",t[t.BUTTON=16]="BUTTON",t[t.CAPTION=17]="CAPTION",t[t.CENTER=18]="CENTER",t[t.CODE=19]="CODE",t[t.COL=20]="COL",t[t.COLGROUP=21]="COLGROUP",t[t.DD=22]="DD",t[t.DESC=23]="DESC",t[t.DETAILS=24]="DETAILS",t[t.DIALOG=25]="DIALOG",t[t.DIR=26]="DIR",t[t.DIV=27]="DIV",t[t.DL=28]="DL",t[t.DT=29]="DT",t[t.EM=30]="EM",t[t.EMBED=31]="EMBED",t[t.FIELDSET=32]="FIELDSET",t[t.FIGCAPTION=33]="FIGCAPTION",t[t.FIGURE=34]="FIGURE",t[t.FONT=35]="FONT",t[t.FOOTER=36]="FOOTER",t[t.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",t[t.FORM=38]="FORM",t[t.FRAME=39]="FRAME",t[t.FRAMESET=40]="FRAMESET",t[t.H1=41]="H1",t[t.H2=42]="H2",t[t.H3=43]="H3",t[t.H4=44]="H4",t[t.H5=45]="H5",t[t.H6=46]="H6",t[t.HEAD=47]="HEAD",t[t.HEADER=48]="HEADER",t[t.HGROUP=49]="HGROUP",t[t.HR=50]="HR",t[t.HTML=51]="HTML",t[t.I=52]="I",t[t.IMG=53]="IMG",t[t.IMAGE=54]="IMAGE",t[t.INPUT=55]="INPUT",t[t.IFRAME=56]="IFRAME",t[t.KEYGEN=57]="KEYGEN",t[t.LABEL=58]="LABEL",t[t.LI=59]="LI",t[t.LINK=60]="LINK",t[t.LISTING=61]="LISTING",t[t.MAIN=62]="MAIN",t[t.MALIGNMARK=63]="MALIGNMARK",t[t.MARQUEE=64]="MARQUEE",t[t.MATH=65]="MATH",t[t.MENU=66]="MENU",t[t.META=67]="META",t[t.MGLYPH=68]="MGLYPH",t[t.MI=69]="MI",t[t.MO=70]="MO",t[t.MN=71]="MN",t[t.MS=72]="MS",t[t.MTEXT=73]="MTEXT",t[t.NAV=74]="NAV",t[t.NOBR=75]="NOBR",t[t.NOFRAMES=76]="NOFRAMES",t[t.NOEMBED=77]="NOEMBED",t[t.NOSCRIPT=78]="NOSCRIPT",t[t.OBJECT=79]="OBJECT",t[t.OL=80]="OL",t[t.OPTGROUP=81]="OPTGROUP",t[t.OPTION=82]="OPTION",t[t.P=83]="P",t[t.PARAM=84]="PARAM",t[t.PLAINTEXT=85]="PLAINTEXT",t[t.PRE=86]="PRE",t[t.RB=87]="RB",t[t.RP=88]="RP",t[t.RT=89]="RT",t[t.RTC=90]="RTC",t[t.RUBY=91]="RUBY",t[t.S=92]="S",t[t.SCRIPT=93]="SCRIPT",t[t.SEARCH=94]="SEARCH",t[t.SECTION=95]="SECTION",t[t.SELECT=96]="SELECT",t[t.SOURCE=97]="SOURCE",t[t.SMALL=98]="SMALL",t[t.SPAN=99]="SPAN",t[t.STRIKE=100]="STRIKE",t[t.STRONG=101]="STRONG",t[t.STYLE=102]="STYLE",t[t.SUB=103]="SUB",t[t.SUMMARY=104]="SUMMARY",t[t.SUP=105]="SUP",t[t.TABLE=106]="TABLE",t[t.TBODY=107]="TBODY",t[t.TEMPLATE=108]="TEMPLATE",t[t.TEXTAREA=109]="TEXTAREA",t[t.TFOOT=110]="TFOOT",t[t.TD=111]="TD",t[t.TH=112]="TH",t[t.THEAD=113]="THEAD",t[t.TITLE=114]="TITLE",t[t.TR=115]="TR",t[t.TRACK=116]="TRACK",t[t.TT=117]="TT",t[t.U=118]="U",t[t.UL=119]="UL",t[t.SVG=120]="SVG",t[t.VAR=121]="VAR",t[t.WBR=122]="WBR",t[t.XMP=123]="XMP"})(O||(O={}));const she=new Map([[M.A,O.A],[M.ADDRESS,O.ADDRESS],[M.ANNOTATION_XML,O.ANNOTATION_XML],[M.APPLET,O.APPLET],[M.AREA,O.AREA],[M.ARTICLE,O.ARTICLE],[M.ASIDE,O.ASIDE],[M.B,O.B],[M.BASE,O.BASE],[M.BASEFONT,O.BASEFONT],[M.BGSOUND,O.BGSOUND],[M.BIG,O.BIG],[M.BLOCKQUOTE,O.BLOCKQUOTE],[M.BODY,O.BODY],[M.BR,O.BR],[M.BUTTON,O.BUTTON],[M.CAPTION,O.CAPTION],[M.CENTER,O.CENTER],[M.CODE,O.CODE],[M.COL,O.COL],[M.COLGROUP,O.COLGROUP],[M.DD,O.DD],[M.DESC,O.DESC],[M.DETAILS,O.DETAILS],[M.DIALOG,O.DIALOG],[M.DIR,O.DIR],[M.DIV,O.DIV],[M.DL,O.DL],[M.DT,O.DT],[M.EM,O.EM],[M.EMBED,O.EMBED],[M.FIELDSET,O.FIELDSET],[M.FIGCAPTION,O.FIGCAPTION],[M.FIGURE,O.FIGURE],[M.FONT,O.FONT],[M.FOOTER,O.FOOTER],[M.FOREIGN_OBJECT,O.FOREIGN_OBJECT],[M.FORM,O.FORM],[M.FRAME,O.FRAME],[M.FRAMESET,O.FRAMESET],[M.H1,O.H1],[M.H2,O.H2],[M.H3,O.H3],[M.H4,O.H4],[M.H5,O.H5],[M.H6,O.H6],[M.HEAD,O.HEAD],[M.HEADER,O.HEADER],[M.HGROUP,O.HGROUP],[M.HR,O.HR],[M.HTML,O.HTML],[M.I,O.I],[M.IMG,O.IMG],[M.IMAGE,O.IMAGE],[M.INPUT,O.INPUT],[M.IFRAME,O.IFRAME],[M.KEYGEN,O.KEYGEN],[M.LABEL,O.LABEL],[M.LI,O.LI],[M.LINK,O.LINK],[M.LISTING,O.LISTING],[M.MAIN,O.MAIN],[M.MALIGNMARK,O.MALIGNMARK],[M.MARQUEE,O.MARQUEE],[M.MATH,O.MATH],[M.MENU,O.MENU],[M.META,O.META],[M.MGLYPH,O.MGLYPH],[M.MI,O.MI],[M.MO,O.MO],[M.MN,O.MN],[M.MS,O.MS],[M.MTEXT,O.MTEXT],[M.NAV,O.NAV],[M.NOBR,O.NOBR],[M.NOFRAMES,O.NOFRAMES],[M.NOEMBED,O.NOEMBED],[M.NOSCRIPT,O.NOSCRIPT],[M.OBJECT,O.OBJECT],[M.OL,O.OL],[M.OPTGROUP,O.OPTGROUP],[M.OPTION,O.OPTION],[M.P,O.P],[M.PARAM,O.PARAM],[M.PLAINTEXT,O.PLAINTEXT],[M.PRE,O.PRE],[M.RB,O.RB],[M.RP,O.RP],[M.RT,O.RT],[M.RTC,O.RTC],[M.RUBY,O.RUBY],[M.S,O.S],[M.SCRIPT,O.SCRIPT],[M.SEARCH,O.SEARCH],[M.SECTION,O.SECTION],[M.SELECT,O.SELECT],[M.SOURCE,O.SOURCE],[M.SMALL,O.SMALL],[M.SPAN,O.SPAN],[M.STRIKE,O.STRIKE],[M.STRONG,O.STRONG],[M.STYLE,O.STYLE],[M.SUB,O.SUB],[M.SUMMARY,O.SUMMARY],[M.SUP,O.SUP],[M.TABLE,O.TABLE],[M.TBODY,O.TBODY],[M.TEMPLATE,O.TEMPLATE],[M.TEXTAREA,O.TEXTAREA],[M.TFOOT,O.TFOOT],[M.TD,O.TD],[M.TH,O.TH],[M.THEAD,O.THEAD],[M.TITLE,O.TITLE],[M.TR,O.TR],[M.TRACK,O.TRACK],[M.TT,O.TT],[M.U,O.U],[M.UL,O.UL],[M.SVG,O.SVG],[M.VAR,O.VAR],[M.WBR,O.WBR],[M.XMP,O.XMP]]);function Nm(t){var e;return(e=she.get(t))!==null&&e!==void 0?e:O.UNKNOWN}const W=O,ohe={[q.HTML]:new Set([W.ADDRESS,W.APPLET,W.AREA,W.ARTICLE,W.ASIDE,W.BASE,W.BASEFONT,W.BGSOUND,W.BLOCKQUOTE,W.BODY,W.BR,W.BUTTON,W.CAPTION,W.CENTER,W.COL,W.COLGROUP,W.DD,W.DETAILS,W.DIR,W.DIV,W.DL,W.DT,W.EMBED,W.FIELDSET,W.FIGCAPTION,W.FIGURE,W.FOOTER,W.FORM,W.FRAME,W.FRAMESET,W.H1,W.H2,W.H3,W.H4,W.H5,W.H6,W.HEAD,W.HEADER,W.HGROUP,W.HR,W.HTML,W.IFRAME,W.IMG,W.INPUT,W.LI,W.LINK,W.LISTING,W.MAIN,W.MARQUEE,W.MENU,W.META,W.NAV,W.NOEMBED,W.NOFRAMES,W.NOSCRIPT,W.OBJECT,W.OL,W.P,W.PARAM,W.PLAINTEXT,W.PRE,W.SCRIPT,W.SECTION,W.SELECT,W.SOURCE,W.STYLE,W.SUMMARY,W.TABLE,W.TBODY,W.TD,W.TEMPLATE,W.TEXTAREA,W.TFOOT,W.TH,W.THEAD,W.TITLE,W.TR,W.TRACK,W.UL,W.WBR,W.XMP]),[q.MATHML]:new Set([W.MI,W.MO,W.MN,W.MS,W.MTEXT,W.ANNOTATION_XML]),[q.SVG]:new Set([W.TITLE,W.FOREIGN_OBJECT,W.DESC]),[q.XLINK]:new Set,[q.XML]:new Set,[q.XMLNS]:new Set},rE=new Set([W.H1,W.H2,W.H3,W.H4,W.H5,W.H6]);M.STYLE,M.SCRIPT,M.XMP,M.IFRAME,M.NOEMBED,M.NOFRAMES,M.PLAINTEXT;var x;(function(t){t[t.DATA=0]="DATA",t[t.RCDATA=1]="RCDATA",t[t.RAWTEXT=2]="RAWTEXT",t[t.SCRIPT_DATA=3]="SCRIPT_DATA",t[t.PLAINTEXT=4]="PLAINTEXT",t[t.TAG_OPEN=5]="TAG_OPEN",t[t.END_TAG_OPEN=6]="END_TAG_OPEN",t[t.TAG_NAME=7]="TAG_NAME",t[t.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",t[t.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",t[t.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",t[t.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",t[t.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",t[t.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",t[t.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",t[t.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",t[t.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",t[t.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",t[t.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",t[t.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",t[t.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",t[t.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",t[t.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",t[t.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",t[t.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",t[t.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",t[t.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",t[t.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",t[t.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",t[t.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",t[t.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",t[t.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",t[t.BOGUS_COMMENT=40]="BOGUS_COMMENT",t[t.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",t[t.COMMENT_START=42]="COMMENT_START",t[t.COMMENT_START_DASH=43]="COMMENT_START_DASH",t[t.COMMENT=44]="COMMENT",t[t.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",t[t.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",t[t.COMMENT_END_DASH=49]="COMMENT_END_DASH",t[t.COMMENT_END=50]="COMMENT_END",t[t.COMMENT_END_BANG=51]="COMMENT_END_BANG",t[t.DOCTYPE=52]="DOCTYPE",t[t.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",t[t.DOCTYPE_NAME=54]="DOCTYPE_NAME",t[t.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",t[t.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",t[t.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",t[t.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",t[t.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",t[t.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",t[t.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",t[t.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",t[t.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",t[t.CDATA_SECTION=68]="CDATA_SECTION",t[t.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",t[t.CDATA_SECTION_END=70]="CDATA_SECTION_END",t[t.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",t[t.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(x||(x={}));const In={DATA:x.DATA,RCDATA:x.RCDATA,RAWTEXT:x.RAWTEXT,SCRIPT_DATA:x.SCRIPT_DATA,PLAINTEXT:x.PLAINTEXT,CDATA_SECTION:x.CDATA_SECTION};function ahe(t){return t>=_.DIGIT_0&&t<=_.DIGIT_9}function pc(t){return t>=_.LATIN_CAPITAL_A&&t<=_.LATIN_CAPITAL_Z}function lhe(t){return t>=_.LATIN_SMALL_A&&t<=_.LATIN_SMALL_Z}function gs(t){return lhe(t)||pc(t)}function dD(t){return gs(t)||ahe(t)}function pd(t){return t+32}function CF(t){return t===_.SPACE||t===_.LINE_FEED||t===_.TABULATION||t===_.FORM_FEED}function pD(t){return CF(t)||t===_.SOLIDUS||t===_.GREATER_THAN_SIGN}function che(t){return t===_.NULL?F.nullCharacterReference:t>1114111?F.characterReferenceOutsideUnicodeRange:wF(t)?F.surrogateCharacterReference:_F(t)?F.noncharacterCharacterReference:kF(t)||t===_.CARRIAGE_RETURN?F.controlCharacterReference:null}class uhe{constructor(e,n){this.options=e,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=x.DATA,this.returnState=x.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Wue(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new rhe(Gue,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(F.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(F.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=che(r);i&&this._err(i,1)}}:void 0)}_err(e,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(e,n))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||(e==null||e()))}write(e,n,r){this.active=!0,this.preprocessor.write(e,n),this._runParsingLoop(),this.paused||(r==null||r())}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let n=0;n<e;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,n){return this.preprocessor.startsWith(e,n)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Fe.START_TAG,tagName:"",tagID:O.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Fe.END_TAG,tagName:"",tagID:O.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:Fe.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:Fe.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,n){this.currentCharacterToken={type:e,chars:n,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,n;const r=this.currentToken;if(xF(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(e=(n=r.location).attrs)!==null&&e!==void 0?e:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(F.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const e=this.currentToken;this.prepareToken(e),e.tagID=Nm(e.tagName),e.type===Fe.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(F.endTagWithAttributes),e.selfClosing&&this._err(F.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case Fe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Fe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Fe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:Fe.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,n)}_emitCodePoint(e){const n=CF(e)?Fe.WHITESPACE_CHARACTER:e===_.NULL?Fe.NULL_CHARACTER:Fe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(Fe.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=x.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ii.Attribute:Ii.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===x.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===x.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===x.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case x.DATA:{this._stateData(e);break}case x.RCDATA:{this._stateRcdata(e);break}case x.RAWTEXT:{this._stateRawtext(e);break}case x.SCRIPT_DATA:{this._stateScriptData(e);break}case x.PLAINTEXT:{this._statePlaintext(e);break}case x.TAG_OPEN:{this._stateTagOpen(e);break}case x.END_TAG_OPEN:{this._stateEndTagOpen(e);break}case x.TAG_NAME:{this._stateTagName(e);break}case x.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(e);break}case x.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(e);break}case x.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(e);break}case x.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(e);break}case x.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(e);break}case x.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(e);break}case x.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(e);break}case x.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(e);break}case x.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(e);break}case x.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(e);break}case x.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(e);break}case x.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(e);break}case x.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(e);break}case x.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(e);break}case x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(e);break}case x.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(e);break}case x.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(e);break}case x.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(e);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(e);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(e);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(e);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(e);break}case x.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(e);break}case x.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(e);break}case x.ATTRIBUTE_NAME:{this._stateAttributeName(e);break}case x.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(e);break}case x.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(e);break}case x.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(e);break}case x.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(e);break}case x.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(e);break}case x.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(e);break}case x.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(e);break}case x.BOGUS_COMMENT:{this._stateBogusComment(e);break}case x.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(e);break}case x.COMMENT_START:{this._stateCommentStart(e);break}case x.COMMENT_START_DASH:{this._stateCommentStartDash(e);break}case x.COMMENT:{this._stateComment(e);break}case x.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(e);break}case x.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(e);break}case x.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(e);break}case x.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(e);break}case x.COMMENT_END_DASH:{this._stateCommentEndDash(e);break}case x.COMMENT_END:{this._stateCommentEnd(e);break}case x.COMMENT_END_BANG:{this._stateCommentEndBang(e);break}case x.DOCTYPE:{this._stateDoctype(e);break}case x.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(e);break}case x.DOCTYPE_NAME:{this._stateDoctypeName(e);break}case x.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(e);break}case x.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(e);break}case x.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(e);break}case x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(e);break}case x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(e);break}case x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(e);break}case x.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break}case x.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(e);break}case x.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(e);break}case x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(e);break}case x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(e);break}case x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(e);break}case x.BOGUS_DOCTYPE:{this._stateBogusDoctype(e);break}case x.CDATA_SECTION:{this._stateCdataSection(e);break}case x.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(e);break}case x.CDATA_SECTION_END:{this._stateCdataSectionEnd(e);break}case x.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case x.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(e);break}default:throw new Error("Unknown state")}}_stateData(e){switch(e){case _.LESS_THAN_SIGN:{this.state=x.TAG_OPEN;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(F.unexpectedNullCharacter),this._emitCodePoint(e);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case _.AMPERSAND:{this._startCharacterReference();break}case _.LESS_THAN_SIGN:{this.state=x.RCDATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(dt);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case _.LESS_THAN_SIGN:{this.state=x.RAWTEXT_LESS_THAN_SIGN;break}case _.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(dt);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case _.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(dt);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case _.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(dt);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateTagOpen(e){if(gs(e))this._createStartTagToken(),this.state=x.TAG_NAME,this._stateTagName(e);else switch(e){case _.EXCLAMATION_MARK:{this.state=x.MARKUP_DECLARATION_OPEN;break}case _.SOLIDUS:{this.state=x.END_TAG_OPEN;break}case _.QUESTION_MARK:{this._err(F.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=x.BOGUS_COMMENT,this._stateBogusComment(e);break}case _.EOF:{this._err(F.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(F.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=x.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(gs(e))this._createEndTagToken(),this.state=x.TAG_NAME,this._stateTagName(e);else switch(e){case _.GREATER_THAN_SIGN:{this._err(F.missingEndTagName),this.state=x.DATA;break}case _.EOF:{this._err(F.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(F.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=x.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const n=this.currentToken;switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=x.BEFORE_ATTRIBUTE_NAME;break}case _.SOLIDUS:{this.state=x.SELF_CLOSING_START_TAG;break}case _.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentTagToken();break}case _.NULL:{this._err(F.unexpectedNullCharacter),n.tagName+=dt;break}case _.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(pc(e)?pd(e):e)}}_stateRcdataLessThanSign(e){e===_.SOLIDUS?this.state=x.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=x.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){gs(e)?(this.state=x.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=x.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=x.BEFORE_ATTRIBUTE_NAME,!1;case _.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=x.SELF_CLOSING_START_TAG,!1;case _.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=x.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=x.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===_.SOLIDUS?this.state=x.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=x.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){gs(e)?(this.state=x.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=x.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=x.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case _.SOLIDUS:{this.state=x.SCRIPT_DATA_END_TAG_OPEN;break}case _.EXCLAMATION_MARK:{this.state=x.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=x.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){gs(e)?(this.state=x.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=x.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=x.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===_.HYPHEN_MINUS?(this.state=x.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=x.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===_.HYPHEN_MINUS?(this.state=x.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=x.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case _.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(dt);break}case _.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case _.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.NULL:{this._err(F.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_ESCAPED,this._emitChars(dt);break}case _.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case _.HYPHEN_MINUS:{this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.GREATER_THAN_SIGN:{this.state=x.SCRIPT_DATA,this._emitChars(">");break}case _.NULL:{this._err(F.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_ESCAPED,this._emitChars(dt);break}case _.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===_.SOLIDUS?this.state=x.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:gs(e)?(this._emitChars("<"),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){gs(e)?(this.state=x.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Pn.SCRIPT,!1)&&pD(this.preprocessor.peek(Pn.SCRIPT.length))){this._emitCodePoint(e);for(let n=0;n<Pn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case _.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(dt);break}case _.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case _.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.NULL:{this._err(F.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(dt);break}case _.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case _.HYPHEN_MINUS:{this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.GREATER_THAN_SIGN:{this.state=x.SCRIPT_DATA,this._emitChars(">");break}case _.NULL:{this._err(F.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(dt);break}case _.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===_.SOLIDUS?(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Pn.SCRIPT,!1)&&pD(this.preprocessor.peek(Pn.SCRIPT.length))){this._emitCodePoint(e);for(let n=0;n<Pn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=x.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.SOLIDUS:case _.GREATER_THAN_SIGN:case _.EOF:{this.state=x.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break}case _.EQUALS_SIGN:{this._err(F.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=x.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=x.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:case _.SOLIDUS:case _.GREATER_THAN_SIGN:case _.EOF:{this._leaveAttrName(),this.state=x.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break}case _.EQUALS_SIGN:{this._leaveAttrName(),this.state=x.BEFORE_ATTRIBUTE_VALUE;break}case _.QUOTATION_MARK:case _.APOSTROPHE:case _.LESS_THAN_SIGN:{this._err(F.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break}case _.NULL:{this._err(F.unexpectedNullCharacter),this.currentAttr.name+=dt;break}default:this.currentAttr.name+=String.fromCodePoint(pc(e)?pd(e):e)}}_stateAfterAttributeName(e){switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.SOLIDUS:{this.state=x.SELF_CLOSING_START_TAG;break}case _.EQUALS_SIGN:{this.state=x.BEFORE_ATTRIBUTE_VALUE;break}case _.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=x.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{this.state=x.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this.state=x.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(F.missingAttributeValue),this.state=x.DATA,this.emitCurrentTagToken();break}default:this.state=x.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case _.QUOTATION_MARK:{this.state=x.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(F.unexpectedNullCharacter),this.currentAttr.value+=dt;break}case _.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case _.APOSTROPHE:{this.state=x.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(F.unexpectedNullCharacter),this.currentAttr.value+=dt;break}case _.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this._leaveAttrValue(),this.state=x.BEFORE_ATTRIBUTE_NAME;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=x.DATA,this.emitCurrentTagToken();break}case _.NULL:{this._err(F.unexpectedNullCharacter),this.currentAttr.value+=dt;break}case _.QUOTATION_MARK:case _.APOSTROPHE:case _.LESS_THAN_SIGN:case _.EQUALS_SIGN:case _.GRAVE_ACCENT:{this._err(F.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break}case _.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this._leaveAttrValue(),this.state=x.BEFORE_ATTRIBUTE_NAME;break}case _.SOLIDUS:{this._leaveAttrValue(),this.state=x.SELF_CLOSING_START_TAG;break}case _.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=x.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this._err(F.missingWhitespaceBetweenAttributes),this.state=x.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case _.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=x.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this._err(F.unexpectedSolidusInTag),this.state=x.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const n=this.currentToken;switch(e){case _.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentComment(n);break}case _.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case _.NULL:{this._err(F.unexpectedNullCharacter),n.data+=dt;break}default:n.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Pn.DASH_DASH,!0)?(this._createCommentToken(Pn.DASH_DASH.length+1),this.state=x.COMMENT_START):this._consumeSequenceIfMatch(Pn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Pn.DOCTYPE.length+1),this.state=x.DOCTYPE):this._consumeSequenceIfMatch(Pn.CDATA_START,!0)?this.inForeignNode?this.state=x.CDATA_SECTION:(this._err(F.cdataInHtmlContent),this._createCommentToken(Pn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=x.BOGUS_COMMENT):this._ensureHibernation()||(this._err(F.incorrectlyOpenedComment),this._createCommentToken(2),this.state=x.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case _.HYPHEN_MINUS:{this.state=x.COMMENT_START_DASH;break}case _.GREATER_THAN_SIGN:{this._err(F.abruptClosingOfEmptyComment),this.state=x.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=x.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const n=this.currentToken;switch(e){case _.HYPHEN_MINUS:{this.state=x.COMMENT_END;break}case _.GREATER_THAN_SIGN:{this._err(F.abruptClosingOfEmptyComment),this.state=x.DATA,this.emitCurrentComment(n);break}case _.EOF:{this._err(F.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=x.COMMENT,this._stateComment(e)}}_stateComment(e){const n=this.currentToken;switch(e){case _.HYPHEN_MINUS:{this.state=x.COMMENT_END_DASH;break}case _.LESS_THAN_SIGN:{n.data+="<",this.state=x.COMMENT_LESS_THAN_SIGN;break}case _.NULL:{this._err(F.unexpectedNullCharacter),n.data+=dt;break}case _.EOF:{this._err(F.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const n=this.currentToken;switch(e){case _.EXCLAMATION_MARK:{n.data+="!",this.state=x.COMMENT_LESS_THAN_SIGN_BANG;break}case _.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=x.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===_.HYPHEN_MINUS?this.state=x.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=x.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===_.HYPHEN_MINUS?this.state=x.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=x.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==_.GREATER_THAN_SIGN&&e!==_.EOF&&this._err(F.nestedComment),this.state=x.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const n=this.currentToken;switch(e){case _.HYPHEN_MINUS:{this.state=x.COMMENT_END;break}case _.EOF:{this._err(F.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=x.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const n=this.currentToken;switch(e){case _.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentComment(n);break}case _.EXCLAMATION_MARK:{this.state=x.COMMENT_END_BANG;break}case _.HYPHEN_MINUS:{n.data+="-";break}case _.EOF:{this._err(F.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=x.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const n=this.currentToken;switch(e){case _.HYPHEN_MINUS:{n.data+="--!",this.state=x.COMMENT_END_DASH;break}case _.GREATER_THAN_SIGN:{this._err(F.incorrectlyClosedComment),this.state=x.DATA,this.emitCurrentComment(n);break}case _.EOF:{this._err(F.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=x.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=x.BEFORE_DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this.state=x.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break}case _.EOF:{this._err(F.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingWhitespaceBeforeDoctypeName),this.state=x.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(pc(e))this._createDoctypeToken(String.fromCharCode(pd(e))),this.state=x.DOCTYPE_NAME;else switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.NULL:{this._err(F.unexpectedNullCharacter),this._createDoctypeToken(dt),this.state=x.DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this._err(F.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case _.EOF:{this._err(F.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=x.DOCTYPE_NAME}}_stateDoctypeName(e){const n=this.currentToken;switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=x.AFTER_DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentDoctype(n);break}case _.NULL:{this._err(F.unexpectedNullCharacter),n.name+=dt;break}case _.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(pc(e)?pd(e):e)}}_stateAfterDoctypeName(e){const n=this.currentToken;switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Pn.PUBLIC,!1)?this.state=x.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Pn.SYSTEM,!1)?this.state=x.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(F.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const n=this.currentToken;switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=x.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.QUOTATION_MARK:{this._err(F.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(F.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(F.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const n=this.currentToken;switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(F.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const n=this.currentToken;switch(e){case _.QUOTATION_MARK:{this.state=x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.NULL:{this._err(F.unexpectedNullCharacter),n.publicId+=dt;break}case _.GREATER_THAN_SIGN:{this._err(F.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case _.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const n=this.currentToken;switch(e){case _.APOSTROPHE:{this.state=x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.NULL:{this._err(F.unexpectedNullCharacter),n.publicId+=dt;break}case _.GREATER_THAN_SIGN:{this._err(F.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case _.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const n=this.currentToken;switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=x.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case _.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentDoctype(n);break}case _.QUOTATION_MARK:{this._err(F.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(F.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const n=this.currentToken;switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=x.DATA;break}case _.QUOTATION_MARK:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const n=this.currentToken;switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=x.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.QUOTATION_MARK:{this._err(F.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(F.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(F.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const n=this.currentToken;switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(F.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const n=this.currentToken;switch(e){case _.QUOTATION_MARK:{this.state=x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.NULL:{this._err(F.unexpectedNullCharacter),n.systemId+=dt;break}case _.GREATER_THAN_SIGN:{this._err(F.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case _.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const n=this.currentToken;switch(e){case _.APOSTROPHE:{this.state=x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.NULL:{this._err(F.unexpectedNullCharacter),n.systemId+=dt;break}case _.GREATER_THAN_SIGN:{this._err(F.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case _.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const n=this.currentToken;switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=x.DATA;break}case _.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const n=this.currentToken;switch(e){case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=x.DATA;break}case _.NULL:{this._err(F.unexpectedNullCharacter);break}case _.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(e){switch(e){case _.RIGHT_SQUARE_BRACKET:{this.state=x.CDATA_SECTION_BRACKET;break}case _.EOF:{this._err(F.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===_.RIGHT_SQUARE_BRACKET?this.state=x.CDATA_SECTION_END:(this._emitChars("]"),this.state=x.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case _.GREATER_THAN_SIGN:{this.state=x.DATA;break}case _.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=x.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(_.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&dD(this.preprocessor.peek(1))?x.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){dD(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===_.SEMICOLON&&this._err(F.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}}const DF=new Set([O.DD,O.DT,O.LI,O.OPTGROUP,O.OPTION,O.P,O.RB,O.RP,O.RT,O.RTC]),fD=new Set([...DF,O.CAPTION,O.COLGROUP,O.TBODY,O.TD,O.TFOOT,O.TH,O.THEAD,O.TR]),df=new Set([O.APPLET,O.CAPTION,O.HTML,O.MARQUEE,O.OBJECT,O.TABLE,O.TD,O.TEMPLATE,O.TH]),hhe=new Set([...df,O.OL,O.UL]),dhe=new Set([...df,O.BUTTON]),mD=new Set([O.ANNOTATION_XML,O.MI,O.MN,O.MO,O.MS,O.MTEXT]),gD=new Set([O.DESC,O.FOREIGN_OBJECT,O.TITLE]),phe=new Set([O.TR,O.TEMPLATE,O.HTML]),fhe=new Set([O.TBODY,O.TFOOT,O.THEAD,O.TEMPLATE,O.HTML]),mhe=new Set([O.TABLE,O.TEMPLATE,O.HTML]),ghe=new Set([O.TD,O.TH]);class Ohe{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=O.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===O.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===q.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,n){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,n,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,n){const r=this._indexOf(e);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(e,n,r){const i=this._indexOf(e)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(e){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(e,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==q.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(e){for(;this.stackTop>=e;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<e)}}popUntilElementPopped(e){const n=this._indexOf(e);this.shortenToLength(Math.max(n,0))}popUntilPopped(e,n){const r=this._indexOfTagNames(e,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(rE,q.HTML)}popUntilTableCellPopped(){this.popUntilPopped(ghe,q.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,n){for(let r=this.stackTop;r>=0;r--)if(e.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(e,n){const r=this._indexOfTagNames(e,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(mhe,q.HTML)}clearBackToTableBodyContext(){this.clearBackTo(fhe,q.HTML)}clearBackToTableRowContext(){this.clearBackTo(phe,q.HTML)}remove(e){const n=this._indexOf(e);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===O.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const n=this._indexOf(e)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===O.HTML}hasInDynamicScope(e,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case q.HTML:{if(i===e)return!0;if(n.has(i))return!1;break}case q.SVG:{if(gD.has(i))return!1;break}case q.MATHML:{if(mD.has(i))return!1;break}}}return!0}hasInScope(e){return this.hasInDynamicScope(e,df)}hasInListItemScope(e){return this.hasInDynamicScope(e,hhe)}hasInButtonScope(e){return this.hasInDynamicScope(e,dhe)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const n=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case q.HTML:{if(rE.has(n))return!0;if(df.has(n))return!1;break}case q.SVG:{if(gD.has(n))return!1;break}case q.MATHML:{if(mD.has(n))return!1;break}}}return!0}hasInTableScope(e){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===q.HTML)switch(this.tagIDs[n]){case e:return!0;case O.TABLE:case O.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===q.HTML)switch(this.tagIDs[e]){case O.TBODY:case O.THEAD:case O.TFOOT:return!0;case O.TABLE:case O.HTML:return!1}return!0}hasInSelectScope(e){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===q.HTML)switch(this.tagIDs[n]){case e:return!0;case O.OPTION:case O.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&DF.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&fD.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&fD.has(this.currentTagId);)this.pop()}}const MO=3;var Kr;(function(t){t[t.Marker=0]="Marker",t[t.Element=1]="Element"})(Kr||(Kr={}));const OD={type:Kr.Marker};class yhe{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,n){const r=[],i=n.length,s=this.treeAdapter.getTagName(e),o=this.treeAdapter.getNamespaceURI(e);for(let a=0;a<this.entries.length;a++){const l=this.entries[a];if(l.type===Kr.Marker)break;const{element:c}=l;if(this.treeAdapter.getTagName(c)===s&&this.treeAdapter.getNamespaceURI(c)===o){const u=this.treeAdapter.getAttrList(c);u.length===i&&r.push({idx:a,attrs:u})}}return r}_ensureNoahArkCondition(e){if(this.entries.length<MO)return;const n=this.treeAdapter.getAttrList(e),r=this._getNoahArkConditionCandidates(e,n);if(r.length<MO)return;const i=new Map(n.map(o=>[o.name,o.value]));let s=0;for(let o=0;o<r.length;o++){const a=r[o];a.attrs.every(l=>i.get(l.name)===l.value)&&(s+=1,s>=MO&&this.entries.splice(a.idx,1))}}insertMarker(){this.entries.unshift(OD)}pushElement(e,n){this._ensureNoahArkCondition(e),this.entries.unshift({type:Kr.Element,element:e,token:n})}insertElementAfterBookmark(e,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Kr.Element,element:e,token:n})}removeEntry(e){const n=this.entries.indexOf(e);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const e=this.entries.indexOf(OD);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const n=this.entries.find(r=>r.type===Kr.Marker||this.treeAdapter.getTagName(r.element)===e);return n&&n.type===Kr.Element?n:null}getElementEntry(e){return this.entries.find(n=>n.type===Kr.Element&&n.element===e)}}const Os={createDocument(){return{nodeName:"#document",mode:or.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(t,e,n){return{nodeName:t,tagName:t,attrs:n,namespaceURI:e,childNodes:[],parentNode:null}},createCommentNode(t){return{nodeName:"#comment",data:t,parentNode:null}},createTextNode(t){return{nodeName:"#text",value:t,parentNode:null}},appendChild(t,e){t.childNodes.push(e),e.parentNode=t},insertBefore(t,e,n){const r=t.childNodes.indexOf(n);t.childNodes.splice(r,0,e),e.parentNode=t},setTemplateContent(t,e){t.content=e},getTemplateContent(t){return t.content},setDocumentType(t,e,n,r){const i=t.childNodes.find(s=>s.nodeName==="#documentType");if(i)i.name=e,i.publicId=n,i.systemId=r;else{const s={nodeName:"#documentType",name:e,publicId:n,systemId:r,parentNode:null};Os.appendChild(t,s)}},setDocumentMode(t,e){t.mode=e},getDocumentMode(t){return t.mode},detachNode(t){if(t.parentNode){const e=t.parentNode.childNodes.indexOf(t);t.parentNode.childNodes.splice(e,1),t.parentNode=null}},insertText(t,e){if(t.childNodes.length>0){const n=t.childNodes[t.childNodes.length-1];if(Os.isTextNode(n)){n.value+=e;return}}Os.appendChild(t,Os.createTextNode(e))},insertTextBefore(t,e,n){const r=t.childNodes[t.childNodes.indexOf(n)-1];r&&Os.isTextNode(r)?r.value+=e:Os.insertBefore(t,Os.createTextNode(e),n)},adoptAttributes(t,e){const n=new Set(t.attrs.map(r=>r.name));for(let r=0;r<e.length;r++)n.has(e[r].name)||t.attrs.push(e[r])},getFirstChild(t){return t.childNodes[0]},getChildNodes(t){return t.childNodes},getParentNode(t){return t.parentNode},getAttrList(t){return t.attrs},getTagName(t){return t.tagName},getNamespaceURI(t){return t.namespaceURI},getTextNodeContent(t){return t.value},getCommentNodeContent(t){return t.data},getDocumentTypeNodeName(t){return t.name},getDocumentTypeNodePublicId(t){return t.publicId},getDocumentTypeNodeSystemId(t){return t.systemId},isTextNode(t){return t.nodeName==="#text"},isCommentNode(t){return t.nodeName==="#comment"},isDocumentTypeNode(t){return t.nodeName==="#documentType"},isElementNode(t){return Object.prototype.hasOwnProperty.call(t,"tagName")},setNodeSourceCodeLocation(t,e){t.sourceCodeLocation=e},getNodeSourceCodeLocation(t){return t.sourceCodeLocation},updateNodeSourceCodeLocation(t,e){t.sourceCodeLocation={...t.sourceCodeLocation,...e}}},AF="html",bhe="about:legacy-compat",Ehe="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",PF=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],vhe=[...PF,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],The=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),NF=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],She=[...NF,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function yD(t,e){return e.some(n=>t.startsWith(n))}function whe(t){return t.name===AF&&t.publicId===null&&(t.systemId===null||t.systemId===bhe)}function khe(t){if(t.name!==AF)return or.QUIRKS;const{systemId:e}=t;if(e&&e.toLowerCase()===Ehe)return or.QUIRKS;let{publicId:n}=t;if(n!==null){if(n=n.toLowerCase(),The.has(n))return or.QUIRKS;let r=e===null?vhe:PF;if(yD(n,r))return or.QUIRKS;if(r=e===null?NF:She,yD(n,r))return or.LIMITED_QUIRKS}return or.NO_QUIRKS}const bD={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},_he="definitionurl",xhe="definitionURL",Che=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(t=>[t.toLowerCase(),t])),Dhe=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:q.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:q.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:q.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:q.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:q.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:q.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:q.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:q.XML}],["xml:space",{prefix:"xml",name:"space",namespace:q.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:q.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:q.XMLNS}]]),Ahe=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(t=>[t.toLowerCase(),t])),Phe=new Set([O.B,O.BIG,O.BLOCKQUOTE,O.BODY,O.BR,O.CENTER,O.CODE,O.DD,O.DIV,O.DL,O.DT,O.EM,O.EMBED,O.H1,O.H2,O.H3,O.H4,O.H5,O.H6,O.HEAD,O.HR,O.I,O.IMG,O.LI,O.LISTING,O.MENU,O.META,O.NOBR,O.OL,O.P,O.PRE,O.RUBY,O.S,O.SMALL,O.SPAN,O.STRONG,O.STRIKE,O.SUB,O.SUP,O.TABLE,O.TT,O.U,O.UL,O.VAR]);function Nhe(t){const e=t.tagID;return e===O.FONT&&t.attrs.some(({name:n})=>n===No.COLOR||n===No.SIZE||n===No.FACE)||Phe.has(e)}function RF(t){for(let e=0;e<t.attrs.length;e++)if(t.attrs[e].name===_he){t.attrs[e].name=xhe;break}}function MF(t){for(let e=0;e<t.attrs.length;e++){const n=Che.get(t.attrs[e].name);n!=null&&(t.attrs[e].name=n)}}function YT(t){for(let e=0;e<t.attrs.length;e++){const n=Dhe.get(t.attrs[e].name);n&&(t.attrs[e].prefix=n.prefix,t.attrs[e].name=n.name,t.attrs[e].namespace=n.namespace)}}function Rhe(t){const e=Ahe.get(t.tagName);e!=null&&(t.tagName=e,t.tagID=Nm(t.tagName))}function Mhe(t,e){return e===q.MATHML&&(t===O.MI||t===O.MO||t===O.MN||t===O.MS||t===O.MTEXT)}function Ihe(t,e,n){if(e===q.MATHML&&t===O.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===No.ENCODING){const i=n[r].value.toLowerCase();return i===bD.TEXT_HTML||i===bD.APPLICATION_XML}}return e===q.SVG&&(t===O.FOREIGN_OBJECT||t===O.DESC||t===O.TITLE)}function Lhe(t,e,n,r){return(!r||r===q.HTML)&&Ihe(t,e,n)||(!r||r===q.MATHML)&&Mhe(t,e)}const Qhe="hidden",$he=8,Fhe=3;var D;(function(t){t[t.INITIAL=0]="INITIAL",t[t.BEFORE_HTML=1]="BEFORE_HTML",t[t.BEFORE_HEAD=2]="BEFORE_HEAD",t[t.IN_HEAD=3]="IN_HEAD",t[t.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",t[t.AFTER_HEAD=5]="AFTER_HEAD",t[t.IN_BODY=6]="IN_BODY",t[t.TEXT=7]="TEXT",t[t.IN_TABLE=8]="IN_TABLE",t[t.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",t[t.IN_CAPTION=10]="IN_CAPTION",t[t.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",t[t.IN_TABLE_BODY=12]="IN_TABLE_BODY",t[t.IN_ROW=13]="IN_ROW",t[t.IN_CELL=14]="IN_CELL",t[t.IN_SELECT=15]="IN_SELECT",t[t.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",t[t.IN_TEMPLATE=17]="IN_TEMPLATE",t[t.AFTER_BODY=18]="AFTER_BODY",t[t.IN_FRAMESET=19]="IN_FRAMESET",t[t.AFTER_FRAMESET=20]="AFTER_FRAMESET",t[t.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",t[t.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(D||(D={}));const Bhe={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},IF=new Set([O.TABLE,O.TBODY,O.TFOOT,O.THEAD,O.TR]),ED={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Os,onParseError:null};class LF{constructor(e,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=D.INITIAL,this.originalInsertionMode=D.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...ED,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new uhe(this.options,this),this.activeFormattingElements=new yhe(this.treeAdapter),this.fragmentContextID=r?Nm(this.treeAdapter.getTagName(r)):O.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Ohe(this.document,this.treeAdapter,this)}static parse(e,n){const r=new this(n);return r.tokenizer.write(e,!0),r.document}static getFragmentParser(e,n){const r={...ED,...n};e??(e=r.treeAdapter.createElement(M.TEMPLATE,q.HTML,[]));const i=r.treeAdapter.createElement("documentmock",q.HTML,[]),s=new this(r,i,e);return s.fragmentContextID===O.TEMPLATE&&s.tmplInsertionModeStack.unshift(D.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,n),n}_err(e,n,r){var i;if(!this.onParseError)return;const s=(i=e.location)!==null&&i!==void 0?i:Bhe,o={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset};this.onParseError(o)}onItemPush(e,n,r){var i,s;(s=(i=this.treeAdapter).onItemPush)===null||s===void 0||s.call(i,e),r&&this.openElements.stackTop>0&&this._setContextModes(e,n)}onItemPop(e,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,e,this.openElements.current),n){let s,o;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,o=this.fragmentContextID):{current:s,currentTagId:o}=this.openElements,this._setContextModes(s,o)}}_setContextModes(e,n){const r=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===q.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&e!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,e)}_switchToTextParsing(e,n){this._insertElement(e,q.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=D.TEXT}switchToPlaintextParsing(){this.insertionMode=D.TEXT,this.originalInsertionMode=D.IN_BODY,this.tokenizer.state=In.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===M.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==q.HTML))switch(this.fragmentContextID){case O.TITLE:case O.TEXTAREA:{this.tokenizer.state=In.RCDATA;break}case O.STYLE:case O.XMP:case O.IFRAME:case O.NOEMBED:case O.NOFRAMES:case O.NOSCRIPT:{this.tokenizer.state=In.RAWTEXT;break}case O.SCRIPT:{this.tokenizer.state=In.SCRIPT_DATA;break}case O.PLAINTEXT:{this.tokenizer.state=In.PLAINTEXT;break}}}_setDocumentType(e){const n=e.name||"",r=e.publicId||"",i=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),e.location){const s=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));s&&this.treeAdapter.setNodeSourceCodeLocation(s,e.location)}}_attachElementToTree(e,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(e,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,e)}}_appendElement(e,n){const r=this.treeAdapter.createElement(e.tagName,n,e.attrs);this._attachElementToTree(r,e.location)}_insertElement(e,n){const r=this.treeAdapter.createElement(e.tagName,n,e.attrs);this._attachElementToTree(r,e.location),this.openElements.push(r,e.tagID)}_insertFakeElement(e,n){const r=this.treeAdapter.createElement(e,q.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(e){const n=this.treeAdapter.createElement(e.tagName,q.HTML,e.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(M.HTML,q.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,O.HTML)}_appendCommentNode(e,n){const r=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,e.location)}_insertCharacters(e){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,e.chars,r):this.treeAdapter.insertText(n,e.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,e.chars)),!e.location)return;const i=this.treeAdapter.getChildNodes(n),s=r?i.lastIndexOf(r):i.length,o=i[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:a,endCol:l,endOffset:c}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:a,endCol:l,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,e.location)}_adoptNodes(e,n){for(let r=this.treeAdapter.getFirstChild(e);r;r=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(e,n){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(e),s=n.type===Fe.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,s)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,e.tagID===O.SVG&&this.treeAdapter.getTagName(n)===M.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===q.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===O.MGLYPH||e.tagID===O.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,q.HTML)}_processToken(e){switch(e.type){case Fe.CHARACTER:{this.onCharacter(e);break}case Fe.NULL_CHARACTER:{this.onNullCharacter(e);break}case Fe.COMMENT:{this.onComment(e);break}case Fe.DOCTYPE:{this.onDoctype(e);break}case Fe.START_TAG:{this._processStartTag(e);break}case Fe.END_TAG:{this.onEndTag(e);break}case Fe.EOF:{this.onEof(e);break}case Fe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(e);break}}}_isIntegrationPoint(e,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return Lhe(e,i,s,r)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Kr.Marker||this.openElements.contains(i.element)),r=n===-1?e-1:n-1;for(let i=r;i>=0;i--){const s=this.activeFormattingElements.entries[i];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=D.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(O.P),this.openElements.popUntilTagNamePopped(O.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case O.TR:{this.insertionMode=D.IN_ROW;return}case O.TBODY:case O.THEAD:case O.TFOOT:{this.insertionMode=D.IN_TABLE_BODY;return}case O.CAPTION:{this.insertionMode=D.IN_CAPTION;return}case O.COLGROUP:{this.insertionMode=D.IN_COLUMN_GROUP;return}case O.TABLE:{this.insertionMode=D.IN_TABLE;return}case O.BODY:{this.insertionMode=D.IN_BODY;return}case O.FRAMESET:{this.insertionMode=D.IN_FRAMESET;return}case O.SELECT:{this._resetInsertionModeForSelect(e);return}case O.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case O.HTML:{this.insertionMode=this.headElement?D.AFTER_HEAD:D.BEFORE_HEAD;return}case O.TD:case O.TH:{if(e>0){this.insertionMode=D.IN_CELL;return}break}case O.HEAD:{if(e>0){this.insertionMode=D.IN_HEAD;return}break}}this.insertionMode=D.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let n=e-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===O.TEMPLATE)break;if(r===O.TABLE){this.insertionMode=D.IN_SELECT_IN_TABLE;return}}this.insertionMode=D.IN_SELECT}_isElementCausesFosterParenting(e){return IF.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const n=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case O.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===q.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case O.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,e,n.beforeElement):this.treeAdapter.appendChild(n.parent,e)}_isSpecialElement(e,n){const r=this.treeAdapter.getNamespaceURI(e);return ohe[r].has(n)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){gpe(this,e);return}switch(this.insertionMode){case D.INITIAL:{ql(this,e);break}case D.BEFORE_HTML:{$c(this,e);break}case D.BEFORE_HEAD:{Fc(this,e);break}case D.IN_HEAD:{Bc(this,e);break}case D.IN_HEAD_NO_SCRIPT:{jc(this,e);break}case D.AFTER_HEAD:{zc(this,e);break}case D.IN_BODY:case D.IN_CAPTION:case D.IN_CELL:case D.IN_TEMPLATE:{$F(this,e);break}case D.TEXT:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:{this._insertCharacters(e);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{IO(this,e);break}case D.IN_TABLE_TEXT:{UF(this,e);break}case D.IN_COLUMN_GROUP:{pf(this,e);break}case D.AFTER_BODY:{ff(this,e);break}case D.AFTER_AFTER_BODY:{Zd(this,e);break}}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){mpe(this,e);return}switch(this.insertionMode){case D.INITIAL:{ql(this,e);break}case D.BEFORE_HTML:{$c(this,e);break}case D.BEFORE_HEAD:{Fc(this,e);break}case D.IN_HEAD:{Bc(this,e);break}case D.IN_HEAD_NO_SCRIPT:{jc(this,e);break}case D.AFTER_HEAD:{zc(this,e);break}case D.TEXT:{this._insertCharacters(e);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{IO(this,e);break}case D.IN_COLUMN_GROUP:{pf(this,e);break}case D.AFTER_BODY:{ff(this,e);break}case D.AFTER_AFTER_BODY:{Zd(this,e);break}}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){iE(this,e);return}switch(this.insertionMode){case D.INITIAL:case D.BEFORE_HTML:case D.BEFORE_HEAD:case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:case D.IN_BODY:case D.IN_TABLE:case D.IN_CAPTION:case D.IN_COLUMN_GROUP:case D.IN_TABLE_BODY:case D.IN_ROW:case D.IN_CELL:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:case D.IN_TEMPLATE:case D.IN_FRAMESET:case D.AFTER_FRAMESET:{iE(this,e);break}case D.IN_TABLE_TEXT:{Zl(this,e);break}case D.AFTER_BODY:{qhe(this,e);break}case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{Zhe(this,e);break}}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case D.INITIAL:{Whe(this,e);break}case D.BEFORE_HEAD:case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:{this._err(e,F.misplacedDoctype);break}case D.IN_TABLE_TEXT:{Zl(this,e);break}}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,F.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?Ope(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case D.INITIAL:{ql(this,e);break}case D.BEFORE_HTML:{Ghe(this,e);break}case D.BEFORE_HEAD:{Khe(this,e);break}case D.IN_HEAD:{Lr(this,e);break}case D.IN_HEAD_NO_SCRIPT:{tde(this,e);break}case D.AFTER_HEAD:{rde(this,e);break}case D.IN_BODY:{vn(this,e);break}case D.IN_TABLE:{hl(this,e);break}case D.IN_TABLE_TEXT:{Zl(this,e);break}case D.IN_CAPTION:{Jde(this,e);break}case D.IN_COLUMN_GROUP:{eS(this,e);break}case D.IN_TABLE_BODY:{Im(this,e);break}case D.IN_ROW:{Lm(this,e);break}case D.IN_CELL:{npe(this,e);break}case D.IN_SELECT:{qF(this,e);break}case D.IN_SELECT_IN_TABLE:{ipe(this,e);break}case D.IN_TEMPLATE:{ope(this,e);break}case D.AFTER_BODY:{lpe(this,e);break}case D.IN_FRAMESET:{cpe(this,e);break}case D.AFTER_FRAMESET:{hpe(this,e);break}case D.AFTER_AFTER_BODY:{ppe(this,e);break}case D.AFTER_AFTER_FRAMESET:{fpe(this,e);break}}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?ype(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case D.INITIAL:{ql(this,e);break}case D.BEFORE_HTML:{Yhe(this,e);break}case D.BEFORE_HEAD:{Jhe(this,e);break}case D.IN_HEAD:{ede(this,e);break}case D.IN_HEAD_NO_SCRIPT:{nde(this,e);break}case D.AFTER_HEAD:{ide(this,e);break}case D.IN_BODY:{Mm(this,e);break}case D.TEXT:{Vde(this,e);break}case D.IN_TABLE:{xu(this,e);break}case D.IN_TABLE_TEXT:{Zl(this,e);break}case D.IN_CAPTION:{epe(this,e);break}case D.IN_COLUMN_GROUP:{tpe(this,e);break}case D.IN_TABLE_BODY:{sE(this,e);break}case D.IN_ROW:{XF(this,e);break}case D.IN_CELL:{rpe(this,e);break}case D.IN_SELECT:{ZF(this,e);break}case D.IN_SELECT_IN_TABLE:{spe(this,e);break}case D.IN_TEMPLATE:{ape(this,e);break}case D.AFTER_BODY:{GF(this,e);break}case D.IN_FRAMESET:{upe(this,e);break}case D.AFTER_FRAMESET:{dpe(this,e);break}case D.AFTER_AFTER_BODY:{Zd(this,e);break}}}onEof(e){switch(this.insertionMode){case D.INITIAL:{ql(this,e);break}case D.BEFORE_HTML:{$c(this,e);break}case D.BEFORE_HEAD:{Fc(this,e);break}case D.IN_HEAD:{Bc(this,e);break}case D.IN_HEAD_NO_SCRIPT:{jc(this,e);break}case D.AFTER_HEAD:{zc(this,e);break}case D.IN_BODY:case D.IN_TABLE:case D.IN_CAPTION:case D.IN_COLUMN_GROUP:case D.IN_TABLE_BODY:case D.IN_ROW:case D.IN_CELL:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:{zF(this,e);break}case D.TEXT:{Ude(this,e);break}case D.IN_TABLE_TEXT:{Zl(this,e);break}case D.IN_TEMPLATE:{WF(this,e);break}case D.AFTER_BODY:case D.IN_FRAMESET:case D.AFTER_FRAMESET:case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{JT(this,e);break}}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===_.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:case D.TEXT:case D.IN_COLUMN_GROUP:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:case D.IN_FRAMESET:case D.AFTER_FRAMESET:{this._insertCharacters(e);break}case D.IN_BODY:case D.IN_CAPTION:case D.IN_CELL:case D.IN_TEMPLATE:case D.AFTER_BODY:case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{QF(this,e);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{IO(this,e);break}case D.IN_TABLE_TEXT:{VF(this,e);break}}}}function jhe(t,e){let n=t.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return n?t.openElements.contains(n.element)?t.openElements.hasInScope(e.tagID)||(n=null):(t.activeFormattingElements.removeEntry(n),n=null):jF(t,e),n}function zhe(t,e){let n=null,r=t.openElements.stackTop;for(;r>=0;r--){const i=t.openElements.items[r];if(i===e.element)break;t._isSpecialElement(i,t.openElements.tagIDs[r])&&(n=i)}return n||(t.openElements.shortenToLength(Math.max(r,0)),t.activeFormattingElements.removeEntry(e)),n}function Vhe(t,e,n){let r=e,i=t.openElements.getCommonAncestor(e);for(let s=0,o=i;o!==n;s++,o=i){i=t.openElements.getCommonAncestor(o);const a=t.activeFormattingElements.getElementEntry(o),l=a&&s>=Fhe;!a||l?(l&&t.activeFormattingElements.removeEntry(a),t.openElements.remove(o)):(o=Uhe(t,a),r===e&&(t.activeFormattingElements.bookmark=a),t.treeAdapter.detachNode(r),t.treeAdapter.appendChild(o,r),r=o)}return r}function Uhe(t,e){const n=t.treeAdapter.getNamespaceURI(e.element),r=t.treeAdapter.createElement(e.token.tagName,n,e.token.attrs);return t.openElements.replace(e.element,r),e.element=r,r}function Hhe(t,e,n){const r=t.treeAdapter.getTagName(e),i=Nm(r);if(t._isElementCausesFosterParenting(i))t._fosterParentElement(n);else{const s=t.treeAdapter.getNamespaceURI(e);i===O.TEMPLATE&&s===q.HTML&&(e=t.treeAdapter.getTemplateContent(e)),t.treeAdapter.appendChild(e,n)}}function Xhe(t,e,n){const r=t.treeAdapter.getNamespaceURI(n.element),{token:i}=n,s=t.treeAdapter.createElement(i.tagName,r,i.attrs);t._adoptNodes(e,s),t.treeAdapter.appendChild(e,s),t.activeFormattingElements.insertElementAfterBookmark(s,i),t.activeFormattingElements.removeEntry(n),t.openElements.remove(n.element),t.openElements.insertAfter(e,s,i.tagID)}function KT(t,e){for(let n=0;n<$he;n++){const r=jhe(t,e);if(!r)break;const i=zhe(t,r);if(!i)break;t.activeFormattingElements.bookmark=r;const s=Vhe(t,i,r.element),o=t.openElements.getCommonAncestor(r.element);t.treeAdapter.detachNode(s),o&&Hhe(t,o,s),Xhe(t,i,r)}}function iE(t,e){t._appendCommentNode(e,t.openElements.currentTmplContentOrNode)}function qhe(t,e){t._appendCommentNode(e,t.openElements.items[0])}function Zhe(t,e){t._appendCommentNode(e,t.document)}function JT(t,e){if(t.stopped=!0,e.location){const n=t.fragmentContext?0:2;for(let r=t.openElements.stackTop;r>=n;r--)t._setEndLocation(t.openElements.items[r],e);if(!t.fragmentContext&&t.openElements.stackTop>=0){const r=t.openElements.items[0],i=t.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(t._setEndLocation(r,e),t.openElements.stackTop>=1)){const s=t.openElements.items[1],o=t.treeAdapter.getNodeSourceCodeLocation(s);o&&!o.endTag&&t._setEndLocation(s,e)}}}}function Whe(t,e){t._setDocumentType(e);const n=e.forceQuirks?or.QUIRKS:khe(e);whe(e)||t._err(e,F.nonConformingDoctype),t.treeAdapter.setDocumentMode(t.document,n),t.insertionMode=D.BEFORE_HTML}function ql(t,e){t._err(e,F.missingDoctype,!0),t.treeAdapter.setDocumentMode(t.document,or.QUIRKS),t.insertionMode=D.BEFORE_HTML,t._processToken(e)}function Ghe(t,e){e.tagID===O.HTML?(t._insertElement(e,q.HTML),t.insertionMode=D.BEFORE_HEAD):$c(t,e)}function Yhe(t,e){const n=e.tagID;(n===O.HTML||n===O.HEAD||n===O.BODY||n===O.BR)&&$c(t,e)}function $c(t,e){t._insertFakeRootElement(),t.insertionMode=D.BEFORE_HEAD,t._processToken(e)}function Khe(t,e){switch(e.tagID){case O.HTML:{vn(t,e);break}case O.HEAD:{t._insertElement(e,q.HTML),t.headElement=t.openElements.current,t.insertionMode=D.IN_HEAD;break}default:Fc(t,e)}}function Jhe(t,e){const n=e.tagID;n===O.HEAD||n===O.BODY||n===O.HTML||n===O.BR?Fc(t,e):t._err(e,F.endTagWithoutMatchingOpenElement)}function Fc(t,e){t._insertFakeElement(M.HEAD,O.HEAD),t.headElement=t.openElements.current,t.insertionMode=D.IN_HEAD,t._processToken(e)}function Lr(t,e){switch(e.tagID){case O.HTML:{vn(t,e);break}case O.BASE:case O.BASEFONT:case O.BGSOUND:case O.LINK:case O.META:{t._appendElement(e,q.HTML),e.ackSelfClosing=!0;break}case O.TITLE:{t._switchToTextParsing(e,In.RCDATA);break}case O.NOSCRIPT:{t.options.scriptingEnabled?t._switchToTextParsing(e,In.RAWTEXT):(t._insertElement(e,q.HTML),t.insertionMode=D.IN_HEAD_NO_SCRIPT);break}case O.NOFRAMES:case O.STYLE:{t._switchToTextParsing(e,In.RAWTEXT);break}case O.SCRIPT:{t._switchToTextParsing(e,In.SCRIPT_DATA);break}case O.TEMPLATE:{t._insertTemplate(e),t.activeFormattingElements.insertMarker(),t.framesetOk=!1,t.insertionMode=D.IN_TEMPLATE,t.tmplInsertionModeStack.unshift(D.IN_TEMPLATE);break}case O.HEAD:{t._err(e,F.misplacedStartTagForHeadElement);break}default:Bc(t,e)}}function ede(t,e){switch(e.tagID){case O.HEAD:{t.openElements.pop(),t.insertionMode=D.AFTER_HEAD;break}case O.BODY:case O.BR:case O.HTML:{Bc(t,e);break}case O.TEMPLATE:{ia(t,e);break}default:t._err(e,F.endTagWithoutMatchingOpenElement)}}function ia(t,e){t.openElements.tmplCount>0?(t.openElements.generateImpliedEndTagsThoroughly(),t.openElements.currentTagId!==O.TEMPLATE&&t._err(e,F.closingOfElementWithOpenChildElements),t.openElements.popUntilTagNamePopped(O.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode()):t._err(e,F.endTagWithoutMatchingOpenElement)}function Bc(t,e){t.openElements.pop(),t.insertionMode=D.AFTER_HEAD,t._processToken(e)}function tde(t,e){switch(e.tagID){case O.HTML:{vn(t,e);break}case O.BASEFONT:case O.BGSOUND:case O.HEAD:case O.LINK:case O.META:case O.NOFRAMES:case O.STYLE:{Lr(t,e);break}case O.NOSCRIPT:{t._err(e,F.nestedNoscriptInHead);break}default:jc(t,e)}}function nde(t,e){switch(e.tagID){case O.NOSCRIPT:{t.openElements.pop(),t.insertionMode=D.IN_HEAD;break}case O.BR:{jc(t,e);break}default:t._err(e,F.endTagWithoutMatchingOpenElement)}}function jc(t,e){const n=e.type===Fe.EOF?F.openElementsLeftAfterEof:F.disallowedContentInNoscriptInHead;t._err(e,n),t.openElements.pop(),t.insertionMode=D.IN_HEAD,t._processToken(e)}function rde(t,e){switch(e.tagID){case O.HTML:{vn(t,e);break}case O.BODY:{t._insertElement(e,q.HTML),t.framesetOk=!1,t.insertionMode=D.IN_BODY;break}case O.FRAMESET:{t._insertElement(e,q.HTML),t.insertionMode=D.IN_FRAMESET;break}case O.BASE:case O.BASEFONT:case O.BGSOUND:case O.LINK:case O.META:case O.NOFRAMES:case O.SCRIPT:case O.STYLE:case O.TEMPLATE:case O.TITLE:{t._err(e,F.abandonedHeadElementChild),t.openElements.push(t.headElement,O.HEAD),Lr(t,e),t.openElements.remove(t.headElement);break}case O.HEAD:{t._err(e,F.misplacedStartTagForHeadElement);break}default:zc(t,e)}}function ide(t,e){switch(e.tagID){case O.BODY:case O.HTML:case O.BR:{zc(t,e);break}case O.TEMPLATE:{ia(t,e);break}default:t._err(e,F.endTagWithoutMatchingOpenElement)}}function zc(t,e){t._insertFakeElement(M.BODY,O.BODY),t.insertionMode=D.IN_BODY,Rm(t,e)}function Rm(t,e){switch(e.type){case Fe.CHARACTER:{$F(t,e);break}case Fe.WHITESPACE_CHARACTER:{QF(t,e);break}case Fe.COMMENT:{iE(t,e);break}case Fe.START_TAG:{vn(t,e);break}case Fe.END_TAG:{Mm(t,e);break}case Fe.EOF:{zF(t,e);break}}}function QF(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e)}function $F(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e),t.framesetOk=!1}function sde(t,e){t.openElements.tmplCount===0&&t.treeAdapter.adoptAttributes(t.openElements.items[0],e.attrs)}function ode(t,e){const n=t.openElements.tryPeekProperlyNestedBodyElement();n&&t.openElements.tmplCount===0&&(t.framesetOk=!1,t.treeAdapter.adoptAttributes(n,e.attrs))}function ade(t,e){const n=t.openElements.tryPeekProperlyNestedBodyElement();t.framesetOk&&n&&(t.treeAdapter.detachNode(n),t.openElements.popAllUpToHtmlElement(),t._insertElement(e,q.HTML),t.insertionMode=D.IN_FRAMESET)}function lde(t,e){t.openElements.hasInButtonScope(O.P)&&t._closePElement(),t._insertElement(e,q.HTML)}function cde(t,e){t.openElements.hasInButtonScope(O.P)&&t._closePElement(),t.openElements.currentTagId!==void 0&&rE.has(t.openElements.currentTagId)&&t.openElements.pop(),t._insertElement(e,q.HTML)}function ude(t,e){t.openElements.hasInButtonScope(O.P)&&t._closePElement(),t._insertElement(e,q.HTML),t.skipNextNewLine=!0,t.framesetOk=!1}function hde(t,e){const n=t.openElements.tmplCount>0;(!t.formElement||n)&&(t.openElements.hasInButtonScope(O.P)&&t._closePElement(),t._insertElement(e,q.HTML),n||(t.formElement=t.openElements.current))}function dde(t,e){t.framesetOk=!1;const n=e.tagID;for(let r=t.openElements.stackTop;r>=0;r--){const i=t.openElements.tagIDs[r];if(n===O.LI&&i===O.LI||(n===O.DD||n===O.DT)&&(i===O.DD||i===O.DT)){t.openElements.generateImpliedEndTagsWithExclusion(i),t.openElements.popUntilTagNamePopped(i);break}if(i!==O.ADDRESS&&i!==O.DIV&&i!==O.P&&t._isSpecialElement(t.openElements.items[r],i))break}t.openElements.hasInButtonScope(O.P)&&t._closePElement(),t._insertElement(e,q.HTML)}function pde(t,e){t.openElements.hasInButtonScope(O.P)&&t._closePElement(),t._insertElement(e,q.HTML),t.tokenizer.state=In.PLAINTEXT}function fde(t,e){t.openElements.hasInScope(O.BUTTON)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(O.BUTTON)),t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML),t.framesetOk=!1}function mde(t,e){const n=t.activeFormattingElements.getElementEntryInScopeWithTagName(M.A);n&&(KT(t,e),t.openElements.remove(n.element),t.activeFormattingElements.removeEntry(n)),t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function gde(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function Ode(t,e){t._reconstructActiveFormattingElements(),t.openElements.hasInScope(O.NOBR)&&(KT(t,e),t._reconstructActiveFormattingElements()),t._insertElement(e,q.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function yde(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML),t.activeFormattingElements.insertMarker(),t.framesetOk=!1}function bde(t,e){t.treeAdapter.getDocumentMode(t.document)!==or.QUIRKS&&t.openElements.hasInButtonScope(O.P)&&t._closePElement(),t._insertElement(e,q.HTML),t.framesetOk=!1,t.insertionMode=D.IN_TABLE}function FF(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,q.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function BF(t){const e=xF(t,No.TYPE);return e!=null&&e.toLowerCase()===Qhe}function Ede(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,q.HTML),BF(e)||(t.framesetOk=!1),e.ackSelfClosing=!0}function vde(t,e){t._appendElement(e,q.HTML),e.ackSelfClosing=!0}function Tde(t,e){t.openElements.hasInButtonScope(O.P)&&t._closePElement(),t._appendElement(e,q.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function Sde(t,e){e.tagName=M.IMG,e.tagID=O.IMG,FF(t,e)}function wde(t,e){t._insertElement(e,q.HTML),t.skipNextNewLine=!0,t.tokenizer.state=In.RCDATA,t.originalInsertionMode=t.insertionMode,t.framesetOk=!1,t.insertionMode=D.TEXT}function kde(t,e){t.openElements.hasInButtonScope(O.P)&&t._closePElement(),t._reconstructActiveFormattingElements(),t.framesetOk=!1,t._switchToTextParsing(e,In.RAWTEXT)}function _de(t,e){t.framesetOk=!1,t._switchToTextParsing(e,In.RAWTEXT)}function vD(t,e){t._switchToTextParsing(e,In.RAWTEXT)}function xde(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML),t.framesetOk=!1,t.insertionMode=t.insertionMode===D.IN_TABLE||t.insertionMode===D.IN_CAPTION||t.insertionMode===D.IN_TABLE_BODY||t.insertionMode===D.IN_ROW||t.insertionMode===D.IN_CELL?D.IN_SELECT_IN_TABLE:D.IN_SELECT}function Cde(t,e){t.openElements.currentTagId===O.OPTION&&t.openElements.pop(),t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML)}function Dde(t,e){t.openElements.hasInScope(O.RUBY)&&t.openElements.generateImpliedEndTags(),t._insertElement(e,q.HTML)}function Ade(t,e){t.openElements.hasInScope(O.RUBY)&&t.openElements.generateImpliedEndTagsWithExclusion(O.RTC),t._insertElement(e,q.HTML)}function Pde(t,e){t._reconstructActiveFormattingElements(),RF(e),YT(e),e.selfClosing?t._appendElement(e,q.MATHML):t._insertElement(e,q.MATHML),e.ackSelfClosing=!0}function Nde(t,e){t._reconstructActiveFormattingElements(),MF(e),YT(e),e.selfClosing?t._appendElement(e,q.SVG):t._insertElement(e,q.SVG),e.ackSelfClosing=!0}function TD(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML)}function vn(t,e){switch(e.tagID){case O.I:case O.S:case O.B:case O.U:case O.EM:case O.TT:case O.BIG:case O.CODE:case O.FONT:case O.SMALL:case O.STRIKE:case O.STRONG:{gde(t,e);break}case O.A:{mde(t,e);break}case O.H1:case O.H2:case O.H3:case O.H4:case O.H5:case O.H6:{cde(t,e);break}case O.P:case O.DL:case O.OL:case O.UL:case O.DIV:case O.DIR:case O.NAV:case O.MAIN:case O.MENU:case O.ASIDE:case O.CENTER:case O.FIGURE:case O.FOOTER:case O.HEADER:case O.HGROUP:case O.DIALOG:case O.DETAILS:case O.ADDRESS:case O.ARTICLE:case O.SEARCH:case O.SECTION:case O.SUMMARY:case O.FIELDSET:case O.BLOCKQUOTE:case O.FIGCAPTION:{lde(t,e);break}case O.LI:case O.DD:case O.DT:{dde(t,e);break}case O.BR:case O.IMG:case O.WBR:case O.AREA:case O.EMBED:case O.KEYGEN:{FF(t,e);break}case O.HR:{Tde(t,e);break}case O.RB:case O.RTC:{Dde(t,e);break}case O.RT:case O.RP:{Ade(t,e);break}case O.PRE:case O.LISTING:{ude(t,e);break}case O.XMP:{kde(t,e);break}case O.SVG:{Nde(t,e);break}case O.HTML:{sde(t,e);break}case O.BASE:case O.LINK:case O.META:case O.STYLE:case O.TITLE:case O.SCRIPT:case O.BGSOUND:case O.BASEFONT:case O.TEMPLATE:{Lr(t,e);break}case O.BODY:{ode(t,e);break}case O.FORM:{hde(t,e);break}case O.NOBR:{Ode(t,e);break}case O.MATH:{Pde(t,e);break}case O.TABLE:{bde(t,e);break}case O.INPUT:{Ede(t,e);break}case O.PARAM:case O.TRACK:case O.SOURCE:{vde(t,e);break}case O.IMAGE:{Sde(t,e);break}case O.BUTTON:{fde(t,e);break}case O.APPLET:case O.OBJECT:case O.MARQUEE:{yde(t,e);break}case O.IFRAME:{_de(t,e);break}case O.SELECT:{xde(t,e);break}case O.OPTION:case O.OPTGROUP:{Cde(t,e);break}case O.NOEMBED:case O.NOFRAMES:{vD(t,e);break}case O.FRAMESET:{ade(t,e);break}case O.TEXTAREA:{wde(t,e);break}case O.NOSCRIPT:{t.options.scriptingEnabled?vD(t,e):TD(t,e);break}case O.PLAINTEXT:{pde(t,e);break}case O.COL:case O.TH:case O.TD:case O.TR:case O.HEAD:case O.FRAME:case O.TBODY:case O.TFOOT:case O.THEAD:case O.CAPTION:case O.COLGROUP:break;default:TD(t,e)}}function Rde(t,e){if(t.openElements.hasInScope(O.BODY)&&(t.insertionMode=D.AFTER_BODY,t.options.sourceCodeLocationInfo)){const n=t.openElements.tryPeekProperlyNestedBodyElement();n&&t._setEndLocation(n,e)}}function Mde(t,e){t.openElements.hasInScope(O.BODY)&&(t.insertionMode=D.AFTER_BODY,GF(t,e))}function Ide(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n))}function Lde(t){const e=t.openElements.tmplCount>0,{formElement:n}=t;e||(t.formElement=null),(n||e)&&t.openElements.hasInScope(O.FORM)&&(t.openElements.generateImpliedEndTags(),e?t.openElements.popUntilTagNamePopped(O.FORM):n&&t.openElements.remove(n))}function Qde(t){t.openElements.hasInButtonScope(O.P)||t._insertFakeElement(M.P,O.P),t._closePElement()}function $de(t){t.openElements.hasInListItemScope(O.LI)&&(t.openElements.generateImpliedEndTagsWithExclusion(O.LI),t.openElements.popUntilTagNamePopped(O.LI))}function Fde(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTagsWithExclusion(n),t.openElements.popUntilTagNamePopped(n))}function Bde(t){t.openElements.hasNumberedHeaderInScope()&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilNumberedHeaderPopped())}function jde(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n),t.activeFormattingElements.clearToLastMarker())}function zde(t){t._reconstructActiveFormattingElements(),t._insertFakeElement(M.BR,O.BR),t.openElements.pop(),t.framesetOk=!1}function jF(t,e){const n=e.tagName,r=e.tagID;for(let i=t.openElements.stackTop;i>0;i--){const s=t.openElements.items[i],o=t.openElements.tagIDs[i];if(r===o&&(r!==O.UNKNOWN||t.treeAdapter.getTagName(s)===n)){t.openElements.generateImpliedEndTagsWithExclusion(r),t.openElements.stackTop>=i&&t.openElements.shortenToLength(i);break}if(t._isSpecialElement(s,o))break}}function Mm(t,e){switch(e.tagID){case O.A:case O.B:case O.I:case O.S:case O.U:case O.EM:case O.TT:case O.BIG:case O.CODE:case O.FONT:case O.NOBR:case O.SMALL:case O.STRIKE:case O.STRONG:{KT(t,e);break}case O.P:{Qde(t);break}case O.DL:case O.UL:case O.OL:case O.DIR:case O.DIV:case O.NAV:case O.PRE:case O.MAIN:case O.MENU:case O.ASIDE:case O.BUTTON:case O.CENTER:case O.FIGURE:case O.FOOTER:case O.HEADER:case O.HGROUP:case O.DIALOG:case O.ADDRESS:case O.ARTICLE:case O.DETAILS:case O.SEARCH:case O.SECTION:case O.SUMMARY:case O.LISTING:case O.FIELDSET:case O.BLOCKQUOTE:case O.FIGCAPTION:{Ide(t,e);break}case O.LI:{$de(t);break}case O.DD:case O.DT:{Fde(t,e);break}case O.H1:case O.H2:case O.H3:case O.H4:case O.H5:case O.H6:{Bde(t);break}case O.BR:{zde(t);break}case O.BODY:{Rde(t,e);break}case O.HTML:{Mde(t,e);break}case O.FORM:{Lde(t);break}case O.APPLET:case O.OBJECT:case O.MARQUEE:{jde(t,e);break}case O.TEMPLATE:{ia(t,e);break}default:jF(t,e)}}function zF(t,e){t.tmplInsertionModeStack.length>0?WF(t,e):JT(t,e)}function Vde(t,e){var n;e.tagID===O.SCRIPT&&((n=t.scriptHandler)===null||n===void 0||n.call(t,t.openElements.current)),t.openElements.pop(),t.insertionMode=t.originalInsertionMode}function Ude(t,e){t._err(e,F.eofInElementThatCanContainOnlyText),t.openElements.pop(),t.insertionMode=t.originalInsertionMode,t.onEof(e)}function IO(t,e){if(t.openElements.currentTagId!==void 0&&IF.has(t.openElements.currentTagId))switch(t.pendingCharacterTokens.length=0,t.hasNonWhitespacePendingCharacterToken=!1,t.originalInsertionMode=t.insertionMode,t.insertionMode=D.IN_TABLE_TEXT,e.type){case Fe.CHARACTER:{UF(t,e);break}case Fe.WHITESPACE_CHARACTER:{VF(t,e);break}}else lh(t,e)}function Hde(t,e){t.openElements.clearBackToTableContext(),t.activeFormattingElements.insertMarker(),t._insertElement(e,q.HTML),t.insertionMode=D.IN_CAPTION}function Xde(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,q.HTML),t.insertionMode=D.IN_COLUMN_GROUP}function qde(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(M.COLGROUP,O.COLGROUP),t.insertionMode=D.IN_COLUMN_GROUP,eS(t,e)}function Zde(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,q.HTML),t.insertionMode=D.IN_TABLE_BODY}function Wde(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(M.TBODY,O.TBODY),t.insertionMode=D.IN_TABLE_BODY,Im(t,e)}function Gde(t,e){t.openElements.hasInTableScope(O.TABLE)&&(t.openElements.popUntilTagNamePopped(O.TABLE),t._resetInsertionMode(),t._processStartTag(e))}function Yde(t,e){BF(e)?t._appendElement(e,q.HTML):lh(t,e),e.ackSelfClosing=!0}function Kde(t,e){!t.formElement&&t.openElements.tmplCount===0&&(t._insertElement(e,q.HTML),t.formElement=t.openElements.current,t.openElements.pop())}function hl(t,e){switch(e.tagID){case O.TD:case O.TH:case O.TR:{Wde(t,e);break}case O.STYLE:case O.SCRIPT:case O.TEMPLATE:{Lr(t,e);break}case O.COL:{qde(t,e);break}case O.FORM:{Kde(t,e);break}case O.TABLE:{Gde(t,e);break}case O.TBODY:case O.TFOOT:case O.THEAD:{Zde(t,e);break}case O.INPUT:{Yde(t,e);break}case O.CAPTION:{Hde(t,e);break}case O.COLGROUP:{Xde(t,e);break}default:lh(t,e)}}function xu(t,e){switch(e.tagID){case O.TABLE:{t.openElements.hasInTableScope(O.TABLE)&&(t.openElements.popUntilTagNamePopped(O.TABLE),t._resetInsertionMode());break}case O.TEMPLATE:{ia(t,e);break}case O.BODY:case O.CAPTION:case O.COL:case O.COLGROUP:case O.HTML:case O.TBODY:case O.TD:case O.TFOOT:case O.TH:case O.THEAD:case O.TR:break;default:lh(t,e)}}function lh(t,e){const n=t.fosterParentingEnabled;t.fosterParentingEnabled=!0,Rm(t,e),t.fosterParentingEnabled=n}function VF(t,e){t.pendingCharacterTokens.push(e)}function UF(t,e){t.pendingCharacterTokens.push(e),t.hasNonWhitespacePendingCharacterToken=!0}function Zl(t,e){let n=0;if(t.hasNonWhitespacePendingCharacterToken)for(;n<t.pendingCharacterTokens.length;n++)lh(t,t.pendingCharacterTokens[n]);else for(;n<t.pendingCharacterTokens.length;n++)t._insertCharacters(t.pendingCharacterTokens[n]);t.insertionMode=t.originalInsertionMode,t._processToken(e)}const HF=new Set([O.CAPTION,O.COL,O.COLGROUP,O.TBODY,O.TD,O.TFOOT,O.TH,O.THEAD,O.TR]);function Jde(t,e){const n=e.tagID;HF.has(n)?t.openElements.hasInTableScope(O.CAPTION)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(O.CAPTION),t.activeFormattingElements.clearToLastMarker(),t.insertionMode=D.IN_TABLE,hl(t,e)):vn(t,e)}function epe(t,e){const n=e.tagID;switch(n){case O.CAPTION:case O.TABLE:{t.openElements.hasInTableScope(O.CAPTION)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(O.CAPTION),t.activeFormattingElements.clearToLastMarker(),t.insertionMode=D.IN_TABLE,n===O.TABLE&&xu(t,e));break}case O.BODY:case O.COL:case O.COLGROUP:case O.HTML:case O.TBODY:case O.TD:case O.TFOOT:case O.TH:case O.THEAD:case O.TR:break;default:Mm(t,e)}}function eS(t,e){switch(e.tagID){case O.HTML:{vn(t,e);break}case O.COL:{t._appendElement(e,q.HTML),e.ackSelfClosing=!0;break}case O.TEMPLATE:{Lr(t,e);break}default:pf(t,e)}}function tpe(t,e){switch(e.tagID){case O.COLGROUP:{t.openElements.currentTagId===O.COLGROUP&&(t.openElements.pop(),t.insertionMode=D.IN_TABLE);break}case O.TEMPLATE:{ia(t,e);break}case O.COL:break;default:pf(t,e)}}function pf(t,e){t.openElements.currentTagId===O.COLGROUP&&(t.openElements.pop(),t.insertionMode=D.IN_TABLE,t._processToken(e))}function Im(t,e){switch(e.tagID){case O.TR:{t.openElements.clearBackToTableBodyContext(),t._insertElement(e,q.HTML),t.insertionMode=D.IN_ROW;break}case O.TH:case O.TD:{t.openElements.clearBackToTableBodyContext(),t._insertFakeElement(M.TR,O.TR),t.insertionMode=D.IN_ROW,Lm(t,e);break}case O.CAPTION:case O.COL:case O.COLGROUP:case O.TBODY:case O.TFOOT:case O.THEAD:{t.openElements.hasTableBodyContextInTableScope()&&(t.openElements.clearBackToTableBodyContext(),t.openElements.pop(),t.insertionMode=D.IN_TABLE,hl(t,e));break}default:hl(t,e)}}function sE(t,e){const n=e.tagID;switch(e.tagID){case O.TBODY:case O.TFOOT:case O.THEAD:{t.openElements.hasInTableScope(n)&&(t.openElements.clearBackToTableBodyContext(),t.openElements.pop(),t.insertionMode=D.IN_TABLE);break}case O.TABLE:{t.openElements.hasTableBodyContextInTableScope()&&(t.openElements.clearBackToTableBodyContext(),t.openElements.pop(),t.insertionMode=D.IN_TABLE,xu(t,e));break}case O.BODY:case O.CAPTION:case O.COL:case O.COLGROUP:case O.HTML:case O.TD:case O.TH:case O.TR:break;default:xu(t,e)}}function Lm(t,e){switch(e.tagID){case O.TH:case O.TD:{t.openElements.clearBackToTableRowContext(),t._insertElement(e,q.HTML),t.insertionMode=D.IN_CELL,t.activeFormattingElements.insertMarker();break}case O.CAPTION:case O.COL:case O.COLGROUP:case O.TBODY:case O.TFOOT:case O.THEAD:case O.TR:{t.openElements.hasInTableScope(O.TR)&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=D.IN_TABLE_BODY,Im(t,e));break}default:hl(t,e)}}function XF(t,e){switch(e.tagID){case O.TR:{t.openElements.hasInTableScope(O.TR)&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=D.IN_TABLE_BODY);break}case O.TABLE:{t.openElements.hasInTableScope(O.TR)&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=D.IN_TABLE_BODY,sE(t,e));break}case O.TBODY:case O.TFOOT:case O.THEAD:{(t.openElements.hasInTableScope(e.tagID)||t.openElements.hasInTableScope(O.TR))&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=D.IN_TABLE_BODY,sE(t,e));break}case O.BODY:case O.CAPTION:case O.COL:case O.COLGROUP:case O.HTML:case O.TD:case O.TH:break;default:xu(t,e)}}function npe(t,e){const n=e.tagID;HF.has(n)?(t.openElements.hasInTableScope(O.TD)||t.openElements.hasInTableScope(O.TH))&&(t._closeTableCell(),Lm(t,e)):vn(t,e)}function rpe(t,e){const n=e.tagID;switch(n){case O.TD:case O.TH:{t.openElements.hasInTableScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n),t.activeFormattingElements.clearToLastMarker(),t.insertionMode=D.IN_ROW);break}case O.TABLE:case O.TBODY:case O.TFOOT:case O.THEAD:case O.TR:{t.openElements.hasInTableScope(n)&&(t._closeTableCell(),XF(t,e));break}case O.BODY:case O.CAPTION:case O.COL:case O.COLGROUP:case O.HTML:break;default:Mm(t,e)}}function qF(t,e){switch(e.tagID){case O.HTML:{vn(t,e);break}case O.OPTION:{t.openElements.currentTagId===O.OPTION&&t.openElements.pop(),t._insertElement(e,q.HTML);break}case O.OPTGROUP:{t.openElements.currentTagId===O.OPTION&&t.openElements.pop(),t.openElements.currentTagId===O.OPTGROUP&&t.openElements.pop(),t._insertElement(e,q.HTML);break}case O.HR:{t.openElements.currentTagId===O.OPTION&&t.openElements.pop(),t.openElements.currentTagId===O.OPTGROUP&&t.openElements.pop(),t._appendElement(e,q.HTML),e.ackSelfClosing=!0;break}case O.INPUT:case O.KEYGEN:case O.TEXTAREA:case O.SELECT:{t.openElements.hasInSelectScope(O.SELECT)&&(t.openElements.popUntilTagNamePopped(O.SELECT),t._resetInsertionMode(),e.tagID!==O.SELECT&&t._processStartTag(e));break}case O.SCRIPT:case O.TEMPLATE:{Lr(t,e);break}}}function ZF(t,e){switch(e.tagID){case O.OPTGROUP:{t.openElements.stackTop>0&&t.openElements.currentTagId===O.OPTION&&t.openElements.tagIDs[t.openElements.stackTop-1]===O.OPTGROUP&&t.openElements.pop(),t.openElements.currentTagId===O.OPTGROUP&&t.openElements.pop();break}case O.OPTION:{t.openElements.currentTagId===O.OPTION&&t.openElements.pop();break}case O.SELECT:{t.openElements.hasInSelectScope(O.SELECT)&&(t.openElements.popUntilTagNamePopped(O.SELECT),t._resetInsertionMode());break}case O.TEMPLATE:{ia(t,e);break}}}function ipe(t,e){const n=e.tagID;n===O.CAPTION||n===O.TABLE||n===O.TBODY||n===O.TFOOT||n===O.THEAD||n===O.TR||n===O.TD||n===O.TH?(t.openElements.popUntilTagNamePopped(O.SELECT),t._resetInsertionMode(),t._processStartTag(e)):qF(t,e)}function spe(t,e){const n=e.tagID;n===O.CAPTION||n===O.TABLE||n===O.TBODY||n===O.TFOOT||n===O.THEAD||n===O.TR||n===O.TD||n===O.TH?t.openElements.hasInTableScope(n)&&(t.openElements.popUntilTagNamePopped(O.SELECT),t._resetInsertionMode(),t.onEndTag(e)):ZF(t,e)}function ope(t,e){switch(e.tagID){case O.BASE:case O.BASEFONT:case O.BGSOUND:case O.LINK:case O.META:case O.NOFRAMES:case O.SCRIPT:case O.STYLE:case O.TEMPLATE:case O.TITLE:{Lr(t,e);break}case O.CAPTION:case O.COLGROUP:case O.TBODY:case O.TFOOT:case O.THEAD:{t.tmplInsertionModeStack[0]=D.IN_TABLE,t.insertionMode=D.IN_TABLE,hl(t,e);break}case O.COL:{t.tmplInsertionModeStack[0]=D.IN_COLUMN_GROUP,t.insertionMode=D.IN_COLUMN_GROUP,eS(t,e);break}case O.TR:{t.tmplInsertionModeStack[0]=D.IN_TABLE_BODY,t.insertionMode=D.IN_TABLE_BODY,Im(t,e);break}case O.TD:case O.TH:{t.tmplInsertionModeStack[0]=D.IN_ROW,t.insertionMode=D.IN_ROW,Lm(t,e);break}default:t.tmplInsertionModeStack[0]=D.IN_BODY,t.insertionMode=D.IN_BODY,vn(t,e)}}function ape(t,e){e.tagID===O.TEMPLATE&&ia(t,e)}function WF(t,e){t.openElements.tmplCount>0?(t.openElements.popUntilTagNamePopped(O.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode(),t.onEof(e)):JT(t,e)}function lpe(t,e){e.tagID===O.HTML?vn(t,e):ff(t,e)}function GF(t,e){var n;if(e.tagID===O.HTML){if(t.fragmentContext||(t.insertionMode=D.AFTER_AFTER_BODY),t.options.sourceCodeLocationInfo&&t.openElements.tagIDs[0]===O.HTML){t._setEndLocation(t.openElements.items[0],e);const r=t.openElements.items[1];r&&!(!((n=t.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&t._setEndLocation(r,e)}}else ff(t,e)}function ff(t,e){t.insertionMode=D.IN_BODY,Rm(t,e)}function cpe(t,e){switch(e.tagID){case O.HTML:{vn(t,e);break}case O.FRAMESET:{t._insertElement(e,q.HTML);break}case O.FRAME:{t._appendElement(e,q.HTML),e.ackSelfClosing=!0;break}case O.NOFRAMES:{Lr(t,e);break}}}function upe(t,e){e.tagID===O.FRAMESET&&!t.openElements.isRootHtmlElementCurrent()&&(t.openElements.pop(),!t.fragmentContext&&t.openElements.currentTagId!==O.FRAMESET&&(t.insertionMode=D.AFTER_FRAMESET))}function hpe(t,e){switch(e.tagID){case O.HTML:{vn(t,e);break}case O.NOFRAMES:{Lr(t,e);break}}}function dpe(t,e){e.tagID===O.HTML&&(t.insertionMode=D.AFTER_AFTER_FRAMESET)}function ppe(t,e){e.tagID===O.HTML?vn(t,e):Zd(t,e)}function Zd(t,e){t.insertionMode=D.IN_BODY,Rm(t,e)}function fpe(t,e){switch(e.tagID){case O.HTML:{vn(t,e);break}case O.NOFRAMES:{Lr(t,e);break}}}function mpe(t,e){e.chars=dt,t._insertCharacters(e)}function gpe(t,e){t._insertCharacters(e),t.framesetOk=!1}function YF(t){for(;t.treeAdapter.getNamespaceURI(t.openElements.current)!==q.HTML&&t.openElements.currentTagId!==void 0&&!t._isIntegrationPoint(t.openElements.currentTagId,t.openElements.current);)t.openElements.pop()}function Ope(t,e){if(Nhe(e))YF(t),t._startTagOutsideForeignContent(e);else{const n=t._getAdjustedCurrentElement(),r=t.treeAdapter.getNamespaceURI(n);r===q.MATHML?RF(e):r===q.SVG&&(Rhe(e),MF(e)),YT(e),e.selfClosing?t._appendElement(e,r):t._insertElement(e,r),e.ackSelfClosing=!0}}function ype(t,e){if(e.tagID===O.P||e.tagID===O.BR){YF(t),t._endTagOutsideForeignContent(e);return}for(let n=t.openElements.stackTop;n>0;n--){const r=t.openElements.items[n];if(t.treeAdapter.getNamespaceURI(r)===q.HTML){t._endTagOutsideForeignContent(e);break}const i=t.treeAdapter.getTagName(r);if(i.toLowerCase()===e.tagName){e.tagName=i,t.openElements.shortenToLength(n);break}}}M.AREA,M.BASE,M.BASEFONT,M.BGSOUND,M.BR,M.COL,M.EMBED,M.FRAME,M.HR,M.IMG,M.INPUT,M.KEYGEN,M.LINK,M.META,M.PARAM,M.SOURCE,M.TRACK,M.WBR;function bpe(t,e){return LF.parse(t,e)}function Epe(t,e,n){typeof t=="string"&&(n=e,e=t,t=null);const r=LF.getFragmentParser(t,n);return r.tokenizer.write(e,!0),r.getFragment()}function vpe(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?SD(t.position):"start"in t||"end"in t?SD(t):"line"in t||"column"in t?oE(t):""}function oE(t){return wD(t&&t.line)+":"+wD(t&&t.column)}function SD(t){return oE(t&&t.start)+"-"+oE(t&&t.end)}function wD(t){return t&&typeof t=="number"?t:1}class an extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof e=="string"?i=e:!s.cause&&e&&(o=!0,i=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const a=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=vpe(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}an.prototype.file="";an.prototype.name="";an.prototype.reason="";an.prototype.message="";an.prototype.stack="";an.prototype.column=void 0;an.prototype.line=void 0;an.prototype.ancestors=void 0;an.prototype.cause=void 0;an.prototype.fatal=void 0;an.prototype.place=void 0;an.prototype.ruleId=void 0;an.prototype.source=void 0;const Yr={basename:Tpe,dirname:Spe,extname:wpe,join:kpe,sep:"/"};function Tpe(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');ch(t);let n=0,r=-1,i=t.length,s;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":t.slice(n,r)}if(e===t)return"";let o=-1,a=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(s){n=i+1;break}}else o<0&&(s=!0,o=i+1),a>-1&&(t.codePointAt(i)===e.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return n===r?r=o:r<0&&(r=t.length),t.slice(n,r)}function Spe(t){if(ch(t),t.length===0)return".";let e=-1,n=t.length,r;for(;--n;)if(t.codePointAt(n)===47){if(r){e=n;break}}else r||(r=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function wpe(t){ch(t);let e=t.length,n=-1,r=0,i=-1,s=0,o;for(;e--;){const a=t.codePointAt(e);if(a===47){if(o){r=e+1;break}continue}n<0&&(o=!0,n=e+1),a===46?i<0?i=e:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":t.slice(i,n)}function kpe(...t){let e=-1,n;for(;++e<t.length;)ch(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":_pe(n)}function _pe(t){ch(t);const e=t.codePointAt(0)===47;let n=xpe(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function xpe(t,e){let n="",r=0,i=-1,s=0,o=-1,a,l;for(;++o<=t.length;){if(o<t.length)a=t.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||s===1))if(i!==o-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=o,s=0;continue}}else if(n.length>0){n="",r=0,i=o,s=0;continue}}e&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+t.slice(i+1,o):n=t.slice(i+1,o),r=o-i-1;i=o,s=0}else a===46&&s>-1?s++:s=-1}return n}function ch(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const Cpe={cwd:Dpe};function Dpe(){return"/"}function aE(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Ape(t){if(typeof t=="string")t=new URL(t);else if(!aE(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return Ppe(t)}function Ppe(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const e=t.pathname;let n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){const r=e.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(e)}const LO=["history","path","basename","stem","extname","dirname"];class lE{constructor(e){let n;e?aE(e)?n={path:e}:typeof e=="string"||Npe(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":Cpe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<LO.length;){const s=LO[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)LO.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Yr.basename(this.path):void 0}set basename(e){$O(e,"basename"),QO(e,"basename"),this.path=Yr.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Yr.dirname(this.path):void 0}set dirname(e){kD(this.basename,"dirname"),this.path=Yr.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Yr.extname(this.path):void 0}set extname(e){if(QO(e,"extname"),kD(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=Yr.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){aE(e)&&(e=Ape(e)),$O(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Yr.basename(this.path,this.extname):void 0}set stem(e){$O(e,"stem"),QO(e,"stem"),this.path=Yr.join(this.dirname||"",e+(this.extname||""))}fail(e,n,r){const i=this.message(e,n,r);throw i.fatal=!0,i}info(e,n,r){const i=this.message(e,n,r);return i.fatal=void 0,i}message(e,n,r){const i=new an(e,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function QO(t,e){if(t&&t.includes(Yr.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+Yr.sep+"`")}function $O(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function kD(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function Npe(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Rpe={abandonedHeadElementChild:{reason:"Unexpected metadata element after head",description:"Unexpected element after head. Expected the element before `</head>`",url:!1},abruptClosingOfEmptyComment:{reason:"Unexpected abruptly closed empty comment",description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier:{reason:"Unexpected abruptly closed public identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier:{reason:"Unexpected abruptly closed system identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:"Unexpected non-digit at start of numeric character reference",description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:"Unexpected CDATA section in HTML",description:"Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange:{reason:"Unexpected too big numeric character reference",description:"Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)"},closingOfElementWithOpenChildElements:{reason:"Unexpected closing tag with open child elements",description:"Unexpectedly closing tag. Expected other tags to be closed first",url:!1},controlCharacterInInputStream:{reason:"Unexpected control character",description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference:{reason:"Unexpected control character reference",description:"Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace"},disallowedContentInNoscriptInHead:{reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute:{reason:"Unexpected duplicate attribute",description:"Unexpectedly double attribute. Expected attributes to occur only once"},endTagWithAttributes:{reason:"Unexpected attribute on closing tag",description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus:{reason:"Unexpected slash at end of closing tag",description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement:{reason:"Unexpected unopened end tag",description:"Unexpected end tag. Expected no end tag or another end tag",url:!1},eofBeforeTagName:{reason:"Unexpected end of file",description:"Unexpected end of file. Expected tag name instead"},eofInCdata:{reason:"Unexpected end of file in CDATA",description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment:{reason:"Unexpected end of file in comment",description:"Unexpected end of file. Expected `-->` to close the comment"},eofInDoctype:{reason:"Unexpected end of file in doctype",description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText:{reason:"Unexpected end of file in element that can only contain text",description:"Unexpected end of file. Expected text or a closing tag",url:!1},eofInScriptHtmlCommentLikeText:{reason:"Unexpected end of file in comment inside script",description:"Unexpected end of file. Expected `-->` to close the comment"},eofInTag:{reason:"Unexpected end of file in tag",description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment:{reason:"Incorrectly closed comment",description:"Unexpected `%c-1`. Expected `-->` to close the comment"},incorrectlyOpenedComment:{reason:"Incorrectly opened comment",description:"Unexpected `%c`. Expected `<!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName:{reason:"Invalid sequence after doctype name",description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName:{reason:"Invalid first character in tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype:{reason:"Misplaced doctype",description:"Unexpected doctype. Expected doctype before head",url:!1},misplacedStartTagForHeadElement:{reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue:{reason:"Missing attribute value",description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype:{reason:"Missing doctype before other content",description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName:{reason:"Missing doctype name",description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier:{reason:"Missing public identifier in doctype",description:"Unexpected `%c`. Expected identifier for `public` instead"},missingDoctypeSystemIdentifier:{reason:"Missing system identifier in doctype",description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName:{reason:"Missing name in end tag",description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier:{reason:"Missing quote before public identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier:{reason:"Missing quote before system identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference:{reason:"Missing semicolon after character reference",description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword:{reason:"Missing whitespace after public identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword:{reason:"Missing whitespace after system identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName:{reason:"Missing whitespace before doctype name",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes:{reason:"Missing whitespace between attributes",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:{reason:"Missing whitespace between public and system identifiers in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment:{reason:"Unexpected nested comment",description:"Unexpected `<!--`. Expected `-->`"},nestedNoscriptInHead:{reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype:{reason:"Unexpected non-conforming doctype declaration",description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus:{reason:"Unexpected trailing slash on start tag of non-void element",description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference:{reason:"Unexpected noncharacter code point referenced by character reference",description:"Unexpected code point. Do not use noncharacters in HTML"},noncharacterInInputStream:{reason:"Unexpected noncharacter character",description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference:{reason:"Unexpected NULL character referenced by character reference",description:"Unexpected code point. Do not use NULL characters in HTML"},openElementsLeftAfterEof:{reason:"Unexpected end of file",description:"Unexpected end of file. Expected closing tag instead",url:!1},surrogateCharacterReference:{reason:"Unexpected surrogate character referenced by character reference",description:"Unexpected code point. Do not use lone surrogate characters in HTML"},surrogateInInputStream:{reason:"Unexpected surrogate character",description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier:{reason:"Invalid character after system identifier in doctype",description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName:{reason:"Unexpected character in attribute name",description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue:{reason:"Unexpected character in unquoted attribute value",description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName:{reason:"Unexpected equals sign before attribute name",description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter:{reason:"Unexpected NULL character",description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName:{reason:"Unexpected question mark instead of tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag:{reason:"Unexpected slash in tag",description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference:{reason:"Unexpected unknown named character reference",description:"Unexpected character reference. Expected known named character references"}},Mpe="https://html.spec.whatwg.org/multipage/parsing.html#parse-error-",Ipe=/-[a-z]/g,Lpe=/%c(?:([-+])(\d+))?/g,Qpe=/%x/g,$pe={2:!0,1:!1,0:null},Fpe={};function Bpe(t,e){const n=e||Fpe,r=n.onerror,i=t instanceof lE?t:new lE(t),s=n.fragment?Epe:bpe,o=String(i),a=s(o,{sourceCodeLocationInfo:!0,onParseError:n.onerror?l:null,scriptingEnabled:!1});return zue(a,{file:i,space:n.space,verbose:n.verbose});function l(c){const u=c.code,h=jpe(u),d=n[h],p=d??!0,f=typeof p=="number"?p:p?1:0;if(f){const g=Rpe[h],y=new an(m(g.reason),{place:{start:{line:c.startLine,column:c.startCol,offset:c.startOffset},end:{line:c.endLine,column:c.endCol,offset:c.endOffset}},ruleId:u,source:"hast-util-from-html"});i.path&&(y.file=i.path,y.name=i.path+":"+y.name),y.fatal=$pe[f],y.note=m(g.description),y.url=g.url===!1?void 0:Mpe+u,r(y)}function m(g){return g.replace(Lpe,y).replace(Qpe,b);function y(T,S,w){const A=(w?Number.parseInt(w,10):0)*(S==="-"?-1:1),C=o.charAt(c.startOffset+A);return Vpe(C)}function b(){return Upe(o.charCodeAt(c.startOffset))}}}}function jpe(t){return t.replace(Ipe,zpe)}function zpe(t){return t.charAt(1).toUpperCase()}function Vpe(t){return t==="`"?"` ` `":t}function Upe(t){return"0x"+t.toString(16).toUpperCase()}function Hpe(t){const e=this,{emitParseErrors:n,...r}={...e.data("settings"),...t};e.parser=i;function i(s,o){return Bpe(s,{...r,onerror:n?function(a){o.path&&(a.name=o.path+":"+a.name,a.file=o.path),o.messages.push(a)}:void 0})}}const Xpe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qpe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Zpe={};function _D(t,e){return(Zpe.jsx?qpe:Xpe).test(t)}const Wpe=/[ \t\n\f\r]/g;function Qm(t){return typeof t=="object"?t.type==="text"?xD(t.value):!1:xD(t)}function xD(t){return t.replace(Wpe,"")===""}var ga={},FO,CD;function Gpe(){if(CD)return FO;CD=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,a=/^\s+|\s+$/g,l=`
`,c="/",u="*",h="",d="comment",p="declaration";function f(g,y){if(typeof g!="string")throw new TypeError("First argument must be a string");if(!g)return[];y=y||{};var b=1,T=1;function S(j){var U=j.match(e);U&&(b+=U.length);var J=j.lastIndexOf(l);T=~J?j.length-J:T+j.length}function w(){var j={line:b,column:T};return function(U){return U.position=new A(j),$(),U}}function A(j){this.start=j,this.end={line:b,column:T},this.source=y.source}A.prototype.content=g;function C(j){var U=new Error(y.source+":"+b+":"+T+": "+j);if(U.reason=j,U.filename=y.source,U.line=b,U.column=T,U.source=g,!y.silent)throw U}function N(j){var U=j.exec(g);if(U){var J=U[0];return S(J),g=g.slice(J.length),U}}function $(){N(n)}function I(j){var U;for(j=j||[];U=L();)U!==!1&&j.push(U);return j}function L(){var j=w();if(!(c!=g.charAt(0)||u!=g.charAt(1))){for(var U=2;h!=g.charAt(U)&&(u!=g.charAt(U)||c!=g.charAt(U+1));)++U;if(U+=2,h===g.charAt(U-1))return C("End of comment missing");var J=g.slice(2,U-2);return T+=2,S(J),g=g.slice(U),T+=2,j({type:d,comment:J})}}function Z(){var j=w(),U=N(r);if(U){if(L(),!N(i))return C("property missing ':'");var J=N(s),fe=j({type:p,property:m(U[0].replace(t,h)),value:J?m(J[0].replace(t,h)):h});return N(o),fe}}function B(){var j=[];I(j);for(var U;U=Z();)U!==!1&&(j.push(U),I(j));return j}return $(),B()}function m(g){return g?g.replace(a,h):h}return FO=f,FO}var DD;function Ype(){if(DD)return ga;DD=1;var t=ga&&ga.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ga,"__esModule",{value:!0}),ga.default=n;const e=t(Gpe());function n(r,i){let s=null;if(!r||typeof r!="string")return s;const o=(0,e.default)(r),a=typeof i=="function";return o.forEach(l=>{if(l.type!=="declaration")return;const{property:c,value:u}=l;a?i(c,u,l):u&&(s=s||{},s[c]=u)}),s}return ga}var Wl={},AD;function Kpe(){if(AD)return Wl;AD=1,Object.defineProperty(Wl,"__esModule",{value:!0}),Wl.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(c){return!c||n.test(c)||t.test(c)},o=function(c,u){return u.toUpperCase()},a=function(c,u){return"".concat(u,"-")},l=function(c,u){return u===void 0&&(u={}),s(c)?c:(c=c.toLowerCase(),u.reactCompat?c=c.replace(i,a):c=c.replace(r,a),c.replace(e,o))};return Wl.camelCase=l,Wl}var Gl,PD;function Jpe(){if(PD)return Gl;PD=1;var t=Gl&&Gl.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},e=t(Ype()),n=Kpe();function r(i,s){var o={};return!i||typeof i!="string"||(0,e.default)(i,function(a,l){a&&l&&(o[(0,n.camelCase)(a,s)]=l)}),o}return r.default=r,Gl=r,Gl}var efe=Jpe();const tfe=$f(efe),nfe=rfe("start");function rfe(t){return e;function e(n){const r=n&&n.position&&n.position[t]||{};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}}}const tS={}.hasOwnProperty,ife=new Map,sfe=/[A-Z]/g,ofe=new Set(["table","tbody","thead","tfoot","tr"]),afe=new Set(["td","th"]),KF="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function JF(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let r;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=mfe(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=ffe(n,e.jsx,e.jsxs)}const i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:r,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?io:ah,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},s=eB(i,t,void 0);return s&&typeof s!="string"?s:i.create(t,i.Fragment,{children:s||void 0},void 0)}function eB(t,e,n){if(e.type==="element")return lfe(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return cfe(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return hfe(t,e,n);if(e.type==="mdxjsEsm")return ufe(t,e);if(e.type==="root")return dfe(t,e,n);if(e.type==="text")return pfe(t,e)}function lfe(t,e,n){const r=t.schema;let i=r;e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=io,t.schema=i),t.ancestors.push(e);const s=nB(t,e.tagName,!1),o=gfe(t,e);let a=rS(t,e);return ofe.has(e.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!Qm(l):!0})),tB(t,o,s,e),nS(o,a),t.ancestors.pop(),t.schema=r,t.create(e,s,o,n)}function cfe(t,e){if(e.data&&e.data.estree&&t.evaluater){const n=e.data.estree.body[0];return n.type,t.evaluater.evaluateExpression(n.expression)}Cu(t,e.position)}function ufe(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);Cu(t,e.position)}function hfe(t,e,n){const r=t.schema;let i=r;e.name==="svg"&&r.space==="html"&&(i=io,t.schema=i),t.ancestors.push(e);const s=e.name===null?t.Fragment:nB(t,e.name,!0),o=Ofe(t,e),a=rS(t,e);return tB(t,o,s,e),nS(o,a),t.ancestors.pop(),t.schema=r,t.create(e,s,o,n)}function dfe(t,e,n){const r={};return nS(r,rS(t,e)),t.create(e,t.Fragment,r,n)}function pfe(t,e){return e.value}function tB(t,e,n,r){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=r)}function nS(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function ffe(t,e,n){return r;function r(i,s,o,a){const l=Array.isArray(o.children)?n:e;return a?l(s,o,a):l(s,o)}}function mfe(t,e){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=nfe(r);return e(i,s,o,a,{columnNumber:l?l.column-1:void 0,fileName:t,lineNumber:l?l.line:void 0},void 0)}}function gfe(t,e){const n={};let r,i;for(i in e.properties)if(i!=="children"&&tS.call(e.properties,i)){const s=yfe(t,i,e.properties[i]);if(s){const[o,a]=s;t.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&afe.has(e.tagName)?r=a:n[o]=a}}if(r){const s=n.style||(n.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Ofe(t,e){const n={};for(const r of e.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const i=r.data.estree.body[0];i.type;const s=i.expression;s.type;const o=s.properties[0];o.type,Object.assign(n,t.evaluater.evaluateExpression(o.argument))}else Cu(t,e.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const o=r.value.data.estree.body[0];o.type,s=t.evaluater.evaluateExpression(o.expression)}else Cu(t,e.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function rS(t,e){const n=[];let r=-1;const i=t.passKeys?new Map:ife;for(;++r<e.children.length;){const s=e.children[r];let o;if(t.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const c=i.get(l)||0;o=l+"-"+c,i.set(l,c+1)}}const a=eB(t,s,o);a!==void 0&&n.push(a)}return n}function yfe(t,e,n){const r=Pm(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?bF(n):EF(n)),r.property==="style"){let i=typeof n=="object"?n:bfe(t,String(n));return t.stylePropertyNameCase==="css"&&(i=Efe(i)),["style",i]}return[t.elementAttributeNameCase==="react"&&r.space?_ue[r.property]||r.property:r.attribute,n]}}function bfe(t,e){try{return tfe(e,{reactCompat:!0})}catch(n){if(t.ignoreInvalidStyle)return{};const r=n,i=new an("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=KF+"#cannot-parse-style-attribute",i}}function nB(t,e,n){let r;if(!n)r={type:"Literal",value:e};else if(e.includes(".")){const i=e.split(".");let s=-1,o;for(;++s<i.length;){const a=_D(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(s&&a.type==="Literal"),optional:!1}:a}r=o}else r=_D(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(r.type==="Literal"){const i=r.value;return tS.call(t.components,i)?t.components[i]:i}if(t.evaluater)return t.evaluater.evaluateExpression(r);Cu(t)}function Cu(t,e){const n=new an("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=t.filePath||void 0,n.url=KF+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Efe(t){const e={};let n;for(n in t)tS.call(t,n)&&(e[vfe(n)]=t[n]);return e}function vfe(t){let e=t.replace(sfe,Tfe);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function Tfe(t){return"-"+t.toLowerCase()}function Sfe(t){const e=this;e.compiler=n;function n(r,i){return JF(r,{filePath:i.path,...t})}}function ND(t){if(t)throw t}var BO,RD;function wfe(){if(RD)return BO;RD=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(l){return typeof Array.isArray=="function"?Array.isArray(l):e.call(l)==="[object Array]"},s=function(l){if(!l||e.call(l)!=="[object Object]")return!1;var c=t.call(l,"constructor"),u=l.constructor&&l.constructor.prototype&&t.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!c&&!u)return!1;var h;for(h in l);return typeof h>"u"||t.call(l,h)},o=function(l,c){n&&c.name==="__proto__"?n(l,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):l[c.name]=c.newValue},a=function(l,c){if(c==="__proto__")if(t.call(l,c)){if(r)return r(l,c).value}else return;return l[c]};return BO=function l(){var c,u,h,d,p,f,m=arguments[0],g=1,y=arguments.length,b=!1;for(typeof m=="boolean"&&(b=m,m=arguments[1]||{},g=2),(m==null||typeof m!="object"&&typeof m!="function")&&(m={});g<y;++g)if(c=arguments[g],c!=null)for(u in c)h=a(m,u),d=a(c,u),m!==d&&(b&&d&&(s(d)||(p=i(d)))?(p?(p=!1,f=h&&i(h)?h:[]):f=h&&s(h)?h:{},o(m,{name:u,newValue:l(b,f,d)})):typeof d<"u"&&o(m,{name:u,newValue:d}));return m},BO}var kfe=wfe();const jO=$f(kfe);function cE(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function _fe(){const t=[],e={run:n,use:r};return e;function n(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(l,...c){const u=t[++s];let h=-1;if(l){o(l);return}for(;++h<i.length;)(c[h]===null||c[h]===void 0)&&(c[h]=i[h]);i=c,u?xfe(u,a)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function xfe(t,e){let n;return r;function r(...o){const a=t.length>o.length;let l;a&&o.push(i);try{l=t.apply(this,o)}catch(c){const u=c;if(a&&n)throw u;return i(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(o,...a){n||(n=!0,e(o,...a))}function s(o){i(null,o)}}const Cfe=(function(t){const e=this.constructor.prototype,n=e[t],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,e),r}),Dfe={}.hasOwnProperty;class iS extends Cfe{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=_fe()}copy(){const e=new iS;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];e.use(...r)}return e.data(jO(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(UO("data",this.frozen),this.namespace[e]=n,this):Dfe.call(this.namespace,e)&&this.namespace[e]||void 0:e?(UO("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=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(e,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=fd(e),r=this.parser||this.Parser;return zO("parse",r),r(String(n),n)}process(e,n){const r=this;return this.freeze(),zO("process",this.parser||this.Parser),VO("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=fd(e),l=r.parse(a);r.run(l,a,function(u,h,d){if(u||!h||!d)return c(u);const p=h,f=r.stringify(p,d);Nfe(f)?d.value=f:d.result=f,c(u,d)});function c(u,h){u||!h?o(u):s?s(h):n(void 0,h)}}}processSync(e){let n=!1,r;return this.freeze(),zO("processSync",this.parser||this.Parser),VO("processSync",this.compiler||this.Compiler),this.process(e,i),ID("processSync","process",n),r;function i(s,o){n=!0,ND(s),r=o}}run(e,n,r){MD(e),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(o,a){const l=fd(n);i.run(e,l,c);function c(u,h,d){const p=h||e;u?a(u):o?o(p):r(void 0,p,d)}}}runSync(e,n){let r=!1,i;return this.run(e,n,s),ID("runSync","run",r),i;function s(o,a){ND(o),i=a,r=!0}}stringify(e,n){this.freeze();const r=fd(n),i=this.compiler||this.Compiler;return VO("stringify",i),MD(e),i(e,r)}use(e,...n){const r=this.attachers,i=this.namespace;if(UO("use",this.frozen),e!=null)if(typeof e=="function")l(e,n);else if(typeof e=="object")Array.isArray(e)?a(e):o(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function s(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...h]=c;l(u,h)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))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");a(c.plugins),c.settings&&(i.settings=jO(!0,i.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const h=c[u];s(h)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let h=-1,d=-1;for(;++h<r.length;)if(r[h][0]===c){d=h;break}if(d===-1)r.push([c,...u]);else if(u.length>0){let[p,...f]=u;const m=r[d][1];cE(m)&&cE(p)&&(p=jO(!0,m,p)),r[d]=[c,p,...f]}}}}const Afe=new iS().freeze();function zO(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function VO(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function UO(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function MD(t){if(!cE(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function ID(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function fd(t){return Pfe(t)?t:new lE(t)}function Pfe(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function Nfe(t){return typeof t=="string"||Rfe(t)}function Rfe(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const rB=(function(t){if(t==null)return Qfe;if(typeof t=="function")return $m(t);if(typeof t=="object")return Array.isArray(t)?Mfe(t):Ife(t);if(typeof t=="string")return Lfe(t);throw new Error("Expected function, string, or object as test")});function Mfe(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=rB(t[n]);return $m(r);function r(...i){let s=-1;for(;++s<e.length;)if(e[s].apply(this,i))return!0;return!1}}function Ife(t){const e=t;return $m(n);function n(r){const i=r;let s;for(s in t)if(i[s]!==e[s])return!1;return!0}}function Lfe(t){return $m(e);function e(n){return n&&n.type===t}}function $m(t){return e;function e(n,r,i){return!!($fe(n)&&t.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Qfe(){return!0}function $fe(t){return t!==null&&typeof t=="object"&&"type"in t}const iB=[],Ffe=!0,LD=!1,Bfe="skip";function jfe(t,e,n,r){let i;typeof e=="function"&&typeof n!="function"?(r=n,n=e):i=e;const s=rB(i),o=r?-1:1;a(t,void 0,[])();function a(l,c,u){const h=l&&typeof l=="object"?l:{};if(typeof h.type=="string"){const p=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return d;function d(){let p=iB,f,m,g;if((!e||s(l,c,u[u.length-1]||void 0))&&(p=zfe(n(l,u)),p[0]===LD))return p;if("children"in l&&l.children){const y=l;if(y.children&&p[0]!==Bfe)for(m=(r?y.children.length:-1)+o,g=u.concat(y);m>-1&&m<y.children.length;){const b=y.children[m];if(f=a(b,m,g)(),f[0]===LD)return f;m=typeof f[1]=="number"?f[1]:m+o}}return p}}}function zfe(t){return Array.isArray(t)?t:typeof t=="number"?[Ffe,t]:t==null?iB:[t]}function Vfe(t,e,n,r){let i,s,o;s=e,o=n,i=r,jfe(t,s,a,i);function a(l,c){const u=c[c.length-1],h=u?u.children.indexOf(l):void 0;return o(l,h,u)}}const Ufe=()=>t=>(Vfe(t,"element",e=>{if(["h2","h3","h4"].includes(e.tagName)){const n=e.children[0].type==="text"?e.children[0].value:"";e.properties={...e.properties,id:Hfe(n)}}}),t);function Hfe(t){return t.toLowerCase().normalize("NFKD").replace(/[^\w\s-]+/g,"").replace(/[-\s]+/g,"-").trim().replace(/^-+|-+$/g,"")}function sB({components:t}={}){return Afe().use(Hpe,{fragment:!0}).use(Ufe).use(Sfe,{Fragment:E.Fragment,jsx:E.jsx,jsxs:E.jsxs,components:t})}const Xfe=({code:t})=>{const[e,n]=v.useState(!1);return E.jsx("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText(t),n(!0),setTimeout(()=>n(!1),2e3)}catch{}},className:"invisible absolute top-2 right-2 z-20 bg-transparent p-2 group-hover:visible",children:e?E.jsx(oM,{size:18}):E.jsx(aM,{size:18})})},HO=({level:t,children:e,id:n})=>{const r=`h${t}`;return E.jsx(r,{id:n,children:e})};let Pt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function qfe(t){return sS(t)}function sS(t){return Array.isArray(t)?Zfe(t):t instanceof RegExp?t:typeof t=="object"?Wfe(t):t}function Zfe(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=sS(t[n]);return e}function Wfe(t){let e={};for(let n in t)e[n]=sS(t[n]);return e}function oB(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function aB(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?aB(t.substring(0,t.length-1)):t.substr(~e+1)}var XO=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,md=class{static hasCaptures(t){return t===null?!1:(XO.lastIndex=0,XO.test(t))}static replaceCaptures(t,e,n){return t.replace(XO,(r,i,s,o)=>{let a=n[parseInt(i||s,10)];if(a){let l=e.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(o){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function lB(t,e){return t<e?-1:t>e?1:0}function cB(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let i=0;i<n;i++){let s=lB(t[i],e[i]);if(s!==0)return s}return 0}return n-r}function QD(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function uB(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var hB=class{constructor(t){V(this,"cache",new Map);this.fn=t}get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},mf=class{constructor(t,e,n){V(this,"_cachedMatchRoot",new hB(t=>this._root.match(t)));this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(Kfe(t),e)}static createFromParsedTheme(t,e){return eme(t,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,n=this._cachedMatchRoot.get(e).find(r=>Gfe(t.parent,r.parentScopes));return n?new dB(n.fontStyle,n.foreground,n.background):null}},qO=class Wd{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const r of n)e=new Wd(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new Wd(n,e[r]);return n}push(e){return new Wd(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function Gfe(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],i=!0}for(;t&&!Yfe(t.scopeName,r);){if(i)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Yfe(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var dB=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function Kfe(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let i=0,s=e.length;i<s;i++){let o=e[i];if(!o.settings)continue;let a;if(typeof o.scope=="string"){let h=o.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),a=h.split(",")}else Array.isArray(o.scope)?a=o.scope:a=[""];let l=-1;if(typeof o.settings.fontStyle=="string"){l=0;let h=o.settings.fontStyle.split(" ");for(let d=0,p=h.length;d<p;d++)switch(h[d]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let c=null;typeof o.settings.foreground=="string"&&QD(o.settings.foreground)&&(c=o.settings.foreground);let u=null;typeof o.settings.background=="string"&&QD(o.settings.background)&&(u=o.settings.background);for(let h=0,d=a.length;h<d;h++){let p=a[h].trim().split(" "),f=p[p.length-1],m=null;p.length>1&&(m=p.slice(0,p.length-1),m.reverse()),n[r++]=new Jfe(f,m,i,l,c,u)}}return n}var Jfe=class{constructor(t,e,n,r,i,s){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=i,this.background=s}},mn=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(mn||{});function eme(t,e){t.sort((l,c)=>{let u=lB(l.scope,c.scope);return u!==0||(u=cB(l.parentScopes,c.parentScopes),u!==0)?u:l.index-c.index});let n=0,r="#000000",i="#ffffff";for(;t.length>=1&&t[0].scope==="";){let l=t.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(i=l.background)}let s=new tme(e),o=new dB(n,s.getId(r),s.getId(i)),a=new rme(new uE(0,null,-1,0,0),[]);for(let l=0,c=t.length;l<c;l++){let u=t[l];a.insert(0,u.scope,u.parentScopes,u.fontStyle,s.getId(u.foreground),s.getId(u.background))}return new mf(s,o,a)}var tme=class{constructor(t){V(this,"_isFrozen");V(this,"_lastColorId");V(this,"_id2color");V(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},nme=Object.freeze([]),uE=class pB{constructor(e,n,r,i,s){V(this,"scopeDepth");V(this,"parentScopes");V(this,"fontStyle");V(this,"foreground");V(this,"background");this.scopeDepth=e,this.parentScopes=n||nme,this.fontStyle=r,this.foreground=i,this.background=s}clone(){return new pB(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,i=e.length;r<i;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},rme=class hE{constructor(e,n=[],r={}){V(this,"_rulesWithParentScopes");this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,i=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=e.parentScopes.length||i>=n.parentScopes.length);){const s=n.parentScopes[i].length-e.parentScopes[r].length;if(s!==0)return s;r++,i++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),i,s;if(r===-1?(i=e,s=""):(i=e.substring(0,r),s=e.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(s)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(hE._cmpBySpecificity),n}insert(e,n,r,i,s,o){if(n===""){this._doInsertHere(e,r,i,s,o);return}let a=n.indexOf("."),l,c;a===-1?(l=n,c=""):(l=n.substring(0,a),c=n.substring(a+1));let u;this._children.hasOwnProperty(l)?u=this._children[l]:(u=new hE(this._mainRule.clone(),uE.cloneArr(this._rulesWithParentScopes)),this._children[l]=u),u.insert(e+1,c,r,i,s,o)}_doInsertHere(e,n,r,i,s){if(n===null){this._mainRule.acceptOverwrite(e,r,i,s);return}for(let o=0,a=this._rulesWithParentScopes.length;o<a;o++){let l=this._rulesWithParentScopes[o];if(cB(l.parentScopes,n)===0){l.acceptOverwrite(e,r,i,s);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new uE(e,n,r,i,s))}},dl=class tr{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=tr.getLanguageId(e),r=tr.getTokenType(e),i=tr.getFontStyle(e),s=tr.getForeground(e),o=tr.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:s,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,i,s,o,a){let l=tr.getLanguageId(e),c=tr.getTokenType(e),u=tr.containsBalancedBrackets(e)?1:0,h=tr.getFontStyle(e),d=tr.getForeground(e),p=tr.getBackground(e);return n!==0&&(l=n),r!==8&&(c=r),i!==null&&(u=i?1:0),s!==-1&&(h=s),o!==0&&(d=o),a!==0&&(p=a),(l<<0|c<<8|u<<10|h<<11|d<<15|p<<24)>>>0}};function gf(t,e){const n=[],r=ime(t);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let c=o();if(n.push({matcher:c,priority:l}),i!==",")break;i=r.next()}return n;function s(){if(i==="-"){i=r.next();const l=s();return c=>!!l&&!l(c)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if($D(i)){const l=[];do l.push(i),i=r.next();while($D(i));return c=>e(l,c)}return null}function o(){const l=[];let c=s();for(;c;)l.push(c),c=s();return u=>l.every(h=>h(u))}function a(){const l=[];let c=o();for(;c&&(l.push(c),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");c=o()}return u=>l.some(h=>h(u))}}function $D(t){return!!t&&!!t.match(/[\w\.:]+/)}function ime(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const r=n[0];return n=e.exec(t),r}}}function fB(t){typeof t.dispose=="function"&&t.dispose()}var Du=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},sme=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},ome=class{constructor(){V(this,"_references",[]);V(this,"_seenReferenceKeys",new Set);V(this,"visitedRule",new Set)}get references(){return this._references}add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},ame=class{constructor(t,e){V(this,"seenFullScopeRequests",new Set);V(this,"seenPartialScopeRequests",new Set);V(this,"Q");this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Du(this.initialScopeName)]}processQueue(){const t=this.Q;this.Q=[];const e=new ome;for(const n of t)lme(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof Du){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function lme(t,e,n,r){const i=n.lookup(t.scopeName);if(!i){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const s=n.lookup(e);t instanceof Du?Gd({baseGrammar:s,selfGrammar:i},r):dE(t.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},r);const o=n.injections(t.scopeName);if(o)for(const a of o)r.add(new Du(a))}function dE(t,e,n){if(e.repository&&e.repository[t]){const r=e.repository[t];Of([r],e,n)}}function Gd(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&Of(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&Of(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function Of(t,e,n){for(const r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?oB({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&Of(r.patterns,{...e,repository:i},n);const s=r.include;if(!s)continue;const o=mB(s);switch(o.kind){case 0:Gd({...e,selfGrammar:e.baseGrammar},n);break;case 1:Gd(e,n);break;case 2:dE(o.ruleName,{...e,repository:i},n);break;case 3:case 4:const a=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){const l={baseGrammar:e.baseGrammar,selfGrammar:a,repository:i};o.kind===4?dE(o.ruleName,l,n):Gd(l,n)}else o.kind===4?n.add(new sme(o.scopeName,o.ruleName)):n.add(new Du(o.scopeName));break}}}var cme=class{constructor(){V(this,"kind",0)}},ume=class{constructor(){V(this,"kind",1)}},hme=class{constructor(t){V(this,"kind",2);this.ruleName=t}},dme=class{constructor(t){V(this,"kind",3);this.scopeName=t}},pme=class{constructor(t,e){V(this,"kind",4);this.scopeName=t,this.ruleName=e}};function mB(t){if(t==="$base")return new cme;if(t==="$self")return new ume;const e=t.indexOf("#");if(e===-1)return new dme(t);if(e===0)return new hme(t.substring(1));{const n=t.substring(0,e),r=t.substring(e+1);return new pme(n,r)}}var fme=/\\(\d+)/,FD=/\\(\d+)/g,mme=-1,gB=-2,uh=class{constructor(t,e,n,r){V(this,"$location");V(this,"id");V(this,"_nameIsCapturing");V(this,"_name");V(this,"_contentNameIsCapturing");V(this,"_contentName");this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=md.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=md.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${aB(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:md.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:md.replaceCaptures(this._contentName,t,e)}},gme=class extends uh{constructor(e,n,r,i,s){super(e,n,r,i);V(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(e,n){throw new Error("Not supported!")}compile(e,n){throw new Error("Not supported!")}compileAG(e,n,r,i){throw new Error("Not supported!")}},Ome=class extends uh{constructor(e,n,r,i,s){super(e,n,r,null);V(this,"_match");V(this,"captures");V(this,"_cachedCompiledPatterns");this._match=new Au(i,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,n){n.push(this._match)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Pu,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},BD=class extends uh{constructor(e,n,r,i,s){super(e,n,r,i);V(this,"hasMissingPatterns");V(this,"patterns");V(this,"_cachedCompiledPatterns");this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,n){for(const r of this.patterns)e.getRule(r).collectPatterns(e,n)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Pu,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},pE=class extends uh{constructor(e,n,r,i,s,o,a,l,c,u){super(e,n,r,i);V(this,"_begin");V(this,"beginCaptures");V(this,"_end");V(this,"endHasBackReferences");V(this,"endCaptures");V(this,"applyEndPatternLast");V(this,"hasMissingPatterns");V(this,"patterns");V(this,"_cachedCompiledPatterns");this._begin=new Au(s,this.id),this.beginCaptures=o,this._end=new Au(a||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=c||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,n){return this._end.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e,n).compile(e)}compileAG(e,n,r,i){return this._getCachedCompiledPatterns(e,n).compileAG(e,r,i)}_getCachedCompiledPatterns(e,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Pu;for(const r of this.patterns)e.getRule(r).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},yf=class extends uh{constructor(e,n,r,i,s,o,a,l,c){super(e,n,r,i);V(this,"_begin");V(this,"beginCaptures");V(this,"whileCaptures");V(this,"_while");V(this,"whileHasBackReferences");V(this,"hasMissingPatterns");V(this,"patterns");V(this,"_cachedCompiledPatterns");V(this,"_cachedCompiledWhilePatterns");this._begin=new Au(s,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new Au(a,gB),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,n){return this._while.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Pu;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,n){return this._getCachedCompiledWhilePatterns(e,n).compile(e)}compileWhileAG(e,n,r,i){return this._getCachedCompiledWhilePatterns(e,n).compileAG(e,r,i)}_getCachedCompiledWhilePatterns(e,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Pu,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||"￿"),this._cachedCompiledWhilePatterns}},OB=class cn{static createCaptureRule(e,n,r,i,s){return e.registerRule(o=>new gme(n,o,r,i,s))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(i=>{if(e.id=i,e.match)return new Ome(e.$vscodeTextmateLocation,e.id,e.name,e.match,cn._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=oB({},r,e.repository));let s=e.patterns;return typeof s>"u"&&e.include&&(s=[{include:e.include}]),new BD(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,cn._compilePatterns(s,n,r))}return e.while?new yf(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,cn._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,cn._compileCaptures(e.whileCaptures||e.captures,n,r),cn._compilePatterns(e.patterns,n,r)):new pE(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,cn._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,cn._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,cn._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let i=[];if(e){let s=0;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);a>s&&(s=a)}for(let o=0;o<=s;o++)i[o]=null;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);let l=0;e[o].patterns&&(l=cn.getCompiledRuleId(e[o],n,r)),i[a]=cn.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,l)}}return i}static _compilePatterns(e,n,r){let i=[];if(e)for(let s=0,o=e.length;s<o;s++){const a=e[s];let l=-1;if(a.include){const c=mB(a.include);switch(c.kind){case 0:case 1:l=cn.getCompiledRuleId(r[a.include],n,r);break;case 2:let u=r[c.ruleName];u&&(l=cn.getCompiledRuleId(u,n,r));break;case 3:case 4:const h=c.scopeName,d=c.kind===4?c.ruleName:null,p=n.getExternalGrammar(h,r);if(p)if(d){let f=p.repository[d];f&&(l=cn.getCompiledRuleId(f,n,p.repository))}else l=cn.getCompiledRuleId(p.repository.$self,n,p.repository);break}}else l=cn.getCompiledRuleId(a,n,r);if(l!==-1){const c=n.getRule(l);let u=!1;if((c instanceof BD||c instanceof pE||c instanceof yf)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;i.push(l)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},Au=class yB{constructor(e,n){V(this,"source");V(this,"ruleId");V(this,"hasAnchor");V(this,"hasBackReferences");V(this,"_anchorCache");if(e&&typeof e=="string"){const r=e.length;let i=0,s=[],o=!1;for(let a=0;a<r;a++)if(e.charAt(a)==="\\"&&a+1<r){const l=e.charAt(a+1);l==="z"?(s.push(e.substring(i,a)),s.push("$(?!\\n)(?<!\\n)"),i=a+2):(l==="A"||l==="G")&&(o=!0),a++}this.hasAnchor=o,i===0?this.source=e:(s.push(e.substring(i,r)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=fme.test(this.source):this.hasBackReferences=!1}clone(){return new yB(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>e.substring(i.start,i.end));return FD.lastIndex=0,this.source.replace(FD,(i,s)=>uB(r[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],i=[],s,o,a,l;for(s=0,o=this.source.length;s<o;s++)a=this.source.charAt(s),e[s]=a,n[s]=a,r[s]=a,i[s]=a,a==="\\"&&s+1<o&&(l=this.source.charAt(s+1),l==="A"?(e[s+1]="￿",n[s+1]="￿",r[s+1]="A",i[s+1]="A"):l==="G"?(e[s+1]="￿",n[s+1]="G",r[s+1]="￿",i[s+1]="G"):(e[s+1]=l,n[s+1]=l,r[s+1]=l,i[s+1]=l),s++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Pu=class{constructor(){V(this,"_items");V(this,"_hasAnchors");V(this,"_cached");V(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new jD(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(i=>i.resolveAnchors(e,n));return new jD(t,r,this._items.map(i=>i.ruleId))}},jD=class{constructor(t,e,n){V(this,"scanner");this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
`)}findNextMatchSync(t,e,n){const r=this.scanner.findNextMatchSync(t,e,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},ZO=class{constructor(t,e){this.languageId=t,this.tokenType=e}},Li,yme=(Li=class{constructor(e,n){V(this,"_defaultAttributes");V(this,"_embeddedLanguagesMatcher");V(this,"_getBasicScopeAttributes",new hB(e=>{const n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new ZO(n,r)}));this._defaultAttributes=new ZO(e,8),this._embeddedLanguagesMatcher=new bme(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?Li._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(Li.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},V(Li,"_NULL_SCOPE_METADATA",new ZO(0,0)),V(Li,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),Li),bme=class{constructor(t){V(this,"values");V(this,"scopesRegExp");if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([n,r])=>uB(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},zD=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function bB(t,e,n,r,i,s,o,a){const l=e.content.length;let c=!1,u=-1;if(o){const p=Eme(t,e,n,r,i,s);i=p.stack,r=p.linePos,n=p.isFirstLine,u=p.anchorPosition}const h=Date.now();for(;!c;){if(a!==0&&Date.now()-h>a)return new zD(i,!0);d()}return new zD(i,!1);function d(){const p=vme(t,e,n,r,i,u);if(!p){s.produce(i,l),c=!0;return}const f=p.captureIndices,m=p.matchedRuleId,g=f&&f.length>0?f[0].end>r:!1;if(m===mme){const y=i.getRule(t);s.produce(i,f[0].start),i=i.withContentNameScopesList(i.nameScopesList),fc(t,e,n,i,s,y.endCaptures,f),s.produce(i,f[0].end);const b=i;if(i=i.parent,u=b.getAnchorPos(),!g&&b.getEnterPos()===r){i=b,s.produce(i,l),c=!0;return}}else{const y=t.getRule(m);s.produce(i,f[0].start);const b=i,T=y.getName(e.content,f),S=i.contentNameScopesList.pushAttributed(T,t);if(i=i.push(m,r,u,f[0].end===l,null,S,S),y instanceof pE){const w=y;fc(t,e,n,i,s,w.beginCaptures,f),s.produce(i,f[0].end),u=f[0].end;const A=w.getContentName(e.content,f),C=S.pushAttributed(A,t);if(i=i.withContentNameScopesList(C),w.endHasBackReferences&&(i=i.withEndRule(w.getEndWithResolvedBackReferences(e.content,f))),!g&&b.hasSameRuleAs(i)){i=i.pop(),s.produce(i,l),c=!0;return}}else if(y instanceof yf){const w=y;fc(t,e,n,i,s,w.beginCaptures,f),s.produce(i,f[0].end),u=f[0].end;const A=w.getContentName(e.content,f),C=S.pushAttributed(A,t);if(i=i.withContentNameScopesList(C),w.whileHasBackReferences&&(i=i.withEndRule(w.getWhileWithResolvedBackReferences(e.content,f))),!g&&b.hasSameRuleAs(i)){i=i.pop(),s.produce(i,l),c=!0;return}}else if(fc(t,e,n,i,s,y.captures,f),s.produce(i,f[0].end),i=i.pop(),!g){i=i.safePop(),s.produce(i,l),c=!0;return}}f[0].end>r&&(r=f[0].end,n=!1)}}function Eme(t,e,n,r,i,s){let o=i.beginRuleCapturedEOL?0:-1;const a=[];for(let l=i;l;l=l.pop()){const c=l.getRule(t);c instanceof yf&&a.push({rule:c,stack:l})}for(let l=a.pop();l;l=a.pop()){const{ruleScanner:c,findOptions:u}=wme(l.rule,t,l.stack.endRule,n,r===o),h=c.findNextMatchSync(e,r,u);if(h){if(h.ruleId!==gB){i=l.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(s.produce(l.stack,h.captureIndices[0].start),fc(t,e,n,l.stack,s,l.rule.whileCaptures,h.captureIndices),s.produce(l.stack,h.captureIndices[0].end),o=h.captureIndices[0].end,h.captureIndices[0].end>r&&(r=h.captureIndices[0].end,n=!1))}else{i=l.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function vme(t,e,n,r,i,s){const o=Tme(t,e,n,r,i,s),a=t.getInjections();if(a.length===0)return o;const l=Sme(a,t,e,n,r,i,s);if(!l)return o;if(!o)return l;const c=o.captureIndices[0].start,u=l.captureIndices[0].start;return u<c||l.priorityMatch&&u===c?l:o}function Tme(t,e,n,r,i,s){const o=i.getRule(t),{ruleScanner:a,findOptions:l}=EB(o,t,i.endRule,n,r===s),c=a.findNextMatchSync(e,r,l);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Sme(t,e,n,r,i,s,o){let a=Number.MAX_VALUE,l=null,c,u=0;const h=s.contentNameScopesList.getScopeNames();for(let d=0,p=t.length;d<p;d++){const f=t[d];if(!f.matcher(h))continue;const m=e.getRule(f.ruleId),{ruleScanner:g,findOptions:y}=EB(m,e,null,r,i===o),b=g.findNextMatchSync(n,i,y);if(!b)continue;const T=b.captureIndices[0].start;if(!(T>=a)&&(a=T,l=b.captureIndices,c=b.ruleId,u=f.priority,a===i))break}return l?{priorityMatch:u===-1,captureIndices:l,matchedRuleId:c}:null}function EB(t,e,n,r,i){return{ruleScanner:t.compileAG(e,n,r,i),findOptions:0}}function wme(t,e,n,r,i){return{ruleScanner:t.compileWhileAG(e,n,r,i),findOptions:0}}function fc(t,e,n,r,i,s,o){if(s.length===0)return;const a=e.content,l=Math.min(s.length,o.length),c=[],u=o[0].end;for(let h=0;h<l;h++){const d=s[h];if(d===null)continue;const p=o[h];if(p.length===0)continue;if(p.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=p.start;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?i.produceFromScopes(c[c.length-1].scopes,p.start):i.produce(r,p.start),d.retokenizeCapturedWithRuleId){const m=d.getName(a,o),g=r.contentNameScopesList.pushAttributed(m,t),y=d.getContentName(a,o),b=g.pushAttributed(y,t),T=r.push(d.retokenizeCapturedWithRuleId,p.start,-1,!1,null,g,b),S=t.createOnigString(a.substring(0,p.end));bB(t,S,n&&p.start===0,p.start,T,i,!1,0),fB(S);continue}const f=d.getName(a,o);if(f!==null){const m=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(f,t);c.push(new kme(m,p.end))}}for(;c.length>0;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var kme=class{constructor(t,e){V(this,"scopes");V(this,"endPos");this.scopes=t,this.endPos=e}};function _me(t,e,n,r,i,s,o,a){return new Cme(t,e,n,r,i,s,o,a)}function VD(t,e,n,r,i){const s=gf(e,bf),o=OB.getCompiledRuleId(n,r,i.repository);for(const a of s)t.push({debugSelector:e,matcher:a.matcher,ruleId:o,grammar:i,priority:a.priority})}function bf(t,e){if(e.length<t.length)return!1;let n=0;return t.every(r=>{for(let i=n;i<e.length;i++)if(xme(e[i],r))return n=i+1,!0;return!1})}function xme(t,e){if(!t)return!1;if(t===e)return!0;const n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var Cme=class{constructor(t,e,n,r,i,s,o,a){V(this,"_rootId");V(this,"_lastRuleId");V(this,"_ruleId2desc");V(this,"_includedGrammars");V(this,"_grammarRepository");V(this,"_grammar");V(this,"_injections");V(this,"_basicScopeAttributesProvider");V(this,"_tokenTypeMatchers");if(this._rootScopeName=t,this.balancedBracketSelectors=s,this._onigLib=a,this._basicScopeAttributesProvider=new yme(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=UD(e,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const l of Object.keys(i)){const c=gf(l,bf);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:i[l]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){const i=r.injections;if(i)for(let o in i)VD(e,o,i[o],this,r);const s=this._grammarRepository.injections(n);s&&s.forEach(o=>{const a=this.getExternalGrammar(o);if(a){const l=a.injectionSelector;l&&VD(e,l,a,this,a)}})}return e.sort((i,s)=>i.priority-s.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=UD(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const r=this._tokenize(t,e,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,e,n=0){const r=this._tokenize(t,e,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,e,n,r){this._rootId===-1&&(this._rootId=OB.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!e||e===fE.NULL){i=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=dl.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),d=this.getRule(this._rootId).getName(null,null);let p;d?p=Vc.createRootAndLookUpScopeName(d,h,this):p=Vc.createRoot("unknown",h),e=new fE(null,this._rootId,-1,-1,!1,null,p,p)}else i=!1,e.reset();t=t+`
`;const s=this.createOnigString(t),o=s.content.length,a=new Ame(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),l=bB(this,s,i,0,e,a,!0,r);return fB(s),{lineLength:o,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function UD(t,e){return t=qfe(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var Vc=class Xr{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}static fromExtension(e,n){let r=e,i=(e==null?void 0:e.scopePath)??null;for(const s of n)i=qO.push(i,s.scopeNames),r=new Xr(r,i,s.encodedTokenAttributes);return r}static createRoot(e,n){return new Xr(null,new qO(null,e),n)}static createRootAndLookUpScopeName(e,n,r){const i=r.getMetadataForScope(e),s=new qO(null,e),o=r.themeProvider.themeMatch(s),a=Xr.mergeAttributes(n,i,o);return new Xr(null,s,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return Xr.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let i=-1,s=0,o=0;return r!==null&&(i=r.fontStyle,s=r.foregroundId,o=r.backgroundId),dl.set(e,n.languageId,n.tokenType,null,i,s,o)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return Xr._pushAttributed(this,e,n);const r=e.split(/ /g);let i=this;for(const s of r)i=Xr._pushAttributed(i,s,n);return i}static _pushAttributed(e,n,r){const i=r.getMetadataForScope(n),s=e.scopePath.push(n),o=r.themeProvider.themeMatch(s),a=Xr.mergeAttributes(e.tokenAttributes,i,o);return new Xr(e,s,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){var i;const n=[];let r=this;for(;r&&r!==e;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(((i=r.parent)==null?void 0:i.scopePath)??null)}),r=r.parent;return r===e?n.reverse():void 0}},ar,fE=(ar=class{constructor(e,n,r,i,s,o,a,l){V(this,"_stackElementBrand");V(this,"_enterPos");V(this,"_anchorPos");V(this,"depth");this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=s,this.endRule=o,this.nameScopesList=a,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}equals(e){return e===null?!1:ar._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?Vc.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){ar._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,r,i,s,o,a){return new ar(this,e,n,r,i,s,o,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){var r,i;return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${(r=this.nameScopesList)==null?void 0:r.toString()}, ${(i=this.contentNameScopesList)==null?void 0:i.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new ar(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var e,n,r;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((e=this.parent)==null?void 0:e.nameScopesList)??null))??[],contentNameScopesList:((r=this.contentNameScopesList)==null?void 0:r.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(e,n){const r=Vc.fromExtension((e==null?void 0:e.nameScopesList)??null,n.nameScopesList);return new ar(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Vc.fromExtension(r,n.contentNameScopesList))}},V(ar,"NULL",new ar(null,0,0,0,!1,null,null,null)),ar),Dme=class{constructor(t,e){V(this,"balancedBracketScopes");V(this,"unbalancedBracketScopes");V(this,"allowAny",!1);this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):gf(n,bf).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>gf(n,bf).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},Ame=class{constructor(t,e,n,r){V(this,"_emitBinaryTokens");V(this,"_lineText");V(this,"_tokens");V(this,"_binaryTokens");V(this,"_lastTokenEndIndex");V(this,"_tokenTypeOverrides");this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){var r;if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let i=(t==null?void 0:t.tokenAttributes)??0,s=!1;if((r=this.balancedBracketSelectors)!=null&&r.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=(t==null?void 0:t.getScopeNames())??[];for(const a of this._tokenTypeOverrides)a.matcher(o)&&(i=dl.set(i,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(o))}if(s&&(i=dl.set(i,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=e;return}const n=(t==null?void 0:t.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},Pme=class{constructor(t,e){V(this,"_grammars",new Map);V(this,"_rawGrammars",new Map);V(this,"_injectionGrammars",new Map);V(this,"_theme");this._onigLib=e,this._theme=t}dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,i){if(!this._grammars.has(t)){let s=this._rawGrammars.get(t);if(!s)return null;this._grammars.set(t,_me(t,s,e,n,r,i,this,this._onigLib))}return this._grammars.get(t)}},Nme=class{constructor(t){V(this,"_options");V(this,"_syncRegistry");V(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new Pme(mf.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,e){this._syncRegistry.setTheme(mf.createFromRawTheme(t,e))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,e,n){return this.loadGrammarWithConfiguration(t,e,{embeddedLanguages:n})}loadGrammarWithConfiguration(t,e,n){return this._loadGrammar(t,e,n.embeddedLanguages,n.tokenTypes,new Dme(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,e,n,r,i){const s=new ame(this._syncRegistry,t);for(;s.Q.length>0;)s.Q.map(o=>this._loadSingleGrammar(o.scopeName)),s.processQueue();return this._grammarForScopeName(t,e,n,r,i)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const e=this._options.loadGrammar(t);if(e){const n=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(e,n)}}addGrammar(t,e=[],n=0,r=null){return this._syncRegistry.addGrammar(t,e),this._grammarForScopeName(t.scopeName,n,r)}_grammarForScopeName(t,e=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(t,e,n,r,i)}},mE=fE.NULL;const Rme=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],HD={}.hasOwnProperty;function Mme(t,e){const n=e||{};function r(i,...s){let o=r.invalid;const a=r.handlers;if(i&&HD.call(i,t)){const l=String(i[t]);o=HD.call(a,l)?a[l]:r.unknown}if(o)return o.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Ime=/["&'<>`]/g,Lme=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Qme=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,$me=/[|\\{}()[\]^$+*?.]/g,XD=new WeakMap;function Fme(t,e){if(t=t.replace(e.subset?Bme(e.subset):Ime,r),e.subset||e.escapeOnly)return t;return t.replace(Lme,n).replace(Qme,r);function n(i,s,o){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,o.charCodeAt(s+2),e)}function r(i,s,o){return e.format(i.charCodeAt(0),o.charCodeAt(s+1),e)}}function Bme(t){let e=XD.get(t);return e||(e=jme(t),XD.set(t,e)),e}function jme(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace($me,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const zme=/[\dA-Fa-f]/;function Vme(t,e,n){const r="&#x"+t.toString(16).toUpperCase();return n&&e&&!zme.test(String.fromCharCode(e))?r:r+";"}const Ume=/\d/;function Hme(t,e,n){const r="&#"+String(t);return n&&e&&!Ume.test(String.fromCharCode(e))?r:r+";"}const Xme=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],WO={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"",Prime:"″",oline:"‾",frasl:"",weierp:"℘",image:"",real:"",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"",lowast:"",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"",cap:"∩",cup:"",int:"∫",there4:"∴",sim:"",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:"",emsp:"",thinsp:"",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"",mdash:"—",lsquo:"",rsquo:"",sbquo:"",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"",rsaquo:"",euro:"€"},qme=["cent","copy","divide","gt","lt","not","para","times"],vB={}.hasOwnProperty,gE={};let gd;for(gd in WO)vB.call(WO,gd)&&(gE[WO[gd]]=gd);const Zme=/[^\dA-Za-z]/;function Wme(t,e,n,r){const i=String.fromCharCode(t);if(vB.call(gE,i)){const s=gE[i],o="&"+s;return n&&Xme.includes(s)&&!qme.includes(s)&&(!r||e&&e!==61&&Zme.test(String.fromCharCode(e)))?o:o+";"}return""}function Gme(t,e,n){let r=Vme(t,e,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Wme(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const s=Hme(t,e,n.omitOptionalSemicolons);s.length<r.length&&(r=s)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Fa(t,e){return Fme(t,Object.assign({format:Gme},e))}const Yme=/^>|^->|<!--|-->|--!>|<!-$/g,Kme=[">"],Jme=["<",">"];function ege(t,e,n,r){return r.settings.bogusComments?"<?"+Fa(t.value,Object.assign({},r.settings.characterReferences,{subset:Kme}))+">":"<!--"+t.value.replace(Yme,i)+"-->";function i(s){return Fa(s,Object.assign({},r.settings.characterReferences,{subset:Jme}))}}function tge(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function qD(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(e);for(;i!==-1;)r++,i=n.indexOf(e,i+e.length);return r}const Bt=SB(1),TB=SB(-1),nge=[];function SB(t){return e;function e(n,r,i){const s=n?n.children:nge;let o=(r||0)+t,a=s[o];if(!i)for(;a&&Qm(a);)o+=t,a=s[o];return a}}const rge={}.hasOwnProperty;function wB(t){return e;function e(n,r,i){return rge.call(t,n.tagName)&&t[n.tagName](n,r,i)}}const oS=wB({body:sge,caption:GO,colgroup:GO,dd:cge,dt:lge,head:GO,html:ige,li:age,optgroup:uge,option:hge,p:oge,rp:ZD,rt:ZD,tbody:pge,td:WD,tfoot:fge,th:WD,thead:dge,tr:mge});function GO(t,e,n){const r=Bt(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Qm(r.value.charAt(0)))}function ige(t,e,n){const r=Bt(n,e);return!r||r.type!=="comment"}function sge(t,e,n){const r=Bt(n,e);return!r||r.type!=="comment"}function oge(t,e,n){const r=Bt(n,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function age(t,e,n){const r=Bt(n,e);return!r||r.type==="element"&&r.tagName==="li"}function lge(t,e,n){const r=Bt(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function cge(t,e,n){const r=Bt(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function ZD(t,e,n){const r=Bt(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function uge(t,e,n){const r=Bt(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function hge(t,e,n){const r=Bt(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function dge(t,e,n){const r=Bt(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function pge(t,e,n){const r=Bt(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function fge(t,e,n){return!Bt(n,e)}function mge(t,e,n){const r=Bt(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function WD(t,e,n){const r=Bt(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const gge=wB({body:bge,colgroup:Ege,head:yge,html:Oge,tbody:vge});function Oge(t){const e=Bt(t,-1);return!e||e.type!=="comment"}function yge(t){const e=new Set;for(const r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}const n=t.children[0];return!n||n.type==="element"}function bge(t){const e=Bt(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Qm(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Ege(t,e,n){const r=TB(n,e),i=Bt(t,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&oS(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function vge(t,e,n){const r=TB(n,e),i=Bt(t,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&oS(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const Od={name:[[`
\f\r &/=>`.split(""),`
\f\r "&'/=>\``.split("")],[`\0
\f\r "&'/<=>`.split(""),`\0
\f\r "&'/<=>\``.split("")]],unquoted:[[`
\f\r &>`.split(""),`\0
\f\r "&'<=>\``.split("")],[`\0
\f\r "&'<=>\``.split(""),`\0
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Tge(t,e,n,r){const i=r.schema,s=i.space==="svg"?!1:r.settings.omitOptionalTags;let o=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(t.tagName.toLowerCase());const a=[];let l;i.space==="html"&&t.tagName==="svg"&&(r.schema=io);const c=Sge(r,t.properties),u=r.all(i.space==="html"&&t.tagName==="template"?t.content:t);return r.schema=i,u&&(o=!1),(c||!s||!gge(t,e,n))&&(a.push("<",t.tagName,c?" "+c:""),o&&(i.space==="svg"||r.settings.closeSelfClosing)&&(l=c.charAt(c.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(u),!o&&(!s||!oS(t,e,n))&&a.push("</"+t.tagName+">"),a.join("")}function Sge(t,e){const n=[];let r=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){const s=wge(t,i,e[i]);s&&n.push(s)}}for(;++r<n.length;){const s=t.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&s!=='"'&&s!=="'"&&(n[r]+=" ")}return n.join("")}function wge(t,e,n){const r=Pm(t.schema,e),i=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,s=t.settings.allowDangerousCharacters?0:1;let o=t.quote,a;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const l=Fa(r.attribute,Object.assign({},t.settings.characterReferences,{subset:Od.name[i][s]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?bF:EF)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n)?l:(t.settings.preferUnquoted&&(a=Fa(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:Od.unquoted[i][s]}))),a!==n&&(t.settings.quoteSmart&&qD(n,o)>qD(n,t.alternative)&&(o=t.alternative),a=o+Fa(n,Object.assign({},t.settings.characterReferences,{subset:(o==="'"?Od.single:Od.double)[i][s],attribute:!0}))+o),l+(a&&"="+a))}const kge=["<","&"];function kB(t,e,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:Fa(t.value,Object.assign({},r.settings.characterReferences,{subset:kge}))}function _ge(t,e,n,r){return r.settings.allowDangerousHtml?t.value:kB(t,e,n,r)}function xge(t,e,n,r){return r.all(t)}const Cge=Mme("type",{invalid:Dge,unknown:Age,handlers:{comment:ege,doctype:tge,element:Tge,raw:_ge,root:xge,text:kB}});function Dge(t){throw new Error("Expected node, not `"+t+"`")}function Age(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const Pge={},Nge={},Rge=[];function Mge(t,e){const n=e||Pge,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Ige,all:Lge,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Rme,characterReferences:n.characterReferences||Nge,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?io:ah,quote:r,alternative:i}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function Ige(t,e,n){return Cge(t,e,n,this)}function Lge(t){const e=[],n=t&&t.children||Rge;let r=-1;for(;++r<n.length;)e[r]=this.one(n[r],r,t);return e.join("")}function Ef(t,e){const n=typeof t=="string"?{}:{...t.colorReplacements},r=typeof t=="string"?t:t.name;for(const[i,s]of Object.entries((e==null?void 0:e.colorReplacements)||{}))typeof s=="string"?n[i]=s:i===r&&Object.assign(n,s);return n}function zs(t,e){return t&&((e==null?void 0:e[t==null?void 0:t.toLowerCase()])||t)}function Qge(t){return Array.isArray(t)?t:[t]}async function _B(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function aS(t){return!t||["plaintext","txt","text","plain"].includes(t)}function xB(t){return t==="ansi"||aS(t)}function lS(t){return t==="none"}function CB(t){return lS(t)}function DB(t,e){var r;if(!e)return t;t.properties||(t.properties={}),(r=t.properties).class||(r.class=[]),typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(/\s+/g)),Array.isArray(t.properties.class)||(t.properties.class=[]);const n=Array.isArray(e)?e:e.split(/\s+/g);for(const i of n)i&&!t.properties.class.includes(i)&&t.properties.class.push(i);return t}function Fm(t,e=!1){var s;const n=t.split(/(\r?\n)/g);let r=0;const i=[];for(let o=0;o<n.length;o+=2){const a=e?n[o]+(n[o+1]||""):n[o];i.push([a,r]),r+=n[o].length,r+=((s=n[o+1])==null?void 0:s.length)||0}return i}function $ge(t){const e=Fm(t,!0).map(([i])=>i);function n(i){if(i===t.length)return{line:e.length-1,character:e[e.length-1].length};let s=i,o=0;for(const a of e){if(s<a.length)break;s-=a.length,o++}return{line:o,character:s}}function r(i,s){let o=0;for(let a=0;a<i;a++)o+=e[a].length;return o+=s,o}return{lines:e,indexToPos:n,posToIndex:r}}function Fge(t,e,n){const r=new Set;for(const s of t.matchAll(/lang=["']([\w-]+)["']/g))r.add(s[1]);for(const s of t.matchAll(/(?:```|~~~)([\w-]+)/g))r.add(s[1]);for(const s of t.matchAll(/\\begin\{([\w-]+)\}/g))r.add(s[1]);if(!n)return Array.from(r);const i=n.getBundledLanguages();return Array.from(r).filter(s=>s&&i[s])}const cS="light-dark()",Bge=["color","background-color"];function jge(t,e){let n=0;const r=[];for(const i of e)i>n&&r.push({...t,content:t.content.slice(n,i),offset:t.offset+n}),n=i;return n<t.content.length&&r.push({...t,content:t.content.slice(n),offset:t.offset+n}),r}function zge(t,e){const n=Array.from(e instanceof Set?e:new Set(e)).sort((r,i)=>r-i);return n.length?t.map(r=>r.flatMap(i=>{const s=n.filter(o=>i.offset<o&&o<i.offset+i.content.length).map(o=>o-i.offset).sort((o,a)=>o-a);return s.length?jge(i,s):i})):t}function Vge(t,e,n,r,i="css-vars"){const s={content:t.content,explanation:t.explanation,offset:t.offset},o=e.map(u=>vf(t.variants[u])),a=new Set(o.flatMap(u=>Object.keys(u))),l={},c=(u,h)=>{const d=h==="color"?"":h==="background-color"?"-bg":`-${h}`;return n+e[u]+(h==="color"?"":d)};return o.forEach((u,h)=>{for(const d of a){const p=u[d]||"inherit";if(h===0&&r&&Bge.includes(d))if(r===cS&&o.length>1){const f=e.findIndex(b=>b==="light"),m=e.findIndex(b=>b==="dark");if(f===-1||m===-1)throw new Pt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const g=o[f][d]||"inherit",y=o[m][d]||"inherit";l[d]=`light-dark(${g}, ${y})`,i==="css-vars"&&(l[c(h,d)]=p)}else l[d]=p;else i==="css-vars"&&(l[c(h,d)]=p)}}),s.htmlStyle=l,s}function vf(t){const e={};if(t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&mn.Italic&&(e["font-style"]="italic"),t.fontStyle&mn.Bold&&(e["font-weight"]="bold");const n=[];t.fontStyle&mn.Underline&&n.push("underline"),t.fontStyle&mn.Strikethrough&&n.push("line-through"),n.length&&(e["text-decoration"]=n.join(" "))}return e}function OE(t){return typeof t=="string"?t:Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";")}const AB=new WeakMap;function Bm(t,e){AB.set(t,e)}function Nu(t){return AB.get(t)}class Pl{constructor(...e){V(this,"_stacks",{});V(this,"lang");if(e.length===2){const[n,r]=e;this.lang=r,this._stacks=n}else{const[n,r,i]=e;this.lang=r,this._stacks={[i]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new Pl(Object.fromEntries(Qge(n).map(r=>[r,mE])),e)}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Uge(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Uge(t){const e=[],n=new Set;function r(i){var o;if(n.has(i))return;n.add(i);const s=(o=i==null?void 0:i.nameScopesList)==null?void 0:o.scopeName;s&&e.push(s),i.parent&&r(i.parent)}return r(t),e}function Hge(t,e){if(!(t instanceof Pl))throw new Pt("Invalid grammar state");return t.getInternalStack(e)}function Xge(){const t=new WeakMap;function e(n){if(!t.has(n.meta)){let r=function(o){if(typeof o=="number"){if(o<0||o>n.source.length)throw new Pt(`Invalid decoration offset: ${o}. Code length: ${n.source.length}`);return{...i.indexToPos(o),offset:o}}else{const a=i.lines[o.line];if(a===void 0)throw new Pt(`Invalid decoration position ${JSON.stringify(o)}. Lines length: ${i.lines.length}`);let l=o.character;if(l<0&&(l=a.length+l),l<0||l>a.length)throw new Pt(`Invalid decoration position ${JSON.stringify(o)}. Line ${o.line} length: ${a.length}`);return{...o,character:l,offset:i.posToIndex(o.line,l)}}};const i=$ge(n.source),s=(n.options.decorations||[]).map(o=>({...o,start:r(o.start),end:r(o.end)}));qge(s),t.set(n.meta,{decorations:s,converter:i,source:n.source})}return t.get(n.meta)}return{name:"shiki:decorations",tokens(n){var i;if(!((i=this.options.decorations)!=null&&i.length))return;const r=e(this).decorations.flatMap(s=>[s.start.offset,s.end.offset]);return zge(n,r)},code(n){var u;if(!((u=this.options.decorations)!=null&&u.length))return;const r=e(this),i=Array.from(n.children).filter(h=>h.type==="element"&&h.tagName==="span");if(i.length!==r.converter.lines.length)throw new Pt(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function s(h,d,p,f){const m=i[h];let g="",y=-1,b=-1;if(d===0&&(y=0),p===0&&(b=0),p===Number.POSITIVE_INFINITY&&(b=m.children.length),y===-1||b===-1)for(let S=0;S<m.children.length;S++)g+=PB(m.children[S]),y===-1&&g.length===d&&(y=S+1),b===-1&&g.length===p&&(b=S+1);if(y===-1)throw new Pt(`Failed to find start index for decoration ${JSON.stringify(f.start)}`);if(b===-1)throw new Pt(`Failed to find end index for decoration ${JSON.stringify(f.end)}`);const T=m.children.slice(y,b);if(!f.alwaysWrap&&T.length===m.children.length)a(m,f,"line");else if(!f.alwaysWrap&&T.length===1&&T[0].type==="element")a(T[0],f,"token");else{const S={type:"element",tagName:"span",properties:{},children:T};a(S,f,"wrapper"),m.children.splice(y,T.length,S)}}function o(h,d){i[h]=a(i[h],d,"line")}function a(h,d,p){var g;const f=d.properties||{},m=d.transform||(y=>y);return h.tagName=d.tagName||"span",h.properties={...h.properties,...f,class:h.properties.class},(g=d.properties)!=null&&g.class&&DB(h,d.properties.class),h=m(h,p)||h,h}const l=[],c=r.decorations.sort((h,d)=>d.start.offset-h.start.offset||h.end.offset-d.end.offset);for(const h of c){const{start:d,end:p}=h;if(d.line===p.line)s(d.line,d.character,p.character,h);else if(d.line<p.line){s(d.line,d.character,Number.POSITIVE_INFINITY,h);for(let f=d.line+1;f<p.line;f++)l.unshift(()=>o(f,h));s(p.line,0,p.character,h)}}l.forEach(h=>h())}}}function qge(t){for(let e=0;e<t.length;e++){const n=t[e];if(n.start.offset>n.end.offset)throw new Pt(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=e+1;r<t.length;r++){const i=t[r],s=n.start.offset<=i.start.offset&&i.start.offset<n.end.offset,o=n.start.offset<i.end.offset&&i.end.offset<=n.end.offset,a=i.start.offset<=n.start.offset&&n.start.offset<i.end.offset,l=i.start.offset<n.end.offset&&n.end.offset<=i.end.offset;if(s||o||a||l){if(s&&o||a&&l||a&&n.start.offset===n.end.offset||o&&i.start.offset===i.end.offset)continue;throw new Pt(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function PB(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(PB).join(""):""}const Zge=[Xge()];function Tf(t){const e=Wge(t.transformers||[]);return[...e.pre,...e.normal,...e.post,...Zge]}function Wge(t){const e=[],n=[],r=[];for(const i of t)switch(i.enforce){case"pre":e.push(i);break;case"post":n.push(i);break;default:r.push(i)}return{pre:e,post:n,normal:r}}var _o=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],YO={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Gge(t,e){const n=t.indexOf("\x1B",e);if(n!==-1&&t[n+1]==="["){const r=t.indexOf("m",n);if(r!==-1)return{sequence:t.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:t.length}}function GD(t){const e=t.shift();if(e==="2"){const n=t.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(e==="5"){const n=t.shift();if(n)return{type:"table",index:Number(n)}}}function Yge(t){const e=[];for(;t.length>0;){const n=t.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)e.push({type:"resetAll"});else if(r<=9)YO[r]&&e.push({type:"setDecoration",value:YO[r]});else if(r<=29){const i=YO[r-20];i&&(e.push({type:"resetDecoration",value:i}),i==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)e.push({type:"setForegroundColor",value:{type:"named",name:_o[r-30]}});else if(r===38){const i=GD(t);i&&e.push({type:"setForegroundColor",value:i})}else if(r===39)e.push({type:"resetForegroundColor"});else if(r<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:_o[r-40]}});else if(r===48){const i=GD(t);i&&e.push({type:"setBackgroundColor",value:i})}else r===49?e.push({type:"resetBackgroundColor"}):r===53?e.push({type:"setDecoration",value:"overline"}):r===55?e.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?e.push({type:"setForegroundColor",value:{type:"named",name:_o[r-90+8]}}):r>=100&&r<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:_o[r-100+8]}})}return e}function Kge(){let t=null,e=null,n=new Set;return{parse(r){const i=[];let s=0;do{const o=Gge(r,s),a=o.sequence?r.substring(s,o.startPosition):r.substring(s);if(a.length>0&&i.push({value:a,foreground:t,background:e,decorations:new Set(n)}),o.sequence){const l=Yge(o.sequence);for(const c of l)c.type==="resetAll"?(t=null,e=null,n.clear()):c.type==="resetForegroundColor"?t=null:c.type==="resetBackgroundColor"?e=null:c.type==="resetDecoration"&&n.delete(c.value);for(const c of l)c.type==="setForegroundColor"?t=c.value:c.type==="setBackgroundColor"?e=c.value:c.type==="setDecoration"&&n.add(c.value)}s=o.position}while(s<r.length);return i}}}var Jge={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function eOe(t=Jge){function e(a){return t[a]}function n(a){return`#${a.map(l=>Math.max(0,Math.min(l,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let c=0;c<_o.length;c++)r.push(e(_o[c]));let a=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let u=0;u<6;u++)for(let h=0;h<6;h++)r.push(n([a[c],a[u],a[h]]));let l=8;for(let c=0;c<24;c++,l+=10)r.push(n([l,l,l]));return r}function s(a){return i()[a]}function o(a){switch(a.type){case"named":return e(a.name);case"rgb":return n(a.rgb);case"table":return s(a.index)}}return{value:o}}const tOe={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function nOe(t,e,n){const r=Ef(t,n),i=Fm(e),s=Object.fromEntries(_o.map(l=>{var h;const c=`terminal.ansi${l[0].toUpperCase()}${l.substring(1)}`,u=(h=t.colors)==null?void 0:h[c];return[l,u||tOe[l]]})),o=eOe(s),a=Kge();return i.map(l=>a.parse(l[0]).map(c=>{let u,h;c.decorations.has("reverse")?(u=c.background?o.value(c.background):t.bg,h=c.foreground?o.value(c.foreground):t.fg):(u=c.foreground?o.value(c.foreground):t.fg,h=c.background?o.value(c.background):void 0),u=zs(u,r),h=zs(h,r),c.decorations.has("dim")&&(u=rOe(u));let d=mn.None;return c.decorations.has("bold")&&(d|=mn.Bold),c.decorations.has("italic")&&(d|=mn.Italic),c.decorations.has("underline")&&(d|=mn.Underline),c.decorations.has("strikethrough")&&(d|=mn.Strikethrough),{content:c.value,offset:l[1],color:u,bgColor:h,fontStyle:d}}))}function rOe(t){const e=t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/i);if(e)if(e[3]){const r=Math.round(Number.parseInt(e[3],16)/2).toString(16).padStart(2,"0");return`#${e[1]}${e[2]}${r}`}else return e[2]?`#${e[1]}${e[2]}80`:`#${Array.from(e[1]).map(r=>`${r}${r}`).join("")}80`;const n=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:t}function uS(t,e,n={}){const{lang:r="text",theme:i=t.getLoadedThemes()[0]}=n;if(aS(r)||lS(i))return Fm(e).map(l=>[{content:l[0],offset:l[1]}]);const{theme:s,colorMap:o}=t.setTheme(i);if(r==="ansi")return nOe(s,e,n);const a=t.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==a.name)throw new Pt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${a.name}"`);if(!n.grammarState.themes.includes(s.name))throw new Pt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return sOe(e,a,s,o,n)}function iOe(...t){if(t.length===2)return Nu(t[1]);const[e,n,r={}]=t,{lang:i="text",theme:s=e.getLoadedThemes()[0]}=r;if(aS(i)||lS(s))throw new Pt("Plain language does not have grammar state");if(i==="ansi")throw new Pt("ANSI language does not have grammar state");const{theme:o,colorMap:a}=e.setTheme(s),l=e.getLanguage(i);return new Pl(Sf(n,l,o,a,r).stateStack,l.name,o.name)}function sOe(t,e,n,r,i){const s=Sf(t,e,n,r,i),o=new Pl(Sf(t,e,n,r,i).stateStack,e.name,n.name);return Bm(s.tokens,o),s.tokens}function Sf(t,e,n,r,i){const s=Ef(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:a=500}=i,l=Fm(t);let c=i.grammarState?Hge(i.grammarState,n.name)??mE:i.grammarContextCode!=null?Sf(i.grammarContextCode,e,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:mE,u=[];const h=[];for(let d=0,p=l.length;d<p;d++){const[f,m]=l[d];if(f===""){u=[],h.push([]);continue}if(o>0&&f.length>=o){u=[],h.push([{content:f,offset:m,color:"",fontStyle:0}]);continue}let g,y,b;i.includeExplanation&&(g=e.tokenizeLine(f,c,a),y=g.tokens,b=0);const T=e.tokenizeLine2(f,c,a),S=T.tokens.length/2;for(let w=0;w<S;w++){const A=T.tokens[2*w],C=w+1<S?T.tokens[2*w+2]:f.length;if(A===C)continue;const N=T.tokens[2*w+1],$=zs(r[dl.getForeground(N)],s),I=dl.getFontStyle(N),L={content:f.substring(A,C),offset:m+A,color:$,fontStyle:I};if(i.includeExplanation){const Z=[];if(i.includeExplanation!=="scopeName")for(const j of n.settings){let U;switch(typeof j.scope){case"string":U=j.scope.split(/,/).map(J=>J.trim());break;case"object":U=j.scope;break;default:continue}Z.push({settings:j,selectors:U.map(J=>J.split(/ /))})}L.explanation=[];let B=0;for(;A+B<C;){const j=y[b],U=f.substring(j.startIndex,j.endIndex);B+=U.length,L.explanation.push({content:U,scopes:i.includeExplanation==="scopeName"?oOe(j.scopes):aOe(Z,j.scopes)}),b+=1}}u.push(L)}h.push(u),u=[],c=T.ruleStack}return{tokens:h,stateStack:c}}function oOe(t){return t.map(e=>({scopeName:e}))}function aOe(t,e){const n=[];for(let r=0,i=e.length;r<i;r++){const s=e[r];n[r]={scopeName:s,themeMatches:cOe(t,s,e.slice(0,r))}}return n}function YD(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function lOe(t,e,n){if(!YD(t[t.length-1],e))return!1;let r=t.length-2,i=n.length-1;for(;r>=0&&i>=0;)YD(t[r],n[i])&&(r-=1),i-=1;return r===-1}function cOe(t,e,n){const r=[];for(const{selectors:i,settings:s}of t)for(const o of i)if(lOe(o,e,n)){r.push(s);break}return r}function NB(t,e,n){const r=Object.entries(n.themes).filter(l=>l[1]).map(l=>({color:l[0],theme:l[1]})),i=r.map(l=>{const c=uS(t,e,{...n,theme:l.theme}),u=Nu(c),h=typeof l.theme=="string"?l.theme:l.theme.name;return{tokens:c,state:u,theme:h}}),s=uOe(...i.map(l=>l.tokens)),o=s[0].map((l,c)=>l.map((u,h)=>{const d={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in n&&n.includeExplanation&&(d.explanation=u.explanation),s.forEach((p,f)=>{const{content:m,explanation:g,offset:y,...b}=p[c][h];d.variants[r[f].color]=b}),d})),a=i[0].state?new Pl(Object.fromEntries(i.map(l=>{var c;return[l.theme,(c=l.state)==null?void 0:c.getInternalStack(l.theme)]})),i[0].state.lang):void 0;return a&&Bm(o,a),o}function uOe(...t){const e=t.map(()=>[]),n=t.length;for(let r=0;r<t[0].length;r++){const i=t.map(l=>l[r]),s=e.map(()=>[]);e.forEach((l,c)=>l.push(s[c]));const o=i.map(()=>0),a=i.map(l=>l[0]);for(;a.every(l=>l);){const l=Math.min(...a.map(c=>c.content.length));for(let c=0;c<n;c++){const u=a[c];u.content.length===l?(s[c].push(u),o[c]+=1,a[c]=i[c][o[c]]):(s[c].push({...u,content:u.content.slice(0,l)}),a[c]={...u,content:u.content.slice(l),offset:u.offset+l})}}}return e}function wf(t,e,n){let r,i,s,o,a,l;if("themes"in n){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:h="css-vars"}=n,d=Object.entries(n.themes).filter(y=>y[1]).map(y=>({color:y[0],theme:y[1]})).sort((y,b)=>y.color===c?-1:b.color===c?1:0);if(d.length===0)throw new Pt("`themes` option must not be empty");const p=NB(t,e,n);if(l=Nu(p),c&&cS!==c&&!d.find(y=>y.color===c))throw new Pt(`\`themes\` option must contain the defaultColor key \`${c}\``);const f=d.map(y=>t.getTheme(y.theme)),m=d.map(y=>y.color);s=p.map(y=>y.map(b=>Vge(b,m,u,c,h))),l&&Bm(s,l);const g=d.map(y=>Ef(y.theme,n));i=KD(d,f,g,u,c,"fg",h),r=KD(d,f,g,u,c,"bg",h),o=`shiki-themes ${f.map(y=>y.name).join(" ")}`,a=c?void 0:[i,r].join(";")}else if("theme"in n){const c=Ef(n.theme,n);s=uS(t,e,n);const u=t.getTheme(n.theme);r=zs(u.bg,c),i=zs(u.fg,c),o=u.name,l=Nu(s)}else throw new Pt("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:i,bg:r,themeName:o,rootStyle:a,grammarState:l}}function KD(t,e,n,r,i,s,o){return t.map((a,l)=>{const c=zs(e[l][s],n[l])||"inherit",u=`${r+a.color}${s==="bg"?"-bg":""}:${c}`;if(l===0&&i){if(i===cS&&t.length>1){const h=t.findIndex(m=>m.color==="light"),d=t.findIndex(m=>m.color==="dark");if(h===-1||d===-1)throw new Pt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const p=zs(e[h][s],n[h])||"inherit",f=zs(e[d][s],n[d])||"inherit";return`light-dark(${p}, ${f});${u}`}return c}return o==="css-vars"?u:null}).filter(a=>!!a).join(";")}function kf(t,e,n,r={meta:{},options:n,codeToHast:(i,s)=>kf(t,i,s),codeToTokens:(i,s)=>wf(t,i,s)}){var f,m;let i=e;for(const g of Tf(n))i=((f=g.preprocess)==null?void 0:f.call(r,i,n))||i;let{tokens:s,fg:o,bg:a,themeName:l,rootStyle:c,grammarState:u}=wf(t,i,n);const{mergeWhitespaces:h=!0,mergeSameStyleTokens:d=!1}=n;h===!0?s=dOe(s):h==="never"&&(s=pOe(s)),d&&(s=fOe(s));const p={...r,get source(){return i}};for(const g of Tf(n))s=((m=g.tokens)==null?void 0:m.call(p,s))||s;return hOe(s,{...n,fg:o,bg:a,themeName:l,rootStyle:c},p,u)}function hOe(t,e,n,r=Nu(t)){var f,m,g,y;const i=Tf(e),s=[],o={type:"root",children:[]},{structure:a="classic",tabindex:l="0"}=e;let c={type:"element",tagName:"pre",properties:{class:`shiki ${e.themeName||""}`,style:e.rootStyle||`background-color:${e.bg};color:${e.fg}`,...l!==!1&&l!=null?{tabindex:l.toString()}:{},...Object.fromEntries(Array.from(Object.entries(e.meta||{})).filter(([b])=>!b.startsWith("_")))},children:[]},u={type:"element",tagName:"code",properties:{},children:s};const h=[],d={...n,structure:a,addClassToHast:DB,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return o},get pre(){return c},get code(){return u},get lines(){return h}};if(t.forEach((b,T)=>{var A,C;T&&(a==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):a==="classic"&&s.push({type:"text",value:`
`}));let S={type:"element",tagName:"span",properties:{class:"line"},children:[]},w=0;for(const N of b){let $={type:"element",tagName:"span",properties:{...N.htmlAttrs},children:[{type:"text",value:N.content}]};const I=OE(N.htmlStyle||vf(N));I&&($.properties.style=I);for(const L of i)$=((A=L==null?void 0:L.span)==null?void 0:A.call(d,$,T+1,w,S,N))||$;a==="inline"?o.children.push($):a==="classic"&&S.children.push($),w+=N.content.length}if(a==="classic"){for(const N of i)S=((C=N==null?void 0:N.line)==null?void 0:C.call(d,S,T+1))||S;h.push(S),s.push(S)}else a==="inline"&&h.push(S)}),a==="classic"){for(const b of i)u=((f=b==null?void 0:b.code)==null?void 0:f.call(d,u))||u;c.children.push(u);for(const b of i)c=((m=b==null?void 0:b.pre)==null?void 0:m.call(d,c))||c;o.children.push(c)}else if(a==="inline"){const b=[];let T={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const w of o.children)w.type==="element"&&w.tagName==="br"?(b.push(T),T={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(w.type==="element"||w.type==="text")&&T.children.push(w);b.push(T);let S={type:"element",tagName:"code",properties:{},children:b};for(const w of i)S=((g=w==null?void 0:w.code)==null?void 0:g.call(d,S))||S;o.children=[];for(let w=0;w<S.children.length;w++){w>0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});const A=S.children[w];A.type==="element"&&o.children.push(...A.children)}}let p=o;for(const b of i)p=((y=b==null?void 0:b.root)==null?void 0:y.call(d,p))||p;return r&&Bm(p,r),p}function dOe(t){return t.map(e=>{const n=[];let r="",i=0;return e.forEach((s,o)=>{const a=!(s.fontStyle&&(s.fontStyle&mn.Underline||s.fontStyle&mn.Strikethrough));a&&s.content.match(/^\s+$/)&&e[o+1]?(i||(i=s.offset),r+=s.content):r?(a?n.push({...s,offset:i,content:r+s.content}):n.push({content:r,offset:i},s),i=0,r=""):n.push(s)}),n})}function pOe(t){return t.map(e=>e.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,i,s,o]=r;if(!i&&!o)return n;const a=[{...n,offset:n.offset+i.length,content:s}];return i&&a.unshift({content:i,offset:n.offset}),o&&a.push({content:o,offset:n.offset+i.length+s.length}),a}))}function fOe(t){return t.map(e=>{const n=[];for(const r of e){if(n.length===0){n.push({...r});continue}const i=n[n.length-1],s=OE(i.htmlStyle||vf(i)),o=OE(r.htmlStyle||vf(r)),a=i.fontStyle&&(i.fontStyle&mn.Underline||i.fontStyle&mn.Strikethrough),l=r.fontStyle&&(r.fontStyle&mn.Underline||r.fontStyle&mn.Strikethrough);!a&&!l&&s===o?i.content+=r.content:n.push({...r})}return n})}const mOe=Mge;function gOe(t,e,n){var s;const r={meta:{},options:n,codeToHast:(o,a)=>kf(t,o,a),codeToTokens:(o,a)=>wf(t,o,a)};let i=mOe(kf(t,e,n,r));for(const o of Tf(n))i=((s=o.postprocess)==null?void 0:s.call(r,i,n))||i;return i}const JD={light:"#333333",dark:"#bbbbbb"},eA={light:"#fffffe",dark:"#1e1e1e"},tA="__shiki_resolved";function hS(t){var a,l,c,u,h;if(t!=null&&t[tA])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||(e.type="dark"),e.colorReplacements={...e.colorReplacements},e.settings||(e.settings=[]);let{bg:n,fg:r}=e;if(!n||!r){const d=e.settings?e.settings.find(p=>!p.name&&!p.scope):void 0;(a=d==null?void 0:d.settings)!=null&&a.foreground&&(r=d.settings.foreground),(l=d==null?void 0:d.settings)!=null&&l.background&&(n=d.settings.background),!r&&((c=e==null?void 0:e.colors)!=null&&c["editor.foreground"])&&(r=e.colors["editor.foreground"]),!n&&((u=e==null?void 0:e.colors)!=null&&u["editor.background"])&&(n=e.colors["editor.background"]),r||(r=e.type==="light"?JD.light:JD.dark),n||(n=e.type==="light"?eA.light:eA.dark),e.fg=r,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let i=0;const s=new Map;function o(d){var f;if(s.has(d))return s.get(d);i+=1;const p=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return(f=e.colorReplacements)!=null&&f[`#${p}`]?o(d):(s.set(d,p),p)}e.settings=e.settings.map(d=>{var g,y;const p=((g=d.settings)==null?void 0:g.foreground)&&!d.settings.foreground.startsWith("#"),f=((y=d.settings)==null?void 0:y.background)&&!d.settings.background.startsWith("#");if(!p&&!f)return d;const m={...d,settings:{...d.settings}};if(p){const b=o(d.settings.foreground);e.colorReplacements[b]=d.settings.foreground,m.settings.foreground=b}if(f){const b=o(d.settings.background);e.colorReplacements[b]=d.settings.background,m.settings.background=b}return m});for(const d of Object.keys(e.colors||{}))if((d==="editor.foreground"||d==="editor.background"||d.startsWith("terminal.ansi"))&&!((h=e.colors[d])!=null&&h.startsWith("#"))){const p=o(e.colors[d]);e.colorReplacements[p]=e.colors[d],e.colors[d]=p}return Object.defineProperty(e,tA,{enumerable:!1,writable:!1,value:!0}),e}async function RB(t){return Array.from(new Set((await Promise.all(t.filter(e=>!xB(e)).map(async e=>await _B(e).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function MB(t){return(await Promise.all(t.map(async e=>CB(e)?null:hS(await _B(e))))).filter(e=>!!e)}let OOe=3;function yOe(t,e=3){e>OOe||console.trace(`[SHIKI DEPRECATE]: ${t}`)}let Ca=class extends Error{constructor(t){super(t),this.name="ShikiError"}};class bOe extends Nme{constructor(n,r,i,s={}){super(n);V(this,"_resolvedThemes",new Map);V(this,"_resolvedGrammars",new Map);V(this,"_langMap",new Map);V(this,"_langGraph",new Map);V(this,"_textmateThemeCache",new WeakMap);V(this,"_loadedThemesCache",null);V(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=r,this._langs=i,this._alias=s,this._themes.map(o=>this.loadTheme(o)),this.loadLanguages(this._langs)}getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const r=hS(n);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let r=this._textmateThemeCache.get(n);r||(r=mf.createFromRawTheme(n),this._textmateThemeCache.set(n,r)),this._syncRegistry.setTheme(r)}getGrammar(n){if(this._alias[n]){const r=new Set([n]);for(;this._alias[n];){if(n=this._alias[n],r.has(n))throw new Ca(`Circular alias \`${Array.from(r).join(" -> ")} -> ${n}\``);r.add(n)}}return this._resolvedGrammars.get(n)}loadLanguage(n){var o,a,l,c;if(this.getGrammar(n.name))return;const r=new Set([...this._langMap.values()].filter(u=>{var h;return(h=u.embeddedLangsLazy)==null?void 0:h.includes(n.name)}));this._resolver.addLanguage(n);const i={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const s=this.loadGrammarWithConfiguration(n.scopeName,1,i);if(s.name=n.name,this._resolvedGrammars.set(n.name,s),n.aliases&&n.aliases.forEach(u=>{this._alias[u]=n.name}),this._loadedLanguagesCache=null,r.size)for(const u of r)this._resolvedGrammars.delete(u.name),this._loadedLanguagesCache=null,(a=(o=this._syncRegistry)==null?void 0:o._injectionGrammars)==null||a.delete(u.scopeName),(c=(l=this._syncRegistry)==null?void 0:l._grammars)==null||c.delete(u.scopeName),this.loadLanguage(this._langMap.get(u.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const s of n)this.resolveEmbeddedLanguages(s);const r=Array.from(this._langGraph.entries()),i=r.filter(([s,o])=>!o);if(i.length){const s=r.filter(([o,a])=>{var l;return a&&((l=a.embeddedLangs)==null?void 0:l.some(c=>i.map(([u])=>u).includes(c)))}).filter(o=>!i.includes(o));throw new Ca(`Missing languages ${i.map(([o])=>`\`${o}\``).join(", ")}, required by ${s.map(([o])=>`\`${o}\``).join(", ")}`)}for(const[s,o]of r)this._resolver.addLanguage(o);for(const[s,o]of r)this.loadLanguage(o)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){this._langMap.set(n.name,n),this._langGraph.set(n.name,n);const r=n.embeddedLanguages??n.embeddedLangs;if(r)for(const i of r)this._langGraph.set(i,this._langMap.get(i))}}class EOe{constructor(e,n){V(this,"_langs",new Map);V(this,"_scopeToLang",new Map);V(this,"_injections",new Map);V(this,"_onigLib");this._onigLib={createOnigScanner:r=>e.createScanner(r),createOnigString:r=>e.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(n=>{this._langs.set(n,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(e.scopeName)})}getInjections(e){const n=e.split(".");let r=[];for(let i=1;i<=n.length;i++){const s=n.slice(0,i).join(".");r=[...r,...this._injections.get(s)||[]]}return r}}let Yl=0;function vOe(t){Yl+=1,t.warnings!==!1&&Yl>=10&&Yl%10===0&&console.warn(`[Shiki] ${Yl} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new Ca("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(hS),i=new EOe(t.engine,n),s=new bOe(i,r,n,t.langAlias);let o;function a(b){g();const T=s.getGrammar(typeof b=="string"?b:b.name);if(!T)throw new Ca(`Language \`${b}\` not found, you may need to load it first`);return T}function l(b){if(b==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};g();const T=s.getTheme(b);if(!T)throw new Ca(`Theme \`${b}\` not found, you may need to load it first`);return T}function c(b){g();const T=l(b);o!==b&&(s.setTheme(T),o=b);const S=s.getColorMap();return{theme:T,colorMap:S}}function u(){return g(),s.getLoadedThemes()}function h(){return g(),s.getLoadedLanguages()}function d(...b){g(),s.loadLanguages(b.flat(1))}async function p(...b){return d(await RB(b))}function f(...b){g();for(const T of b.flat(1))s.loadTheme(T)}async function m(...b){return g(),f(await MB(b))}function g(){if(e)throw new Ca("Shiki instance has been disposed")}function y(){e||(e=!0,s.dispose(),Yl-=1)}return{setTheme:c,getTheme:l,getLanguage:a,getLoadedThemes:u,getLoadedLanguages:h,loadLanguage:p,loadLanguageSync:d,loadTheme:m,loadThemeSync:f,dispose:y,[Symbol.dispose]:y}}async function TOe(t){t.engine||yOe("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,n,r]=await Promise.all([MB(t.themes||[]),RB(t.langs||[]),t.engine]);return vOe({...t,themes:e,langs:n,engine:r})}async function SOe(t){const e=await TOe(t);return{getLastGrammarState:(...n)=>iOe(e,...n),codeToTokensBase:(n,r)=>uS(e,n,r),codeToTokensWithThemes:(n,r)=>NB(e,n,r),codeToTokens:(n,r)=>wf(e,n,r),codeToHast:(n,r)=>kf(e,n,r),codeToHtml:(n,r)=>gOe(e,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function wOe(t){const e=t.langs,n=t.themes,r=t.engine;async function i(s){function o(h){var d;if(typeof h=="string"){if(xB(h))return[];h=((d=s.langAlias)==null?void 0:d[h])||h;const p=e[h];if(!p)throw new Pt(`Language \`${h}\` is not included in this bundle. You may want to load it from external source.`);return p}return h}function a(h){if(CB(h))return"none";if(typeof h=="string"){const d=n[h];if(!d)throw new Pt(`Theme \`${h}\` is not included in this bundle. You may want to load it from external source.`);return d}return h}const l=(s.themes??[]).map(h=>a(h)),c=(s.langs??[]).map(h=>o(h)),u=await SOe({engine:s.engine??r(),...s,themes:l,langs:c});return{...u,loadLanguage(...h){return u.loadLanguage(...h.map(o))},loadTheme(...h){return u.loadTheme(...h.map(a))},getBundledLanguages(){return e},getBundledThemes(){return n}}}return i}function kOe(t){let e;async function n(r={}){if(e){const i=await e;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}else{e=t({...r,themes:[],langs:[]});const i=await e;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}}return n}function _Oe(t,e){const n=kOe(t);async function r(i,s){var l;const o=await n({langs:[s.lang],themes:"theme"in s?[s.theme]:Object.values(s.themes)}),a=await((l=e==null?void 0:e.guessEmbeddedLanguages)==null?void 0:l.call(e,i,s.lang,o));return a&&await o.loadLanguage(...a),o}return{getSingletonHighlighter(i){return n(i)},async codeToHtml(i,s){return(await r(i,s)).codeToHtml(i,s)},async codeToHast(i,s){return(await r(i,s)).codeToHast(i,s)},async codeToTokens(i,s){return(await r(i,s)).codeToTokens(i,s)},async codeToTokensBase(i,s){return(await r(i,s)).codeToTokensBase(i,s)},async codeToTokensWithThemes(i,s){return(await r(i,s)).codeToTokensWithThemes(i,s)},async getLastGrammarState(i,s){return(await n({langs:[s.lang],themes:[s.theme]})).getLastGrammarState(i,s)}}}const IB=[{id:"abap",name:"ABAP",import:(()=>k(()=>import("./abap-Y8Dl9g_6-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>k(()=>import("./actionscript-3-DZzbMeqX-CfeIJUat.js"),[]))},{id:"ada",name:"Ada",import:(()=>k(()=>import("./ada-vP6ak0IW-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>k(()=>import("./angular-html-DPB4Rf0C-BGgsGAY9.js"),__vite__mapDeps([0,1,2,3])).then(t=>t.f))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>k(()=>import("./angular-ts-CTOR2ofC-k8fsuEIJ.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>k(()=>import("./apache-BUjz-sD2-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>k(()=>import("./apex-oLhhs58q-DDbsPZ6N.js"),[]))},{id:"apl",name:"APL",import:(()=>k(()=>import("./apl-CjNiDgad-CT4Sbzkr.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>k(()=>import("./applescript-BPx7YFFu-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>k(()=>import("./ara-Z2fSOxSw-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>k(()=>import("./asciidoc-B-pCoB3G-Dv7Oe6Be.js"),[]))},{id:"asm",name:"Assembly",import:(()=>k(()=>import("./asm-BTWLY5ym-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>k(()=>import("./astro-CFFExE8Q-HUi9-hH-.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>k(()=>import("./awk-Fb0P9dkn-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>k(()=>import("./ballerina-oZK-YekG-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>k(()=>import("./bat-0FvbqU9S-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>k(()=>import("./beancount-DqJEb89h-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>k(()=>import("./berry-DODBq_Ff-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>k(()=>import("./bibtex-EULQRLY5-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>k(()=>import("./bicep-BorU73w0-Bmn6On1c.js"),[]))},{id:"blade",name:"Blade",import:(()=>k(()=>import("./blade-CRa6j5zS-DjoTdYFr.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>k(()=>import("./bsl-NkNNwerW-COH_2WFP.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>k(()=>import("./c-eeMepfLm-BIGW1oBm.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>k(()=>import("./cadence-02UX7mW8-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>k(()=>import("./cairo-DM6WF2e3-DtzH3ucv.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>k(()=>import("./clarity-PKm5CwqM-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>k(()=>import("./clojure-CXJfHrL3-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>k(()=>import("./cmake-BJz8BOTU-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>k(()=>import("./cobol-HihOMwht-CEH5cA2t.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>k(()=>import("./codeowners-Bt9yU6NX-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>k(()=>import("./codeql-DHkodjjI-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>k(()=>import("./coffee-DGBR_nr_-BGq2hPi0.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>k(()=>import("./common-lisp-EVqT9Zhp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>k(()=>import("./coq-B0L9upzn-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>k(()=>import("./cpp-Cj177cuW-CX9fafSh.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>k(()=>import("./crystal-CRJyc4G--DiK3qIky.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>k(()=>import("./csharp-C7yUs7-w-K5feNrxe.js"),[]))},{id:"css",name:"CSS",import:(()=>k(()=>import("./css-CECN5uSL-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>k(()=>import("./csv-CmYOceLb-Co7V7EpZ.js"),[]))},{id:"cue",name:"CUE",import:(()=>k(()=>import("./cue-ZzumE7IT-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>k(()=>import("./cypher-jpdmjtA6-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>k(()=>import("./d-CBagWSwH-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>k(()=>import("./dart-6ObCrKr9-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>k(()=>import("./dax-CcDT-8dH-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>k(()=>import("./desktop-B93p9R9O-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>k(()=>import("./diff-BxzP2J8R-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>k(()=>import("./docker-CsHqm9tx-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>k(()=>import("./dotenv-BMjVjUL1-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>k(()=>import("./dream-maker-PAx17jaB-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>k(()=>import("./edge-BYQkOzbF-DYO1BWoQ.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>k(()=>import("./elixir-Dh036GMp-Bmki-TVL.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>k(()=>import("./elm-BtNbw_Cd-Bp18OckW.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>k(()=>import("./emacs-lisp-Cfxdx5D--C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>k(()=>import("./erb-CS4zioBv-CIsDXqOo.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>k(()=>import("./erlang-DNcDT8Hi-BWqZUIhL.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>k(()=>import("./fennel-N4WcXuKx-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>k(()=>import("./fish-BTDEUgqH-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>k(()=>import("./fluent-BMXUxfv1-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>k(()=>import("./fortran-fixed-form-DUsA-VGo-CqycLhgt.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>k(()=>import("./fortran-free-form-DPIT_jbP-D22FLkUw.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>k(()=>import("./fsharp-CYOiIVNx-C_zLmMdw.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",import:(()=>k(()=>import("./gdresource-BwtMIoBm-DAu1Gww7.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",import:(()=>k(()=>import("./gdscript-BifyeYhI-DTMYz4Jt.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>k(()=>import("./gdshader-Bk8fF6yr-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>k(()=>import("./genie-DzUvd7U9-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>k(()=>import("./gherkin-DHRaV0YP-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>k(()=>import("./git-commit-Bd32YZ0K-DKnZnecv.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>k(()=>import("./git-rebase-ZWUFO_T4-PODeWoq4.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>k(()=>import("./gleam-Bv284lvN-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>k(()=>import("./glimmer-js-DkxNrfPT-CYvKIGv7.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>k(()=>import("./glimmer-ts-D6YZEmK_-BwkeDeeu.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>k(()=>import("./glsl-CkUcVZNK-Bf0UjSP5.js"),__vite__mapDeps([25,26])))},{id:"gnuplot",name:"Gnuplot",import:(()=>k(()=>import("./gnuplot-yPG9-sE_-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>k(()=>import("./go-ChxJuLYK-Dn2_MT6a.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>k(()=>import("./graphql-CBu2ehBn-Cr253Gy9.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>k(()=>import("./groovy-CJQTphOW-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>k(()=>import("./hack-ItRNKiEb-Dz4s7CVj.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>k(()=>import("./haml-NZLVzu_R-C8mKtd0e.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>k(()=>import("./handlebars-mxStpSE7-B5GnhLue.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>k(()=>import("./haskell-WeIwNIP6-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>k(()=>import("./haxe-TztHsm5T-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>k(()=>import("./hcl-D438OF-I-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>k(()=>import("./hjson-DYBUbqOl-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>k(()=>import("./hlsl-Bk8TCZNL-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>k(()=>import("./html-B50bmoVb-Cb86E5ej.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>k(()=>import("./html-derivative-C6bxFbFW-Iy97gZi_.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>k(()=>import("./http-DLvAkeD--BNfsu0Nw.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>k(()=>import("./hurl-CgkFN90t-RkzLjdXO.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>k(()=>import("./hxml-GbqSQCLa-MyDbT556.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>k(()=>import("./hy-Brt5EZ7--DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>k(()=>import("./imba-CimUv-Uh-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>k(()=>import("./ini-BZIuRIvJ-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>k(()=>import("./java-DY6VlHhP-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>k(()=>import("./javascript-C25yR2R2-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>k(()=>import("./jinja-CFW5uAwY-CRnS6Ysd.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>k(()=>import("./jison-DdreslRX-C_aDQymB.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>k(()=>import("./json-DxJze_jm-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>k(()=>import("./json5-BT4Fjg39-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>k(()=>import("./jsonc-CHjZD8gR-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>k(()=>import("./jsonl-BGuvDmy9-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>k(()=>import("./jsonnet-Bx2cfsXg-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>k(()=>import("./jssm-BcADi6EI-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>k(()=>import("./jsx-BtKADgXT-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>k(()=>import("./julia--2-efCjg-ZfD7vPuG.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"kdl",name:"KDL",import:(()=>k(()=>import("./kdl-BNOv9TC3-U6gkEhfw.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>k(()=>import("./kotlin-ByBMgTeR-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>k(()=>import("./kusto-VWFLl2T0-BvAqAH-y.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>k(()=>import("./latex-Cs75fyNk-BaSXX46b.js"),__vite__mapDeps([63,64,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>k(()=>import("./lean-D5yRrexI-Bc6EcWN3.js"),[]))},{id:"less",name:"Less",import:(()=>k(()=>import("./less-B1GLI2Di-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>k(()=>import("./liquid-CHzkx3jT-zQly3uxw.js"),__vite__mapDeps([65,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>k(()=>import("./llvm-co1rIKs3-BtvRca6l.js"),[]))},{id:"log",name:"Log file",import:(()=>k(()=>import("./log-Al8wyEFV-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>k(()=>import("./logo-DBa4JDzV-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>k(()=>import("./lua-kX5WP_P5-BiSz3S93.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>k(()=>import("./luau-DtBSxLyz-CXu1NL6O.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>k(()=>import("./make-CsMclxtr-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>k(()=>import("./markdown-CrScaQ96-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>k(()=>import("./marko-ls0Jg2j8-CH6c4llz.js"),__vite__mapDeps([66,3,67,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>k(()=>import("./matlab-BOAaUVP0-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>k(()=>import("./mdc-uaivvctV-DArzT8kn.js"),__vite__mapDeps([68,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>k(()=>import("./mdx-BOhZZUJ8-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>k(()=>import("./mermaid-B0ixDHKN-DKYwYmdq.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>k(()=>import("./mipsasm-CTx18fBl-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>k(()=>import("./mojo-BD611d7o-1DNp92w6.js"),[]))},{id:"move",name:"Move",import:(()=>k(()=>import("./move-F-dICmj2-Bu9oaDYs.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>k(()=>import("./narrat-DmhDCBs--DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>k(()=>import("./nextflow-DmSVRGjG-BrzmwbiE.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>k(()=>import("./nginx-5vhPAEw3-DWisHew1.js"),__vite__mapDeps([69,37,26])))},{id:"nim",name:"Nim",import:(()=>k(()=>import("./nim-QAjRdh9w-DCY1hsTS.js"),__vite__mapDeps([70,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>k(()=>import("./nix-BZK5F767-c8nO5XWb.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>k(()=>import("./nushell-D8j3dhT--C-sUppwS.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>k(()=>import("./objective-c-Itk8tzmv-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>k(()=>import("./objective-cpp-DGt5UKRO-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>k(()=>import("./ocaml-eSVK32Eg-C0hk2d4L.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>k(()=>import("./openscad-Sp5uZ6f2-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>k(()=>import("./pascal-xy8pJNns-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>k(()=>import("./perl-DkVrgJBg-BOYFiEPK.js"),__vite__mapDeps([71,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>k(()=>import("./php-j2zCzTEz-D4sqbyu8.js"),__vite__mapDeps([72,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>k(()=>import("./pkl-C-zSNmaA-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>k(()=>import("./plsql-pVbGZfOv-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>k(()=>import("./po-BNfHvqmm-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>k(()=>import("./polar-CAZahv3u-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>k(()=>import("./postcss-05aHdL-n-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>k(()=>import("./powerquery-DI9HkTvs-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>k(()=>import("./powershell-Clc4ydu--Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>k(()=>import("./prisma-FZjmVtSl-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>k(()=>import("./prolog-C5-yg4TO-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>k(()=>import("./proto-MmCPeFAD-DyJlTyXw.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>k(()=>import("./pug-XOw9Q1Ho-ibTSJqKJ.js"),__vite__mapDeps([73,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>k(()=>import("./puppet-CUJHmnxV-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>k(()=>import("./purescript-rUfGld-4-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>k(()=>import("./python-BFNSHbwJ-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>k(()=>import("./qml-rTNXsquU-ChczqDSS.js"),__vite__mapDeps([74,2])))},{id:"qmldir",name:"QML Directory",import:(()=>k(()=>import("./qmldir-BInDYbpo-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>k(()=>import("./qss-AeJTysr_-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>k(()=>import("./r-Bm0uF0U2-DiinP2Uv.js"),[]))},{id:"racket",name:"Racket",import:(()=>k(()=>import("./racket-B83wSAja-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>k(()=>import("./raku-nEQ4ZJJ7-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>k(()=>import("./razor-B1z-bksM-BImEwUiZ.js"),__vite__mapDeps([75,1,2,3,76])))},{id:"reg",name:"Windows Registry Script",import:(()=>k(()=>import("./reg-m_s_Kiip-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>k(()=>import("./regexp-BazyLpPg-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>k(()=>import("./rel-BcRfyd6Q-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>k(()=>import("./riscv-Ce8MAQLP-BM1_JUlF.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>k(()=>import("./rosmsg-Cz0w1km8-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>k(()=>import("./rst-CcbeA9zE-DJw32adD.js"),__vite__mapDeps([77,15,1,2,3,23,24,25,26,16,20,28,38,78,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>k(()=>import("./ruby-DMPw6uKF-che4axXI.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>k(()=>import("./rust-CLzF9zIN-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>k(()=>import("./sas-fpEvgATw-BHxbuS_h.js"),__vite__mapDeps([79,16])))},{id:"sass",name:"Sass",import:(()=>k(()=>import("./sass-DxHp5rTx-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>k(()=>import("./scala-D4grkFkl-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>k(()=>import("./scheme-BCRWuEm4-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>k(()=>import("./scss-B1FaCqwR-D5j8Lzl0.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>k(()=>import("./sdbl-B7T8abf4-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>k(()=>import("./shaderlab-Cr62-Wb4-DBlXx3uy.js"),__vite__mapDeps([80,81])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>k(()=>import("./shellscript-InADTalH-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>k(()=>import("./shellsession-DiDJNQdy-DyhC3EVy.js"),__vite__mapDeps([82,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>k(()=>import("./smalltalk-BlI1_OkM-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>k(()=>import("./solidity-DUWnFhS6-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>k(()=>import("./soy-C1-6njHa-gzSMiW6X.js"),__vite__mapDeps([83,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>k(()=>import("./sparql-B0KWFEri-hRQCfo7w.js"),__vite__mapDeps([84,85])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>k(()=>import("./splunk-CRXR8A9s-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>k(()=>import("./sql-Cn_v3PB0-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>k(()=>import("./ssh-config-DP-hNVbF-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>k(()=>import("./stata-B8c5fTjX-C93OJGXX.js"),__vite__mapDeps([86,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>k(()=>import("./stylus-CyKEU1Ej-BEDo0Tqx.js"),[]))},{id:"svelte",name:"Svelte",import:(()=>k(()=>import("./svelte-5UasyOg7-zJZT0dEM.js"),__vite__mapDeps([87,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>k(()=>import("./swift-9UzSvamq-Dg5xB15N.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>k(()=>import("./system-verilog-BCm7smPJ-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>k(()=>import("./systemd-C-4qm6XH-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>k(()=>import("./talonscript-CFF3LF_O-Cc6Jm0TJ.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>k(()=>import("./tasl-Cg_WBUAe-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>k(()=>import("./tcl-DN7buRTF-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>k(()=>import("./templ-peLZIM2D-BFctp3GS.js"),__vite__mapDeps([88,89,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>k(()=>import("./terraform-DGvcn9zM-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>k(()=>import("./tex-DpOayVob-BUPSY20p.js"),__vite__mapDeps([64,62])))},{id:"toml",name:"TOML",import:(()=>k(()=>import("./toml-DY62mUL_-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>k(()=>import("./ts-tags-ioVe2PKw-KHYt7rNi.js"),__vite__mapDeps([90,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>k(()=>import("./tsv-BtvSkaG0-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>k(()=>import("./tsx-B8rCNbgL-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>k(()=>import("./turtle-_H59FV7D-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>k(()=>import("./twig-CcRLVyUg-C7btHcUR.js"),__vite__mapDeps([91,3,2,5,72,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>k(()=>import("./typescript-RycA9KXf-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>k(()=>import("./typespec-DWqp-kUU-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>k(()=>import("./typst-D_1QKWns-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>k(()=>import("./v-BPCNiyYe-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>k(()=>import("./vala-uxaPR7d1-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>k(()=>import("./vb-D8_c5-KN-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>k(()=>import("./verilog-B-bybjPF-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>k(()=>import("./vhdl-CUlNa8ac-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>k(()=>import("./viml-DsfA-sWm-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>k(()=>import("./vue-DOVAQqiz-Cv_ide59.js"),__vite__mapDeps([92,3,2,11,9,15,1])))},{id:"vue-html",name:"Vue HTML",import:(()=>k(()=>import("./vue-html-C7WI2elu-3aWFIZnF.js"),__vite__mapDeps([93,92,3,2,11,9,15,1])))},{id:"vue-vine",name:"Vue Vine",import:(()=>k(()=>import("./vue-vine-D386fra9-CJV7hRr5.js"),__vite__mapDeps([94,3,5,67,95,12,92,2,11,9,15,1])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>k(()=>import("./vyper-CPQuu50u-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>k(()=>import("./wasm-BBXxrAl7-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>k(()=>import("./wenyan-pbVjoM9_-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>k(()=>import("./wgsl-DY4iK1q1-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>k(()=>import("./wikitext-Z-MoUasO-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>k(()=>import("./wit-CQMQOlTg-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>k(()=>import("./wolfram-Dz4KXISs-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>k(()=>import("./xml-C2J0sS9M-wPCL2nsB.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>k(()=>import("./xsl-BmSZphgC-CVyS_1ZI.js"),__vite__mapDeps([96,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>k(()=>import("./yaml-DaO7k5B1-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>k(()=>import("./zenscript-CxBjpf9c-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>k(()=>import("./zig-Vm0PO9wB-VOosw3JB.js"),[]))}],xOe=Object.fromEntries(IB.map(t=>[t.id,t.import])),COe=Object.fromEntries(IB.flatMap(t=>{var e;return((e=t.aliases)==null?void 0:e.map(n=>[n,t.import]))||[]})),DOe={...xOe,...COe},AOe=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>k(()=>import("./andromeeda-BIpZ7gaU-C-Jbm3Hp.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>k(()=>import("./aurora-x-BwoVEUWZ-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>k(()=>import("./ayu-dark-CxPZkpb2-Cv9koXgw.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>k(()=>import("./catppuccin-frappe-D3cH2rXe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>k(()=>import("./catppuccin-latte-C0LRGUW4-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>k(()=>import("./catppuccin-macchiato-c5wQ11TT-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>k(()=>import("./catppuccin-mocha-WMD6Qvya-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>k(()=>import("./dark-plus-pUHDTVV0-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>k(()=>import("./dracula-BtZx2Kac-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>k(()=>import("./dracula-soft-BKa-aqBv-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>k(()=>import("./everforest-dark-DMCBqXCK-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>k(()=>import("./everforest-light-BbXl82Em-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>k(()=>import("./github-dark-DenFmJkN-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>k(()=>import("./github-dark-default-BJPUVz4H-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>k(()=>import("./github-dark-dimmed-DUshB20C-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>k(()=>import("./github-dark-high-contrast-D3aGCnF8-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>k(()=>import("./github-light-JYsPkUQd-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>k(()=>import("./github-light-default-D99KPAby-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>k(()=>import("./github-light-high-contrast-BbmZE-Mp-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>k(()=>import("./gruvbox-dark-hard-C5HOtKIh-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>k(()=>import("./gruvbox-dark-medium-FVgwJHuz-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>k(()=>import("./gruvbox-dark-soft-B46F314v-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>k(()=>import("./gruvbox-light-hard-CJD38wDZ-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>k(()=>import("./gruvbox-light-medium-BlIhMYTA-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>k(()=>import("./gruvbox-light-soft-DoPHyLVZ-hJgmCMqR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>k(()=>import("./houston-BDYrDoDW-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>k(()=>import("./kanagawa-dragon-CiKur4Hl-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>k(()=>import("./kanagawa-lotus-BKu-smKu-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>k(()=>import("./kanagawa-wave-CQwozSzG-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>k(()=>import("./laserwave-6a00oqik-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>k(()=>import("./light-plus-CZuVqSLX-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>k(()=>import("./material-theme-D6KBX41T-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>k(()=>import("./material-theme-darker-CkRroheE-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>k(()=>import("./material-theme-lighter-BUBw43Yz-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>k(()=>import("./material-theme-ocean-ClGX14Ja-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>k(()=>import("./material-theme-palenight-C1RVm8K1-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>k(()=>import("./min-dark-C7ak0t6c-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>k(()=>import("./min-light-CKFxVcPp-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>k(()=>import("./monokai-C1KBYcO0-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>k(()=>import("./night-owl-Bm2rzalh-C39BiMTA.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>k(()=>import("./nord-CC5OiUXg-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>k(()=>import("./one-dark-pro-DTA3VF0_-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>k(()=>import("./one-light-D9sNaUtq-PoHY5YXO.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>k(()=>import("./plastic-CSTz3KZp-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>k(()=>import("./poimandres-C-VADXHD-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>k(()=>import("./red-7y8PH7HH-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>k(()=>import("./rose-pine-BKc3yVeu-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>k(()=>import("./rose-pine-dawn-BulJcPZT-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>k(()=>import("./rose-pine-moon-j6jiXKV8-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>k(()=>import("./slack-dark-i7wN4OET-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>k(()=>import("./slack-ochin-ndHf0LoP-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>k(()=>import("./snazzy-light-BlSJXAu4-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>k(()=>import("./solarized-dark-UTmkh7lw-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>k(()=>import("./solarized-light-BheCkDPT-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>k(()=>import("./synthwave-84-NU3C_KFZ-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>k(()=>import("./tokyo-night-DP4TmcQl-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>k(()=>import("./vesper-BckBta1U-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>k(()=>import("./vitesse-black-BoGvW84i-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>k(()=>import("./vitesse-dark-Cym-eLtO-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>k(()=>import("./vitesse-light-CcmG315c-CVO1_9PV.js"),[]))}],POe=Object.fromEntries(AOe.map(t=>[t.id,t.import]));class dS extends Error{constructor(e){super(e),this.name="ShikiError"}}function NOe(){return 2147483648}function ROe(){return typeof performance<"u"?performance.now():Date.now()}const MOe=(t,e)=>t+(e-t%e)%e;async function IOe(t){let e,n;const r={};function i(p){n=p,r.HEAPU8=new Uint8Array(p),r.HEAPU32=new Uint32Array(p)}function s(p,f,m){r.HEAPU8.copyWithin(p,f,f+m)}function o(p){try{return e.grow(p-n.byteLength+65535>>>16),i(e.buffer),1}catch{}}function a(p){const f=r.HEAPU8.length;p=p>>>0;const m=NOe();if(p>m)return!1;for(let g=1;g<=4;g*=2){let y=f*(1+.2/g);y=Math.min(y,p+100663296);const b=Math.min(m,MOe(Math.max(p,y),65536));if(o(b))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(p,f,m=1024){const g=f+m;let y=f;for(;p[y]&&!(y>=g);)++y;if(y-f>16&&p.buffer&&l)return l.decode(p.subarray(f,y));let b="";for(;f<y;){let T=p[f++];if(!(T&128)){b+=String.fromCharCode(T);continue}const S=p[f++]&63;if((T&224)===192){b+=String.fromCharCode((T&31)<<6|S);continue}const w=p[f++]&63;if((T&240)===224?T=(T&15)<<12|S<<6|w:T=(T&7)<<18|S<<12|w<<6|p[f++]&63,T<65536)b+=String.fromCharCode(T);else{const A=T-65536;b+=String.fromCharCode(55296|A>>10,56320|A&1023)}}return b}function u(p,f){return p?c(r.HEAPU8,p,f):""}const h={emscripten_get_now:ROe,emscripten_memcpy_big:s,emscripten_resize_heap:a,fd_write:()=>0};async function d(){const p=await t({env:h,wasi_snapshot_preview1:h});e=p.memory,i(e.buffer),Object.assign(r,p),r.UTF8ToString=u}return await d(),r}var LOe=Object.defineProperty,QOe=(t,e,n)=>e in t?LOe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qt=(t,e,n)=>QOe(t,typeof e!="symbol"?e+"":e,n);let Ut=null;function $Oe(t){throw new dS(t.UTF8ToString(t.getLastOnigError()))}class jm{constructor(e){Qt(this,"utf16Length"),Qt(this,"utf8Length"),Qt(this,"utf16Value"),Qt(this,"utf8Value"),Qt(this,"utf16OffsetToUtf8"),Qt(this,"utf8OffsetToUtf16");const n=e.length,r=jm._utf8ByteLength(e),i=r!==n,s=i?new Uint32Array(n+1):null;i&&(s[n]=r);const o=i?new Uint32Array(r+1):null;i&&(o[r]=n);const a=new Uint8Array(r);let l=0;for(let c=0;c<n;c++){const u=e.charCodeAt(c);let h=u,d=!1;if(u>=55296&&u<=56319&&c+1<n){const p=e.charCodeAt(c+1);p>=56320&&p<=57343&&(h=(u-55296<<10)+65536|p-56320,d=!0)}i&&(s[c]=l,d&&(s[c+1]=l),h<=127?o[l+0]=c:h<=2047?(o[l+0]=c,o[l+1]=c):h<=65535?(o[l+0]=c,o[l+1]=c,o[l+2]=c):(o[l+0]=c,o[l+1]=c,o[l+2]=c,o[l+3]=c)),h<=127?a[l++]=h:h<=2047?(a[l++]=192|(h&1984)>>>6,a[l++]=128|(h&63)>>>0):h<=65535?(a[l++]=224|(h&61440)>>>12,a[l++]=128|(h&4032)>>>6,a[l++]=128|(h&63)>>>0):(a[l++]=240|(h&1835008)>>>18,a[l++]=128|(h&258048)>>>12,a[l++]=128|(h&4032)>>>6,a[l++]=128|(h&63)>>>0),d&&c++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=e,this.utf8Value=a,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let n=0;for(let r=0,i=e.length;r<i;r++){const s=e.charCodeAt(r);let o=s,a=!1;if(s>=55296&&s<=56319&&r+1<i){const l=e.charCodeAt(r+1);l>=56320&&l<=57343&&(o=(s-55296<<10)+65536|l-56320,a=!0)}o<=127?n+=1:o<=2047?n+=2:o<=65535?n+=3:n+=4,a&&r++}return n}createString(e){const n=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,n),n}}const zm=class qr{constructor(e){if(Qt(this,"id",++qr.LAST_ID),Qt(this,"_onigBinding"),Qt(this,"content"),Qt(this,"utf16Length"),Qt(this,"utf8Length"),Qt(this,"utf16OffsetToUtf8"),Qt(this,"utf8OffsetToUtf16"),Qt(this,"ptr"),!Ut)throw new dS("Must invoke loadWasm first.");this._onigBinding=Ut,this.content=e;const n=new jm(e);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!qr._sharedPtrInUse?(qr._sharedPtr||(qr._sharedPtr=Ut.omalloc(1e4)),qr._sharedPtrInUse=!0,Ut.HEAPU8.set(n.utf8Value,qr._sharedPtr),this.ptr=qr._sharedPtr):this.ptr=n.createString(Ut)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===qr._sharedPtr?qr._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Qt(zm,"LAST_ID",0);Qt(zm,"_sharedPtr",0);Qt(zm,"_sharedPtrInUse",!1);let LB=zm;class FOe{constructor(e){if(Qt(this,"_onigBinding"),Qt(this,"_ptr"),!Ut)throw new dS("Must invoke loadWasm first.");const n=[],r=[];for(let a=0,l=e.length;a<l;a++){const c=new jm(e[a]);n[a]=c.createString(Ut),r[a]=c.utf8Length}const i=Ut.omalloc(4*e.length);Ut.HEAPU32.set(n,i/4);const s=Ut.omalloc(4*e.length);Ut.HEAPU32.set(r,s/4);const o=Ut.createOnigScanner(i,s,e.length);for(let a=0,l=e.length;a<l;a++)Ut.ofree(n[a]);Ut.ofree(s),Ut.ofree(i),o===0&&$Oe(Ut),this._onigBinding=Ut,this._ptr=o}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof e=="string"){e=new LB(e);const s=this._findNextMatchSync(e,n,!1,i);return e.dispose(),s}return this._findNextMatchSync(e,n,!1,i)}_findNextMatchSync(e,n,r,i){const s=this._onigBinding,o=s.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(n),i);if(o===0)return null;const a=s.HEAPU32;let l=o/4;const c=a[l++],u=a[l++],h=[];for(let d=0;d<u;d++){const p=e.convertUtf8OffsetToUtf16(a[l++]),f=e.convertUtf8OffsetToUtf16(a[l++]);h[d]={start:p,end:f,length:f-p}}return{index:c,captureIndices:h}}}function BOe(t){return typeof t.instantiator=="function"}function jOe(t){return typeof t.default=="function"}function zOe(t){return typeof t.data<"u"}function VOe(t){return typeof Response<"u"&&t instanceof Response}function UOe(t){var e;return typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||typeof Buffer<"u"&&((e=Buffer.isBuffer)==null?void 0:e.call(Buffer,t))||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&t instanceof Uint32Array}let yd;function HOe(t){if(yd)return yd;async function e(){Ut=await IOe(async n=>{let r=t;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),BOe(r)?r=await r.instantiator(n):jOe(r)?r=await r.default(n):(zOe(r)&&(r=r.data),VOe(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await XOe(r)(n):r=await qOe(r)(n):UOe(r)?r=await KO(r)(n):r instanceof WebAssembly.Module?r=await KO(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await KO(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return yd=e(),yd}function KO(t){return e=>WebAssembly.instantiate(t,e)}function XOe(t){return e=>WebAssembly.instantiateStreaming(t,e)}function qOe(t){return async e=>{const n=await t.arrayBuffer();return WebAssembly.instantiate(n,e)}}async function ZOe(t){return t&&await HOe(t),{createScanner(e){return new FOe(e.map(n=>typeof n=="string"?n:n.source))},createString(e){return new LB(e)}}}const WOe=wOe({langs:DOe,themes:POe,engine:()=>ZOe(k(()=>import("./wasm-DQxwEHae-CG6Dc4jp.js"),[]))}),{codeToHast:GOe}=_Oe(WOe,{guessEmbeddedLanguages:Fge});async function YOe(t,e){const n=await GOe(t,{lang:e,themes:{light:"github-light-default",dark:"one-dark-pro"}});return JF(n,{Fragment:E.Fragment,jsx:E.jsx,jsxs:E.jsxs,components:{pre:({children:r})=>r}})}const KOe=t=>{const[e,n]=v.useState(null);return v.useEffect(()=>{YOe(t.content,t.language).then(n)},[t.content,t.language]),e||E.jsx("code",{...t,children:t.content})},QB={h2:t=>E.jsx(HO,{level:2,...t}),h3:t=>E.jsx(HO,{level:3,...t}),h4:t=>E.jsx(HO,{level:4,...t}),img:({src:t,alt:e,width:n,...r})=>E.jsx("img",{src:t,alt:e||"",width:r["data-width"],height:r["data-height"],className:"mx-auto rounded-lg"}),iframe:({...t})=>E.jsx("div",{children:E.jsx("iframe",{...t,allowFullScreen:!0,className:"mx-auto aspect-video h-full w-full rounded-lg"})}),pre:({children:t,...e})=>{const n=t.props.children;return E.jsxs("div",{className:"group not-prose relative overflow-hidden rounded-lg border border-[#d1d9e0] dark:border-[#3d444d]",children:[E.jsx(Xfe,{code:String(n)}),E.jsx("pre",{...e,children:t})]})},code:({children:t,...e})=>{const n=/language-(\w+)/.exec(e.className||""),r=String(t).replace(/\n$/,"");return n?E.jsx(KOe,{language:n[1],content:r}):E.jsx("code",{...e,children:t})},table:t=>E.jsx("table",{className:"not-prose mx-auto w-full table-auto border-collapse text-sm",...t}),tr:t=>E.jsx("tr",{className:"border-b border-b-[#d1d9e0] last:border-b-0 dark:border-b-[#3d444d]",...t}),td:t=>E.jsx("td",{className:"px-2.5 py-3.5",...t}),th:t=>E.jsx("td",{className:"px-2.5 py-3.5 font-bold",...t})},JOe=({children:t})=>{const[e,n]=v.useState(v.createElement(v.Fragment));return v.useEffect(function(){(async function(){const r=await sB({components:QB}).process(t);n(r.result)})()},[t]),E.jsx("div",{className:"rte-renderer tiptap ProseMirror !py-0",children:e})},eye=({children:t})=>{const e=sB({components:QB}).processSync(t);return E.jsx("div",{className:"rte-renderer tiptap ProseMirror !py-0",children:e.result})},aye=({value:t,ssr:e=!1})=>e?E.jsx(eye,{children:t}):E.jsx(JOe,{children:t});export{aye as e,Tue as k};