@pi-outpost/embed 0.52.0 → 0.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,423 +0,0 @@
1
- const e=require("./rolldown-runtime-DbbDpzbe.cjs"),t=require("./lib-CRTt_FoR.cjs"),n=require("./workspacePath-BdmjN0W2.cjs"),r=require("./download-U7JEZ6c9.cjs"),i=require("./katex-C-T_oEhv.cjs");let a=require("react"),o=require("react/jsx-runtime"),s=require("react-dom");var c=(0,a.createContext)(`dark`),l=()=>(0,a.useContext)(c);function u({text:e,className:t,iconOnly:n=!1}){let[r,i]=(0,a.useState)(!1);async function s(){try{await navigator.clipboard.writeText(e),i(!0),setTimeout(()=>i(!1),1500)}catch{}}return(0,o.jsx)(`button`,{type:`button`,onClick:s,title:r?`Copied!`:n?`Copy code`:`Copy`,"aria-label":n?r?`Copied`:`Copy code`:void 0,className:t??`rounded px-1.5 py-0.5 text-xs text-zinc-400 hover:bg-zinc-100 hover:text-zinc-700 dark:text-zinc-600 dark:hover:bg-zinc-800 dark:hover:text-zinc-300`,children:n?r?`✓`:`⧉`:r?`✓ copied`:`⧉ copy`})}function d(e){if(e==null)return;if(!(e.getRootNode()instanceof ShadowRoot))return globalThis.document.body;let t=e;for(;t.parentElement!==null;)t=t.parentElement;return t}function f({label:e,open:t,onClose:n,children:r,actions:i,containerRef:c,anchorRef:l,testId:u=`structured-enlarged`}){(0,a.useEffect)(()=>{if(!t)return;let e=e=>{e.key===`Escape`&&n()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t,n]);let f=(0,a.useRef)(void 0);return f.current=d(l?.current)??f.current,t?(0,s.createPortal)((0,o.jsx)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":`${e}, full size`,"data-testid":u,onClick:n,className:`fixed inset-0 z-[100] flex items-center justify-center overflow-hidden bg-black/60 p-6`,children:(0,o.jsxs)(`div`,{onClick:e=>e.stopPropagation(),className:`flex max-h-full min-w-0 w-auto max-w-[95vw] flex-col overflow-hidden rounded-lg bg-white p-4 shadow-xl dark:bg-zinc-900`,children:[(0,o.jsxs)(`div`,{className:`mb-2 flex shrink-0 items-center justify-between gap-4`,children:[(0,o.jsx)(`span`,{className:`text-xs text-zinc-500`,children:e}),(0,o.jsx)(`div`,{className:`flex items-center gap-3`,children:(0,o.jsx)(`button`,{type:`button`,onClick:n,"aria-label":`Close`,className:`rounded px-2 py-0.5 text-xs text-zinc-500 hover:bg-zinc-100 dark:hover:bg-zinc-800`,children:`✕`})})]}),(0,o.jsx)(`div`,{ref:c,role:`region`,"aria-label":`${e} content`,tabIndex:0,className:`min-h-0 min-w-0 overflow-auto [&_svg]:!max-w-none`,children:r}),i&&(0,o.jsx)(`div`,{className:`mt-2 flex shrink-0 flex-wrap items-center justify-start gap-3`,children:i})]})}),f.current??globalThis.document.body):null}var p=.8;function m(e){return e===`landscape`?`portrait`:`landscape`}function h(e,t){return!Number.isFinite(e)||!Number.isFinite(t)||e<=710?`landscape`:t<=e*p?`portrait`:`landscape`}var g=[`LR`,`RL`];function _(e){return g.includes(e)?`landscape`:`portrait`}function v(e){switch(e){case`LR`:return`TB`;case`TB`:return`LR`;case`RL`:return`BT`;case`BT`:return`RL`}}function y(e){let t=e.toUpperCase();return t===`TD`?`TB`:t===`TB`||t===`BT`||t===`LR`||t===`RL`?t:void 0}function b(e){let t=0;if(e[0]?.trim()===`---`){let n=e.findIndex((e,t)=>t>0&&e.trim()===`---`);if(n===-1)return-1;t=n+1}for(;t<e.length;t+=1){let n=e[t].trim();if(!(n===``||n.startsWith(`%%`)))return t}return-1}function x(e){let t=e.split(`
2
- `),n=b(t);if(n===-1)return;let r=t[n],i=/^(\s*)(flowchart|graph)([ \t]+(TD|TB|BT|LR|RL)\b)?(.*)$/i.exec(r);if(i!==null){let[,e,r,,a,o]=i,s=a===void 0?`TB`:y(a),c=v(s),l=[...t];return l[n]=`${e}${r} ${c}${o}`,{direction:s,turned:l.join(`
3
- `)}}let a=/^(\s*)stateDiagram(-v2)?\s*$/i.exec(r);if(a!==null)return S(t,n,a[1])}function S(e,t,n){let r=0;for(let n=t+1;n<e.length;n+=1){let t=e[n],i=r===0?/^\s*direction\s+(TD|TB|BT|LR|RL)\s*$/i.exec(t):null;if(i!==null){let r=y(i[1]),a=[...e];return a[n]=t.replace(/(direction\s+)(TD|TB|BT|LR|RL)/i,`$1${v(r)}`),{direction:r,turned:a.join(`
4
- `)}}r+=(t.match(/\{/g)?.length??0)-(t.match(/\}/g)?.length??0),r<0&&(r=0)}let i=[...e];return i.splice(t+1,0,`${n} direction LR`),{direction:`TB`,turned:i.join(`
5
- `)}}var C=`text-xs text-zinc-500 underline hover:text-zinc-800 dark:hover:text-zinc-200 disabled:opacity-50`,w=`flex flex-wrap items-center gap-3 text-xs`,T=null;async function ee(e){let t=await(T??=Promise.resolve().then(()=>require("./mermaid.core-73kk5oPm.cjs")).then(e=>e.t));return t.default.initialize({startOnLoad:!1,theme:e,look:`classic`,securityLevel:`strict`,suppressErrorRendering:!0}),t}function te(e){let t=/viewBox="\s*[\d.-]+[\s,]+[\d.-]+[\s,]+([\d.]+)[\s,]+([\d.]+)/.exec(e),n=t?Number(t[1]):NaN;return Number.isFinite(n)&&n>0?n:void 0}function E(e,t){if(typeof e!=`object`||!e||!(`props`in e))return null;let n=e.props;if(t!==void 0&&!RegExp(`\\blanguage-${t}\\b`).test(n.className??``))return null;let r=n.children;return typeof r==`string`?r:Array.isArray(r)&&r.every(e=>typeof e==`string`)?r.join(``):null}function D(e){let t=E(e,`mermaid`);return t===null?null:t.trim()}function ne(e){let{children:t,...n}=e,r=D(t);if(r!==null)return(0,o.jsx)(re,{code:r});let i=E(t);return i===null?(0,o.jsx)(`pre`,{...n,children:t}):(0,o.jsxs)(`div`,{className:`code-block relative`,"data-testid":`code-block`,children:[(0,o.jsx)(`pre`,{...n,children:t}),(0,o.jsx)(u,{iconOnly:!0,text:i.replace(/\n$/,``),className:`absolute right-1.5 top-1.5 rounded border border-zinc-300 bg-white/80 px-1.5 py-0.5 text-xs text-zinc-500 hover:text-zinc-800 dark:border-zinc-700 dark:bg-zinc-900/80 dark:text-zinc-400 dark:hover:text-zinc-100`})]})}function re({code:e}){let n=(0,a.useId)().replace(/[^a-zA-Z0-9]/g,``),r=l()===`light`?`default`:`dark`,[i,s]=(0,a.useState)(null),[c,d]=(0,a.useState)(null),[p,g]=(0,a.useState)(!1),[v,y]=(0,a.useState)(!1),[b,S]=(0,a.useState)(!1),[T,E]=(0,a.useState)(null),D=(0,a.useRef)(!1),ne=(0,a.useRef)(0),re=(0,a.useRef)(0),ie=()=>`mermaid-${n}-${++re.current}`,ae=(0,a.useMemo)(()=>x(e),[e]),oe=ae===void 0?`landscape`:_(ae.direction),[se,ce]=(0,a.useState)(void 0),le=i?.svg??null,ue=i!==null&&i.orientation!==oe,de=(0,a.useRef)(null),O=(0,a.useRef)(e);O.current=e,(0,a.useEffect)(()=>(ne.current+=1,s(null),ce(void 0),y(!1),d(null),E(null),()=>{ne.current+=1}),[e]);async function fe(){if(!i||D.current)return;D.current=!0,S(!0),E(null);let e=ne.current;try{let{renderDiagram:t}=await Promise.resolve().then(()=>require("./mermaidToImage-Ckx06W6z.cjs")).then(e=>e.r),r=await t(i.source,`mermaid-download-${n}`);if(e!==ne.current)return;let a=URL.createObjectURL(new Blob([r.svg],{type:`image/svg+xml;charset=utf-8`}));try{let e=document.createElement(`a`);e.href=a,e.download=`diagram.svg`,e.click()}finally{URL.revokeObjectURL(a)}}catch(t){e===ne.current&&E(t instanceof Error?t.message:String(t))}finally{D.current=!1,S(!1)}}return(0,a.useEffect)(()=>{let e=!1,n=setTimeout(()=>void t.h(async()=>{try{let t=(await ee(r)).default,n=O.current,i=x(n),a=i===void 0?`landscape`:_(i.direction);if(se!==void 0&&i!==void 0){let r=se===a?n:i.turned,{svg:o}=await t.render(ie(),r);e||(s({svg:o,orientation:se,source:r}),d(null));return}let o=await t.render(ie(),n),c={svg:o.svg,orientation:a,source:n},l=te(o.svg);if(i!==void 0&&l!==void 0&&l>710){let e=await t.render(ie(),i.turned),n=te(e.svg);if(n!==void 0){let t=a===`landscape`?h(l,n):h(n,l);t!==a&&(c={svg:e.svg,orientation:t,source:i.turned})}}e||(s(c),d(null))}catch(t){e||(s(null),d(t instanceof Error?t.message:String(t)))}}),300);return()=>{e=!0,clearTimeout(n)}},[e,n,r,se]),le?(0,o.jsxs)(`div`,{ref:de,className:`my-2 flex flex-col gap-2 rounded-lg border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-800 dark:bg-zinc-900`,children:[(0,o.jsxs)(`div`,{className:`${w} order-3`,children:[(0,o.jsx)(`button`,{type:`button`,onClick:()=>g(!p),title:p?`Show diagram`:`Show code`,className:C,children:p?`⚏ diagram`:`⌗ code`}),!p&&ae!==void 0&&i!==null&&(0,o.jsx)(`button`,{type:`button`,"data-testid":`mermaid-orientation`,onClick:()=>ce(e=>m(e??i.orientation)),title:i.orientation===`portrait`?`Turn it across the page — it is drawn down`:`Turn it down the page — it is drawn across`,"aria-label":`Turn the diagram ${m(i.orientation)}`,className:`text-xs text-zinc-500 underline hover:text-zinc-800 dark:hover:text-zinc-200 disabled:opacity-50`,children:i.orientation===`portrait`?`↔ landscape`:`↕ portrait`}),!p&&(0,o.jsx)(`button`,{type:`button`,onClick:()=>y(!0),"aria-label":`Show diagram at full size`,className:`text-xs text-zinc-500 underline hover:text-zinc-800 dark:hover:text-zinc-200 disabled:opacity-50`,children:`⤢ enlarge`}),(0,o.jsx)(`button`,{type:`button`,className:C,disabled:b,onClick:()=>void fe(),title:`Save as .svg — insert it as a picture in a document`,children:b?`preparing SVG…`:`⤓ download SVG`}),(0,o.jsx)(u,{text:e,className:C}),T&&(0,o.jsxs)(`span`,{role:`alert`,className:`text-red-600 dark:text-red-400`,children:[`Could not download SVG: `,T]})]}),p?(0,o.jsx)(`pre`,{className:`overflow-x-auto font-mono text-xs text-zinc-500 dark:text-zinc-400`,children:e}):(0,o.jsx)(`div`,{className:`flex justify-center overflow-x-auto [&_svg]:max-w-full`,dangerouslySetInnerHTML:{__html:le}}),ue&&!p&&(0,o.jsxs)(`div`,{className:`mt-1 text-center text-xs text-zinc-400 dark:text-zinc-600`,"data-testid":`mermaid-turned`,children:[`drawn `,i?.orientation,` to fit — the source asks for `,oe]}),(0,o.jsx)(f,{label:`diagram`,testId:`mermaid-enlarged`,open:v,onClose:()=>y(!1),anchorRef:de,actions:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`button`,{type:`button`,className:C,disabled:b,onClick:()=>void fe(),children:b?`preparing SVG…`:`⤓ download SVG`}),T&&(0,o.jsxs)(`span`,{role:`alert`,className:`text-red-600 dark:text-red-400`,children:[`Could not download SVG: `,T]})]}),children:(0,o.jsx)(`div`,{style:{width:te(le)},className:`[&_svg]:!h-auto [&_svg]:!max-w-none [&_svg]:!w-full`,dangerouslySetInnerHTML:{__html:le}})})]}):(0,o.jsxs)(`pre`,{className:`my-2 overflow-x-auto rounded-lg border border-zinc-200 bg-zinc-50 p-3 font-mono text-xs text-zinc-500 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-400`,children:[e,c&&(0,o.jsx)(`div`,{className:`mt-2 text-red-600 dark:text-red-400`,children:c})]})}var ie=`urn:structured-exchange:1`,ae=[`graph`,`sequence`];function oe(e){return se(e)?[`graph`,`sequence`,`table`]:ae}function se(e){return e===`urn:structured-exchange:2`||e===`urn:structured-exchange:3`}function ce(e){if(Array.isArray(e))return{cells:e};let t=e.heading;return typeof t==`string`?{cells:[],role:e.role,heading:t}:{cells:e.cells,role:e.role}}var le={nodes:500,edges:2e3,participants:100,messages:1e3,columns:50,rows:5e3,removals:500,ref:200,localId:200,label:500,kind:100,kindsPerVocabulary:64,columnName:200,cell:1e3},ue=`urn:structured-exchange:2`,de={profile:200,attributesPerItem:50,removeAttributesPerItem:50,attributeName:200,attributeString:1e3,attributeListItems:50,revision:200,locationsPerItem:10,uri:2e3,position:1e6,artifactsPerItem:20,artifactsPerDocument:50,artifactRel:100,artifactMediaType:100,artifactLabel:500,artifactDigest:71,relations:2e3,heading:500,headingDepth:6,viewpoints:20,viewpointConcern:500},O=8e6,fe=`urn:structured-exchange:3`,pe=[ie,ue,fe];function me(e){return pe.find(t=>t===e)}var he=4e6,ge=Math.max(he,O);function _e(e){return se(e)?O:he}var ve=e=>new TextEncoder().encode(e).length;function ye(e){return e===`bytes`?ge:e===`relations`?de.relations:le[e]}function be(e,t){let n=ye(e),r=t?.[e];return r===void 0||r>=n?{limit:n,level:`ceiling`}:{limit:r,level:`deployment`}}function xe(e,t,n){let r=ve(e),i=be(`bytes`,t),a=n===void 0?1/0:_e(n),o=Math.min(i.limit,a),s=o===a&&a<i.limit?`ceiling`:i.level;if(!(r<=o))return{rule:`document-too-large`,path:``,message:`document is ${r} bytes, past the ${o}-byte ${s===`ceiling`?`contract ceiling`:`limit this deployment applies`}`,limit:o,observed:r,level:s}}var Se={graph:[`nodes`,`edges`],sequence:[`participants`,`messages`],table:[`columns`,`rows`,`relations`]};function Ce(e,t){if(t===void 0)return[];let n=[];for(let r of Se[e.kind]??[]){let i=e.data[r];if(!Array.isArray(i))continue;let{limit:a,level:o}=be(r,t);o===`deployment`&&i.length>a&&n.push({rule:`collection-past-deployment-limit`,path:`/data/${r}`,message:`${r} has ${i.length} entries, past the ${a} this deployment allows`,limit:a,observed:i.length,level:o})}return n}function we(e,t){let n={};for(let t of Se[e.kind]??[]){let r=e.data[t];Array.isArray(r)&&(n[t]=r.length)}return{kind:e.kind,bytes:ve(t),counts:n}}var Te=6.6,Ee=5.4;function De(e,t,n){let r=e.flatMap(e=>e.split(/\r?\n/)).reduce((e,t)=>Math.max(e,t.length),0);return Math.min(Math.max(r*Te+22,t),n)}function Oe(e,t,n,r){let i=t.map(e=>Me(e).length).reduce((e,t)=>Math.max(e,t),0);return Math.max(De(e,n,r),Math.min(i*Ee+22,r))}function ke(e,t,n=Te){let r=Math.max(Math.floor((t-22)/n+1e-6),4),i=[],a=e.split(/\r?\n/);if(a.length>1)return a.flatMap(e=>ke(e,t,n)).slice(0,3);let o=``;for(let t of e.split(/\s+/)){let e=o===``?t:`${o} ${t}`;if(e.length<=r)o=e;else for(o!==``&&i.push(o),o=t;o.length>r&&i.length<3;)i.push(o.slice(0,r)),o=o.slice(r)}if(o!==``&&i.push(o),i.length===0)return[``];if(i.length<=3)return i;let s=i.slice(0,3);return s[2]=`${s[2].slice(0,Math.max(r-1,1))}…`,s}function Ae(e,t){return e*15+t*15+14}function je(e,t){return e.flatMap(e=>ke(Me(e),t,Ee))}function Me(e){return`${e.field}: ${e.from===void 0?``:`${e.from} → `}${e.to}`}function Ne(e,t){return`${e}: ${Pe(t)}`}function Pe(e){return Array.isArray(e)?e.map(e=>Pe(e)).join(`, `):e===null?`null`:typeof e==`object`&&e&&typeof e.ref==`string`?`<${e.ref}>`:String(e)}function Fe(e){let t=e.range===void 0?``:` lines ${e.range.startLine}–${e.range.endLine}`,n=e.revision===void 0?``:` at ${e.revision}`;return`${e.uri}${t}${n}`}function Ie(e){let t=e.label===void 0?e.uri:`${e.label} (${e.uri})`,n=e.mediaType===void 0?``:`, ${e.mediaType}`;return`${e.rel}: ${t}${n} — ${e.sha256.slice(0,14)}…`}var Le=864e5,Re=/^(\d{4})-(\d{2})-(\d{2})$/;function ze(e){let t=Re.exec(e);if(t===null)return;let[n,r,i]=[Number(t[1]),Number(t[2]),Number(t[3])],a=new Date(Date.UTC(n,r-1,i));if(a.setUTCFullYear(n,r-1,i),a.getUTCFullYear()===n&&a.getUTCMonth()===r-1&&a.getUTCDate()===i)return Math.round(a.getTime()/Le)}function Be(e){let t=new Date(e*Le);return`${String(t.getUTCFullYear()).padStart(4,`0`)}-${String(t.getUTCMonth()+1).padStart(2,`0`)}-${String(t.getUTCDate()).padStart(2,`0`)}`}function Ve(e=new Date){return Math.round(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())/Le)}function He(e){let t=ze(e.type===`activity`?e.start:e.date),n=ze(e.type===`activity`?e.end:e.date);return t===void 0||n===void 0?void 0:{start:t,end:n}}function Ue(e){let t=new Map;return e.rows.forEach((e,n)=>{e.type===`task`&&(t.has(e.id)||t.set(e.id,{id:e.id,type:`task`,row:n,days:We(e)}),e.items.forEach((e,r)=>{e.id===void 0||t.has(e.id)||t.set(e.id,{id:e.id,type:e.type,row:n,item:r,days:He(e)})}))}),t}function We(e){let t;for(let n of e.items){let e=He(n);e!==void 0&&(t=t===void 0?{...e}:{start:Math.min(t.start,e.start),end:Math.max(t.end,e.end)})}return t}function Ge(e){return e.type??`finish-to-start`}function Ke(e){return{from:e.startsWith(`finish`)?`end`:`start`,to:e.endsWith(`finish`)?`end`:`start`}}function qe(e,t){let n=t.get(e.from)?.days,r=t.get(e.to)?.days;if(n===void 0||r===void 0)return;let i=Ke(Ge(e));return r[i.to]>=n[i.from]}function Je(e){if(`date`in e){let t=ze(e.date)??0;return{start:t,end:t}}return{start:ze(e.start)??0,end:ze(e.end)??0}}function Ye(e){if(e.previous===void 0)return;let t=Je(e.type===`activity`?{start:e.start,end:e.end}:{date:e.date}),n=Je(e.previous);return{start:t.start-n.start,end:t.end-n.end}}function Xe(e){if(e===0)return``;let t=e>0?`+`:`−`,n=Math.abs(e);return n<14?`${t}${n}d`:n<70?`${t}${Math.round(n/7)}w`:`${t}${Math.round(n/30.44)}mo`}function Ze(e){let t=Ye(e);return t===void 0?``:t.start===t.end?Xe(t.start):t.start===0?`end${Xe(t.end)}`:t.end===0?`start${Xe(t.start)}`:`${Xe(t.start)}, end${Xe(t.end)}`}function Qe(e,t){if(e.role!==void 0||t?.role!==void 0)return!0;let n=Ye(e);return n!==void 0&&(n.start!==0||n.end!==0)}function $e(e){return e.role!==void 0||e.items.some(t=>Qe(t,e))}var et={week:12,month:4,quarter:.75};function tt(e,t){let n=e>=8?`week`:e>=1?`month`:`quarter`;if(t===void 0)return n;let r=[`week`,`month`,`quarter`];return r[Math.max(r.indexOf(n),r.indexOf(t))]}var nt=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`];function rt(e){return e.width>=24?e.label:e.width>=9?e.label.charAt(0):``}function it(e,t){return t===`month`?rt(e):e.width>=e.label.length*6+4?e.label:``}function at(e){return((e+3)%7+7)%7}function ot(e){let t=e-at(e)+3,n=new Date(t*Le).getUTCFullYear();return Math.floor((t-ut(n,0))/7)+1}function st(e){if(e.label!==void 0&&e.label!==``)return e.label;if(e.type===`milestone`&&e.kind!==void 0&&e.kind!==``)return e.kind}function ct(e){return e.length*Te}function lt(e,t){let n=new Date(e*Le),r=n.getUTCFullYear(),i=n.getUTCMonth(),a=[];for(;;){i+=1,i===12&&(i=0,r+=1);let e=ut(r,i);if(e>t)return a;a.push({day:e,year:r,month:i})}}function ut(e,t){let n=new Date(0);return n.setUTCFullYear(e,t,1),Math.round(n.getTime()/Le)}function dt(e,t){let n=e=>e===`bar`||e===`ghost`;return n(e)&&t===`star`||e===`star`&&n(t)}function ft(e,t){return e.x0<t.x1&&t.x0<e.x1}function pt(e,t){if(t<=0||e.width<=t)return;let n=e.items.filter(e=>e.change!==void 0);if(n.length>0){let e=Math.min(...n.flatMap(e=>e.ghost===void 0?[e.glyph.x]:[e.glyph.x,e.ghost.x]));return e<t*.9?void 0:Math.max(0,e-t/6)}if(`x`in e.today&&e.today.x>t*.8)return Math.max(0,e.today.x-t/3)}function mt(e,t,n={}){let r=ze(e.time.start)??0,i=ze(e.time.end)??r,a=n.pxPerDay??et[e.time.scale]??4,o=(i-r+1)*a,s=e=>(e-r)*a,c=lt(r,i),l=new Date(r*Le),u=[{day:r,year:l.getUTCFullYear(),month:l.getUTCMonth()},...c],d=u.map((e,t)=>{let n=t+1<u.length?u[t+1].day:i+1;return{label:nt[e.month],x:s(e.day),width:(n-e.day)*a,year:e.year,month:e.month}}),f=[];u.forEach((e,t)=>{let n=d[t],r=f[f.length-1];r!==void 0&&r.label===String(e.year)?r.width+=n.width:f.push({label:String(e.year),x:n.x,width:n.width})});let p=tt(a,n.unit),m=(e,t)=>e.map((n,r)=>{let o=r+1<e.length?e[r+1]:i+1;return{label:t(n),x:s(n),width:(o-n)*a}}),h=f,g;if(p===`week`){let e=[];for(let t=r-at(r)+7;t<=i;t+=7)e.push(t);g=m([r,...e],e=>`W${ot(e)}`),h=d.map(e=>({label:`${e.label} ${e.year}`,x:e.x,width:e.width}))}else if(p===`quarter`){let e=u.filter((e,t)=>t===0||e.month%3==0);g=e.map((t,n)=>{let r=n+1<e.length?e[n+1].day:i+1;return{label:`Q${Math.floor(t.month/3)+1}`,x:s(t.day),width:(r-t.day)*a}})}else g=d;let _=g.slice(1).map(e=>e.x),v=[],y=[],b=0,x=e.comparedTo!==void 0,S=(e,t)=>{if(!x)return;if(e.role===`added`||t.role===`added`)return`(new)`;let n=Ze(e);return n===``?void 0:`(${n})`},C=(e,t,n)=>{let r=S(e,t);return r===void 0?n:n===void 0?r:`${n} ${r}`},w=(e,t)=>{if(x)return e.role===`removed`||t.role===`removed`?`removed`:e.role===`added`||t.role===`added`?`added`:Ze(e)===``?void 0:`moved`},T=(e,t)=>{let n=[],r=[],i=[],c=e.map(e=>({...e,days:He(e.item)})).filter(e=>e.days!==void 0).sort((e,t)=>Number(e.item.type===`milestone`)-Number(t.item.type===`milestone`)||e.days.start-t.days.start||e.row-t.row||e.index-t.index);for(let{item:e,index:t,row:l,days:u,text:d,note:f,change:p}of c){let c=[],m;if(p===`moved`&&e.previous!==void 0){let t=Je(e.previous);if(e.type===`activity`)m={x0:s(t.start),x1:s(t.end+1)};else{let e=s(t.start)+a/2;m={x0:e-7,x1:e+7,cx:e}}c.push({kind:`ghost`,x0:m.x0,x1:m.x1})}let h,g,_,v;if(e.type===`activity`){if(g=s(u.start),_=s(u.end+1),c.push({kind:`bar`,x0:g,x1:_}),d!==void 0){let e=ct(d);h=e+12<=_-g?{text:d,inside:!0,x:g+6,width:e}:ht(d,g,_,o),f!==void 0&&(h.note=f),c.push({kind:`label`,x0:h.x,x1:h.x+h.width})}}else v=s(u.start)+a/2,g=v-7,_=v+7,c.push({kind:`star`,x0:g,x1:_}),d!==void 0&&(h=ht(d,g,_,o),f!==void 0&&(h.note=f),c.push({kind:`label`,x0:h.x,x1:h.x+h.width}));let y=n.findIndex(e=>c.every(t=>e.every(e=>dt(t.kind,e.kind)||!ft(t,e))));y===-1&&(y=n.length,n.push([])),n[y].push(...c),r.push({row:l,item:t,type:e.type,lane:y,days:u,...e.kind?{kind:e.kind}:{},...p===void 0?{}:{change:p}}),i.push({label:h===void 0?void 0:{...h,...p===`removed`?{struck:!0}:{}},x0:g,x1:_,cx:v,ghost:m})}return r.forEach((e,n)=>{let r=i[n],a=t+4+e.lane*24+12,o=e.type===`activity`?{x:r.x0,y:a-6,width:r.x1-r.x0,height:12}:{x:r.x0,y:a-7,width:14,height:14},s=r.ghost;y.push({...e,glyph:o,...r.cx===void 0?{}:{center:{x:r.cx,y:a}},...r.label===void 0?{}:{label:{...r.label,y:a-8,height:16}},...s===void 0?{}:e.type===`activity`?{ghost:{x:s.x0,y:a-6,width:s.x1-s.x0,height:12}}:{ghost:{x:s.x0,y:a-7,width:14,height:14},ghostCenter:{x:s.cx,y:a}}})}),Math.max(1,n.length)},ee=e=>e*24+8,te=(e,t)=>{let n=T(e.items.map((n,r)=>({row:t,index:r,item:n,text:C(n,e,st(n)),note:S(n,e),change:w(n,e)})),b),r=ee(n);v.push({type:`task`,row:t,y:b,height:r,lanes:n,label:e.label,id:e.id}),b+=r},E,D=()=>{if(E!==void 0){if(E.tasks.length===0){let e=E.label?26:10;v.push({type:`separator`,row:E.row,y:b,height:e,...E.label?{label:E.label}:{}}),b+=e}else{let e=T(E.tasks.flatMap(({task:e,row:t})=>e.items.map((n,r)=>({row:t,index:r,item:n,text:C(n,e,st(n)??(n.type===`activity`?e.label:void 0)),note:S(n,e),change:w(n,e)}))),b),t=ee(e);v.push({type:`section`,row:E.row,y:b,height:t,lanes:e,...E.label?{label:E.label}:{},tasks:E.tasks.map(({task:e})=>e.id)}),b+=t}E=void 0}},ne=(()=>{let t=new Set;if(!(n.onlyChanged&&x))return;let r;return e.rows.forEach((e,n)=>{e.type===`separator`?r=n:$e(e)&&(t.add(n),r!==void 0&&t.add(r))}),t})(),re=ne===void 0?0:e.rows.filter((e,t)=>e.type===`task`&&!ne.has(t)).length;e.rows.forEach((e,t)=>{if(ne===void 0||ne.has(t)){if(e.type===`separator`){if(n.compact){D(),E={row:t,...e.label?{label:e.label}:{},tasks:[]};return}let r=e.label?26:10;v.push({type:`separator`,row:t,y:b,height:r,...e.label?{label:e.label}:{}}),b+=r}else E===void 0?te(e,t):E.tasks.push({task:e,row:t})}}),D();let ie=[];for(let t of e.rows)if(t.type===`task`)for(let e of t.items)e.kind&&!ie.includes(e.kind)&&ie.push(e.kind);for(let t of[...e.periods??[],...e.references??[]])t.kind&&!ie.includes(t.kind)&&ie.push(t.kind);let ae=[];(e.periods??[]).forEach((e,t)=>{let n=Math.max(ze(e.start)??r,r),o=Math.min(ze(e.end)??i,i);n>o||ae.push({index:t,x:s(n),width:(o-n+1)*a,start:e.start,end:e.end,...e.label?{label:e.label}:{},...e.kind?{kind:e.kind}:{}})});let oe=(e.references??[]).flatMap((e,t)=>{let n=ze(e.date);return n===void 0||n<r||n>i?[]:[{index:t,x:s(n)+a/2,label:e.label,date:e.date,...e.kind?{kind:e.kind}:{}}]}),se=[];if(t>=r&&t<=i){let e=s(t)+a/2;se.push({x0:e-26,x1:e+26})}let ce=[],le=[...ae.filter(e=>e.label).map(e=>({of:`period`,index:e.index,text:e.label,x:e.x+3,room:e.width-6})),...oe.map(e=>{let t=ct(e.label)*(10/11);return{of:`reference`,index:e.index,text:e.label,x:Math.min(Math.max(2,e.x-t/2),o-t-2),room:o-4}})].sort((e,t)=>e.x-t.x);for(let e of le){let t=ct(e.text)*(10/11);if(t>e.room)continue;let n={x0:e.x-2,x1:e.x+t+2};se.some(e=>n.x0<e.x1&&e.x0<n.x1)||(se.push(n),ce.push({of:e.of,index:e.index,text:e.text,x:e.x,width:t}))}return{width:o,height:b,start:r,end:i,years:f,months:d,monthLines:c.map(e=>s(e.day)),unit:p,upper:h,lower:g,unitLines:_,rows:v,items:y,dependencies:gt(e,v,y,s),today:t<r?{outside:`before`,day:t}:t>i?{outside:`after`,day:t}:{x:s(t)+a/2,day:t},kinds:ie,hiddenTasks:re,periods:ae,references:oe,headerLabels:ce}}function ht(e,t,n,r){let i=ct(e),a=n+4;if(a+i<=r)return{text:e,inside:!1,x:a,width:i};let o=t-4-i;return o>=0?{text:e,inside:!1,x:o,width:i}:{text:e,inside:!1,x:Math.max(0,r-i),width:i}}function gt(e,t,n,r){let i=Ue(e),a=new Map(n.map(e=>[`${e.row}:${e.item}`,e])),o=new Map(t.map(e=>[e.row,e])),s=(e,t)=>{let s=i.get(e);if(s?.days===void 0)return;if(s.item!==void 0){let e=a.get(`${s.row}:${s.item}`);if(e===void 0)return;let n=e.glyph.y+e.glyph.height/2;return e.center===void 0?{x:t===`start`?e.glyph.x:e.glyph.x+e.glyph.width,y:n}:{x:e.center.x+(t===`start`?-7:7),y:n}}let c=r(t===`start`?s.days.start:s.days.end+1),l=o.get(s.row);if(l!==void 0&&l.type===`task`)return{x:c,y:l.y+4+12};let u=n.filter(e=>e.row===s.row).sort((e,n)=>t===`start`?e.glyph.x-n.glyph.x:n.glyph.x+n.glyph.width-(e.glyph.x+e.glyph.width));if(u.length!==0)return{x:c,y:u[0].glyph.y+u[0].glyph.height/2}},c=[];return(e.dependencies??[]).forEach((e,t)=>{let n=Ge(e),r=Ke(n),a=s(e.from,r.from),o=s(e.to,r.to),l=qe(e,i);if(a===void 0||o===void 0||l===void 0)return;let u={x:a.x+(r.from===`end`?8:-8),y:a.y},d={x:o.x+(r.to===`start`?-8:8),y:o.y};if(a.y===o.y&&r.from===`end`&&r.to===`start`&&o.x>=a.x-14){c.push({index:t,from:e.from,to:e.to,type:n,satisfied:l,points:[a,o]});return}let f=o.y>a.y?o.y-12:(o.y,a.y,o.y+12);c.push({index:t,from:e.from,to:e.to,type:n,satisfied:l,points:[a,u,{x:u.x,y:f},{x:d.x,y:f},d,o]})}),c}function _t(e){let t=e.rows.reduce((e,t)=>Math.max(e,(t.label??``).length),0);return Math.min(Math.max(t*Te+24,120),280)}function vt(e,t){for(let n of e.rows){if(n.type!==`task`)continue;if(n.id===t)return`"${n.label}" (${t})`;let e=n.items.find(e=>e.id===t);if(e!==void 0){let n=st(e);return n===void 0?t:`"${n}" (${t})`}}return t}function yt(e,t,n){let r=n===!1?` — not satisfied by the dates`:``;return`${vt(e,t.to)} waits on ${vt(e,t.from)} (${Ge(t)})${r}`}function bt(e){let t=[];e.title!==void 0&&e.title!==``&&t.push(e.title),e.comparedTo!==void 0&&t.push(`Compared with ${e.comparedTo.label}${e.comparedTo.date===void 0?``:` (${e.comparedTo.date})`}`),t.push(`From ${e.time.start} to ${e.time.end}, by ${e.time.scale}`);for(let n of e.rows){if(t.push(``),n.type===`separator`){t.push(n.label?`— ${n.label} —`:`———`);continue}let e=n.role===void 0?``:n.role===`added`?` — new`:` — removed`;t.push(`${n.label} [${n.id}]${n.items.length===0?` — no items`:``}${e}`);for(let e of n.items){let n=e.type===`activity`?`${e.start} to ${e.end}`:e.date,r=e.label===void 0?``:`: ${e.label}`,i=e.kind===void 0?``:` [${e.kind}]`,a=e.id===void 0?``:` (${e.id})`,o=(()=>{if(e.role===`added`)return` — new`;if(e.role===`removed`)return` — removed`;let t=Ze(e);return t===``||e.previous===void 0?``:` — moved ${t}, was ${`date`in e.previous?e.previous.date:`${e.previous.start} to ${e.previous.end}`}`})();t.push(` ${e.type} ${n}${r}${i}${a}${o}`)}}let n=[...(e.periods??[]).map(e=>` period ${e.start} to ${e.end}${e.label?`: ${e.label}`:``}${e.kind?` [${e.kind}]`:``}`),...(e.references??[]).map(e=>` reference ${e.date}: ${e.label}${e.kind?` [${e.kind}]`:``}`)];n.length>0&&t.push(``,`Calendar`,...n);let r=e.dependencies??[];if(r.length>0){let n=Ue(e);t.push(``,`Dependencies`);for(let i of r)t.push(` ${yt(e,i,qe(i,n))}`)}return t}function xt(e){let t=[],n=(e,n)=>{let r=ze(e);return r===void 0&&t.push({rule:`invalid-date`,path:n,message:`"${e}" is not a day of the calendar`}),r},r=n(e.time.start,`/data/time/start`),i=n(e.time.end,`/data/time/end`),a=r!==void 0&&i!==void 0&&r<=i?{start:r,end:i}:void 0;r!==void 0&&i!==void 0&&r>i&&t.push({rule:`inverted-range`,path:`/data/time`,message:`the timeline starts on ${e.time.start}, after it ends on ${e.time.end}`});let o=`${e.time.start} to ${e.time.end}`,s=new Map,c=(e,n)=>{if(e===void 0)return;let r=s.get(e);r===void 0?s.set(e,n):t.push({rule:`duplicate-identifier`,path:`${n}/id`,message:`identifier "${e}" is already declared at ${r}`})},l=e.comparedTo!==void 0;e.comparedTo?.date!==void 0&&n(e.comparedTo.date,`/data/comparedTo/date`);let u=e=>t.push({rule:`comparison-without-reference`,path:e,message:"previous dates and change roles describe a comparison; declare `comparedTo` naming the plan they compare with"}),d=new Set;return e.rows.forEach((e,r)=>{if(e.type!==`task`)return;let i=`/data/rows/${r}`;c(e.id,i),e.role!==void 0&&!l&&u(`${i}/role`),e.items.forEach((r,s)=>{let f=`${i}/items/${s}`;if(c(r.id,f),r.kind!==void 0&&d.add(r.kind),r.role!==void 0&&!l&&u(`${f}/role`),r.previous!==void 0){l||u(`${f}/previous`),(r.role!==void 0||e.role!==void 0)&&t.push({rule:`contradictory-change`,path:`${f}/previous`,message:`an item that is ${r.role??`in a task that is ${e.role}`} has no previous dates; it is new or dropped, not moved`});let i=r.previous,s=r.type===`activity`?{first:n(i.start,`${f}/previous/start`),last:n(i.end,`${f}/previous/end`)}:(()=>{let e=n(i.date,`${f}/previous/date`);return{first:e,last:e}})();s.first!==void 0&&s.last!==void 0&&(s.first>s.last?t.push({rule:`inverted-range`,path:`${f}/previous`,message:`the previous dates start on ${i.start}, after they end on ${i.end}`}):a!==void 0&&(s.first<a.start||s.last>a.end)&&t.push({rule:`item-outside-range`,path:`${f}/previous`,message:`the previous dates fall outside the timeline's range ${o}; the range covers both plans, so widen \`time\``}))}r.role!==void 0&&e.role!==void 0&&r.role!==e.role&&t.push({rule:`contradictory-change`,path:`${f}/role`,message:`an item ${r.role} in a task that is ${e.role}`});let p,m;if(r.type===`activity`){if(p=n(r.start,`${f}/start`),m=n(r.end,`${f}/end`),p!==void 0&&m!==void 0&&p>m){t.push({rule:`inverted-range`,path:f,message:`the activity starts on ${r.start}, after it ends on ${r.end}`});return}}else p=m=n(r.date,`${f}/date`);a!==void 0&&p!==void 0&&m!==void 0&&(p<a.start||m>a.end)&&t.push({rule:`item-outside-range`,path:f,message:r.type===`activity`?`the activity runs ${r.start} to ${r.end}, outside the timeline's range ${o}; widen \`time\` or move the activity`:`the milestone falls on ${r.date}, outside the timeline's range ${o}; widen \`time\` or move the milestone`})})}),(e.periods??[]).forEach((e,r)=>{let i=`/data/periods/${r}`;e.kind!==void 0&&d.add(e.kind);let s=n(e.start,`${i}/start`),c=n(e.end,`${i}/end`);s!==void 0&&c!==void 0&&(s>c?t.push({rule:`inverted-range`,path:i,message:`the period starts on ${e.start}, after it ends on ${e.end}`}):a!==void 0&&(c<a.start||s>a.end)&&t.push({rule:`period-outside-range`,path:i,message:`the period ${e.start} to ${e.end} lies wholly outside the timeline's range ${o}, so nothing of it could be drawn`}))}),(e.references??[]).forEach((e,r)=>{let i=`/data/references/${r}`;e.kind!==void 0&&d.add(e.kind);let s=n(e.date,`${i}/date`);s!==void 0&&a!==void 0&&(s<a.start||s>a.end)&&t.push({rule:`item-outside-range`,path:i,message:`the reference date ${e.date} is outside the timeline's range ${o}; widen \`time\` or move it`})}),d.size>le.kindsPerVocabulary&&t.push({rule:`too-many-kinds`,path:`/data/rows`,message:`${d.size} distinct item types, and no more than ${le.kindsPerVocabulary} can be told apart in a rendering`,observed:d.size,limit:le.kindsPerVocabulary}),t.push(...Ct(e,Ue(e))),t.push(...St(e)),t}function St(e){let t=new Set;for(let n of e.rows)if(n.type===`task`){n.role===`removed`&&t.add(n.id);for(let e of n.items)e.id!==void 0&&(e.role===`removed`||n.role===`removed`)&&t.add(e.id)}let n=[];return(e.dependencies??[]).forEach((e,r)=>{for(let i of[`from`,`to`])t.has(e[i])&&n.push({rule:`dependency-on-removed`,path:`/data/dependencies/${r}/${i}`,message:`"${e[i]}" was dropped from the plan, so nothing can depend on it any more; remove the dependency`})}),n}function Ct(e,t){let n=[],r=e.dependencies??[],i=[],a=new Map;r.forEach((r,o)=>{let s=`/data/dependencies/${o}`,c=!0;for(let i of[`from`,`to`]){let a=r[i],o=t.get(a);if(o===void 0)c=!1,n.push({rule:`unresolved-endpoint`,path:`${s}/${i}`,message:`"${a}" is not the identifier of any task or item this timeline declares`});else if(o.type===`task`&&o.days===void 0){c=!1;let t=e.rows[o.row];if(t.type===`task`&&t.items.length>0)continue;n.push({rule:`empty-task-endpoint`,path:`${s}/${i}`,message:`task "${a}" holds no item, so it has no start or finish for a dependency to link`})}}if(!c)return;let l=t.get(r.from),u=t.get(r.to),d=(e,t)=>e.type===`task`&&t.type!==`task`&&t.row===e.row;if(l.id===u.id||d(l,u)||d(u,l)){n.push({rule:`self-dependency`,path:s,message:l.id===u.id?`"${l.id}" cannot depend on itself`:`a task and one of its own items cannot depend on each other: the task's span is made of its items`});return}let f=JSON.stringify([r.from,r.to,Ge(r)]),p=a.get(f);p===void 0?(a.set(f,o),i.push({from:r.from,to:r.to,index:o})):n.push({rule:`duplicate-dependency`,path:s,message:`the same dependency is already declared at /data/dependencies/${p}`})});let o=wt(i);return o!==void 0&&n.push({rule:`dependency-cycle`,path:`/data/dependencies/${o.index}`,message:`dependencies form a cycle, which no dates can honour: ${o.ids.join(` → `)}`}),n}function wt(e){let t=new Map;for(let n of e){let e=t.get(n.from)??[];e.push({to:n.to,index:n.index}),t.set(n.from,e)}let n=new Map,r=[];for(let e of t.keys()){if(n.has(e))continue;let i=[{id:e,next:0}];for(n.set(e,`open`),r.push({id:e,index:-1});i.length>0;){let e=i[i.length-1],a=t.get(e.id)??[];if(e.next>=a.length){n.set(e.id,`done`),i.pop(),r.pop();continue}let o=a[e.next++],s=n.get(o.to);if(s===`open`){let e=r.findIndex(e=>e.id===o.to);return{ids:[...r.slice(e).map(e=>e.id),o.to],index:o.index}}s===void 0&&(n.set(o.to,`open`),i.push({id:o.to,next:0}),r.push({id:o.to,index:o.index}))}}}function Tt(e){let t=e.data;return e.kind===`graph`?Array.isArray(t.nodes)&&Array.isArray(t.edges):e.kind===`sequence`?Array.isArray(t.participants)&&Array.isArray(t.messages):e.kind===`timeline`?typeof t.time==`object`&&t.time!==null&&Array.isArray(t.rows):Array.isArray(t.columns)&&Array.isArray(t.rows)}function Et(e){return e.kind===`graph`?e.data.nodes:e.kind===`sequence`?e.data.participants:[]}function Dt(e){return e.kind===`graph`?e.data.edges:e.kind===`sequence`?e.data.messages:[]}function Ot(e){return e.kind===`graph`||e.kind===`sequence`?e.data.containers??[]:[]}function kt(e){return e.kind===`graph`?`/data/nodes`:`/data/participants`}function At(e){return e.kind===`graph`?`/data/edges`:`/data/messages`}function jt(e){if(e.kind===`timeline`)return[];let t=e.data,n=[];for(let e of[`nodes`,`edges`,`participants`,`messages`,`rows`,`relations`]){let r=t[e];Array.isArray(r)&&r.forEach((t,r)=>{if(typeof t!=`object`||!t||Array.isArray(t))return;let i=t;n.push({at:`/data/${e}/${r}`,ref:typeof i.ref==`string`?i.ref:void 0,set:i.set,expect:i.expect,locations:i.locations})})}return n}function Mt(e){if(e.kind!==`table`)return[];let t=e.data.rows,n=[];return t.forEach((e,t)=>{if(typeof e!=`object`||!e||Array.isArray(e))return;let r=e;(r.ref!==void 0||r.set!==void 0)&&n.push({at:`/data/rows/${t}`,...typeof r.ref==`string`?{ref:r.ref}:{},...r.set===void 0?{}:{set:r.set}})}),n}function Nt(e){if(e.kind!==`table`)return[];let t=e.data.rows,n=[];return t.forEach((e,t)=>{if(typeof e!=`object`||!e||Array.isArray(e))return;let r=e.id;typeof r==`string`&&n.push({id:r,at:`/data/rows/${t}`})}),n}function Pt(e){if(e.kind!==`table`)return[];let t=e.data.relations;return Array.isArray(t)?t:[]}function Ft(e,t){return e===`timeline`?`a timeline is maintained by presenting the revised timeline again, not proposed as a change, ${t}`:`a ${e} is a projection and cannot be proposed, ${t}`}function It(e){let t=[];if(!Tt(e))return t.push({rule:`kind-data-mismatch`,path:`/data`,message:`data does not carry what kind "${e.kind}" declares`}),t;let n=oe(e.schema).includes(e.kind);e.target!==void 0&&!n&&t.push({rule:`kind-not-proposable`,path:`/target`,message:Ft(e.kind,`so it carries no target`)}),e.removals!==void 0&&(n?e.target===void 0&&t.push({rule:`removal-without-target`,path:`/removals`,message:`removals need a target: an artifact that does not exist yet has nothing to remove`}):t.push({rule:`kind-not-proposable`,path:`/removals`,message:Ft(e.kind,`so it declares no removals`)}));let r=Et(e),i=kt(e),a=new Map;r.forEach((e,n)=>{let r=a.get(e.id);r===void 0?a.set(e.id,n):t.push({rule:`duplicate-identifier`,path:`${i}/${n}/id`,message:`identifier "${e.id}" is already declared at ${i}/${r}`})});let o=new Map;Ot(e).forEach((e,n)=>{let r=o.get(e.id);r===void 0?o.set(e.id,n):t.push({rule:`duplicate-container-identifier`,path:`/data/containers/${n}/id`,message:`container "${e.id}" is already declared at /data/containers/${r}`})}),r.forEach((e,n)=>{for(let[r,a]of[[`container`,e.container],[`set/container`,e.set?.container]])a!==void 0&&!o.has(a)&&t.push({rule:`unresolved-container`,path:`${i}/${n}/${r}`,message:`"${a}" is not a container declared in /data/containers`})});let s=At(e);Dt(e).forEach((e,n)=>{for(let r of[`from`,`to`]){let o=e[r];a.has(o)||t.push({rule:`unresolved-endpoint`,path:`${s}/${n}/${r}`,message:`"${o}" is not an identifier declared in ${i}`})}});let c=new Map,l=(e,n,r)=>{if(n===void 0)return;let i=`${e}:${n}`,a=c.get(i);a===void 0?c.set(i,r):t.push({rule:`duplicate-reference`,path:r,message:`${e} "${n}" is already addressed at ${a}; a proposal states one intention per thing`})};r.forEach((e,t)=>l(`element`,e.ref,`${i}/${t}`)),Dt(e).forEach((e,t)=>l(`relationship`,e.ref,`${s}/${t}`)),Mt(e).forEach(e=>l(`row`,e.ref,e.at)),(e.removals??[]).forEach((e,t)=>l(e.type,e.ref,`/removals/${t}`));let u=[...r.map((e,t)=>({at:`${i}/${t}`,ref:e.ref,set:e.set})),...Dt(e).map((t,n)=>({at:`${At(e)}/${n}`,ref:t.ref,set:t.set})),...Mt(e)];for(let r of u)r.set!==void 0&&(r.ref===void 0?t.push({rule:`change-without-reference`,path:`${r.at}/set`,message:`a change names a reference to change; without one this is a new thing, and its fields are its values`}):n?e.target===void 0&&t.push({rule:`change-without-target`,path:`${r.at}/set`,message:`a change needs a target: naming what is being changed is what makes this a proposal rather than a new artifact`}):t.push({rule:`kind-not-proposable`,path:`${r.at}/set`,message:Ft(e.kind,`so nothing in it declares a change`)}));let d=e=>{let t=new Set;for(let n of e)n.kind!==void 0&&n.kind!==``&&t.add(n.kind);return t},f=[[e.kind===`sequence`?`participant`:`element`,i,d(r)],[e.kind===`sequence`?`message`:`relationship`,At(e),d(Dt(e))]];for(let[e,n,r]of f)r.size>le.kindsPerVocabulary&&t.push({rule:`too-many-kinds`,path:n,message:`${r.size} distinct ${e} types, and no more than ${le.kindsPerVocabulary} can be told apart in a rendering`,observed:r.size,limit:le.kindsPerVocabulary});let p=e.viewpoints;if(Array.isArray(p)){if(e.kind!==`graph`)t.push({rule:`viewpoints-without-graph`,path:`/viewpoints`,message:`only a graph declares viewpoints; a ${e.kind} has no element and relationship kinds for one to retain`});else{let n=new Set(r.map(e=>e.kind).filter(e=>!!e)),i=new Set(Dt(e).map(e=>e.kind).filter(e=>!!e)),a=new Map;p.forEach((e,r)=>{let o=`/viewpoints/${r}`,{id:s,elementKinds:c,relationshipKinds:l}=e,u=a.get(s);u===void 0?a.set(s,r):t.push({rule:`duplicate-viewpoint-identifier`,path:`${o}/id`,message:`viewpoint "${s}" is already declared at /viewpoints/${u}`}),c===void 0&&l===void 0&&t.push({rule:`empty-viewpoint`,path:o,message:`viewpoint "${s}" retains no kind, so it would show nothing it was not already showing; name elementKinds, relationshipKinds, or both`});let d=[[c,n,i,`elementKinds`,`element`,`relationship`],[l,i,n,`relationshipKinds`,`relationship`,`element`]];for(let[e,n,r,i,a,c]of d)e?.forEach((e,l)=>{n.has(e)||t.push({rule:`unresolved-viewpoint-kind`,path:`${o}/${i}/${l}`,message:`viewpoint "${s}" retains ${a} kind "${e}", and no ${a} of this document has it`+(r.has(e)?` (it is a ${c} kind here, which is a different vocabulary)`:``)})})})}}if(e.kind===`table`){let{columns:n,rows:r}=e.data;r.forEach((e,r)=>{let{cells:i,heading:a}=ce(e);a===void 0&&i.length!==n.length&&t.push({rule:`row-column-mismatch`,path:`/data/rows/${r}`,message:`row has ${i.length} values but ${n.length} columns are declared`,observed:i.length,limit:n.length})})}e.kind===`timeline`&&t.push(...xt(e.data));for(let n of jt(e)){n.expect!==void 0&&(e.target===void 0?t.push({rule:`expectation-without-target`,path:`${n.at}/expect`,message:`an expectation is checked by the authority a proposal targets; a document that targets nothing has nobody to check it`}):n.ref===void 0&&t.push({rule:`expectation-without-reference`,path:`${n.at}/expect`,message:`an expectation describes something that already exists, and this item carries no reference to one`}));let r=n.set?.removeAttributes;if(Array.isArray(r)){let e=n.set?.attributes??{},i=new Map;r.forEach((r,a)=>{if(typeof r!=`string`)return;let o=i.get(r);o===void 0?i.set(r,a):t.push({rule:`duplicate-attribute-removal`,path:`${n.at}/set/removeAttributes/${a}`,message:`"${r}" is already removed at ${n.at}/set/removeAttributes/${o}`}),Object.prototype.hasOwnProperty.call(e,r)&&t.push({rule:`attribute-set-and-removed`,path:`${n.at}/set/removeAttributes/${a}`,message:`"${r}" is both assigned and removed; a proposal states one intention per property`})})}Array.isArray(n.locations)&&n.locations.forEach((e,r)=>{if(typeof e!=`object`||!e)return;let i=e.range;i!==void 0&&(i.endLine<i.startLine||i.endLine===i.startLine&&i.endCharacter!==void 0&&i.startCharacter!==void 0&&i.endCharacter<i.startCharacter)&&t.push({rule:`location-range-reversed`,path:`${n.at}/locations/${r}/range`,message:`a range ends before it begins, so it selects nothing a reader could be taken to`})})}e.kind===`table`&&e.data.rows.forEach((e,n)=>{if(typeof e!=`object`||!e||Array.isArray(e))return;let r=e;r.role!==void 0&&r.set!==void 0&&t.push({rule:`role-with-change`,path:`/data/rows/${n}/role`,message:`a row states what it observed or what it asks for, not both: a declared role beside a change is a report and an instruction at once`})});let m=new Map;for(let n of Nt(e)){let e=m.get(n.id);e===void 0?m.set(n.id,n.at):t.push({rule:`duplicate-identifier`,path:`${n.at}/id`,message:`identifier "${n.id}" is already declared at ${e}`})}return Pt(e).forEach((e,n)=>{for(let r of[`from`,`to`]){let i=e[r];if(typeof i!=`object`||!i)continue;let a=i.id;typeof a==`string`&&(m.has(a)||t.push({rule:`unresolved-endpoint`,path:`/data/relations/${n}/${r}`,message:`"${a}" is not the identifier of any row this document declares`}))}}),t}function Lt(e,t){let n=t(e);if(n.length>0)return{valid:!1,issues:n};let r=e,i=It(r);return i.length>0?{valid:!1,issues:i}:{valid:!0,envelope:r,issues:[]}}function Rt(e,t,n){let r=xe(e,n);if(r!==void 0)return{valid:!1,issues:[r]};let i;try{i=JSON.parse(e)}catch{return{valid:!1,issues:[{rule:`not-json`,path:``,message:`document is not parseable JSON`}]}}let a=Lt(i,t);if(!a.valid)return a;let o=xe(e,n,a.envelope.schema);if(o!==void 0)return{valid:!1,issues:[o]};let s=Ce(a.envelope,n);return s.length>0?{valid:!1,issues:s}:{valid:!0,envelope:a.envelope,measurement:we(a.envelope,e),issues:[]}}function zt(e){if(typeof e!=`object`||!e||Array.isArray(e))return;let t=e.schema;if(typeof t==`string`&&t.startsWith(`urn:structured-exchange:`))return t}function Bt(e,t,n){let r=xe(e,n);if(r!==void 0)return{status:`too-large`,issue:r};let i;try{i=JSON.parse(e)}catch{return{status:`not-a-document`,why:`unparseable`}}let a=zt(i);if(a===void 0)return{status:`not-a-document`,why:`undeclared`};if(me(a)===void 0)return{status:`unsupported-version`,schema:a};let o=Lt(i,t);if(!o.valid)return{status:`invalid`,issues:o.issues};let s=xe(e,n,o.envelope.schema);return s===void 0?{status:`valid`,envelope:o.envelope}:{status:`too-large`,issue:s}}function Vt(e){let t=e.replace(/\r\n/g,`
6
- `).replace(/\s+$/,``),n=2166136261;for(let e=0;e<t.length;e++)n^=t.charCodeAt(e),n=Math.imul(n,16777619);return`sx-${(n>>>0).toString(16).padStart(8,`0`)}-${t.length.toString(36)}`}async function Ht(e){try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.cssText=`position:fixed;top:0;left:0;opacity:0;pointer-events:none`,document.body.append(t);try{return t.select(),document.execCommand(`copy`)}catch{return!1}finally{t.remove()}}}function Ut(e,t,n){return e>=t&&e<=n}function Wt(e){return e===8205}function Gt(e){return Ut(e,55296,56319)}function Kt(e){return Ut(e,127462,127487)}function qt(e){return Ut(e,65024,65039)}function Jt(e){return Ut(e,768,879)||Ut(e,6832,6911)||Ut(e,7616,7679)||Ut(e,65056,65071)}function Yt(e){return e>65535?2:1}function Xt(e,t){for(;t<e.length;){let n=e.codePointAt(t);if(Jt(n)||qt(n))t+=Yt(n);else break}return t}function Zt(e,t){let n=e.codePointAt(t),r=t+Yt(n);for(r=Xt(e,r);r<e.length-1&&Wt(e.codePointAt(r));){let t=e.codePointAt(r+1);r+=1+Yt(t),r=Xt(e,r)}return Kt(n)&&r<e.length&&Kt(e.codePointAt(r))&&(r+=Yt(e.codePointAt(r))),r}function Qt(e){return Gt(e)||Jt(e)||qt(e)||Wt(e)}function $t(e,t){if(t===0)return!0;let n=0,r=0;for(;r<e.length;)if(r=Zt(e,r),n++,n>=t)return!0;return!1}function en(e,t){let n=0,r=0;for(;r<e.length;)if(r=Zt(e,r),n++,n>t)return!1;return!0}function tn(e,t){if(t===0)return!0;let n=0;for(;n<e.length;){if(Qt(e.charCodeAt(n)))return $t(e,t);if(n++,n>=t)return!0}return!1}function nn(e,t){let n=0;for(;n<e.length;){if(Qt(e.charCodeAt(n)))return en(e,t);if(n++,n>t)return!1}return!0}function rn(e){return Array.isArray(e)}function an(e){return mn(typeof e,`bigint`)}function on(e){return mn(typeof e,`boolean`)}function sn(e){if(pn(e)||!cn(e))return!1;let t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function cn(e){return mn(typeof e,`function`)}function ln(e){return mn(e,null)}function un(e){return mn(typeof e,`object`)&&!ln(e)}function dn(e){return mn(typeof e,`string`)}function fn(e){return mn(typeof e,`symbol`)}function pn(e){return mn(e,void 0)}function mn(e,t){return e===t}function k(e,t){return nn(e,t)}function A(e,t){return tn(e,t)}function hn(e){return e instanceof Boolean}function gn(e){return e instanceof Number}function _n(e){return e instanceof String}function vn(e){return globalThis.ArrayBuffer.isView(e)}function yn(e){return e instanceof globalThis.RegExp}function bn(e){return e instanceof globalThis.Date}var xn=[];function Sn(e){xn=e.variables}var Cn=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`schema`in e&&`kind`in e&&`data`in e&&Object.getOwnPropertyNames(e).every((e,t)=>xn[0].test(e)||!1)&&e.schema===`urn:structured-exchange:1`&&(e.kind===`graph`||e.kind===`sequence`||e.kind===`table`)&&(e.target===void 0||!(`target`in e)||wn(e.target))&&(e.removals===void 0||!(`removals`in e)||Array.isArray(e.removals)&&e.removals.every((e,t)=>Tn(e))&&e.removals.length<=500)&&[typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&`nodes`in e.data&&`edges`in e.data&&Object.getOwnPropertyNames(e.data).every((e,t)=>xn[2].test(e)||!1)&&Array.isArray(e.data.nodes)&&e.data.nodes.every((e,t)=>kn(e))&&e.data.nodes.length<=500&&e.data.nodes.length>=1&&Array.isArray(e.data.edges)&&e.data.edges.every((e,t)=>jn(e))&&e.data.edges.length<=2e3&&(e.data.containers===void 0||!(`containers`in e.data)||Array.isArray(e.data.containers)&&e.data.containers.every((e,t)=>Nn(e))&&e.data.containers.length<=50),typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&`participants`in e.data&&`messages`in e.data&&Object.getOwnPropertyNames(e.data).every((e,t)=>xn[8].test(e)||!1)&&Array.isArray(e.data.participants)&&e.data.participants.every((e,t)=>kn(e))&&e.data.participants.length<=100&&e.data.participants.length>=1&&Array.isArray(e.data.messages)&&e.data.messages.every((e,t)=>Pn(e))&&e.data.messages.length<=1e3&&(e.data.containers===void 0||!(`containers`in e.data)||Array.isArray(e.data.containers)&&e.data.containers.every((e,t)=>Nn(e))&&e.data.containers.length<=50),typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&`columns`in e.data&&`rows`in e.data&&Object.getOwnPropertyNames(e.data).length===2&&Array.isArray(e.data.columns)&&e.data.columns.every((e,t)=>typeof e==`string`&&k(e,200)&&A(e,1))&&e.data.columns.length<=50&&e.data.columns.length>=1&&Array.isArray(e.data.rows)&&e.data.rows.every((e,t)=>[In(e),typeof e==`object`&&!!e&&!Array.isArray(e)&&`cells`in e&&Object.getOwnPropertyNames(e).every((e,t)=>xn[11].test(e)||!1)&&In(e.cells)&&(e.role===void 0||!(`role`in e)||e.role===`added`||e.role===`changed`||e.role===`context`||e.role===`removed`)].reduce((e,t,n)=>t===!0?++e:e,0)===1)&&e.data.rows.length<=5e3].reduce((e,t,n)=>t===!0?++e:e,0)===1),wn=(e=>typeof e==`string`&&k(e,200)&&A(e,1)),Tn=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`type`in e&&`ref`in e&&Object.getOwnPropertyNames(e).every((e,t)=>xn[1].test(e)||!1)&&(e.type===`element`||e.type===`relationship`)&&wn(e.ref)&&(e.label===void 0||!(`label`in e)||En(e.label))&&(e.kind===void 0||!(`kind`in e)||Dn(e.kind))&&(e.from===void 0||!(`from`in e)||On(e.from))&&(e.to===void 0||!(`to`in e)||On(e.to))),En=(e=>typeof e==`string`&&k(e,500)),Dn=(e=>typeof e==`string`&&k(e,100)&&A(e,1)),On=(e=>typeof e==`string`&&k(e,200)&&A(e,1)),kn=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`id`in e&&Object.getOwnPropertyNames(e).every((e,t)=>xn[3].test(e)||!1)&&On(e.id)&&(e.ref===void 0||!(`ref`in e)||wn(e.ref))&&(e.label===void 0||!(`label`in e)||En(e.label))&&(e.kind===void 0||!(`kind`in e)||Dn(e.kind))&&(e.set===void 0||!(`set`in e)||An(e.set))&&(e.container===void 0||!(`container`in e)||On(e.container))&&(typeof e!=`object`||!e||Array.isArray(e)||`ref`in e?!0:!(typeof e==`object`&&e&&!Array.isArray(e))||`label`in e)),An=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>xn[4].test(e)||!1)&&(e.label===void 0||!(`label`in e)||En(e.label))&&(e.kind===void 0||!(`kind`in e)||Dn(e.kind))&&(e.container===void 0||!(`container`in e)||On(e.container))&&Object.getOwnPropertyNames(e).length>=1),jn=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`from`in e&&`to`in e&&Object.getOwnPropertyNames(e).every((e,t)=>xn[5].test(e)||!1)&&On(e.from)&&On(e.to)&&(e.kind===void 0||!(`kind`in e)||Dn(e.kind))&&(e.ref===void 0||!(`ref`in e)||wn(e.ref))&&(e.label===void 0||!(`label`in e)||En(e.label))&&(e.set===void 0||!(`set`in e)||Mn(e.set))&&(typeof e!=`object`||!e||Array.isArray(e)||`ref`in e?!0:!(typeof e==`object`&&e&&!Array.isArray(e))||`kind`in e)),Mn=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>xn[6].test(e)||!1)&&(e.kind===void 0||!(`kind`in e)||Dn(e.kind))&&(e.label===void 0||!(`label`in e)||En(e.label))&&Object.getOwnPropertyNames(e).length>=1),Nn=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`id`in e&&`label`in e&&Object.getOwnPropertyNames(e).every((e,t)=>xn[7].test(e)||!1)&&On(e.id)&&En(e.label)&&(e.kind===void 0||!(`kind`in e)||Dn(e.kind))),Pn=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`from`in e&&`to`in e&&Object.getOwnPropertyNames(e).every((e,t)=>xn[9].test(e)||!1)&&On(e.from)&&On(e.to)&&(e.ref===void 0||!(`ref`in e)||wn(e.ref))&&(e.label===void 0||!(`label`in e)||En(e.label))&&(e.set===void 0||!(`set`in e)||Fn(e.set))&&(typeof e!=`object`||!e||Array.isArray(e)||`ref`in e?!0:!(typeof e==`object`&&e&&!Array.isArray(e))||`label`in e)),Fn=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>xn[10].test(e)||!1)&&(e.label===void 0||!(`label`in e)||En(e.label))&&Object.getOwnPropertyNames(e).length>=1),In=(e=>Array.isArray(e)&&e.every((e,t)=>(typeof e==`string`||Number.isFinite(e)||typeof e==`boolean`||e===null)&&(typeof e!=`string`||k(e,1e3)))&&e.length<=50);function Ln(e){return Cn(e)}Sn({variables:[RegExp(`(^schema$|^kind$|^target$|^removals$|^data$)`,`u`),RegExp(`(^type$|^ref$|^label$|^kind$|^from$|^to$)`,`u`),RegExp(`(^nodes$|^edges$|^containers$)`,`u`),RegExp(`(^id$|^ref$|^label$|^kind$|^set$|^container$)`,`u`),RegExp(`(^label$|^kind$|^container$)`,`u`),RegExp(`(^from$|^to$|^kind$|^ref$|^label$|^set$)`,`u`),RegExp(`(^kind$|^label$)`,`u`),RegExp(`(^id$|^label$|^kind$)`,`u`),RegExp(`(^participants$|^messages$|^containers$)`,`u`),RegExp(`(^from$|^to$|^ref$|^label$|^set$)`,`u`),RegExp(`(^label$)`,`u`),RegExp(`(^cells$|^role$)`,`u`)]});function Rn(){throw Error(`Unreachable`)}function zn(e){let t=new Set,n=e;for(;n&&n!==Object.prototype;){for(let e of Reflect.ownKeys(n))e!==`constructor`&&typeof e!=`symbol`&&t.add(e);n=Object.getPrototypeOf(n)}return[...t]}function Bn(e){return typeof e==`number`}var Vn;(function(e){e[e.Array=0]=`Array`,e[e.BigInt=1]=`BigInt`,e[e.Boolean=2]=`Boolean`,e[e.Date=3]=`Date`,e[e.Constructor=4]=`Constructor`,e[e.Function=5]=`Function`,e[e.Null=6]=`Null`,e[e.Number=7]=`Number`,e[e.Object=8]=`Object`,e[e.RegExp=9]=`RegExp`,e[e.String=10]=`String`,e[e.Symbol=11]=`Symbol`,e[e.TypeArray=12]=`TypeArray`,e[e.Undefined=13]=`Undefined`})(Vn||={});var Hn=BigInt(`14695981039346656037`),[Un,Wn]=[BigInt(`1099511628211`),BigInt(`18446744073709551616`)],Gn=Array.from({length:256}).map((e,t)=>BigInt(t)),Kn=new Float64Array(1),qn=new DataView(Kn.buffer),Jn=new Uint8Array(Kn.buffer);function Yn(e){Hn^=Gn[e],Hn=Hn*Un%Wn}function Xn(e){Yn(Vn.Array);for(let t of e)dr(t)}function Zn(e){Yn(Vn.BigInt),qn.setBigInt64(0,e);for(let e of Jn)Yn(e)}function Qn(e){Yn(Vn.Boolean),Yn(+!!e)}function $n(e){Yn(Vn.Constructor),dr(e.toString())}function er(e){Yn(Vn.Date),dr(e.getTime())}function tr(e){Yn(Vn.Function),dr(e.toString())}function nr(e){Yn(Vn.Null)}function rr(e){Yn(Vn.Number),qn.setFloat64(0,e,!0);for(let e of Jn)Yn(e)}function ir(e){Yn(Vn.Object);for(let t of zn(e).sort())dr(t),dr(e[t])}function ar(e){Yn(Vn.RegExp),sr(e.toString())}var or=new TextEncoder;function sr(e){Yn(Vn.String);for(let t of or.encode(e))Yn(t)}function cr(e){Yn(Vn.Symbol),dr(e.toString())}function lr(e){Yn(Vn.TypeArray);let t=new Uint8Array(e.buffer);for(let e=0;e<t.length;e++)Yn(t[e])}function ur(e){return Yn(Vn.Undefined)}function dr(e){return vn(e)?lr(e):bn(e)?er(e):yn(e)?ar(e):hn(e)?Qn(e.valueOf()):_n(e)?sr(e.valueOf()):gn(e)?rr(e.valueOf()):Bn(e)?rr(e):rn(e)?Xn(e):on(e)?Qn(e):an(e)?Zn(e):sn(e)?$n(e):ln(e)?nr(e):un(e)?ir(e):dn(e)?sr(e):fn(e)?cr(e):pn(e)?ur(e):cn(e)?tr(e):Rn()}function fr(e){return Hn=BigInt(`14695981039346656037`),dr(e),Hn}function pr(e){return fr(e).toString(16).padStart(16,`0`)}var mr=[];function hr(e){mr=e.variables}var gr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`schema`in e&&`kind`in e&&`data`in e&&Object.getOwnPropertyNames(e).every((e,t)=>mr[0].test(e)||!1)&&e.schema===`urn:structured-exchange:2`&&(e.kind===`graph`||e.kind===`sequence`||e.kind===`table`)&&(e.profile===void 0||!(`profile`in e)||typeof e.profile==`string`&&k(e.profile,200)&&A(e.profile,1))&&(e.target===void 0||!(`target`in e)||typeof e.target==`object`&&e.target!==null&&!Array.isArray(e.target)&&`ref`in e.target&&Object.getOwnPropertyNames(e.target).every((e,t)=>mr[1].test(e)||!1)&&_r(e.target.ref)&&(e.target.revision===void 0||!(`revision`in e.target)||vr(e.target.revision)))&&(e.removals===void 0||!(`removals`in e)||Array.isArray(e.removals)&&e.removals.every((e,t)=>yr(e))&&e.removals.length<=500)&&(e.artifacts===void 0||!(`artifacts`in e)||Array.isArray(e.artifacts)&&e.artifacts.every((e,t)=>Cr(e))&&e.artifacts.length<=50)&&(e.viewpoints===void 0||!(`viewpoints`in e)||Array.isArray(e.viewpoints)&&e.viewpoints.every((e,t)=>wr(e))&&e.viewpoints.length<=20)&&[typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&`nodes`in e.data&&`edges`in e.data&&Object.getOwnPropertyNames(e.data).every((e,t)=>mr[6].test(e)||!1)&&Array.isArray(e.data.nodes)&&e.data.nodes.every((e,t)=>Tr(e))&&e.data.nodes.length<=500&&e.data.nodes.length>=1&&Array.isArray(e.data.edges)&&e.data.edges.every((e,t)=>Lr(e))&&e.data.edges.length<=2e3&&(e.data.containers===void 0||!(`containers`in e.data)||Array.isArray(e.data.containers)&&e.data.containers.every((e,t)=>zr(e))&&e.data.containers.length<=50),typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&`participants`in e.data&&`messages`in e.data&&Object.getOwnPropertyNames(e.data).every((e,t)=>mr[16].test(e)||!1)&&Array.isArray(e.data.participants)&&e.data.participants.every((e,t)=>Tr(e))&&e.data.participants.length<=100&&e.data.participants.length>=1&&Array.isArray(e.data.messages)&&e.data.messages.every((e,t)=>Br(e))&&e.data.messages.length<=1e3&&(e.data.containers===void 0||!(`containers`in e.data)||Array.isArray(e.data.containers)&&e.data.containers.every((e,t)=>zr(e))&&e.data.containers.length<=50),typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&`columns`in e.data&&`rows`in e.data&&Object.getOwnPropertyNames(e.data).every((e,t)=>mr[19].test(e)||!1)&&Array.isArray(e.data.columns)&&e.data.columns.every((e,t)=>typeof e==`string`&&k(e,200)&&A(e,1))&&e.data.columns.length<=50&&e.data.columns.length>=1&&Array.isArray(e.data.rows)&&e.data.rows.every((e,t)=>[Hr(e),Ur(e),Kr(e)].reduce((e,t,n)=>t===!0?++e:e,0)===1)&&e.data.rows.length<=5e3&&(e.data.relations===void 0||!(`relations`in e.data)||Array.isArray(e.data.relations)&&e.data.relations.every((e,t)=>qr(e))&&e.data.relations.length<=2e3)].reduce((e,t,n)=>t===!0?++e:e,0)===1),_r=(e=>typeof e==`string`&&k(e,200)&&A(e,1)),vr=(e=>typeof e==`string`&&k(e,200)&&A(e,1)),yr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`type`in e&&`ref`in e&&Object.getOwnPropertyNames(e).every((e,t)=>mr[2].test(e)||!1)&&(e.type===`element`||e.type===`relationship`||e.type===`row`)&&_r(e.ref)&&(e.label===void 0||!(`label`in e)||br(e.label))&&(e.kind===void 0||!(`kind`in e)||xr(e.kind))&&(e.from===void 0||!(`from`in e)||Sr(e.from))&&(e.to===void 0||!(`to`in e)||Sr(e.to))),br=(e=>typeof e==`string`&&k(e,500)),xr=(e=>typeof e==`string`&&k(e,100)&&A(e,1)),Sr=(e=>typeof e==`string`&&k(e,200)&&A(e,1)),Cr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`rel`in e&&`uri`in e&&`sha256`in e&&Object.getOwnPropertyNames(e).every((e,t)=>mr[3].test(e)||!1)&&typeof e.rel==`string`&&k(e.rel,100)&&A(e.rel,1)&&typeof e.uri==`string`&&k(e.uri,2e3)&&A(e.uri,1)&&typeof e.sha256==`string`&&mr[4].test(e.sha256)&&(e.mediaType===void 0||!(`mediaType`in e)||typeof e.mediaType==`string`&&k(e.mediaType,100)&&A(e.mediaType,1))&&(e.label===void 0||!(`label`in e)||br(e.label))),wr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`id`in e&&`label`in e&&`concern`in e&&Object.getOwnPropertyNames(e).every((e,t)=>mr[5].test(e)||!1)&&Sr(e.id)&&typeof e.label==`string`&&k(e.label,500)&&A(e.label,1)&&typeof e.concern==`string`&&k(e.concern,500)&&A(e.concern,1)&&(e.elementKinds===void 0||!(`elementKinds`in e)||Array.isArray(e.elementKinds)&&e.elementKinds.every((e,t)=>xr(e))&&e.elementKinds.length<=64&&e.elementKinds.length>=1&&new Set(e.elementKinds.map(pr)).size===e.elementKinds.length)&&(e.relationshipKinds===void 0||!(`relationshipKinds`in e)||Array.isArray(e.relationshipKinds)&&e.relationshipKinds.every((e,t)=>xr(e))&&e.relationshipKinds.length<=64&&e.relationshipKinds.length>=1&&new Set(e.relationshipKinds.map(pr)).size===e.relationshipKinds.length)),Tr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`id`in e&&Object.getOwnPropertyNames(e).every((e,t)=>mr[7].test(e)||!1)&&Sr(e.id)&&(e.ref===void 0||!(`ref`in e)||_r(e.ref))&&(e.label===void 0||!(`label`in e)||br(e.label))&&(e.kind===void 0||!(`kind`in e)||xr(e.kind))&&(e.set===void 0||!(`set`in e)||Er(e.set))&&(e.container===void 0||!(`container`in e)||Sr(e.container))&&(e.attributes===void 0||!(`attributes`in e)||Dr(e.attributes))&&(e.expect===void 0||!(`expect`in e)||Mr(e.expect))&&(e.locations===void 0||!(`locations`in e)||Nr(e.locations))&&(e.artifacts===void 0||!(`artifacts`in e)||Ir(e.artifacts))&&(typeof e!=`object`||!e||Array.isArray(e)||`ref`in e?!0:!(typeof e==`object`&&e&&!Array.isArray(e))||`label`in e)),Er=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>mr[8].test(e)||!1)&&(e.label===void 0||!(`label`in e)||br(e.label))&&(e.kind===void 0||!(`kind`in e)||xr(e.kind))&&(e.container===void 0||!(`container`in e)||Sr(e.container))&&(e.attributes===void 0||!(`attributes`in e)||Dr(e.attributes))&&(e.removeAttributes===void 0||!(`removeAttributes`in e)||jr(e.removeAttributes))&&Object.getOwnPropertyNames(e).length>=1),Dr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((t,n)=>mr[9].test(t)||Or(e[t]))&&Object.getOwnPropertyNames(e).every((e,t)=>typeof e!=`string`||k(e,200)&&A(e,1))&&Object.getOwnPropertyNames(e).length<=50),Or=(e=>[kr(e),Ar(e),Array.isArray(e)&&e.every((e,t)=>[kr(e),Ar(e)].reduce((e,t,n)=>t===!0?++e:e,0)===1)&&e.length<=50].reduce((e,t,n)=>t===!0?++e:e,0)===1),kr=(e=>(typeof e==`string`||Number.isFinite(e)||typeof e==`boolean`||e===null)&&(typeof e!=`string`||k(e,1e3))),Ar=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`ref`in e&&Object.getOwnPropertyNames(e).length===1&&_r(e.ref)),jr=(e=>Array.isArray(e)&&e.every((e,t)=>Sr(e))&&e.length<=50),Mr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>mr[10].test(e)||!1)&&(e.label===void 0||!(`label`in e)||br(e.label))&&(e.kind===void 0||!(`kind`in e)||xr(e.kind))&&(e.container===void 0||!(`container`in e)||Sr(e.container))&&(e.revision===void 0||!(`revision`in e)||vr(e.revision))&&(e.attributes===void 0||!(`attributes`in e)||Dr(e.attributes))&&Object.getOwnPropertyNames(e).length>=1),Nr=(e=>Array.isArray(e)&&e.every((e,t)=>Pr(e))&&e.length<=10),Pr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`uri`in e&&Object.getOwnPropertyNames(e).every((e,t)=>mr[11].test(e)||!1)&&typeof e.uri==`string`&&k(e.uri,2e3)&&A(e.uri,1)&&(e.revision===void 0||!(`revision`in e)||vr(e.revision))&&(e.range===void 0||!(`range`in e)||typeof e.range==`object`&&e.range!==null&&!Array.isArray(e.range)&&`startLine`in e.range&&`endLine`in e.range&&Object.getOwnPropertyNames(e.range).every((e,t)=>mr[12].test(e)||!1)&&Fr(e.range.startLine)&&(e.range.startCharacter===void 0||!(`startCharacter`in e.range)||Fr(e.range.startCharacter))&&Fr(e.range.endLine)&&(e.range.endCharacter===void 0||!(`endCharacter`in e.range)||Fr(e.range.endCharacter)))),Fr=(e=>Number.isInteger(e)&&(!(Number.isFinite(e)||typeof e==`bigint`)||e<=1e6&&e>=0)),Ir=(e=>Array.isArray(e)&&e.every((e,t)=>Cr(e))&&e.length<=20),Lr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`from`in e&&`to`in e&&Object.getOwnPropertyNames(e).every((e,t)=>mr[13].test(e)||!1)&&Sr(e.from)&&Sr(e.to)&&(e.kind===void 0||!(`kind`in e)||xr(e.kind))&&(e.ref===void 0||!(`ref`in e)||_r(e.ref))&&(e.label===void 0||!(`label`in e)||br(e.label))&&(e.set===void 0||!(`set`in e)||Rr(e.set))&&(e.attributes===void 0||!(`attributes`in e)||Dr(e.attributes))&&(e.expect===void 0||!(`expect`in e)||Mr(e.expect))&&(e.locations===void 0||!(`locations`in e)||Nr(e.locations))&&(e.artifacts===void 0||!(`artifacts`in e)||Ir(e.artifacts))&&(typeof e!=`object`||!e||Array.isArray(e)||`ref`in e?!0:!(typeof e==`object`&&e&&!Array.isArray(e))||`kind`in e)),Rr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>mr[14].test(e)||!1)&&(e.kind===void 0||!(`kind`in e)||xr(e.kind))&&(e.label===void 0||!(`label`in e)||br(e.label))&&(e.attributes===void 0||!(`attributes`in e)||Dr(e.attributes))&&(e.removeAttributes===void 0||!(`removeAttributes`in e)||jr(e.removeAttributes))&&Object.getOwnPropertyNames(e).length>=1),zr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`id`in e&&`label`in e&&Object.getOwnPropertyNames(e).every((e,t)=>mr[15].test(e)||!1)&&Sr(e.id)&&br(e.label)&&(e.kind===void 0||!(`kind`in e)||xr(e.kind))),Br=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`from`in e&&`to`in e&&Object.getOwnPropertyNames(e).every((e,t)=>mr[17].test(e)||!1)&&Sr(e.from)&&Sr(e.to)&&(e.ref===void 0||!(`ref`in e)||_r(e.ref))&&(e.label===void 0||!(`label`in e)||br(e.label))&&(e.set===void 0||!(`set`in e)||Vr(e.set))&&(e.attributes===void 0||!(`attributes`in e)||Dr(e.attributes))&&(e.expect===void 0||!(`expect`in e)||Mr(e.expect))&&(e.locations===void 0||!(`locations`in e)||Nr(e.locations))&&(e.artifacts===void 0||!(`artifacts`in e)||Ir(e.artifacts))&&(typeof e!=`object`||!e||Array.isArray(e)||`ref`in e?!0:!(typeof e==`object`&&e&&!Array.isArray(e))||`label`in e)),Vr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>mr[18].test(e)||!1)&&(e.label===void 0||!(`label`in e)||br(e.label))&&(e.attributes===void 0||!(`attributes`in e)||Dr(e.attributes))&&(e.removeAttributes===void 0||!(`removeAttributes`in e)||jr(e.removeAttributes))&&Object.getOwnPropertyNames(e).length>=1),Hr=(e=>Array.isArray(e)&&e.every((e,t)=>(typeof e==`string`||Number.isFinite(e)||typeof e==`boolean`||e===null)&&(typeof e!=`string`||k(e,1e3)))&&e.length<=50),Ur=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`cells`in e&&Object.getOwnPropertyNames(e).every((e,t)=>mr[20].test(e)||!1)&&Hr(e.cells)&&(e.role===void 0||!(`role`in e)||Wr(e.role))&&(e.id===void 0||!(`id`in e)||Sr(e.id))&&(e.ref===void 0||!(`ref`in e)||_r(e.ref))&&(e.kind===void 0||!(`kind`in e)||xr(e.kind))&&(e.label===void 0||!(`label`in e)||br(e.label))&&(e.set===void 0||!(`set`in e)||Gr(e.set))&&(e.attributes===void 0||!(`attributes`in e)||Dr(e.attributes))&&(e.expect===void 0||!(`expect`in e)||Mr(e.expect))&&(e.locations===void 0||!(`locations`in e)||Nr(e.locations))&&(e.artifacts===void 0||!(`artifacts`in e)||Ir(e.artifacts))),Wr=(e=>e===`added`||e===`changed`||e===`context`||e===`removed`),Gr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>mr[21].test(e)||!1)&&(e.label===void 0||!(`label`in e)||br(e.label))&&(e.kind===void 0||!(`kind`in e)||xr(e.kind))&&(e.cells===void 0||!(`cells`in e)||Hr(e.cells))&&(e.attributes===void 0||!(`attributes`in e)||Dr(e.attributes))&&(e.removeAttributes===void 0||!(`removeAttributes`in e)||jr(e.removeAttributes))&&Object.getOwnPropertyNames(e).length>=1),Kr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`heading`in e&&Object.getOwnPropertyNames(e).every((e,t)=>mr[22].test(e)||!1)&&typeof e.heading==`string`&&k(e.heading,500)&&A(e.heading,1)&&(e.depth===void 0||!(`depth`in e)||Number.isInteger(e.depth)&&(!(Number.isFinite(e.depth)||typeof e.depth==`bigint`)||e.depth<=6&&e.depth>=1))&&(e.role===void 0||!(`role`in e)||Wr(e.role))&&(e.id===void 0||!(`id`in e)||Sr(e.id))&&(e.ref===void 0||!(`ref`in e)||_r(e.ref))),qr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`from`in e&&`to`in e&&`kind`in e&&Object.getOwnPropertyNames(e).every((e,t)=>mr[23].test(e)||!1)&&Jr(e.from)&&Jr(e.to)&&xr(e.kind)&&(e.ref===void 0||!(`ref`in e)||_r(e.ref))&&(e.label===void 0||!(`label`in e)||br(e.label))&&(e.attributes===void 0||!(`attributes`in e)||Dr(e.attributes))),Jr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>mr[24].test(e)||!1)&&(e.id===void 0||!(`id`in e)||Sr(e.id))&&(e.ref===void 0||!(`ref`in e)||_r(e.ref))&&Object.getOwnPropertyNames(e).length>=1&&Object.getOwnPropertyNames(e).length<=1&&[!(typeof e==`object`&&e&&!Array.isArray(e))||`id`in e,!(typeof e==`object`&&e&&!Array.isArray(e))||`ref`in e].reduce((e,t,n)=>t===!0?++e:e,0)===1);function Yr(e){return gr(e)}hr({variables:[RegExp(`(^schema$|^kind$|^profile$|^target$|^removals$|^artifacts$|^viewpoints$|^data$)`,`u`),RegExp(`(^ref$|^revision$)`,`u`),RegExp(`(^type$|^ref$|^label$|^kind$|^from$|^to$)`,`u`),RegExp(`(^rel$|^uri$|^sha256$|^mediaType$|^label$)`,`u`),RegExp(`^sha256:[0-9a-f]{64}$`,`u`),RegExp(`(^id$|^label$|^concern$|^elementKinds$|^relationshipKinds$)`,`u`),RegExp(`(^nodes$|^edges$|^containers$)`,`u`),RegExp(`(^id$|^ref$|^label$|^kind$|^set$|^container$|^attributes$|^expect$|^locations$|^artifacts$)`,`u`),RegExp(`(^label$|^kind$|^container$|^attributes$|^removeAttributes$)`,`u`),RegExp(`(?!)`,`u`),RegExp(`(^label$|^kind$|^container$|^revision$|^attributes$)`,`u`),RegExp(`(^uri$|^revision$|^range$)`,`u`),RegExp(`(^startLine$|^startCharacter$|^endLine$|^endCharacter$)`,`u`),RegExp(`(^from$|^to$|^kind$|^ref$|^label$|^set$|^attributes$|^expect$|^locations$|^artifacts$)`,`u`),RegExp(`(^kind$|^label$|^attributes$|^removeAttributes$)`,`u`),RegExp(`(^id$|^label$|^kind$)`,`u`),RegExp(`(^participants$|^messages$|^containers$)`,`u`),RegExp(`(^from$|^to$|^ref$|^label$|^set$|^attributes$|^expect$|^locations$|^artifacts$)`,`u`),RegExp(`(^label$|^attributes$|^removeAttributes$)`,`u`),RegExp(`(^columns$|^rows$|^relations$)`,`u`),RegExp(`(^cells$|^role$|^id$|^ref$|^kind$|^label$|^set$|^attributes$|^expect$|^locations$|^artifacts$)`,`u`),RegExp(`(^label$|^kind$|^cells$|^attributes$|^removeAttributes$)`,`u`),RegExp(`(^heading$|^depth$|^role$|^id$|^ref$)`,`u`),RegExp(`(^from$|^to$|^kind$|^ref$|^label$|^attributes$)`,`u`),RegExp(`(^id$|^ref$)`,`u`)]});var j=[];function Xr(e){j=e.variables}var Zr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`schema`in e&&`kind`in e&&`data`in e&&Object.getOwnPropertyNames(e).every((e,t)=>j[0].test(e)||!1)&&e.schema===`urn:structured-exchange:3`&&(e.kind===`graph`||e.kind===`sequence`||e.kind===`table`||e.kind===`timeline`)&&(e.profile===void 0||!(`profile`in e)||typeof e.profile==`string`&&k(e.profile,200)&&A(e.profile,1))&&(e.target===void 0||!(`target`in e)||typeof e.target==`object`&&e.target!==null&&!Array.isArray(e.target)&&`ref`in e.target&&Object.getOwnPropertyNames(e.target).every((e,t)=>j[1].test(e)||!1)&&Qr(e.target.ref)&&(e.target.revision===void 0||!(`revision`in e.target)||$r(e.target.revision)))&&(e.removals===void 0||!(`removals`in e)||Array.isArray(e.removals)&&e.removals.every((e,t)=>ei(e))&&e.removals.length<=500)&&(e.artifacts===void 0||!(`artifacts`in e)||Array.isArray(e.artifacts)&&e.artifacts.every((e,t)=>ii(e))&&e.artifacts.length<=50)&&(e.viewpoints===void 0||!(`viewpoints`in e)||Array.isArray(e.viewpoints)&&e.viewpoints.every((e,t)=>ai(e))&&e.viewpoints.length<=20)&&[typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&`nodes`in e.data&&`edges`in e.data&&Object.getOwnPropertyNames(e.data).every((e,t)=>j[6].test(e)||!1)&&Array.isArray(e.data.nodes)&&e.data.nodes.every((e,t)=>oi(e))&&e.data.nodes.length<=500&&e.data.nodes.length>=1&&Array.isArray(e.data.edges)&&e.data.edges.every((e,t)=>vi(e))&&e.data.edges.length<=2e3&&(e.data.containers===void 0||!(`containers`in e.data)||Array.isArray(e.data.containers)&&e.data.containers.every((e,t)=>bi(e))&&e.data.containers.length<=50),typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&`participants`in e.data&&`messages`in e.data&&Object.getOwnPropertyNames(e.data).every((e,t)=>j[16].test(e)||!1)&&Array.isArray(e.data.participants)&&e.data.participants.every((e,t)=>oi(e))&&e.data.participants.length<=100&&e.data.participants.length>=1&&Array.isArray(e.data.messages)&&e.data.messages.every((e,t)=>xi(e))&&e.data.messages.length<=1e3&&(e.data.containers===void 0||!(`containers`in e.data)||Array.isArray(e.data.containers)&&e.data.containers.every((e,t)=>bi(e))&&e.data.containers.length<=50),typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&`columns`in e.data&&`rows`in e.data&&Object.getOwnPropertyNames(e.data).every((e,t)=>j[19].test(e)||!1)&&Array.isArray(e.data.columns)&&e.data.columns.every((e,t)=>typeof e==`string`&&k(e,200)&&A(e,1))&&e.data.columns.length<=50&&e.data.columns.length>=1&&Array.isArray(e.data.rows)&&e.data.rows.every((e,t)=>[Ci(e),wi(e),Di(e)].reduce((e,t,n)=>t===!0?++e:e,0)===1)&&e.data.rows.length<=5e3&&(e.data.relations===void 0||!(`relations`in e.data)||Array.isArray(e.data.relations)&&e.data.relations.every((e,t)=>Oi(e))&&e.data.relations.length<=2e3),typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&`time`in e.data&&`rows`in e.data&&Object.getOwnPropertyNames(e.data).every((e,t)=>j[25].test(e)||!1)&&(e.data.title===void 0||!(`title`in e.data)||ti(e.data.title))&&typeof e.data.time==`object`&&e.data.time!==null&&!Array.isArray(e.data.time)&&`start`in e.data.time&&`end`in e.data.time&&`scale`in e.data.time&&Object.getOwnPropertyNames(e.data.time).length===3&&Ai(e.data.time.start)&&Ai(e.data.time.end)&&(e.data.time.scale===`week`||e.data.time.scale===`month`||e.data.time.scale===`quarter`)&&Array.isArray(e.data.rows)&&e.data.rows.every((e,t)=>ji(e))&&e.data.rows.length<=500&&(e.data.dependencies===void 0||!(`dependencies`in e.data)||Array.isArray(e.data.dependencies)&&e.data.dependencies.every((e,t)=>Ri(e))&&e.data.dependencies.length<=2e3)&&(e.data.comparedTo===void 0||!(`comparedTo`in e.data)||typeof e.data.comparedTo==`object`&&e.data.comparedTo!==null&&!Array.isArray(e.data.comparedTo)&&`label`in e.data.comparedTo&&Object.getOwnPropertyNames(e.data.comparedTo).every((e,t)=>j[32].test(e)||!1)&&typeof e.data.comparedTo.label==`string`&&k(e.data.comparedTo.label,500)&&A(e.data.comparedTo.label,1)&&(e.data.comparedTo.date===void 0||!(`date`in e.data.comparedTo)||Ai(e.data.comparedTo.date)))&&(e.data.periods===void 0||!(`periods`in e.data)||Array.isArray(e.data.periods)&&e.data.periods.every((e,t)=>zi(e))&&e.data.periods.length<=100)&&(e.data.references===void 0||!(`references`in e.data)||Array.isArray(e.data.references)&&e.data.references.every((e,t)=>Bi(e))&&e.data.references.length<=50)].reduce((e,t,n)=>t===!0?++e:e,0)===1),Qr=(e=>typeof e==`string`&&k(e,200)&&A(e,1)),$r=(e=>typeof e==`string`&&k(e,200)&&A(e,1)),ei=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`type`in e&&`ref`in e&&Object.getOwnPropertyNames(e).every((e,t)=>j[2].test(e)||!1)&&(e.type===`element`||e.type===`relationship`||e.type===`row`)&&Qr(e.ref)&&(e.label===void 0||!(`label`in e)||ti(e.label))&&(e.kind===void 0||!(`kind`in e)||ni(e.kind))&&(e.from===void 0||!(`from`in e)||ri(e.from))&&(e.to===void 0||!(`to`in e)||ri(e.to))),ti=(e=>typeof e==`string`&&k(e,500)),ni=(e=>typeof e==`string`&&k(e,100)&&A(e,1)),ri=(e=>typeof e==`string`&&k(e,200)&&A(e,1)),ii=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`rel`in e&&`uri`in e&&`sha256`in e&&Object.getOwnPropertyNames(e).every((e,t)=>j[3].test(e)||!1)&&typeof e.rel==`string`&&k(e.rel,100)&&A(e.rel,1)&&typeof e.uri==`string`&&k(e.uri,2e3)&&A(e.uri,1)&&typeof e.sha256==`string`&&j[4].test(e.sha256)&&(e.mediaType===void 0||!(`mediaType`in e)||typeof e.mediaType==`string`&&k(e.mediaType,100)&&A(e.mediaType,1))&&(e.label===void 0||!(`label`in e)||ti(e.label))),ai=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`id`in e&&`label`in e&&`concern`in e&&Object.getOwnPropertyNames(e).every((e,t)=>j[5].test(e)||!1)&&ri(e.id)&&typeof e.label==`string`&&k(e.label,500)&&A(e.label,1)&&typeof e.concern==`string`&&k(e.concern,500)&&A(e.concern,1)&&(e.elementKinds===void 0||!(`elementKinds`in e)||Array.isArray(e.elementKinds)&&e.elementKinds.every((e,t)=>ni(e))&&e.elementKinds.length<=64&&e.elementKinds.length>=1&&new Set(e.elementKinds.map(pr)).size===e.elementKinds.length)&&(e.relationshipKinds===void 0||!(`relationshipKinds`in e)||Array.isArray(e.relationshipKinds)&&e.relationshipKinds.every((e,t)=>ni(e))&&e.relationshipKinds.length<=64&&e.relationshipKinds.length>=1&&new Set(e.relationshipKinds.map(pr)).size===e.relationshipKinds.length)),oi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`id`in e&&Object.getOwnPropertyNames(e).every((e,t)=>j[7].test(e)||!1)&&ri(e.id)&&(e.ref===void 0||!(`ref`in e)||Qr(e.ref))&&(e.label===void 0||!(`label`in e)||ti(e.label))&&(e.kind===void 0||!(`kind`in e)||ni(e.kind))&&(e.set===void 0||!(`set`in e)||si(e.set))&&(e.container===void 0||!(`container`in e)||ri(e.container))&&(e.attributes===void 0||!(`attributes`in e)||ci(e.attributes))&&(e.expect===void 0||!(`expect`in e)||pi(e.expect))&&(e.locations===void 0||!(`locations`in e)||mi(e.locations))&&(e.artifacts===void 0||!(`artifacts`in e)||_i(e.artifacts))&&(typeof e!=`object`||!e||Array.isArray(e)||`ref`in e?!0:!(typeof e==`object`&&e&&!Array.isArray(e))||`label`in e)),si=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>j[8].test(e)||!1)&&(e.label===void 0||!(`label`in e)||ti(e.label))&&(e.kind===void 0||!(`kind`in e)||ni(e.kind))&&(e.container===void 0||!(`container`in e)||ri(e.container))&&(e.attributes===void 0||!(`attributes`in e)||ci(e.attributes))&&(e.removeAttributes===void 0||!(`removeAttributes`in e)||fi(e.removeAttributes))&&Object.getOwnPropertyNames(e).length>=1),ci=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((t,n)=>j[9].test(t)||li(e[t]))&&Object.getOwnPropertyNames(e).every((e,t)=>typeof e!=`string`||k(e,200)&&A(e,1))&&Object.getOwnPropertyNames(e).length<=50),li=(e=>[ui(e),di(e),Array.isArray(e)&&e.every((e,t)=>[ui(e),di(e)].reduce((e,t,n)=>t===!0?++e:e,0)===1)&&e.length<=50].reduce((e,t,n)=>t===!0?++e:e,0)===1),ui=(e=>(typeof e==`string`||Number.isFinite(e)||typeof e==`boolean`||e===null)&&(typeof e!=`string`||k(e,1e3))),di=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`ref`in e&&Object.getOwnPropertyNames(e).length===1&&Qr(e.ref)),fi=(e=>Array.isArray(e)&&e.every((e,t)=>ri(e))&&e.length<=50),pi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>j[10].test(e)||!1)&&(e.label===void 0||!(`label`in e)||ti(e.label))&&(e.kind===void 0||!(`kind`in e)||ni(e.kind))&&(e.container===void 0||!(`container`in e)||ri(e.container))&&(e.revision===void 0||!(`revision`in e)||$r(e.revision))&&(e.attributes===void 0||!(`attributes`in e)||ci(e.attributes))&&Object.getOwnPropertyNames(e).length>=1),mi=(e=>Array.isArray(e)&&e.every((e,t)=>hi(e))&&e.length<=10),hi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`uri`in e&&Object.getOwnPropertyNames(e).every((e,t)=>j[11].test(e)||!1)&&typeof e.uri==`string`&&k(e.uri,2e3)&&A(e.uri,1)&&(e.revision===void 0||!(`revision`in e)||$r(e.revision))&&(e.range===void 0||!(`range`in e)||typeof e.range==`object`&&e.range!==null&&!Array.isArray(e.range)&&`startLine`in e.range&&`endLine`in e.range&&Object.getOwnPropertyNames(e.range).every((e,t)=>j[12].test(e)||!1)&&gi(e.range.startLine)&&(e.range.startCharacter===void 0||!(`startCharacter`in e.range)||gi(e.range.startCharacter))&&gi(e.range.endLine)&&(e.range.endCharacter===void 0||!(`endCharacter`in e.range)||gi(e.range.endCharacter)))),gi=(e=>Number.isInteger(e)&&(!(Number.isFinite(e)||typeof e==`bigint`)||e<=1e6&&e>=0)),_i=(e=>Array.isArray(e)&&e.every((e,t)=>ii(e))&&e.length<=20),vi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`from`in e&&`to`in e&&Object.getOwnPropertyNames(e).every((e,t)=>j[13].test(e)||!1)&&ri(e.from)&&ri(e.to)&&(e.kind===void 0||!(`kind`in e)||ni(e.kind))&&(e.ref===void 0||!(`ref`in e)||Qr(e.ref))&&(e.label===void 0||!(`label`in e)||ti(e.label))&&(e.set===void 0||!(`set`in e)||yi(e.set))&&(e.attributes===void 0||!(`attributes`in e)||ci(e.attributes))&&(e.expect===void 0||!(`expect`in e)||pi(e.expect))&&(e.locations===void 0||!(`locations`in e)||mi(e.locations))&&(e.artifacts===void 0||!(`artifacts`in e)||_i(e.artifacts))&&(typeof e!=`object`||!e||Array.isArray(e)||`ref`in e?!0:!(typeof e==`object`&&e&&!Array.isArray(e))||`kind`in e)),yi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>j[14].test(e)||!1)&&(e.kind===void 0||!(`kind`in e)||ni(e.kind))&&(e.label===void 0||!(`label`in e)||ti(e.label))&&(e.attributes===void 0||!(`attributes`in e)||ci(e.attributes))&&(e.removeAttributes===void 0||!(`removeAttributes`in e)||fi(e.removeAttributes))&&Object.getOwnPropertyNames(e).length>=1),bi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`id`in e&&`label`in e&&Object.getOwnPropertyNames(e).every((e,t)=>j[15].test(e)||!1)&&ri(e.id)&&ti(e.label)&&(e.kind===void 0||!(`kind`in e)||ni(e.kind))),xi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`from`in e&&`to`in e&&Object.getOwnPropertyNames(e).every((e,t)=>j[17].test(e)||!1)&&ri(e.from)&&ri(e.to)&&(e.ref===void 0||!(`ref`in e)||Qr(e.ref))&&(e.label===void 0||!(`label`in e)||ti(e.label))&&(e.set===void 0||!(`set`in e)||Si(e.set))&&(e.attributes===void 0||!(`attributes`in e)||ci(e.attributes))&&(e.expect===void 0||!(`expect`in e)||pi(e.expect))&&(e.locations===void 0||!(`locations`in e)||mi(e.locations))&&(e.artifacts===void 0||!(`artifacts`in e)||_i(e.artifacts))&&(typeof e!=`object`||!e||Array.isArray(e)||`ref`in e?!0:!(typeof e==`object`&&e&&!Array.isArray(e))||`label`in e)),Si=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>j[18].test(e)||!1)&&(e.label===void 0||!(`label`in e)||ti(e.label))&&(e.attributes===void 0||!(`attributes`in e)||ci(e.attributes))&&(e.removeAttributes===void 0||!(`removeAttributes`in e)||fi(e.removeAttributes))&&Object.getOwnPropertyNames(e).length>=1),Ci=(e=>Array.isArray(e)&&e.every((e,t)=>(typeof e==`string`||Number.isFinite(e)||typeof e==`boolean`||e===null)&&(typeof e!=`string`||k(e,1e3)))&&e.length<=50),wi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`cells`in e&&Object.getOwnPropertyNames(e).every((e,t)=>j[20].test(e)||!1)&&Ci(e.cells)&&(e.role===void 0||!(`role`in e)||Ti(e.role))&&(e.id===void 0||!(`id`in e)||ri(e.id))&&(e.ref===void 0||!(`ref`in e)||Qr(e.ref))&&(e.kind===void 0||!(`kind`in e)||ni(e.kind))&&(e.label===void 0||!(`label`in e)||ti(e.label))&&(e.set===void 0||!(`set`in e)||Ei(e.set))&&(e.attributes===void 0||!(`attributes`in e)||ci(e.attributes))&&(e.expect===void 0||!(`expect`in e)||pi(e.expect))&&(e.locations===void 0||!(`locations`in e)||mi(e.locations))&&(e.artifacts===void 0||!(`artifacts`in e)||_i(e.artifacts))),Ti=(e=>e===`added`||e===`changed`||e===`context`||e===`removed`),Ei=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>j[21].test(e)||!1)&&(e.label===void 0||!(`label`in e)||ti(e.label))&&(e.kind===void 0||!(`kind`in e)||ni(e.kind))&&(e.cells===void 0||!(`cells`in e)||Ci(e.cells))&&(e.attributes===void 0||!(`attributes`in e)||ci(e.attributes))&&(e.removeAttributes===void 0||!(`removeAttributes`in e)||fi(e.removeAttributes))&&Object.getOwnPropertyNames(e).length>=1),Di=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`heading`in e&&Object.getOwnPropertyNames(e).every((e,t)=>j[22].test(e)||!1)&&typeof e.heading==`string`&&k(e.heading,500)&&A(e.heading,1)&&(e.depth===void 0||!(`depth`in e)||Number.isInteger(e.depth)&&(!(Number.isFinite(e.depth)||typeof e.depth==`bigint`)||e.depth<=6&&e.depth>=1))&&(e.role===void 0||!(`role`in e)||Ti(e.role))&&(e.id===void 0||!(`id`in e)||ri(e.id))&&(e.ref===void 0||!(`ref`in e)||Qr(e.ref))),Oi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`from`in e&&`to`in e&&`kind`in e&&Object.getOwnPropertyNames(e).every((e,t)=>j[23].test(e)||!1)&&ki(e.from)&&ki(e.to)&&ni(e.kind)&&(e.ref===void 0||!(`ref`in e)||Qr(e.ref))&&(e.label===void 0||!(`label`in e)||ti(e.label))&&(e.attributes===void 0||!(`attributes`in e)||ci(e.attributes))),ki=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>j[24].test(e)||!1)&&(e.id===void 0||!(`id`in e)||ri(e.id))&&(e.ref===void 0||!(`ref`in e)||Qr(e.ref))&&Object.getOwnPropertyNames(e).length>=1&&Object.getOwnPropertyNames(e).length<=1&&[!(typeof e==`object`&&e&&!Array.isArray(e))||`id`in e,!(typeof e==`object`&&e&&!Array.isArray(e))||`ref`in e].reduce((e,t,n)=>t===!0?++e:e,0)===1),Ai=(e=>typeof e==`string`&&j[26].test(e)),ji=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`type`in e&&(e.type===`task`||e.type===`separator`)&&(typeof e!=`object`||!e||Array.isArray(e)||e.type===void 0||!(`type`in e)||e.type===`task`?Mi(e):!0)&&(typeof e!=`object`||!e||Array.isArray(e)||e.type===void 0||!(`type`in e)||e.type===`separator`?Li(e):!0)),Mi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`type`in e&&`id`in e&&`label`in e&&`items`in e&&Object.getOwnPropertyNames(e).every((e,t)=>j[27].test(e)||!1)&&e.type===`task`&&ri(e.id)&&ti(e.label)&&Array.isArray(e.items)&&e.items.every((e,t)=>Ni(e))&&e.items.length<=100&&(e.role===void 0||!(`role`in e)||Fi(e.role))),Ni=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`type`in e&&(e.type===`activity`||e.type===`milestone`)&&(typeof e!=`object`||!e||Array.isArray(e)||e.type===void 0||!(`type`in e)||e.type===`activity`?Pi(e):!0)&&(typeof e!=`object`||!e||Array.isArray(e)||e.type===void 0||!(`type`in e)||e.type===`milestone`?Ii(e):!0)),Pi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`type`in e&&`start`in e&&`end`in e&&Object.getOwnPropertyNames(e).every((e,t)=>j[28].test(e)||!1)&&e.type===`activity`&&Ai(e.start)&&Ai(e.end)&&(e.id===void 0||!(`id`in e)||ri(e.id))&&(e.label===void 0||!(`label`in e)||ti(e.label))&&(e.kind===void 0||!(`kind`in e)||ni(e.kind))&&(e.previous===void 0||!(`previous`in e)||typeof e.previous==`object`&&e.previous!==null&&!Array.isArray(e.previous)&&`start`in e.previous&&`end`in e.previous&&Object.getOwnPropertyNames(e.previous).length===2&&Ai(e.previous.start)&&Ai(e.previous.end))&&(e.role===void 0||!(`role`in e)||Fi(e.role))),Fi=(e=>e===`added`||e===`removed`),Ii=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`type`in e&&`date`in e&&Object.getOwnPropertyNames(e).every((e,t)=>j[29].test(e)||!1)&&e.type===`milestone`&&Ai(e.date)&&(e.id===void 0||!(`id`in e)||ri(e.id))&&(e.label===void 0||!(`label`in e)||ti(e.label))&&(e.kind===void 0||!(`kind`in e)||ni(e.kind))&&(e.previous===void 0||!(`previous`in e)||typeof e.previous==`object`&&e.previous!==null&&!Array.isArray(e.previous)&&`date`in e.previous&&Object.getOwnPropertyNames(e.previous).length===1&&Ai(e.previous.date))&&(e.role===void 0||!(`role`in e)||Fi(e.role))),Li=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`type`in e&&Object.getOwnPropertyNames(e).every((e,t)=>j[30].test(e)||!1)&&e.type===`separator`&&(e.label===void 0||!(`label`in e)||ti(e.label))),Ri=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`from`in e&&`to`in e&&Object.getOwnPropertyNames(e).every((e,t)=>j[31].test(e)||!1)&&ri(e.from)&&ri(e.to)&&(e.type===void 0||!(`type`in e)||e.type===`finish-to-start`||e.type===`start-to-start`||e.type===`finish-to-finish`||e.type===`start-to-finish`)),zi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`start`in e&&`end`in e&&Object.getOwnPropertyNames(e).every((e,t)=>j[33].test(e)||!1)&&Ai(e.start)&&Ai(e.end)&&(e.label===void 0||!(`label`in e)||ti(e.label))&&(e.kind===void 0||!(`kind`in e)||ni(e.kind))),Bi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`date`in e&&`label`in e&&Object.getOwnPropertyNames(e).every((e,t)=>j[34].test(e)||!1)&&Ai(e.date)&&typeof e.label==`string`&&k(e.label,500)&&A(e.label,1)&&(e.kind===void 0||!(`kind`in e)||ni(e.kind)));function Vi(e){return Zr(e)}Xr({variables:[RegExp(`(^schema$|^kind$|^profile$|^target$|^removals$|^artifacts$|^viewpoints$|^data$)`,`u`),RegExp(`(^ref$|^revision$)`,`u`),RegExp(`(^type$|^ref$|^label$|^kind$|^from$|^to$)`,`u`),RegExp(`(^rel$|^uri$|^sha256$|^mediaType$|^label$)`,`u`),RegExp(`^sha256:[0-9a-f]{64}$`,`u`),RegExp(`(^id$|^label$|^concern$|^elementKinds$|^relationshipKinds$)`,`u`),RegExp(`(^nodes$|^edges$|^containers$)`,`u`),RegExp(`(^id$|^ref$|^label$|^kind$|^set$|^container$|^attributes$|^expect$|^locations$|^artifacts$)`,`u`),RegExp(`(^label$|^kind$|^container$|^attributes$|^removeAttributes$)`,`u`),RegExp(`(?!)`,`u`),RegExp(`(^label$|^kind$|^container$|^revision$|^attributes$)`,`u`),RegExp(`(^uri$|^revision$|^range$)`,`u`),RegExp(`(^startLine$|^startCharacter$|^endLine$|^endCharacter$)`,`u`),RegExp(`(^from$|^to$|^kind$|^ref$|^label$|^set$|^attributes$|^expect$|^locations$|^artifacts$)`,`u`),RegExp(`(^kind$|^label$|^attributes$|^removeAttributes$)`,`u`),RegExp(`(^id$|^label$|^kind$)`,`u`),RegExp(`(^participants$|^messages$|^containers$)`,`u`),RegExp(`(^from$|^to$|^ref$|^label$|^set$|^attributes$|^expect$|^locations$|^artifacts$)`,`u`),RegExp(`(^label$|^attributes$|^removeAttributes$)`,`u`),RegExp(`(^columns$|^rows$|^relations$)`,`u`),RegExp(`(^cells$|^role$|^id$|^ref$|^kind$|^label$|^set$|^attributes$|^expect$|^locations$|^artifacts$)`,`u`),RegExp(`(^label$|^kind$|^cells$|^attributes$|^removeAttributes$)`,`u`),RegExp(`(^heading$|^depth$|^role$|^id$|^ref$)`,`u`),RegExp(`(^from$|^to$|^kind$|^ref$|^label$|^attributes$)`,`u`),RegExp(`(^id$|^ref$)`,`u`),RegExp(`(^title$|^time$|^rows$|^dependencies$|^comparedTo$|^periods$|^references$)`,`u`),RegExp(`^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$`,`u`),RegExp(`(^type$|^id$|^label$|^items$|^role$)`,`u`),RegExp(`(^type$|^start$|^end$|^id$|^label$|^kind$|^previous$|^role$)`,`u`),RegExp(`(^type$|^date$|^id$|^label$|^kind$|^previous$|^role$)`,`u`),RegExp(`(^type$|^label$)`,`u`),RegExp(`(^from$|^to$|^type$)`,`u`),RegExp(`(^label$|^date$)`,`u`),RegExp(`(^start$|^end$|^label$|^kind$)`,`u`),RegExp(`(^date$|^label$|^kind$)`,`u`)]});var Hi={[ie]:Ln,[ue]:Yr,[fe]:Vi},Ui=e=>{let t=zt(e),n=me(t);return n===void 0&&t!==void 0?[{rule:`unsupported-version`,path:`/schema`,message:`this build validates ${pe.join(` and `)}`}]:Hi[n??`urn:structured-exchange:1`](e)?[]:[{rule:`schema/invalid`,path:``,message:`does not conform to the published structured-exchange schema`}]},Wi=Object.defineProperty,Gi=(e,t,n)=>t in e?Wi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ki=(e,t)=>{for(var n in t)Wi(e,n,{get:t[n],enumerable:!0})},qi=(e,t,n)=>Gi(e,typeof t==`symbol`?t:t+``,n),Ji={};Ki(Ji,{Graph:()=>Na,alg:()=>sa});var Yi=Object.defineProperty,Xi=(e,t)=>{for(var n in t)Yi(e,n,{get:t[n],enumerable:!0})},Zi=class{constructor(e){this._isDirected=!0,this._isMultigraph=!1,this._isCompound=!1,this._nodes={},this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={},this._nodeCount=0,this._edgeCount=0,this._defaultNodeLabelFn=()=>{},this._defaultEdgeLabelFn=()=>{},e&&(this._isDirected=`directed`in e?e.directed:!0,this._isMultigraph=`multigraph`in e&&e.multigraph,this._isCompound=`compound`in e&&e.compound),this._isCompound&&(this._parent={},this._children={},this._children[`\0`]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=typeof e==`function`?e:()=>e,this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){return this.nodes().filter(e=>Object.keys(this._in[e]).length===0)}sinks(){return this.nodes().filter(e=>Object.keys(this._out[e]).length===0)}setNodes(e,t){return e.forEach(e=>{t===void 0?this.setNode(e):this.setNode(e,t)}),this}setNode(e,t){return e in this._nodes?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=`\0`,this._children[e]={},this._children[`\0`][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return e in this._nodes}removeNode(e){if(e in this._nodes){let t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(e=>{this.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(t),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(t===void 0)t=`\0`;else{t+=``;for(let n=t;n!==void 0;n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}parent(e){if(this._isCompound){let t=this._parent[e];if(t!==`\0`)return t}}children(e=`\0`){if(this._isCompound){let t=this._children[e];if(t)return Object.keys(t)}else{if(e===`\0`)return this.nodes();if(this.hasNode(e))return[]}return[]}predecessors(e){let t=this._preds[e];if(t)return Object.keys(t)}successors(e){let t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){let t=this.predecessors(e);if(t){let n=new Set(t),r=this.successors(e);if(r)for(let e of r)n.add(e);return Array.from(n.values())}}isLeaf(e){let t;return t=this.isDirected()?this.successors(e):this.neighbors(e),(t?.length??0)===0}filterNodes(e){let t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph()),Object.entries(this._nodes).forEach(([n,r])=>{e(n)&&t.setNode(n,r)}),Object.values(this._edgeObjs).forEach(e=>{t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,this.edge(e))});let n={},r=e=>{let i=this.parent(e);return!i||t.hasNode(i)?(n[e]=i,i):i in n?n[i]:r(i)};return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,r(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=typeof e==`function`?e:()=>e,this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){return e.reduce((e,n)=>(t===void 0?this.setEdge(e,n):this.setEdge(e,n,t),n)),this}setEdge(e,t,n,r){let i,a,o,s,c=!1;typeof e==`object`&&e&&`v`in e?(i=e.v,a=e.w,o=e.name,arguments.length===2&&(s=t,c=!0)):(i=e,a=t,o=r,arguments.length>2&&(s=n,c=!0)),i=``+i,a=``+a,o!==void 0&&(o=``+o);let l=ea(this._isDirected,i,a,o);if(l in this._edgeLabels)return c&&(this._edgeLabels[l]=s),this;if(o!==void 0&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(i),this.setNode(a),this._edgeLabels[l]=c?s:this._defaultEdgeLabelFn(i,a,o);let u=ta(this._isDirected,i,a,o);return i=u.v,a=u.w,Object.freeze(u),this._edgeObjs[l]=u,Qi(this._preds[a],i),Qi(this._sucs[i],a),this._in[a][l]=u,this._out[i][l]=u,this._edgeCount++,this}edge(e,t,n){let r=arguments.length===1?na(this._isDirected,e):ea(this._isDirected,e,t,n);return this._edgeLabels[r]}edgeAsObj(e,t,n){let r=arguments.length===1?this.edge(e):this.edge(e,t,n);return typeof r!=`object`||!r?{label:r}:r}hasEdge(e,t,n){return(arguments.length===1?na(this._isDirected,e):ea(this._isDirected,e,t,n))in this._edgeLabels}removeEdge(e,t,n){let r=arguments.length===1?na(this._isDirected,e):ea(this._isDirected,e,t,n),i=this._edgeObjs[r];if(i){let e=i.v,t=i.w;delete this._edgeLabels[r],delete this._edgeObjs[r],$i(this._preds[t],e),$i(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--}return this}inEdges(e,t){return this.isDirected()?this.filterEdges(this._in[e],e,t):this.nodeEdges(e,t)}outEdges(e,t){return this.isDirected()?this.filterEdges(this._out[e],e,t):this.nodeEdges(e,t)}nodeEdges(e,t){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,t)}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}filterEdges(e,t,n){if(!e)return;let r=Object.values(e);return n?r.filter(e=>e.v===t&&e.w===n||e.v===n&&e.w===t):r}};function Qi(e,t){e[t]?e[t]++:e[t]=1}function $i(e,t){e[t]!==void 0&&!--e[t]&&delete e[t]}function ea(e,t,n,r){let i=``+t,a=``+n;if(!e&&i>a){let e=i;i=a,a=e}return i+``+a+``+(r===void 0?`\0`:r)}function ta(e,t,n,r){let i=``+t,a=``+n;if(!e&&i>a){let e=i;i=a,a=e}let o={v:i,w:a};return r&&(o.name=r),o}function na(e,t){return ea(e,t.v,t.w,t.name)}Xi({},{read:()=>oa,write:()=>ra});function ra(e){let t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ia(e),edges:aa(e)},n=e.graph();return n!==void 0&&(t.value=structuredClone(n)),t}function ia(e){return e.nodes().map(t=>{let n=e.node(t),r=e.parent(t),i={v:t};return n!==void 0&&(i.value=n),r!==void 0&&(i.parent=r),i})}function aa(e){return e.edges().map(t=>{let n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function oa(e){let t=new Zi(e.options);return e.value!==void 0&&t.setGraph(e.value),e.nodes.forEach(e=>{t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(e=>{t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}var sa={};Xi(sa,{CycleException:()=>Sa,bellmanFord:()=>la,components:()=>da,dijkstra:()=>ma,dijkstraAll:()=>ga,findCycles:()=>va,floydWarshall:()=>ba,isAcyclic:()=>wa,postorder:()=>Oa,preorder:()=>ka,prim:()=>Aa,shortestPaths:()=>ja,tarjan:()=>_a,topsort:()=>Ca});var ca=()=>1;function la(e,t,n,r){return ua(e,String(t),n||ca,r||function(t){return e.outEdges(t)??[]})}function ua(e,t,n,r){let i={},a,o=0,s=e.nodes(),c=function(e){let t=i[e.v],r=i[e.w];if(!t||!r)return;let o=n(e);t.distance+o<r.distance&&(i[e.w]={distance:t.distance+o,predecessor:e.v},a=!0)},l=function(){s.forEach(function(e){r(e).forEach(function(t){let n=t.v===e?t.v:t.w,r=n===t.v?t.w:t.v;c({v:n,w:r})})})};s.forEach(function(e){i[e]={distance:e===t?0:1/0,predecessor:``}});let u=s.length;for(let e=1;e<u&&(a=!1,o++,l(),a);e++);if(o===u-1&&(a=!1,l(),a))throw Error(`The graph contains a negative weight cycle`);return i}function da(e){let t={},n=[],r;function i(n){var a,o;n in t||(t[n]=!0,r.push(n),(a=e.successors(n))==null||a.forEach(i),(o=e.predecessors(n))==null||o.forEach(i))}return e.nodes().forEach(function(e){r=[],i(e),r.length&&n.push(r)}),n}var fa=class{constructor(){this._arr=[],this._keyIndices={}}size(){return this._arr.length}keys(){return this._arr.map(e=>e.key)}has(e){return e in this._keyIndices}priority(e){let t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw Error(`Queue underflow`);return this._arr[0].key}add(e,t){let n=this._keyIndices,r=String(e);if(!(r in n)){let e=this._arr,i=e.length;return n[r]=i,e.push({key:r,priority:t}),this._decrease(i),!0}return!1}removeMin(){if(this.size()===0)throw Error(`Queue underflow`);this._swap(0,this._arr.length-1);let e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){let n=this._keyIndices[e];if(n===void 0)throw Error(`Key not found: ${e}`);let r=this._arr[n].priority;if(t>r)throw Error(`New priority is greater than current priority. Key: ${e} Old: ${r} New: ${t}`);this._arr[n].priority=t,this._decrease(n)}_heapify(e){let t=this._arr,n=2*e,r=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,r<t.length&&(i=t[r].priority<t[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){let t=this._arr,n=t[e].priority,r;for(;e!==0&&(r=e>>1,!(t[r].priority<n));)this._swap(e,r),e=r}_swap(e,t){let n=this._arr,r=this._keyIndices,i=n[e],a=n[t];n[e]=a,n[t]=i,r[a.key]=e,r[i.key]=t}},pa=()=>1;function ma(e,t,n,r){return ha(e,String(t),n||pa,r||function(t){return e.outEdges(t)??[]})}function ha(e,t,n,r){let i={},a=new fa,o,s,c=function(e){let t=e.v===o?e.w:e.v,r=i[t];if(!r)return;let c=n(e),l=s.distance+c;if(c<0)throw Error(`dijkstra does not allow negative edge weights. Bad edge: `+e+` Weight: `+c);l<r.distance&&(r.distance=l,r.predecessor=o,a.decrease(t,l))};for(e.nodes().forEach(function(e){let n=e===t?0:1/0;i[e]={distance:n,predecessor:``},a.add(e,n)});a.size()>0;){o=a.removeMin();let e=i[o];if(!e||e.distance===1/0)break;s=e,r(o).forEach(c)}return i}function ga(e,t,n){return e.nodes().reduce(function(r,i){return r[i]=ma(e,i,t,n),r},{})}function _a(e){let t=0,n=[],r={},i=[];function a(o){var s;let c=r[o]={onStack:!0,lowlink:t,index:t++};if(n.push(o),(s=e.successors(o))==null||s.forEach(function(e){if(e in r){let t=r[e];t!=null&&t.onStack&&(c.lowlink=Math.min(c.lowlink,t.index))}else{a(e);let t=r[e];t&&(c.lowlink=Math.min(c.lowlink,t.lowlink))}}),c.lowlink===c.index){let e=[],t;do{t=n.pop();let i=r[t];i&&(i.onStack=!1),e.push(t)}while(o!==t);i.push(e)}}return e.nodes().forEach(function(e){e in r||a(e)}),i}function va(e){return _a(e).filter(function(t){let n=t[0];return n?t.length>1||t.length===1&&(e.outEdges(n,n)??[]).length>0:!1})}var ya=()=>1;function ba(e,t,n){return xa(e,t||ya,n||function(t){return e.outEdges(t)??[]})}function xa(e,t,n){let r={},i=e.nodes();return i.forEach(function(e){let a={};r[e]=a,a[e]={distance:0,predecessor:``},i.forEach(function(t){e!==t&&(a[t]={distance:1/0,predecessor:``})}),n(e).forEach(function(n){let r=n.v===e?n.w:n.v,i=t(n);a[r]={distance:i,predecessor:e}})}),i.forEach(function(e){let t=r[e];t&&i.forEach(function(n){let a=r[n];a&&i.forEach(function(n){let r=a[e],i=t[n],o=a[n];if(r&&i&&o){let e=r.distance+i.distance;e<o.distance&&(o.distance=e,o.predecessor=i.predecessor)}})})}),r}var Sa=class extends Error{constructor(e){super(e),this.name=`CycleException`}};function Ca(e){let t={},n={},r=[];function i(a){var o;if(a in n)throw new Sa;a in t||(n[a]=!0,t[a]=!0,(o=e.predecessors(a))==null||o.forEach(i),delete n[a],r.push(a))}if(e.sinks().forEach(i),Object.keys(t).length!==e.nodeCount())throw new Sa;return r}function wa(e){try{Ca(e)}catch(e){if(e instanceof Sa)return!1;throw e}return!0}function Ta(e,t,n,r,i){Array.isArray(t)||(t=[t]);let a=(t=>(e.isDirected()?e.successors(t):e.neighbors(t))??[]),o={};return t.forEach(function(t){if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);i=Ea(e,t,n===`post`,o,a,r,i)}),i}function Ea(e,t,n,r,i,a,o){return t in r||(r[t]=!0,n||(o=a(o,t)),i(t).forEach(function(t){o=Ea(e,t,n,r,i,a,o)}),n&&(o=a(o,t))),o}function Da(e,t,n){return Ta(e,t,n,function(e,t){return e.push(t),e},[])}function Oa(e,t){return Da(e,t,`post`)}function ka(e,t){return Da(e,t,`pre`)}function Aa(e,t){var n;let r=new Zi,i={},a=new fa,o;function s(e){let n=e.v===o?e.w:e.v,r=a.priority(n);if(r!==void 0){let s=t(e);s<r&&(i[n]=o,a.decrease(n,s))}}if(e.nodeCount()===0)return r;e.nodes().forEach(function(e){a.add(e,1/0),r.setNode(e)});let c=e.nodes()[0];c!==void 0&&a.decrease(c,0);let l=!1;for(;a.size()>0;){if(o=a.removeMin(),o in i)r.setEdge(o,i[o]);else{if(l)throw Error(`Input graph is not connected: `+e);l=!0}(n=e.nodeEdges(o))==null||n.forEach(s)}return r}function ja(e,t,n,r){return Ma(e,t,n,r??(t=>e.outEdges(t)??[]))}function Ma(e,t,n,r){if(n===void 0)return ma(e,t,n,r);let i=!1,a=e.nodes();for(let o=0;o<a.length;o++){let s=a[o];if(s===void 0)continue;let c=r(s);for(let e=0;e<c.length;e++){let t=c[e];if(!t)continue;let r=t.v===s?t.v:t.w;n({v:r,w:r===t.v?t.w:t.v})<0&&(i=!0)}if(i)return la(e,t,n,r)}return ma(e,t,n,r)}var Na=Zi;function Pa(e,t,n,r){let i=r;for(;e.hasNode(i);)i=Xa(r);return n.dummy=t,e.setNode(i,n),i}function Fa(e){let t=new Na().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function Ia(e){let t=new Na({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function La(e,t){let n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);let c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function Ra(e){let t=Za(Ga(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),i=r.rank;i!==void 0&&(t[i]||(t[i]=[]),t[i][r.order]=n)}),t}function za(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MAX_VALUE:n}),n=Wa(Math.min,t);e.nodes().forEach(t=>{let r=e.node(t);Object.hasOwn(r,`rank`)&&(r.rank-=n)})}function Ba(e){let t=e.nodes().map(t=>e.node(t).rank).filter(e=>e!==void 0),n=Wa(Math.min,t),r=[];e.nodes().forEach(t=>{let i=e.node(t).rank-n;r[i]||(r[i]=[]),r[i].push(t)});let i=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((t,n)=>{t===void 0&&n%a!==0?--i:t!==void 0&&i&&t.forEach(t=>e.node(t).rank+=i)})}function Va(e,t,n,r){let i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),Pa(e,`border`,i,t)}function Ha(e,t=Ua){let n=[];for(let r=0;r<e.length;r+=t){let i=e.slice(r,r+t);n.push(i)}return n}var Ua=65535;function Wa(e,t){return t.length>Ua?e(...Ha(t).map(t=>e(...t))):e(...t)}function Ga(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MIN_VALUE:n});return Wa(Math.max,t)}function Ka(e,t){let n={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function qa(e,t){let n=Date.now();try{return t()}finally{console.log(e+` time: `+(Date.now()-n)+`ms`)}}function Ja(e,t){return t()}var Ya=0;function Xa(e){return e+(``+ ++Ya)}function Za(e,t,n=1){t??(t=e,e=0);let r=e=>e<t;n<0&&(r=e=>t<e);let i=[];for(let t=e;r(t);t+=n)i.push(t);return i}function Qa(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function $a(e,t){let n;return n=typeof t==`string`?e=>e[t]:t,Object.entries(e).reduce((e,[t,r])=>(e[t]=n(r,t),e),{})}function eo(e,t){return e.reduce((e,n,r)=>(e[n]=t[r],e),{})}var to=`\0`;function no(e,t,n){if(!(e&&t&&n&&t.dummy===`edge`&&n.dummy===`edge`&&t.edgeObj&&n.edgeObj&&e[t.edgeObj.v]&&e[n.edgeObj.v]&&e[t.edgeObj.w]&&e[n.edgeObj.w]))return 0;let r=!0;t.edgeObj.w===n.edgeObj.w&&(r=!1);let i=r?e[t.edgeObj.v]?.rank??NaN:e[t.edgeObj.w]?.rank??NaN,a=Object.entries(e).find(e=>e[1].edgeObj?.v===t.edgeObj.v&&e[1].edgeObj?.w===t.edgeObj.w&&e[1].rank===i),o=Object.entries(e).find(e=>e[1].edgeObj?.v===n.edgeObj.v&&e[1].edgeObj?.w===n.edgeObj.w&&e[1].rank===i);if(!a||!o)return 0;let s=a[1].order??NaN,c=o[1].order??NaN;return isNaN(s-c)?0:s-c}var ro=`3.1.1`,io=class{constructor(){qi(this,`_sentinel`);let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return ao(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&ao(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,oo)),n=n._prev;return`[`+e.join(`, `)+`]`}};function ao(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function oo(e,t){if(e!==`_next`&&e!==`_prev`)return t}var so=io,co=()=>1;function lo(e,t){if(e.nodeCount()<=1)return[];let n=po(e,t||co);return uo(n.graph,n.buckets,n.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w)||[])}function uo(e,t,n){let r=[],i=t[t.length-1],a=t[0],o;for(;e.nodeCount();){for(;o=a.dequeue();)fo(e,t,n,o);for(;o=i.dequeue();)fo(e,t,n,o);if(e.nodeCount()){for(let i=t.length-2;i>0;--i)if(o=t[i]?.dequeue(),o){r=r.concat(fo(e,t,n,o,!0)||[]);break}}}return r}function fo(e,t,n,r,i){let a=[],o=i?a:void 0;return(e.inEdges(r.v)||[]).forEach(r=>{let o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,mo(t,n,s)}),(e.outEdges(r.v)||[]).forEach(r=>{let i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,mo(t,n,o)}),e.removeNode(r.v),o}function po(e,t){let n=new Na,r=0,i=0;e.nodes().forEach(e=>{n.setNode(e,{v:e,in:0,out:0})}),e.edges().forEach(e=>{let a=n.edge(e.v,e.w)||0,o=t(e),s=a+o;n.setEdge(e.v,e.w,s);let c=n.node(e.v),l=n.node(e.w);i=Math.max(i,c.out+=o),r=Math.max(r,l.in+=o)});let a=ho(i+r+3).map(()=>new so),o=r+1;return n.nodes().forEach(e=>{mo(a,o,n.node(e))}),{graph:n,buckets:a,zeroIdx:o}}function mo(e,t,n){var r,i,a;n.out?n.in?(a=e[n.out-n.in+t])==null||a.enqueue(n):(i=e[e.length-1])==null||i.enqueue(n):(r=e[0])==null||r.enqueue(n)}function ho(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}function go(e,t){(e.graph().acyclicer===`greedy`?lo(e,n(e)):_o(e,t??null)).forEach(t=>{let n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,Xa(`rev`))});function n(e){return t=>e.edge(t).weight}}function _o(e,t){let n=[],r={},i={};function a(t){Object.hasOwn(i,t)||(i[t]=!0,r[t]=!0,e.outEdges(t).forEach(e=>{Object.hasOwn(r,e.w)?n.push(e):a(e.w)}),delete r[t])}function o(a){var s;Object.hasOwn(i,a)||(i[a]=!0,r[a]=!0,(s=e.outEdges(a))==null||s.forEach(i=>{Object.hasOwn(r,i.w)||t.node(a)?.rank>t.node(i.w)?.rank&&yo(e,i.w,i)?n.push(i):o(i.w)}),delete r[a])}let s=a;return t&&typeof t.node==`function`&&(s=o),e.sources().forEach(s),e.nodes().forEach(s),n}function vo(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}function yo(e,t,n){let r=new Set;function i(t){if(e.sources().includes(t))return!0;r.add(t);for(let a of e.inEdges(t)??[])if((a.v!==n.v||a.w!==n.w)&&!r.has(a.v)&&i(a.v))return!0;return!1}return i(t)}function bo(e){e.graph().dummyChains=[],e.edges().forEach(t=>xo(e,t))}function xo(e,t){let n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a===r+1)return;e.removeEdge(t);let l,u,d=0;for(++r;r<a;++d,++r)s.points=[],u={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},l=Pa(e,`edge`,u,`_d`),r===c&&(u.width=s.width,u.height=s.height,u.dummy=`edge-label`,u.labelpos=s.labelpos),e.setEdge(n,l,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(l),n=l;e.setEdge(n,i,{weight:s.weight},o)}function So(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}function Co(e){let t={};function n(r){let i=e.node(r);if(Object.hasOwn(t,r))return i.rank;t[r]=!0;let a=e.outEdges(r),o=a?a.map(t=>t==null?1/0:n(t.w)-e.edge(t).minlen):[],s=Wa(Math.min,o);return s===1/0&&(s=0),i.rank=s}e.sources().forEach(n)}function wo(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var To=Eo;function Eo(e){let t=new Na({directed:!1}),n=e.nodes();if(n.length===0)throw Error(`Graph must have at least one node`);let r=n[0],i=e.nodeCount();t.setNode(r,{});let a,o;for(;Do(t,e)<i&&(a=Oo(t,e),a);)o=t.hasNode(a.v)?wo(e,a):-wo(e,a),ko(t,e,o);return t}function Do(e,t){function n(r){let i=t.nodeEdges(r);i&&i.forEach(i=>{let a=i.v,o=r===a?i.w:a;!e.hasNode(o)&&!wo(t,i)&&(e.setNode(o,{}),e.setEdge(r,o,{}),n(o))})}return e.nodes().forEach(n),e.nodeCount()}function Oo(e,t){return t.edges().reduce((n,r)=>{let i=1/0;return e.hasNode(r.v)!==e.hasNode(r.w)&&(i=wo(t,r)),i<n[0]?[i,r]:n},[1/0,null])[1]}function ko(e,t,n){e.nodes().forEach(e=>t.node(e).rank+=n)}var{preorder:Ao,postorder:jo}=sa,Mo=No;No.initLowLimValues=Lo,No.initCutValues=Po,No.calcCutValue=Io,No.leaveEdge=zo,No.enterEdge=Bo,No.exchangeEdges=Vo;function No(e){e=Fa(e),Co(e);let t=To(e);Lo(t),Po(t,e);let n,r;for(;n=zo(t);)r=Bo(t,e,n),Vo(t,e,n,r)}function Po(e,t){let n=jo(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(n=>Fo(e,t,n))}function Fo(e,t,n){let r=e.node(n).parent,i=e.edge(n,r);i.cutvalue=Io(e,t,n)}function Io(e,t,n){let r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;a||=(i=!1,t.edge(r,n)),o=a.weight;let s=t.nodeEdges(n);return s&&s.forEach(a=>{let s=a.v===n,c=s?a.w:a.v;if(c!==r){let r=s===i,l=t.edge(a).weight;if(o+=r?l:-l,Uo(e,n,c)){let t=e.edge(n,c).cutvalue;o+=r?-t:t}}}),o}function Lo(e,t){arguments.length<2&&(t=e.nodes()[0]),Ro(e,{},1,t)}function Ro(e,t,n,r,i){let a=n,o=e.node(r);t[r]=!0;let s=e.neighbors(r);return s&&s.forEach(i=>{Object.hasOwn(t,i)||(n=Ro(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function zo(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function Bo(e,t,n){let r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);let a=e.node(r),o=e.node(i),s=a,c=!1;return a.lim>o.lim&&(s=o,c=!0),t.edges().filter(t=>c===Wo(e,e.node(t.v),s)&&c!==Wo(e,e.node(t.w),s)).reduce((e,n)=>wo(t,n)<wo(t,e)?n:e)}function Vo(e,t,n,r){let i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),Lo(e),Po(e,t),Ho(e,t)}function Ho(e,t){let n=e.nodes().find(t=>!e.node(t).parent);if(!n)return;let r=Ao(e,[n]);r=r.slice(1),r.forEach(n=>{let r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function Uo(e,t,n){return e.hasEdge(t,n)}function Wo(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var Go=Ko;function Ko(e){let t=e.graph().ranker;if(typeof t==`function`)return t(e);switch(t){case`network-simplex`:Yo(e);break;case`tight-tree`:Jo(e);break;case`longest-path`:qo(e);break;case`none`:break;default:Yo(e)}}var qo=Co;function Jo(e){Co(e),To(e)}function Yo(e){Mo(e)}var Xo=Zo;function Zo(e){let t=$o(e),n=e.graph();Array.isArray(n.dummyChains)&&n.dummyChains.forEach(n=>{let r=e.node(n),i=r.edgeObj,a=Qo(e,t,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;for(;n!==i.w;){if(r=e.node(n),u){for(;(l=o[c])!==s&&e.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&e.node(o[c+1]).minRank<=r.rank;)c++;l=o[c]}l!==void 0&&e.setParent(n,l),n=e.successors(n)[0]}})}function Qo(e,t,n,r){let i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c;c=n;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));let l=c,u=r;for(;(u=e.parent(u))!==l;)a.push(u);return{path:i.concat(a.reverse()),lca:l}}function $o(e){let t={},n=0;function r(i){let a=n;e.children(i).forEach(r),t[i]={low:a,lim:n++}}return e.children(to).forEach(r),t}function es(e){let t=Pa(e,`root`,{},`_root`),n=ns(e),r=Object.values(n),i=Wa(Math.max,r)-1,a=2*i+1;e.graph().nestingRoot=t,e.edges().forEach(t=>e.edge(t).minlen*=a);let o=rs(e)+1;e.children(to).forEach(r=>{ts(e,t,a,o,i,n,r)}),e.graph().nodeRankFactor=a}function ts(e,t,n,r,i,a,o){let s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}let c=Va(e,`_bt`),l=Va(e,`_bb`),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,s.forEach(s=>{ts(e,t,n,r,i,a,s);let u=e.node(s),d=u.borderTop?u.borderTop:s,f=u.borderBottom?u.borderBottom:s,p=u.borderTop?r:2*r,m=d===f?i-(a[o]??0)+1:1;e.setEdge(c,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,l,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+(a[o]??0)})}function ns(e){let t={};function n(r,i){let a=e.children(r);a&&a.length&&a.forEach(e=>n(e,i+1)),t[r]=i}return e.children(to).forEach(e=>n(e,1)),t}function rs(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function is(e){let t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}var as=os;function os(e){function t(n){let r=e.children(n),i=e.node(n);if(r.length&&r.forEach(t),i&&Object.hasOwn(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(let t=i.minRank,r=i.maxRank+1;t<r;++t)ss(e,`borderLeft`,`_bl`,n,i,t),ss(e,`borderRight`,`_br`,n,i,t)}}e.children(to).forEach(t)}function ss(e,t,n,r,i,a){let o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=Pa(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}function cs(e){let t=e.graph().rankdir?.toLowerCase();(t===`lr`||t===`rl`)&&us(e)}function ls(e){let t=e.graph().rankdir?.toLowerCase();(t===`bt`||t===`rl`)&&fs(e),(t===`lr`||t===`rl`)&&(ms(e),us(e))}function us(e){e.nodes().forEach(t=>ds(e.node(t))),e.edges().forEach(t=>ds(e.edge(t)))}function ds(e){let t=e.width;e.width=e.height,e.height=t}function fs(e){e.nodes().forEach(t=>ps(e.node(t))),e.edges().forEach(t=>{var n;let r=e.edge(t);(n=r.points)==null||n.forEach(ps),Object.hasOwn(r,`y`)&&ps(r)})}function ps(e){e.y=-e.y}function ms(e){e.nodes().forEach(t=>hs(e.node(t))),e.edges().forEach(t=>{var n;let r=e.edge(t);(n=r.points)==null||n.forEach(hs),Object.hasOwn(r,`x`)&&hs(r)})}function hs(e){let t=e.x;e.x=e.y,e.y=t}function gs(e,t=null){let n={},r=e.nodes().filter(t=>!e.children(t).length),i=r.map(t=>e.node(t).rank),a=Za(Wa(Math.max,i)+1).map(()=>[]);function o(t){if(n[t])return;n[t]=!0;let r=e.node(t);a[r.rank].push(t);let i=e.successors(t);i&&[...i].sort((e,t)=>s(e,t)).forEach(o)}r.sort((t,n)=>e.node(t).rank-e.node(n).rank).forEach(o);function s(n,r){return no(t,e.node(n),e.node(r))}return a}function _s(e,t){let n=0;for(let r=1;r<t.length;++r)n+=vs(e,t[r-1],t[r]);return n}function vs(e,t,n){let r=eo(n,n.map((e,t)=>t)),i=t.flatMap(t=>{let n=e.outEdges(t);return n?n.map(t=>({pos:r[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos):[]}),a=1;for(;a<n.length;)a<<=1;let o=2*a-1;--a;let s=Array(o).fill(0),c=0;return i.forEach(e=>{let t=e.pos+a;s[t]+=e.weight;let n=0;for(;t>0;)t%2&&(n+=s[t+1]),t=t-1>>1,s[t]+=e.weight;c+=e.weight*n}),c}function ys(e,t=[]){return t.map(t=>{let n=e.inEdges(t);if(!n||!n.length)return{v:t};{let r=n.reduce((t,n)=>{let r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}})}function bs(e,t){let n={};return e.forEach((e,t)=>{let r={indegree:0,in:[],out:[],vs:[e.v],i:t};e.barycenter!==void 0&&(r.barycenter=e.barycenter,r.weight=e.weight),n[e.v]=r}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];t!==void 0&&r!==void 0&&(r.indegree++,t.out.push(r))}),xs(Object.values(n).filter(e=>!e.indegree))}function xs(e){let t=[];function n(e){return t=>{t.merged||(t.barycenter===void 0||e.barycenter===void 0||t.barycenter>=e.barycenter)&&Ss(e,t)}}function r(t){return n=>{n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){let i=e.pop();t.push(i),i.in.reverse().forEach(n(i)),i.out.forEach(r(i))}return t.filter(e=>!e.merged).map(e=>Qa(e,[`vs`,`i`,`barycenter`,`weight`]))}function Ss(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function Cs(e,t,n,r,i){let a={},o=null,s=null,c=i;typeof t==`boolean`?(c=t,a={}):t&&(a=t,o=n??null,s=r??null);let l=Ka(e,e=>Object.hasOwn(e,`barycenter`)),u=l.lhs,d=l.rhs.sort((e,t)=>t.i-e.i),f=[],p=0,m=0,h=0;u.sort(Ts(s,o,!!c));for(let[e,t]of Object.entries(a)){let n=u.findIndex(t=>t.vs[0]===e);u.splice(n+1,0,t)}h=ws(f,d,h),u.forEach(e=>{h+=e.vs.length,f.push(e.vs),p+=e.barycenter*e.weight,m+=e.weight,h=ws(f,d,h)});let g={vs:f.flat(1)};return m&&(g.barycenter=p/m,g.weight=m),g}function ws(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function Ts(e,t,n){return(r,i)=>{if(r.barycenter<i.barycenter)return-1;if(r.barycenter>i.barycenter)return 1;if(e&&(typeof r.vs[0]==`string`||typeof i.vs[0]==`string`)){let n=no(t,e.node(r.vs[0]),e.node(i.vs[0]));if(n!==0)return n}return n?i.i-r.i:r.i-i.i}}function Es(e,t,n,r,i){var a,o;let s=null,c=i;typeof r==`boolean`?(c=r,s=null):r!==void 0&&(s=r);let l=e.children(t),u=e.node(t),d=u?u.borderLeft:void 0,f=u?u.borderRight:void 0,p={};d&&(l=l.filter(e=>e!==d&&e!==f));let m=ys(e,l);m.forEach(t=>{if(e.children(t.v).length){let{result:r}=Es(e,t.v,n,s,c);p[t.v]=r,Object.hasOwn(r,`barycenter`)&&Os(t,r)}});let h=bs(m,n);Ds(h,p);let g={},_=!1;for(let t=0;t<h.length;t++)for(let n=t+1;n<h.length;n++)if(h[t]&&h[n]&&(a=h[t])!=null&&a.barycenter&&(o=h[n])!=null&&o.barycenter&&h[t]?.barycenter===h[n].barycenter){let r=h[t]?.vs[0]??``,i=h[n]?.vs[0]??``,a=e.node(r),o=e.node(i);if(a.dummy===`edge`&&o.dummy===`edge`&&a.edgeObj?.v===o.edgeObj?.v&&a.edgeObj?.w===o.edgeObj?.w){if(a.edgeLabel.reversed){g[i]=h[t],h.splice(t,1),t--;break}g[r]=h[n],h.splice(n,1),n--}else _=!0}let v=Cs(h,g,s,e,c);if(d&&f){v.vs=[d,v.vs,f].flat(1);let t=e.predecessors(d);if(t&&t.length){let n=e.node(t[0]),r=e.predecessors(f),i=e.node(r[0]);Object.hasOwn(v,`barycenter`)||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+n.order+i.order)/(v.weight+2),v.weight+=2}}return Object.defineProperty(v,"result",{value:v,enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(v,"usedBias",{value:_,enumerable:!1,configurable:!0,writable:!0}),v}function Ds(e,t){e.forEach(e=>{e.vs=e.vs.flatMap(e=>t[e]?t[e].vs:e)})}function Os(e,t){e.barycenter===void 0?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}function ks(e,t,n,r){r||=e.nodes();let i=As(e),a=new Na({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(t=>e.node(t));return r.forEach(r=>{let o=e.node(r),s=e.parent(r);if(o.rank===t||o.minRank<=t&&t<=o.maxRank){a.setNode(r),a.setParent(r,s||i);let c=e[n](r);c&&c.forEach(t=>{let n=t.v===r?t.w:t.v,i=a.edge(n,r),o=i===void 0?0:i.weight;a.setEdge(n,r,{weight:e.edge(t).weight+o})}),Object.hasOwn(o,`minRank`)&&a.setNode(r,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]})}}),a}function As(e){let t;for(;e.hasNode(t=Xa(`_root`)););return t}function js(e,t,n){let r={},i;n.forEach(n=>{let a=e.parent(n),o,s;for(;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}function Ms(e,t={},n=null){if(typeof t.customOrder==`function`){t.customOrder(e,Ms);return}let r=Ga(e),i=Ns(e,Za(1,r+1),`inEdges`),a=Ns(e,Za(r-1,-1,-1),`outEdges`),o=gs(e,n);if(Fs(e,o),t.disableOptimalOrderHeuristic)return;let s=1/0,c,l=t.constraints||[];for(let t=0,r=0;r<4;++t,++r){Ps(t%2?i:a,t%4>=2,l,n),o=Ra(e);let u=_s(e,o);u<s?(r=0,c=Object.assign({},o),s=u):u===s&&(c=structuredClone(o))}Fs(e,c)}function Ns(e,t,n){let r=new Map,i=(e,t)=>{r.has(e)||r.set(e,[]),r.get(e).push(t)};for(let t of e.nodes()){let n=e.node(t);if(typeof n.rank==`number`&&i(n.rank,t),typeof n.minRank==`number`&&typeof n.maxRank==`number`)for(let e=n.minRank;e<=n.maxRank;e++)e!==n.rank&&i(e,t)}return t.map(function(t){return ks(e,t,n,r.get(t)||[])})}function Ps(e,t,n,r){let i=!0,a=new Na;e.forEach(function(e){n.forEach(e=>a.setEdge(e.left,e.right));let o=e.graph().root,{result:s,usedBias:c}=Es(e,o,a,r,i);t&&c&&(i=!i),s.vs.forEach((t,n)=>e.node(t).order=n),js(e,a,s.vs)})}function Fs(e,t){Object.values(t).forEach(t=>t.forEach((t,n)=>e.node(t).order=n))}function Is(e,t){let n={};function r(t,r){let i=0,a=0,o=t.length,s=r[r.length-1];return r.forEach((t,c)=>{let l=Rs(e,t),u=l?e.node(l).order:o;(l||t===s)&&(r.slice(a,c+1).forEach(t=>{let r=e.predecessors(t);r&&r.forEach(r=>{let a=e.node(r),o=a.order;(o<i||u<o)&&!(a.dummy&&e.node(t).dummy)&&zs(n,r,t)})}),a=c+1,i=u)}),r}return t.length&&t.reduce(r),n}function Ls(e,t){let n={};function r(t,r,i,a,o){Za(r,i).forEach(r=>{let i=t[r];if(i!==void 0&&e.node(i).dummy){let t=e.predecessors(i);t&&t.forEach(t=>{if(t===void 0)return;let r=e.node(t);r.dummy&&(r.order<a||r.order>o)&&zs(n,t,i)})}})}function i(t,n){let i=-1,a=-1,o=0;return n.forEach((s,c)=>{if(e.node(s).dummy===`border`){let t=e.predecessors(s);if(t&&t.length){let s=t[0];if(s===void 0)return;a=e.node(s).order,r(n,o,c,i,a),o=c,i=a}}r(n,o,n.length,a,t.length)}),n}return t.length&&t.reduce(i),n}function Rs(e,t){if(e.node(t).dummy){let n=e.predecessors(t);if(n)return n.find(t=>e.node(t).dummy)}}function zs(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];r||(e[t]=r={}),r[n]=!0}function Bs(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];return r!==void 0&&Object.hasOwn(r,n)}function Vs(e,t,n,r,i){let a={},o={},s={};return t.forEach(e=>{e.forEach((e,t)=>{a[e]=e,o[e]=e,s[e]=t})}),t.forEach(t=>{let c=-1,l=-1,u=!1,d=t,f=t.findIndex(t=>i?.includes(t)||Xs(t,e,i));f>0&&(d=[t[f],...t.slice(0,f),...t.slice(f+1)],u=!0),d.forEach(t=>{let d=r(t);if(d&&d.length){i!=null&&i.includes(t)&&(d=d.filter(t=>Xs(t,e,i)));let r=d.sort((e,t)=>{let n=s[e],r=s[t];return(n===void 0?0:n)-(r===void 0?0:r)}),f=(r.length-1)/2;for(let e=Math.floor(f),i=Math.ceil(f);e<=i;++e){let i=r[e];if(i===void 0)continue;let d=s[i];if(d!==void 0&&o[t]===t&&c<d&&s[i]!==l&&!Bs(n,t,i)){let e=a[i];e!==void 0&&(o[i]=t,o[t]=a[t]=e,c=d,u&&=(c=-1,l=s[i]??-1,!1))}}}})}),{root:a,align:o}}function Hs(e,t,n,r,i=!1){let a={},o=Us(e,t,n,i),s=i?`borderLeft`:`borderRight`;function c(e,t){let n=o.nodes().slice(),r={},i=n.pop();for(;i;){if(r[i])e(i);else{r[i]=!0,n.push(i);for(let e of t(i))n.push(e)}i=n.pop()}}function l(e){let t=o.inEdges(e);t?a[e]=t.reduce((e,t)=>{let n=a[t.v]??0,r=o.edge(t);return Math.max(e,n+(r===void 0?0:r))},0):a[e]=0}function u(t){let n=o.outEdges(t),r=1/0;n&&(r=n.reduce((e,t)=>{let n=a[t.w],r=o.edge(t);return Math.min(e,(n===void 0?0:n)-(r===void 0?0:r))},1/0));let i=e.node(t);r!==1/0&&i.borderType!==s&&(a[t]=Math.max(a[t]===void 0?0:a[t],r))}function d(e){return o.predecessors(e)||[]}function f(e){return o.successors(e)||[]}return c(l,d),c(u,f),Object.keys(r).forEach(e=>{let t=n[e];t!==void 0&&(a[e]=a[t]??0)}),a}function Us(e,t,n,r){let i=new Na,a=e.graph(),o=Js(a.nodesep,a.edgesep,r);return t.forEach(t=>{let r;t.forEach(t=>{let a=n[t];if(a!==void 0){if(i.setNode(a),r!==void 0){let s=n[r];if(s!==void 0){let n=i.edge(s,a);i.setEdge(s,a,Math.max(o(e,t,r),n||0))}}r=t}})}),i}function Ws(e,t){return Object.values(t).reduce((t,n)=>{let r=-1/0,i=1/0;Object.entries(n).forEach(([t,n])=>{let a=Ys(e,t)/2;r=Math.max(n+a,r),i=Math.min(n-a,i)});let a=r-i;return a<t[0]&&(t=[a,n]),t},[1/0,null])[1]}function Gs(e,t){let n=Object.values(t),r=Wa(Math.min,n),i=Wa(Math.max,n);[`u`,`d`].forEach(n=>{[`l`,`r`].forEach(a=>{let o=n+a,s=e[o];if(!s||s===t)return;let c=Object.values(s),l=r-Wa(Math.min,c);a!==`l`&&(l=i-Wa(Math.max,c)),l&&(e[o]=$a(s,e=>e+l))})})}function Ks(e,t=void 0){let n=e.ul;return n?$a(n,(n,r)=>{if(t){let n=e[t.toLowerCase()];if(n&&n[r]!==void 0)return n[r]}let i=Object.values(e).map(e=>{let t=e[r];return t===void 0?0:t}).sort((e,t)=>e-t);return((i[1]??0)+(i[2]??0))/2}):{}}function qs(e,t){let n=Ra(e),r=Object.assign(Is(e,n),Ls(e,n)),i={},a;return[`u`,`d`].forEach(o=>{a=o===`u`?n:Object.values(n).reverse(),[`l`,`r`].forEach(n=>{n===`r`&&(a=a.map(e=>Object.values(e).reverse()));let s=Vs(e,a,r,t=>(o===`u`?e.predecessors(t):e.successors(t))||[],t),c=Hs(e,a,s.root,s.align,n===`r`);n===`r`&&(c=$a(c,e=>-e)),i[o+n]=c})}),Gs(i,Ws(e,i)),Ks(i,e.graph().align)}function Js(e,t,n){return(r,i,a)=>{let o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.hasOwn(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2}if(l&&(c+=n?l:-l),l=void 0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.hasOwn(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2}return l&&(c+=n?l:-l),c}}function Ys(e,t){return e.node(t).width}function Xs(e,t,n){if(!n)return!1;let r=t.node(e)?.edgeObj;if(!r||t.node(e).edgeLabel.reversed)return!1;let i=n.indexOf(r?.v),a=n.indexOf(r?.w);return i!==-1&&a!==-1&&i===(a+1)%n.length||i===(a-1)%n.length}function Zs(e,t){e=Ia(e),Qs(e),Object.entries(qs(e,t)).forEach(([t,n])=>e.node(t).x=n)}function Qs(e){let t=Ra(e),n=e.graph(),r=n.ranksep,i=n.rankalign,a=0;t.forEach(t=>{let n=t.reduce((t,n)=>{let r=e.node(n).height??0;return t>r?t:r},0);t.forEach(t=>{let r=e.node(t);r.y=i===`top`?a+r.height/2:i===`bottom`?a+n-r.height/2:a+n/2}),a+=n+r})}var $s=new WeakMap;function ec(e,t={}){return nc(e,Ja,t),e}function tc(e,t,n){let r=t;for(;r!==void 0;){let t=e.parent(r);if(t===n)return r;r=t}}function nc(e,t,n){let r=e.nodes().filter(t=>e.children(t).length),i={};r.forEach(r=>{let a=e.node(r);if(a&&a.rankdir){let o=new Na({multigraph:!0,compound:!0});o.setGraph({rankdir:a.rankdir});let s=e.children(r);s.forEach(t=>{let n={...e.node(t)};o.setNode(t,n);let i=e.parent(t);i&&i!==r&&s.includes(i)&&o.setParent(t,i)});let c=new Set;e.edges().forEach(t=>{let n=tc(e,t.v,r),i=tc(e,t.w,r);if(n&&i&&n!==i){let r=`${n}\0${i}`;c.has(r)||(c.add(r),o.setEdge(n,i,{...e.edge(t)}))}}),nc(o,t,n);let l=pc(o);rc(l,t,n,null),ic(o,l);let u=1/0,d=1/0,f=-1/0,p=-1/0;o.nodes().forEach(e=>{if(e===r)return;let t=o.node(e);t&&typeof t.x==`number`&&typeof t.y==`number`&&typeof t.width==`number`&&typeof t.height==`number`&&(u=Math.min(u,t.x-t.width/2),f=Math.max(f,t.x+t.width/2),d=Math.min(d,t.y-t.height/2),p=Math.max(p,t.y+t.height/2))}),(!isFinite(u)||!isFinite(d)||!isFinite(f)||!isFinite(p))&&(u=d=0,f=p=0);let m=f-u,h=p-d;i[r]={minX:u,minY:d,maxX:f,maxY:p,width:m,height:h,offsetX:u,offsetY:d},a._dagreClusterSubgraph=o}});let a=[],o=t=>{let n=[],r=(e.children(t)||[]).filter(e=>e!==t);for(;r.length>0;){let t=r.shift();n.push(t),(e.children(t)||[]).filter(e=>e!==t).forEach(e=>r.push(e))}return n},s=new Map;r.forEach(t=>{let n=e.node(t);n&&n.rankdir&&i[t]&&s.set(t,(e.children(t)||[]).filter(e=>e!==t))});let c=new Set([...s.values()].flat()),l=new Map;s.forEach((e,t)=>{c.has(t)||l.set(t,o(t))});let u=new Set([...l.values()].flat()),d=e=>{for(let[t,n]of l)if(n.includes(e))return t;return e},f=[];e.edges().forEach(t=>{(u.has(t.v)||u.has(t.w))&&f.push({edge:t,label:e.edge(t)})});let p=new Map;u.forEach(t=>{let n=e.parent(t);p.set(t,typeof n==`string`?n:void 0)}),l.forEach((t,n)=>{let r=e.node(n),o=[];t.forEach(t=>{let n=e.node(t);n&&(o.push({id:t,node:n,parent:p.get(t)}),e.removeNode(t))});let s=f.filter(({edge:e})=>t.includes(e.v)||t.includes(e.w)),c=i[n];r&&(a.push({clusterId:n,subgraph:r._dagreClusterSubgraph,bounds:c,children:t,removedNodes:o,removedEdges:s}),r.width=c.width,r.height=c.height)});let m=new Set;f.forEach(({edge:t,label:n})=>{let r=d(t.v),i=d(t.w);if(r!==i&&e.hasNode(r)&&e.hasNode(i)){let t=`${r}\0${i}`;m.has(t)||(m.add(t),e.setEdge(r,i,{...n,width:0,height:0}))}});let h=pc(e),g=rc(h,t,n,$s.get(e)??null);$s.set(e,g),ic(e,h),m.forEach(t=>{let n=t.indexOf(`\0`),r=t.slice(0,n),i=t.slice(n+1);e.hasEdge(r,i)&&e.removeEdge(r,i)}),a.forEach(({clusterId:t,subgraph:n,bounds:r,removedNodes:i,removedEdges:a})=>{let o=e.node(t),s=o?.x??0,c=o?.y??0,l=(r.minX+r.maxX)/2,u=(r.minY+r.maxY)/2;i.forEach(({id:t,node:n,parent:r})=>{e.setNode(t,n),r!==void 0&&e.setParent(t,r)}),a.forEach(({edge:t,label:n})=>{e.setEdge(t,n)}),n.nodes().forEach(r=>{if(r===t)return;let i=n.node(r),a=e.node(r);a&&i&&typeof i.x==`number`&&typeof i.y==`number`&&(a.x=s+(i.x-l),a.y=c+(i.y-u))}),delete o._dagreClusterSubgraph}),r.forEach(t=>{let n=e.node(t),r=i[t];if(n&&n.rankdir&&n._dagreClusterSubgraph&&r){let i=n._dagreClusterSubgraph,a=n.x??0,o=n.y??0,s=(r.minX+r.maxX)/2,c=(r.minY+r.maxY)/2;i.nodes().forEach(n=>{if(n===t)return;let r=i.node(n),l=e.node(n);if(l&&r&&typeof r.x==`number`&&typeof r.y==`number`){let e=r.x-s,t=r.y-c;l.x=a+e,l.y=o+t}}),delete n._dagreClusterSubgraph}})}function rc(e,t,n,r=null){var i,a;let o=n?.useDynamic!==!1,s=o&&(i=r?.graph)!=null?i:null,c=o&&(a=r?.rawNodes)!=null?a:null;t(` makeSpaceForEdgeLabels`,()=>mc(e)),t(` removeSelfEdges`,()=>Cc(e)),t(` acyclic`,()=>go(e,s)),t(` nestingGraph.run`,()=>es(e)),t(` rank`,()=>Go(Ia(e))),t(` injectEdgeLabelProxies`,()=>hc(e)),t(` removeEmptyRanks`,()=>Ba(e)),t(` nestingGraph.cleanup`,()=>is(e)),t(` normalizeRanks`,()=>za(e)),t(` assignRankMinMax`,()=>gc(e)),t(` removeEdgeLabelProxies`,()=>_c(e)),t(` normalize.run`,()=>bo(e)),t(` parentDummyChains`,()=>Xo(e)),t(` addBorderSegments`,()=>as(e)),t(` order`,()=>Ms(e,n,c)),t(` insertSelfEdges`,()=>wc(e)),t(` adjustCoordinateSystem`,()=>cs(e)),t(` position`,()=>Zs(e,n.corePath)),t(` positionSelfEdges`,()=>Tc(e));let l=JSON.parse(JSON.stringify(e._nodes));return t(` removeBorderNodes`,()=>Sc(e)),t(` normalize.undo`,()=>So(e)),t(` fixupEdgeLabelCoords`,()=>bc(e)),t(` undoCoordinateSystem`,()=>ls(e)),t(` translateGraph`,()=>vc(e)),t(` assignNodeIntersects`,()=>yc(e)),t(` reversePoints`,()=>xc(e)),t(` acyclic.undo`,()=>vo(e)),{graph:e,rawNodes:l}}function ic(e,t){e.nodes().forEach(n=>{let r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,r.order=i.order,r.rank=i.rank,t.children(n).length&&(r.width=i.width,r.height=i.height))}),e.edges().forEach(n=>{let r=e.edge(n),i=t.edge(n);r.points=i.points,Object.hasOwn(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var ac=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],oc={ranksep:50,edgesep:20,nodesep:50,rankdir:`TB`,rankalign:`center`},sc=[`acyclicer`,`ranker`,`rankdir`,`align`,`rankalign`],cc=[`width`,`height`,`rank`],lc={width:0,height:0},uc=[`minlen`,`weight`,`width`,`height`,`labeloffset`],dc={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},fc=[`labelpos`];function pc(e){let t=new Na({multigraph:!0,compound:!0}),n=Dc(e.graph());return t.setGraph(Object.assign({},oc,Ec(n,ac),Qa(n,sc))),e.nodes().forEach(n=>{let r=Ec(Dc(e.node(n)),cc);Object.keys(lc).forEach(e=>{r[e]===void 0&&(r[e]=lc[e])}),t.setNode(n,r);let i=e.parent(n);i!==void 0&&t.setParent(n,i)}),e.edges().forEach(n=>{let r=Dc(e.edge(n));t.setEdge(n,Object.assign({},dc,Ec(r,uc),Qa(r,fc)))}),t}function mc(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,(r.labelpos??`r`).toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function hc(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let n=e.node(t.v);Pa(e,`edge-proxy`,{rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t},`_ep`)}})}function gc(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function _c(e){e.nodes().forEach(t=>{let n=e.node(t);if(n.dummy===`edge-proxy`){let r=n;e.edge(r.e).labelRank=n.rank,e.removeNode(t)}})}function vc(e){let t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){let a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}e.nodes().forEach(t=>c(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);Object.hasOwn(n,`x`)&&c(n)}),t-=o,r-=s,e.nodes().forEach(n=>{let i=e.node(n);i.x-=t,i.y-=r}),e.edges().forEach(n=>{let i=e.edge(n);i.points.forEach(e=>{e.x-=t,e.y-=r}),Object.hasOwn(i,`x`)&&(i.x-=t),Object.hasOwn(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function yc(e){e.edges().forEach(t=>{if(t.v===t.w)return;let n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(La(r,a)),n.points.push(La(i,o))})}function bc(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset}})}function xc(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function Sc(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(n.borderLeft[n.borderLeft.length-1]),o=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy===`border`&&e.removeNode(t)})}function Cc(e){e.edges().forEach(t=>{if(t.v===t.w){let n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function wc(e){Ra(e).forEach(t=>{let n=0;t.forEach((t,r)=>{let i=e.node(t);typeof i.rank!=`number`&&(i.rank=0),i.order=r+n,(i.selfEdges||[]).forEach(t=>{Pa(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,edgeLabel:t.label},`_se`),(!Array.isArray(t.label.points)||t.label.points.length!==7)&&(t.label.points=[{x:0,y:-10},{x:0,y:-10},{x:0,y:0},{x:0,y:10},{x:0,y:10},{x:0,y:0},{x:0,y:0}])}),delete i.selfEdges})})}function Tc(e){e.nodes().forEach(t=>{let n=e.node(t),r=e=>typeof e==`number`&&isFinite(e);if(n.dummy===`selfedge`){let i=n,a=e.node(i.e.v),o=r(a?.x)?a.x:0,s=r(a?.y)?a.y:0,c=r(a?.width)?a.width:0,l=r(a?.height)?a.height:0,u=r(n.x)?n.x:o,d=r(n.y)?n.y:s,f=c/2,p=l/2;i.edgeLabel.points=[{x:u+f,y:d-p},{x:u+f,y:d-p},{x:u,y:d},{x:u-f,y:d+p},{x:u-f,y:d+p},{x:u,y:d},{x:u,y:d}],i.edgeLabel.x=u,i.edgeLabel.y=d,e.setEdge(i.e,i.edgeLabel),e.removeNode(t)}else n&&Array.isArray(n.selfEdges)&&n.selfEdges.forEach(e=>{if(!Array.isArray(e.label.points)||e.label.points.length!==7){let t=r(n.x)?n.x:0,i=r(n.y)?n.y:0,a=r(n.width)?n.width:0,o=r(n.height)?n.height:0,s=a/2,c=o/2;e.label.points=[{x:t+s,y:i-c},{x:t+s,y:i-c},{x:t,y:i},{x:t-s,y:i+c},{x:t-s,y:i+c},{x:t,y:i},{x:t,y:i}]}})})}function Ec(e,t){return $a(Qa(e,t),Number)}function Dc(e){let t={};return e&&Object.entries(e).forEach(([e,n])=>{typeof e==`string`&&(e=e.toLowerCase()),t[e]=n}),t}function Oc(e){let t=Ra(e),n=new Na({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{n.setNode(t,{label:t}),n.setParent(t,`layer`+e.node(t).rank)}),e.edges().forEach(e=>n.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{let r=`layer`+t;n.setNode(r,{rank:`same`}),e.reduce((e,t)=>(n.setEdge(e,t,{style:`invis`}),t))}),n}var kc={graphlib:Ji,version:ro,layout:ec,debug:Oc,util:{time:qa,notime:Ja}};function Ac(e,t){return t?e.ref===void 0?`added`:e.set===void 0?`context`:`changed`:`unchanged`}function jc(e,t){if(t&&e.heading===void 0)return e.ref===void 0?`added`:e.set===void 0?`context`:`changed`}function Mc(e,t){return t?e.ref===void 0?`added`:e.set===void 0?`context`:`changed`:`unchanged`}function Nc(e){let t=e.set;if(t===void 0)return[];let n=e;return Object.entries(t).filter(([e])=>e!==`attributes`&&e!==`removeAttributes`).map(([e,t])=>{let r=n[e];return{field:e,...typeof r==`string`?{from:r}:{},to:String(t)}})}var Pc={added:`added`,changed:`changed`,context:`existing`,unchanged:``},Fc={added:`added`,changed:`changed`,context:`existing`,removed:`removed`},Ic=[`added`,`changed`,`context`,`removed`];function Lc(e){return e.rows.some(e=>ce(e).role!==void 0)}function Rc(e,t){if(t)return ce(e).role??`context`}function zc(e){if(e.length===0)return;let t=Math.min(...e.map(e=>e.x)),n=Math.min(...e.map(e=>e.y)),r=Math.max(...e.map(e=>e.x+e.width)),i=Math.max(...e.map(e=>e.y+e.height));return{x:t-Uc,y:n-Uc-Wc,width:r-t+Uc*2,height:i-n+Uc*2+Wc}}var Bc=64,Vc=24,Hc=12,Uc=10,Wc=16,Gc=16,Kc=160,qc=52;function Jc(e,t,n=`landscape`){let r=new kc.graphlib.Graph({compound:!0,multigraph:!0});r.setGraph({rankdir:n===`portrait`?`TB`:`LR`,ranksep:Bc,nodesep:Vc,marginx:Hc,marginy:Hc}),r.setDefaultEdgeLabel(()=>({}));for(let n of e.nodes)r.setNode(n.id,t(n));let i=e.containers??[],a=new Map;for(let t of e.nodes)t.container!==void 0&&i.some(e=>e.id===t.container)&&(r.setNode(t.container,{label:t.container}),r.setParent(t.id,t.container),a.set(t.container,[...a.get(t.container)??[],t.id]));e.edges.forEach((e,t)=>{e.from!==e.to&&r.hasNode(e.from)&&r.hasNode(e.to)&&r.setEdge(e.from,e.to,{},String(t))}),kc.layout(r);let o=e.nodes.map(e=>{let n=r.node(e.id),{width:i,height:a}=t(e);return{id:e.id,x:(n?.x??Hc+i/2)-i/2,y:(n?.y??Hc+a/2)-a/2,width:i,height:a}}),s=[];e.edges.forEach((e,t)=>{if(e.from===e.to)return;let n=r.edge(e.from,e.to,String(t));n?.points!==void 0&&n.points.length>0&&s.push({index:t,points:n.points.map(e=>({x:e.x,y:e.y}))})});let c=[],l=o.reduce((e,t)=>Math.max(e,t.y+t.height),Hc)+Gc,u=new Map(o.map(e=>[e.id,e]));for(let e of i){let t=zc((a.get(e.id)??[]).flatMap(e=>{let t=u.get(e);return t===void 0?[]:[t]}));t===void 0?(c.push({id:e.id,label:e.label,x:Hc,y:l,width:Kc,height:qc}),l+=68):c.push({id:e.id,label:e.label,...t})}let d=[...o.map(e=>({x:e.x,y:e.y,width:e.width,height:e.height})),...c],f=Math.min(0,...d.map(e=>e.x))-Hc,p=Math.min(0,...d.map(e=>e.y))-Hc;if(f<0||p<0){for(let e of o)e.x-=f,e.y-=p;for(let e of c)e.x-=f,e.y-=p;for(let e of s)for(let t of e.points)t.x-=f,t.y-=p}let m=[...o.map(e=>({x:e.x,y:e.y,width:e.width,height:e.height})),...c].reduce((e,t)=>({width:Math.max(e.width,t.x+t.width),height:Math.max(e.height,t.y+t.height)}),{width:0,height:0});return{nodes:o,edges:s,containers:c,width:m.width+Hc,height:m.height+Hc}}var Yc={attributes:[],expectations:[],assignments:[],removedAttributes:[],locations:[],artifacts:[]};function Xc(e){if(typeof e!=`object`||!e)return Yc;let t=e,n=e=>typeof e==`object`&&e&&!Array.isArray(e)?Object.entries(e):[],r=t.set,i=r?.removeAttributes;return{attributes:n(t.attributes),expectations:n(t.expect?.attributes),assignments:n(r?.attributes),removedAttributes:Array.isArray(i)?i.filter(e=>typeof e==`string`):[],locations:Array.isArray(t.locations)?t.locations:[],artifacts:Array.isArray(t.artifacts)?t.artifacts:[]}}function Zc(e){let t=e.target;if(typeof t==`string`)return{ref:t};if(typeof t!=`object`||!t)return;let n=t;if(typeof n.ref==`string`)return{ref:n.ref,...typeof n.revision==`string`?{revision:n.revision}:{}}}function Qc(e,t){let n=(e.removals??[]).map(e=>({type:e.type,ref:e.ref})),r=e.profile,i=e.artifacts,a={...typeof r==`string`?{profile:r}:{},...(()=>{let t=Zc(e);return t===void 0?{}:{target:t}})(),artifacts:Array.isArray(i)?i:[]};if(e.kind===`table`){let r=e.data,i=Lc(r),o=r.rows.map(e=>{let n=Array.isArray(e)?{}:e,r=(Array.isArray(e)?void 0:e.role)??jc({ref:typeof n.ref==`string`?n.ref:void 0,set:n.set,heading:typeof n.heading==`string`?n.heading:void 0},t)??Rc(e,i),{cells:a,heading:o}=ce(e),s=Array.isArray(e)?{}:e;return{cells:a,...r===void 0?{}:{role:r},...o===void 0?{}:{heading:o},...typeof s.depth==`number`?{depth:s.depth}:{},...typeof s.id==`string`?{id:s.id}:{},...typeof s.ref==`string`?{ref:s.ref}:{},...typeof s.kind==`string`?{kind:s.kind}:{},changes:Nc(s),...Xc(e)}}),s=new Map;for(let e of o){if(e.id===void 0)continue;let t=e.cells.find(e=>typeof e==`string`&&e!==``);s.set(e.id,(typeof t==`string`?t:void 0)??e.ref??e.id)}let c=r.relations,l=(Array.isArray(c)?c:[]).map(e=>{let t=e,n=e=>{let t=typeof e?.id==`string`?e.id:void 0,n=typeof e?.ref==`string`?e.ref:void 0;return{id:t,ref:n,label:(t===void 0?void 0:s.get(t))??n??t??``}},r=n(t.from),i=n(t.to);return{kind:t.kind??``,...typeof t.label==`string`?{label:t.label}:{},...r.id===void 0?{}:{fromRow:r.id},...i.id===void 0?{}:{toRow:i.id},...r.ref===void 0?{}:{fromRef:r.ref},...i.ref===void 0?{}:{toRef:i.ref},fromLabel:r.label,toLabel:i.label}});return{thingNoun:`column`,linkNoun:`row`,things:[],links:[],columns:r.columns,rows:o,containers:[],removals:n,traces:l,...a}}if(e.kind===`timeline`)return{thingNoun:`task`,linkNoun:`dependency`,things:[],links:[],containers:[],removals:n,traces:[],...a};let o=e.kind===`graph`,s=o?e.data.nodes:e.data.participants,c=o?e.data.edges:e.data.messages,l=new Map(s.map(e=>[e.id,$c(e)]));return{thingNoun:o?`element`:`participant`,linkNoun:o?`relationship`:`message`,things:s.map(e=>({id:e.id,label:$c(e),kind:e.kind,role:Ac(e,t),changes:Nc(e),container:e.container,...Xc(e)})),links:c.map(e=>({from:e.from,to:e.to,fromLabel:l.get(e.from)??e.from,toLabel:l.get(e.to)??e.to,label:e.label,kind:`kind`in e?e.kind:void 0,role:Mc(e,t),changes:Nc(e),isLoop:e.from===e.to,...Xc(e)})),containers:e.data.containers??[],removals:n,traces:[],...a}}function $c(e){return e.label??e.ref??e.id}function el(e){if(e.kind===`graph`){let t=e.data,n=[`flowchart TD`],r=t.containers??[],i=new Set(r.map(e=>e.id)),a=e=>t.nodes.filter(t=>t.container===e);for(let e of r){n.push(` subgraph ${tl(e.id)}["${rl(e.label)}"]`);for(let t of a(e.id))n.push(` ${tl(t.id)}["${rl($c(t))}"]`);n.push(` end`)}for(let e of t.nodes)e.container!==void 0&&i.has(e.container)||n.push(` ${tl(e.id)}["${rl($c(e))}"]`);for(let e of t.edges){let t=e.label??e.kind,r=t===void 0?`-->`:`-- "${rl(t)}" -->`;n.push(` ${tl(e.from)} ${r} ${tl(e.to)}`)}return n.join(`
7
- `)}if(e.kind===`sequence`){let t=e.data,n=[`sequenceDiagram`],r=t.containers??[],i=new Set(r.map(e=>e.id)),a=(e,t)=>`${t}participant ${tl(e.id)} as "${rl($c(e))}"`;for(let e of r){n.push(` box ${rl(e.label)}`);for(let r of t.participants.filter(t=>t.container===e.id))n.push(a(r,` `));n.push(` end`)}for(let e of t.participants)e.container!==void 0&&i.has(e.container)||n.push(a(e,` `));for(let e of t.messages)n.push(` ${tl(e.from)}->>${tl(e.to)}: ${rl(e.label??``)}`);return n.join(`
8
- `)}}function tl(e){return`n${[...e].map(e=>e.charCodeAt(0).toString(36)).join(``)}`}var nl={"#":`#35;`,'"':`#quot;`,";":`#59;`,"<":`#60;`,">":`#62;`};function rl(e){return e.replace(/[#";<>]/g,e=>nl[e]).replace(/[\r\n\t\f\v\u0000-\u001f\u2028\u2029]+/g,` `)}function il(e,t){return`${e}:${t}`}var al=new Set;function ol(e,t,n){return n===void 0||n===``?!1:e.has(il(t,n))}function sl(e){let t=e?.viewpoints;return Array.isArray(t)?t:[]}function cl(e,t){let n=new Set,r=(e,t,r)=>{if(t===void 0)return;let i=new Set(t);for(let t of e)t.kind!==void 0&&t.kind!==``&&!i.has(t.kind)&&n.add(il(r,t.kind))};return r(e.nodes,t.elementKinds,`element`),r(e.edges,t.relationshipKinds,`relationship`),n}function ll(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}var ul=40,dl=22;function fl(e){let t=e.containers??[],n;if(t.length===0)n=e.participants;else{let r=new Set(t.map(e=>e.id)),i=new Set;n=[];for(let t of e.participants){if(i.has(t.id))continue;let a=t.container;if(a===void 0||!r.has(a))n.push(t),i.add(t.id);else for(let t of e.participants)t.container!==a||i.has(t.id)||(n.push(t),i.add(t.id))}}let r=[];n.forEach((e,n)=>{let i=t.find(t=>t.id===e.container);if(i===void 0)return;let a=r.at(-1);a!==void 0&&a.container.id===i.id&&a.to===n-1?a.to=n:r.push({container:i,from:n,to:n})});let i=t.length>0?dl:0,a=new Map(n.map((e,t)=>[e.id,t])),o=Math.max(...e.participants.map(e=>Oe([$c(e)],Nc(e),110,240)),De(e.messages.map(e=>e.label??``),110,240)*.8),s=o-14,c=e.participants.reduce((e,t)=>Math.max(e,Ae(ke($c(t),s).length,je(Nc(t),s).length)),Ae(1,0))+8;return{columns:n,bands:r,bandHeight:i,lifelineX:o,boxW:s,headerHeight:c,messageGap:ul,width:Math.max(e.participants.length*o,240),height:i+c+(e.messages.length+1)*ul,xOf:e=>(a.get(e)??0)*o+o/2}}function pl(e,t){let n=[$c(e)];t!==`unchanged`&&n.push(`(${Pc[t]})`),e.ref!==void 0&&n.push(`[${e.ref}]`);for(let t of Nc(e))n.push(Me(t));return n.join(` `)}function ml(e,t){let n=t.cx-e.cx,r=t.cy-e.cy;if(n===0&&r===0)return{x:e.cx,y:e.cy};let i=Math.min(n===0?1/0:e.w/2/Math.abs(n),r===0?1/0:e.h/2/Math.abs(r));return{x:e.cx+n*i,y:e.cy+r*i}}function hl(e,t){if(e.length<3)return e.map((e,t)=>`${t===0?`M`:`L`} ${e.x} ${e.y}`).join(` `);let n=[`M ${e[0].x} ${e[0].y}`];for(let r=1;r<e.length-1;r++){let i=e[r-1],a=e[r],o=e[r+1],s=Math.hypot(a.x-i.x,a.y-i.y),c=Math.hypot(o.x-a.x,o.y-a.y);if(s===0||c===0)continue;let l=((a.x-i.x)*(o.y-a.y)-(a.y-i.y)*(o.x-a.x))/(s*c);if(Math.abs(l)<.02)continue;let u=Math.min(t,s/2,c/2),d={x:a.x-(a.x-i.x)/s*u,y:a.y-(a.y-i.y)/s*u},f={x:a.x+(o.x-a.x)/c*u,y:a.y+(o.y-a.y)/c*u};n.push(`L ${d.x} ${d.y}`,`Q ${a.x} ${a.y} ${f.x} ${f.y}`)}let r=e[e.length-1];return n.push(`L ${r.x} ${r.y}`),n.join(` `)}function gl(e,t,n,r,i){if(e===t){let t=26+r*12,n=e.cx-e.w/4,i=e.cx+e.w/4,a=e.y;return{d:`M ${n} ${a} C ${n} ${a-t}, ${i} ${a-t}, ${i} ${a}`,labelAt:{x:e.cx,y:a-t*.75},span:t*2}}let a=ml(e,t),o=ml(t,e),s=Math.hypot(o.x-a.x,o.y-a.y),c=(n??[]).slice(1,-1),l=i===void 0?c:c.map((e,t)=>{let n=c.length===1?.5:t/(c.length-1);return{x:e.x+i.from.dx*(1-n)+i.to.dx*n,y:e.y+i.from.dy*(1-n)+i.to.dy*n}});if(l.length>0&&r===0){let e=l[Math.floor((l.length-1)/2)];return{d:hl([a,...l,o],12),labelAt:e,span:s}}let u=r===0?0:Math.ceil(r/2)*22*(r%2==1?1:-1),d=(a.x+o.x)/2,f=(a.y+o.y)/2;if(u===0)return{d:`M ${a.x} ${a.y} L ${o.x} ${o.y}`,labelAt:{x:d,y:f},span:s};let p=s===0?0:-(o.y-a.y)/s,m=s===0?0:(o.x-a.x)/s,h=d+p*u*2,g=f+m*u*2;return{d:`M ${a.x} ${a.y} Q ${h} ${g} ${o.x} ${o.y}`,labelAt:{x:d+p*u,y:f+m*u},span:s}}function _l(e){let t=(e.match(/-?\d+(?:\.\d+)?/g)??[]).map(Number);if(t.length<2)return;let n=1/0,r=1/0,i=-1/0,a=-1/0;for(let e=0;e+1<t.length;e+=2)n=Math.min(n,t[e]),i=Math.max(i,t[e]),r=Math.min(r,t[e+1]),a=Math.max(a,t[e+1]);return{minX:n,minY:r,maxX:i,maxY:a}}function vl(e,t,n,r){let i=t=>{let n=e.participants.find(e=>e.id===t);return n===void 0?t:$c(n)},a=t.label===void 0||t.label===``?``:`: ${t.label}`;return[`${n+1}.`,`${i(t.from)} → ${i(t.to)}${a}`,t.from===t.to?`(to itself)`:``,r===`unchanged`?``:`[${Pc[r]}]`,Nc(t).map(Me).join(`, `)].filter(e=>e!==``).join(` `)}function yl(e,t,n){let r=t=>{let n=e.nodes.find(e=>e.id===t);return n===void 0?t:$c(n)},i=t.label??t.kind;return[`${r(t.from)} → ${r(t.to)}`,i===void 0?``:`(${i})`,n===`unchanged`?``:`[${Pc[n]}]`,Nc(t).map(Me).join(`, `)].filter(e=>e!==``).join(` `)}function bl(e){if(e===void 0||e===``)return;let t=Rt(e,Ui);return t.valid?{valid:!0,envelope:t.envelope,issues:[]}:t}function xl(e){let t=bl(e);return t?.valid===!0?t.envelope:void 0}function Sl(e){return Bt(e,Ui)}var Cl=`#ffffff`,wl=`#27272a`,Tl=`#71717a`,El={added:{fill:`#ecfdf5`,stroke:`#059669`,text:`#065f46`},changed:{fill:`#fffbeb`,stroke:`#d97706`,text:`#92400e`},context:{fill:`#fafafa`,stroke:`#d4d4d8`,text:`#71717a`},unchanged:{fill:`#ffffff`,stroke:`#a1a1aa`,text:wl}},Dl={added:`#059669`,changed:`#d97706`,context:`#d4d4d8`,unchanged:`#a1a1aa`},Ol=[`added`,`changed`,`context`,`unchanged`],kl=[{fill:`#eff6ff`,stroke:`#2563eb`},{fill:`#f5f3ff`,stroke:`#7c3aed`},{fill:`#ecfeff`,stroke:`#0891b2`},{fill:`#fff1f2`,stroke:`#e11d48`},{fill:`#f7fee7`,stroke:`#65a30d`},{fill:`#fff7ed`,stroke:`#ea580c`},{fill:`#f0fdfa`,stroke:`#0d9488`},{fill:`#fdf4ff`,stroke:`#c026d3`},{fill:`#fefce8`,stroke:`#ca8a04`},{fill:`#f8fafc`,stroke:`#475569`},{fill:`#eef2ff`,stroke:`#4f46e5`},{fill:`#fef2f2`,stroke:`#b91c1c`},{fill:`#f0fdf4`,stroke:`#16a34a`},{fill:`#fdf2f8`,stroke:`#db2777`},{fill:`#f5f5f4`,stroke:`#78716c`},{fill:`#f0f9ff`,stroke:`#0369a1`}],Al=[void 0,`7 3`,`2 3`,`9 3 2 3`],jl=kl.length*Al.length;function Ml(e,t=.88){let n=n=>{let r=Number.parseInt(e.slice(1+n*2,3+n*2),16);return Math.round(r+(255-r)*t).toString(16).padStart(2,`0`)};return`#${n(0)}${n(1)}${n(2)}`}function Nl(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619)>>>0;return t}kl.length;function Pl(e,t,n={}){let r=n.dashes===!1,i=jl,a=new Map,o=new Set,s=e=>t!==void 0&&Object.hasOwn(t,e)?t[e].color:void 0,c=new Set;for(let t of e){let e=s(t);e!==void 0&&(a.set(t,{fill:Ml(e),stroke:e,declared:!0}),c.add(e.toLowerCase()))}for(let e=0;e<i;e++)c.has(kl[e%kl.length].stroke.toLowerCase())&&o.add(e);for(let t of e){if(a.has(t))continue;let e;if(r){e=-1;let n=Nl(t)%kl.length;for(let t=0;t<kl.length&&e===-1;t++){let r=(n+t)%kl.length;o.has(r)||(e=r)}for(let t=kl.length;t<jl&&e===-1;t++){let r=kl.length+(n+t)%(jl-kl.length);o.has(r)||(e=r)}e===-1&&(e=n)}else{e=Nl(t)%i;for(let t=0;t<i&&o.has(e);t++)e=(e+1)%i}o.add(e);let n=kl[e%kl.length],s=Math.floor(e/kl.length)%Al.length;if(r)a.set(t,{...n,...s===0?{}:{hatch:s}});else{let e=Al[s];a.set(t,{...n,...e===void 0?{}:{dash:e}})}}return a}function Fl(e,t){let n=new Map;for(let r of e){let e=t.get(r);if(e?.declared!==!0)continue;let i=e.stroke.toLowerCase();n.set(i,[...n.get(i)??[],r])}let r=new Map;for(let e of n.values())if(!(e.length<2))for(let t of e)r.set(t,e.filter(e=>e!==t));return r}function Il(e){let t=[];for(let n of e)n.kind!==void 0&&n.kind!==``&&!t.includes(n.kind)&&t.push(n.kind);return t}var M=`system-ui, Segoe UI, Arial, Helvetica, sans-serif`;function Ll(e){let t=El[e.role],n={fill:e.tint?.fill??t.fill,stroke:e.role===`unchanged`?e.tint?.stroke??t.stroke:t.stroke,text:t.text===`#71717a`?Tl:wl},r=e.role===`added`||e.role===`changed`?2:1.2,i=e.role===`context`?.62:1,a=e.anchor??`start`,o=ke(e.label,e.width),s=je(e.changes,e.width),c=o.length+s.length,l=e.y+e.height/2-(c-1)*15/2+4,u=a===`middle`?e.x+e.width/2:e.x+8,d=[{shape:`rect`,x:e.x,y:e.y,width:e.width,height:e.height,rx:5,fill:n.fill,stroke:n.stroke,strokeWidth:r,...e.tint?.dash===void 0?{}:{strokeDasharray:e.tint.dash},opacity:i}];return o.forEach((e,t)=>{d.push({shape:`text`,x:u,y:l+t*15,text:e,fontSize:11,fill:n.text,fontFamily:M,textAnchor:a,opacity:i})}),s.forEach((e,t)=>{d.push({shape:`text`,x:u,y:l+(o.length+t)*15,text:e,fontSize:9,fontWeight:600,fill:n.text,fontFamily:M,textAnchor:a,opacity:i,testId:`field-changes`})}),d}function Rl(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function zl(e){return Rl(e).replace(/"/g,`&quot;`)}function Bl(e){return e.filter(([,e])=>e!==void 0).map(([e,t])=>` ${e}="${zl(String(t))}"`).join(``)}function Vl(e){let t=Object.entries(e.data??{}).map(([e,t])=>[`data-${e}`,t]);switch(e.shape){case`rect`:return`<rect${Bl([[`x`,e.x],[`y`,e.y],[`width`,e.width],[`height`,e.height],[`rx`,e.rx],[`fill`,e.fill],[`fill-opacity`,e.fillOpacity],[`stroke`,e.stroke],[`stroke-width`,e.strokeWidth],[`stroke-dasharray`,e.strokeDasharray],[`opacity`,e.opacity],...t])} />`;case`text`:{let n=`${Rl(e.text)}${e.note===void 0?``:` <tspan font-style="italic">${Rl(e.note)}</tspan>`}`,r=[[`x`,e.x],[`y`,e.y],[`font-size`,e.fontSize],[`font-family`,e.fontFamily],[`font-weight`,e.fontWeight],[`font-style`,e.fontStyle],[`text-anchor`,e.textAnchor]],i=`<text${Bl([...r,[`fill`,e.fill],...e.paintOrder===`stroke`?[]:[[`stroke`,e.stroke],[`stroke-width`,e.strokeWidth]],[`text-decoration`,e.textDecoration],[`opacity`,e.opacity],[`data-testid`,e.testId],...t])}>${n}</text>`;return e.paintOrder===`stroke`?`<text${Bl([...r,[`fill`,e.stroke],[`stroke`,e.stroke],[`stroke-width`,e.strokeWidth],[`opacity`,e.opacity],[`aria-hidden`,`true`]])}>${n}</text>${i}`:i}case`line`:return`<line${Bl([[`x1`,e.x1],[`y1`,e.y1],[`x2`,e.x2],[`y2`,e.y2],[`stroke`,e.stroke],[`stroke-width`,e.strokeWidth],[`stroke-dasharray`,e.strokeDasharray],[`opacity`,e.opacity],[`marker-end`,e.markerEnd===void 0?void 0:`url(#${e.markerEnd})`],...t])} />`;case`path`:return`<path${Bl([[`d`,e.d],[`stroke`,e.stroke],[`fill`,e.fill??`none`],[`stroke-width`,e.strokeWidth],[`stroke-dasharray`,e.strokeDasharray],[`stroke-linecap`,e.strokeLinecap],[`opacity`,e.opacity],[`marker-end`,e.markerEnd===void 0?void 0:`url(#${e.markerEnd})`],...t])} />`}}function Hl(e){return`<marker id="${zl(e.id)}" markerWidth="7" markerHeight="7" refX="9" refY="5" viewBox="0 0 10 10" markerUnits="userSpaceOnUse" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="${zl(e.paint)}" /></marker>`}function Ul(e){let t=e=>{let n=Object.entries(e.data??{}).map(([e,t])=>[`data-${e}`,t]),r=e.title===void 0?``:`<title>${Rl(e.title)}</title>`,i=[[`opacity`,e.opacity],[`data-testid`,e.testId]];return`<g${Bl([...n,...i])}>${r}`+e.primitives.map(Vl).join(``)+(e.groups??[]).map(t).join(``)+`</g>`},n=e.groups.map(t).join(``),r=e.markers.length===0?``:`<defs>${e.markers.map(Hl).join(``)}</defs>`;return`<svg xmlns="http://www.w3.org/2000/svg" role="img"`+Bl([[`aria-label`,e.ariaLabel],[`viewBox`,e.viewBox],[`width`,e.width],[`height`,e.height]])+`><rect${Bl([[`x`,e.viewBox.split(` `)[0]],[`y`,e.viewBox.split(` `)[1]],[`width`,e.width],[`height`,e.height],[`fill`,e.background]])} />`+r+n+`</svg>`}var Wl=17,Gl=18,Kl=92,ql=860;function Jl(e){return Math.min(e,ql)}function Yl(e){return 21+(e.length+9)*5.6+Gl}function Xl(e,t){let n=Jl(t),r=1,i=0;for(let t of e.entries){let e=Yl(t.label);i>0&&Kl+i+e>n-20&&(r+=1,i=0),i+=e}return r}function Zl(e){let t=e.flatMap(e=>e.entries).reduce((e,t)=>Math.max(e,Yl(t.label)),0);return t===0?0:Math.min(Kl+t+32,ql)}function Ql(e,t){let n=e.filter(e=>e.entries.length>0);return n.length===0?0:n.reduce((e,n)=>e+Xl(n,t),0)*Wl+12}function $l(e,t,n,r){let i=e.filter(e=>e.entries.length>0);if(i.length===0)return[];let a=Jl(r),o=[],s=0;for(let e of i){let r=s,i=0,c=[];for(let r of e.entries){let o=Yl(r.label);i>0&&Kl+i+o>a-20&&(s+=1,i=0);let l=t+Kl+i,u=n+s*Wl;i+=o;let d=e.sample===`line`?{shape:`line`,x1:l,y1:u+5,x2:l+16,y2:u+5,stroke:r.stroke,strokeWidth:1.6,...r.dashed===void 0?{}:{strokeDasharray:r.dashed}}:{shape:`rect`,x:l,y:u,width:16,height:10,rx:2,fill:r.fill,stroke:r.stroke,strokeWidth:1.2,...r.dashed===void 0?{}:{strokeDasharray:r.dashed}};c.push({id:`legend-${r.key??r.label}`,...r.projectColour===!0?{title:`${r.label} — project colour`}:{},data:{"legend-entry":r.key??r.label,...r.projectColour===!0?{"colour-source":`project`}:{},...r.toggles===!0&&r.key!==void 0?{toggles:`true`}:{},...r.faded===!0?{faded:`true`}:{},...r.hidden===!0?{hidden:`true`}:{}},opacity:r.hidden===!0?.45:r.faded===!0?.62:1,primitives:[d,{shape:`text`,x:l+21,y:u+9,text:r.hidden===!0?`${r.label} (hidden)`:r.label,fontSize:9,fill:Tl,fontFamily:M}]})}o.push({id:`legend-title-${e.title}`,primitives:[{shape:`text`,x:t,y:n+r*Wl+9,text:e.title,fontSize:9,fontWeight:600,fill:Tl,fontFamily:M,testId:`legend-group`}]}),o.push(...c),s+=1}return[{id:`diagram-legend`,testId:`diagram-legend`,primitives:[],groups:o}]}var eu=12,tu=5.2;function nu(e,t){let n=Math.max(Math.floor((t-24)/tu),20),r=[],i=``;for(let t of e.split(/\s+/).filter(e=>e!==``))for(i===``?i=t:i.length+1+t.length<=n?i=`${i} ${t}`:(r.push(i),i=t);i.length>n;)r.push(i.slice(0,n)),i=i.slice(n);return i!==``&&r.push(i),r}function ru(e){let t=e.length;for(;t>0&&(e[t-1]===`.`||/\s/.test(e[t-1]));)--t;return e.slice(0,t)}function iu(e,t,n,r,i){let a=`${t.nodes.length} of ${e.nodes.length} elements and ${t.edges.length} of ${e.edges.length} relationships shown.`+(r?` Hidden types are still part of the proposal.`:``);if(i===void 0)return n.size===0?void 0:`Filtered view: ${a}`;let o=!ll(n,cl(e,i));return`Viewpoint: ${i.label} — ${ru(i.concern)}`+(o?` (adjusted).`:`.`)+(n.size===0?``:` ${a}`)}function au(e,t){return`${e}-${t.replace(`#`,``)}`}function ou(e){let t=Oe([$c(e)],Nc(e),120,260);return{width:t,height:Ae(ke($c(e),t).length,je(Nc(e),t).length)}}function su(e,t){let n=e.nodes.filter(e=>!ol(t,`element`,e.kind)),r=new Set(n.map(e=>e.id));return{nodes:n,edges:e.edges.filter(e=>!ol(t,`relationship`,e.kind)&&r.has(e.from)&&r.has(e.to)),containers:e.containers}}function cu(e,t,n){return{label:n===void 0?e:`${e} (same colour as ${n.join(`, `)})`,fill:t.fill,stroke:t.stroke,...t.dash===void 0?{}:{dashed:t.dash},...t.declared===!0?{projectColour:!0}:{}}}function lu(e,t){if(t!==void 0)return{layout:Jc(e,ou,t),orientation:t};let n=Jc(e,ou,`landscape`);if(n.width<=710)return{layout:n,orientation:`landscape`};let r=Jc(e,ou,`portrait`);return h(n.width,r.width)===`portrait`?{layout:r,orientation:`portrait`}:{layout:n,orientation:`landscape`}}function uu(e,t=al){return lu(su(e,t),void 0).orientation}function du(e,t){let n=t.hidden??al,r=t.nudges??new Map,i=t.isProposal,a=su(e,n),{layout:o,orientation:s}=lu(a,t.orientation),c=new Map(o.nodes.map(e=>[e.id,e])),l=e=>{let t=c.get(e);if(t===void 0)return;let n=r.get(e),i=t.x+(n?.dx??0),a=t.y+(n?.dy??0);return{x:i,y:a,cx:i+t.width/2,cy:a+t.height/2,w:t.width,h:t.height}},u=o.containers.map(e=>{let t=zc(a.nodes.filter(t=>t.container===e.id).flatMap(e=>{let t=l(e.id);return t===void 0?[]:[{x:t.x,y:t.y,width:t.w,height:t.h}]}));return t===void 0?e:{...e,...t}}),d=Pl(Il(e.nodes),t.appearance?.kinds),f=Pl(Il(e.edges),t.appearance?.relationshipKinds),p=Fl(Il(e.nodes),d),m=Fl(Il(e.edges),f),h=e=>t=>({...cu(t,(e===`element`?d:f).get(t),(e===`element`?p:m).get(t)),toggles:!0,key:il(e,t),hidden:n.has(il(e,t))}),g=[{title:`elements`,sample:`box`,entries:Il(e.nodes).map(h(`element`))},{title:`relationships`,sample:`line`,entries:Il(e.edges).map(h(`relationship`))}];if(i){let e=new Set([...a.nodes.map(e=>Ac(e,!0)),...a.edges.map(e=>Mc(e,!0))]);g.push({title:`changes`,sample:`box`,entries:Ol.filter(t=>t!==`unchanged`&&e.has(t)).map(e=>({label:Pc[e],fill:Cl,stroke:El[e].stroke,faded:e===`context`}))})}let _=new Map,v=new Map;for(let e of a.edges){let t=JSON.stringify([e.from,e.to]),n=v.get(t)??0;_.set(e,n),v.set(t,n+1)}let y=new Map(o.edges.map(e=>[e.index,e.points])),b=new Map;a.edges.forEach((e,t)=>{let n=y.get(t);n!==void 0&&b.set(e,n)});let x={dx:0,dy:0},S=a.edges.map(e=>{let t=l(e.from),n=l(e.to);if(t===void 0||n===void 0)return;let i=r.has(e.from)||r.has(e.to);return gl(t,e.from===e.to?t:n,b.get(e),_.get(e)??0,i?{from:r.get(e.from)??x,to:r.get(e.to)??x}:void 0)}),C=o.nodes.map(e=>l(e.id)),w=S.flatMap(e=>{let t=e===void 0?void 0:_l(e.d);return t===void 0?[]:[t]}),T=r.size>0&&C.length>0,ee=u.map(e=>({x:e.x,y:e.y,w:e.width,h:e.height})),te=e=>T?[]:[e],E=Math.min(...te(0),...C.map(e=>e.x-12),...ee.map(e=>e.x-12),...w.map(e=>e.minX-12)),D=Math.min(...te(0),...C.map(e=>e.y-12),...ee.map(e=>e.y-14),...w.map(e=>e.minY-14)),ne=Math.max(...te(o.width),...C.map(e=>e.x+e.w+12),...ee.map(e=>e.x+e.w+12),...w.map(e=>e.maxX+12)),re=Math.max(...te(o.height),...C.map(e=>e.y+e.h+12),...ee.map(e=>e.y+e.h+12),...w.map(e=>e.maxY+12)),ie=e=>{let t=Mc(e,i),n=e.kind===void 0?void 0:f.get(e.kind);return{role:t,stroke:n?.stroke??Dl.unchanged,dash:n?.dash,halo:t===`added`||t===`changed`?Dl[t]:void 0,width:t===`context`?1:t===`unchanged`?1.5:1.8,opacity:t===`context`?.6:1}},ae=[...new Set(a.edges.map(e=>ie(e).stroke))],oe=re+4,se=Math.max(ne-E,Zl(g)),ce=iu(e,a,n,i,t.viewpoint),le=t.viewpoint===void 0||ce===void 0?0:nu(ce,se).length*eu+4,ue=re-D+Ql(g,se)+le,de=[];for(let e of u)de.push({id:`container-${e.id}`,data:{container:e.id},primitives:[{shape:`rect`,x:e.x,y:e.y,width:e.width,height:e.height,rx:8,fill:`none`,stroke:Tl,strokeDasharray:`5 3`,opacity:.55},{shape:`text`,x:e.x+8,y:e.y+12,text:e.label,fontSize:10,fill:Tl}]});a.edges.forEach((t,n)=>{let r=l(t.from),i=l(t.to),a=S[n];if(r===void 0||i===void 0||a===void 0)return;let o=ie(t),s=o.stroke,c=Nc(t),u=t.label??t.kind,d=e=>e.length*5.2+8<=a.span,f=[];o.halo!==void 0&&f.push({shape:`path`,data:{edge:`role`},d:a.d,fill:`none`,stroke:o.halo,strokeWidth:o.width+4,strokeLinecap:`round`,opacity:.3}),f.push({shape:`path`,data:{edge:`line`},d:a.d,fill:`none`,stroke:s,strokeWidth:o.width,...o.dash===void 0?{}:{strokeDasharray:o.dash},opacity:o.opacity,markerEnd:au(`se-arrow`,s)}),u!==void 0&&d(u)&&f.push({shape:`text`,x:a.labelAt.x,y:a.labelAt.y-5,text:u,textAnchor:`middle`,fontSize:9,fill:s,fontFamily:M,stroke:Cl,strokeWidth:3,paintOrder:`stroke`});let p=c.map(Me).join(`, `);c.length>0&&d(p)&&f.push({shape:`text`,x:a.labelAt.x,y:a.labelAt.y+10,text:p,textAnchor:`middle`,fontSize:9,fontWeight:600,fill:s,fontFamily:M,stroke:Cl,strokeWidth:3,paintOrder:`stroke`,testId:`relationship-change`}),de.push({id:`edge-${n}`,data:{"relationship-role":o.role,"relationship-shape":t.from===t.to?`loop`:`open`},title:yl(e,t,o.role),primitives:f})});for(let e of a.nodes){let t=l(e.id);if(t===void 0)continue;let n=Ac(e,i);de.push({id:e.id,data:{"element-role":n,"element-id":e.id,draggable:`node`},title:pl(e,n),primitives:Ll({x:t.x,y:t.y,width:t.w,height:t.h,role:n,label:$c(e),...e.kind===void 0?{}:{tint:d.get(e.kind)},changes:Nc(e)})})}let O=t.viewpoint,fe=ce;if(fe!==void 0&&O!==void 0){let e=nu(fe,se);de.push({id:`filter-note`,testId:`diagram-filter-note`,data:{viewpoint:O.id},primitives:e.map((t,n)=>({shape:`text`,x:E+12,y:oe+Ql(g,se)+eu*n+eu-4,text:n<e.length-1?`${t} `:t,fontSize:9,fontWeight:600,fill:`#92400e`,fontFamily:M}))})}else fe!==void 0&&de.push({id:`filter-note`,primitives:[{shape:`text`,x:E+12,y:oe+Ql(g,se)-4,text:fe,fontSize:9,fontWeight:600,fill:`#92400e`,fontFamily:M,testId:`diagram-filter-note`}]});return de.push(...$l(g,E+12,oe,se)),{width:se,height:ue,viewBox:`${E} ${D} ${se} ${ue}`,ariaLabel:a.nodes.length===e.nodes.length&&a.edges.length===e.edges.length?`Graph of ${e.nodes.length} elements and ${e.edges.length} relationships`:`Graph of ${e.nodes.length} elements and ${e.edges.length} relationships, filtered to ${a.nodes.length} elements and ${a.edges.length} relationships`,background:Cl,markers:ae.map(e=>({id:au(`se-arrow`,e),paint:e})),groups:de,...fe===void 0?{}:{narrowing:fe},orientation:s}}function fu(e,t){let n=t.isProposal,r=fl(e),{columns:i,bands:a,bandHeight:o,lifelineX:s,boxW:c,headerHeight:l,messageGap:u}=r,d=o,f=r.xOf,p=Pl(Il(e.participants),t.appearance?.kinds),m=Fl(Il(e.participants),p),h=[{title:`participants`,sample:`box`,entries:Il(e.participants).map(e=>({...cu(e,p.get(e),m.get(e)),key:il(`element`,e)}))}];if(n){let t=new Set([...e.participants.map(e=>Ac(e,!0)),...e.messages.map(e=>Mc(e,!0))]);h.push({title:`changes`,sample:`box`,entries:Ol.filter(e=>e!==`unchanged`&&t.has(e)).map(e=>({label:Pc[e],fill:Cl,stroke:El[e].stroke,faded:e===`context`}))})}let g=r.height+4,_=Math.max(r.width,Zl(h)),v=r.height+Ql(h,_),y=[];for(let e of a){let t=e.from*s+(s-c)/2,n=e.to*s+(s+c)/2;y.push({id:`band-${e.container.id}-${e.from}`,data:{container:e.container.id},primitives:[{shape:`rect`,x:t,y:2,width:n-t,height:d-6,rx:5,fill:`none`,stroke:Tl,strokeDasharray:`5 3`,opacity:.55},{shape:`text`,x:(t+n)/2,y:d-9,text:e.container.label,fontSize:10,textAnchor:`middle`,fill:Tl}]})}for(let e of i)y.push({id:`life-${e.id}`,primitives:[{shape:`line`,x1:f(e.id),y1:o+l,x2:f(e.id),y2:r.height-6,stroke:`#d4d4d8`,strokeDasharray:`3 3`,strokeWidth:1}]});for(let e of i){let t=Ac(e,n);y.push({id:e.id,data:{"element-role":t,"element-id":e.id},title:pl(e,t),primitives:Ll({x:f(e.id)-c/2,y:o+4,width:c,height:l-8,role:t,label:$c(e),...e.kind===void 0?{}:{tint:p.get(e.kind)},changes:Nc(e),anchor:`middle`})})}return e.messages.forEach((t,r)=>{let i=Mc(t,n),a=Dl[i],s=o+l+(r+1)*u,c=f(t.from),d=f(t.to),p=t.from===t.to,m=Nc(t),h=p?c+26+6:(c+d)/2,g=p?`start`:`middle`,_=[];p?_.push({shape:`path`,d:`M ${c} ${s} h 26 v ${u/2} h -26`,fill:`none`,stroke:a,strokeWidth:1.4,markerEnd:au(`se-msg`,a)}):_.push({shape:`line`,x1:c,y1:s,x2:d,y2:s,stroke:a,strokeWidth:1.4,markerEnd:au(`se-msg`,a)}),t.label!==void 0&&_.push({shape:`text`,x:h,y:s-5,text:t.label,textAnchor:g,fontSize:10,fill:wl,fontFamily:M,stroke:Cl,strokeWidth:3,paintOrder:`stroke`}),m.length>0&&_.push({shape:`text`,x:h,y:s+11,text:m.map(Me).join(`, `),textAnchor:g,fontSize:9,fontWeight:600,fill:a,fontFamily:M,stroke:Cl,strokeWidth:3,paintOrder:`stroke`,testId:`relationship-change`}),_.push({shape:`text`,x:4,y:s+3,text:String(r+1),fontSize:9,fill:Tl,fontFamily:M}),y.push({id:`message-${r}`,data:{"relationship-role":i,"message-index":String(r),"message-from":t.from,"message-to":t.to},title:vl(e,t,r,i),primitives:_})}),y.push(...$l(h,12,g,_)),{width:_,height:v,viewBox:`0 0 ${_} ${v}`,ariaLabel:`Sequence of ${e.participants.length} participants and ${e.messages.length} messages`,background:Cl,markers:Ol.map(e=>({id:au(`se-msg`,Dl[e]),paint:Dl[e]})),groups:y}}var pu=`change`,mu=`section`,hu=`level`;function gu(e,t,n){let r=Lc(e),i=(e,t)=>n?.[t]?.role??Rc(e,r),a=e.rows.some((e,t)=>i(e,t)!==void 0),o=e.rows.map((e,t)=>({row:e,role:i(e,t)})).filter(({role:e})=>e===void 0||!t.has(il(`role`,e)));return{shown:o,anyRole:a,withheld:e.rows.length-o.length}}function _u(e,t,n){let{shown:r,anyRole:i,withheld:a}=gu(e,t,n),o=e.rows.some(e=>ce(e).heading!==void 0);return{columns:[...o?[mu,hu]:[],...e.columns,...i?[pu]:[]],rows:r.map(({row:t,role:n})=>{let{cells:r,heading:a}=ce(t),s=Array.isArray(t)?void 0:t.depth,c=o?a===void 0?[null,null]:[a,s??1]:[],l=a===void 0?r:e.columns.map(()=>null);return[...c,...l,...i?[n===void 0?null:Fc[n]]:[]]}),withheld:a}}function vu(e){if(e===null)return``;let t=String(e);return/[",\n\r]/.test(t)?`"${t.replaceAll(`"`,`""`)}"`:t}function yu(e){return[e.columns,...e.rows].map(e=>e.map(vu).join(`,`)).join(`\r
9
- `)}function bu(e){return e===null?``:String(e).replaceAll(`\\`,`\\\\`).replaceAll(`|`,`\\|`).replace(/\r\n|\r|\n/g,`<br>`)}function xu(e){return e.replaceAll(`\\`,`\\\\`).replace(/\r\n|\r|\n/g,` `)}function Su(e,t=new Set,n){let{shown:r,anyRole:i}=gu(e,t,n),a=[...e.columns,...i?[pu]:[]],o=`| ${a.map(e=>bu(e)).join(` | `)} |`,s=`| ${a.map(()=>`---`).join(` | `)} |`,c=[],l=[],u=!1,d=()=>{l.length!==0&&(c.push([o,s,...l].join(`
10
- `)),l=[],u=!0)};for(let{row:e,role:t}of r){let{cells:n,heading:r}=ce(e);if(r!==void 0){d();let t=Array.isArray(e)?1:e.depth??1;c.push(`${`#`.repeat(Math.min(t+1,6))} ${xu(r)}`);continue}let a=[...n,...i?[t===void 0?null:Fc[t]]:[]];l.push(`| ${a.map(bu).join(` | `)} |`)}return d(),!u&&c.length===0&&c.push([o,s].join(`
11
- `)),`${c.join(`
12
-
13
- `)}\n`}function Cu(e,t){r.t(new Blob([``,yu(e)],{type:`text/csv;charset=utf-8`}),t)}async function wu(e,t){let{default:n}=await Promise.resolve().then(()=>require("./browser-CUQnQIhV.cjs")),i=await n([e.columns.map(e=>({value:e,fontWeight:`bold`})),...e.rows.map(e=>e.map(e=>e===null?{value:void 0}:typeof e==`number`?{value:e,type:Number}:typeof e==`boolean`?{value:e,type:Boolean}:{value:e,type:String}))]).toBlob();r.t(i,t)}function Tu(e,t,n,i){r.t(new Blob([Su(e,t,n)],{type:`text/markdown;charset=utf-8`}),i)}var Eu=e=>JSON.parse(JSON.stringify(e));function Du(e){let t=Eu(e);return delete t.comparedTo,t.rows=t.rows.filter(e=>e.type!==`task`||e.role!==`removed`).map(e=>(e.type===`task`&&(delete e.role,e.items=e.items.filter(e=>e.role!==`removed`).map(e=>(delete e.role,delete e.previous,e))),e)),t}var Ou=`#e4e4e7`,ku=`#ea580c`,Au=`#dc2626`,ju=`#2563eb`,Mu={fill:`#e4e4e7`,stroke:`#52525b`},Nu=.35,Pu=.25,Fu=8,Iu=24,Lu=18,Ru=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`];function zu(e,t,n){let r=[];for(let i=0;i<10;i++){let a=i%2==0?n:n*.45,o=-Math.PI/2+i*Math.PI/5;r.push(`${(e+a*Math.cos(o)).toFixed(2)},${(t+a*Math.sin(o)).toFixed(2)}`)}return`M${r.join(`L`)}Z`}function Bu(e,t,n,r,i=1,a=`#a1a1aa`,o=6,s=.5){let c=[],l=i=>{for(let l=o;l<n+r;l+=o){let o=Math.min(l,n),u=Math.max(0,l-n),d=Math.max(0,l-r),f=Math.min(l,r);c.push({shape:`line`,x1:e+(i?n-o:o),y1:t+u,x2:e+(i?n-d:d),y2:t+f,stroke:a,strokeWidth:.6,opacity:s})}};return(i===1||i===3)&&l(!1),(i===2||i===3)&&l(!0),c}function Vu(e){let[t,n,r]=Be(e).split(`-`);return`${Number(r)} ${Ru[Number(n)-1]} ${t}`}function Hu(e,t){let n=Math.floor(t/Te);return e.length<=n?e:`${e.slice(0,Math.max(1,n-1))}…`}function Uu(e,t,n){let r=e.rows[n.row];if(r?.type!==`task`)return``;let i=r.items[n.item],a=i.type===`activity`?`${i.start} to ${i.end}`:i.date,o=i.id===void 0?[]:t.dependencies.filter(e=>e.from===i.id||e.to===i.id),s=o.filter(e=>!e.satisfied).length;return[`${i.type} ${a}`,i.label,i.kind===void 0?void 0:`kind ${i.kind}`,`task "${r.label}" (${r.id})`,o.length===0?void 0:`${o.length} ${o.length===1?`dependency`:`dependencies`}${s>0?`, ${s} not satisfied`:``}`].filter(e=>e!==void 0).join(`, `)}function Wu(e,t){let n=t.comparison===`new`?Du(e):e,r=_t(n),i=(()=>{let e=mt(n,t.today,{compact:t.compact,pxPerDay:1,onlyChanged:t.onlyChanged});return e.end-e.start+1})(),a=et[t.scale??n.time.scale]??et.month,o=!1;if(t.pxPerDay!==void 0)a=t.pxPerDay;else if(t.width!==void 0){let e=(t.width-r-16)/i;a=Math.max(Pu,e),o=e<Pu}let s=t.unit??(t.pxPerDay!==void 0||t.width!==void 0?t.scale:t.scale??n.time.scale),c=mt(n,t.today,{compact:t.compact,pxPerDay:a,onlyChanged:t.onlyChanged,...s===void 0?{}:{unit:s}}),l=Pl(c.kinds,t.appearance?.kinds,{dashes:!1}),u=e=>e===void 0?Mu:l.get(e)??Mu,d=t.referenceLine??`today`,f=t.showDependencies??!0,p=[Tl,Au,ju].map(e=>({id:au(`tl`,e),paint:e})),m=[{id:`header-ground`,primitives:[{shape:`rect`,x:0,y:0,width:c.width,height:58,fill:`#ffffff`},...c.unitLines.map(e=>({shape:`line`,x1:e,x2:e,y1:38,y2:58,stroke:Ou})),{shape:`line`,x1:0,x2:c.width,y1:57.5,y2:57.5,stroke:Tl}]},...c.upper.map(e=>({id:`upper-${e.x}`,testId:`timeline-upper`,primitives:[{shape:`line`,x1:e.x,x2:e.x,y1:18,y2:58,stroke:Tl},{shape:`text`,x:e.x+4,y:32,text:e.label,fontSize:11,fontWeight:600,fill:wl,fontFamily:M,testId:`timeline-upper`}]})),{id:`year-repeats`,primitives:(c.unit===`month`?c.months:[]).filter((e,t)=>t>0&&e.month%3==0&&e.month!==0).map(e=>({shape:`text`,x:e.x+4,y:32,text:String(e.year),fontSize:11,fill:Tl,fontFamily:M,testId:`timeline-year-repeat`}))},{id:`units`,primitives:c.lower.map(e=>({shape:`text`,x:e.x+e.width/2,y:52,text:it(e,c.unit),fontSize:10,textAnchor:`middle`,fill:Tl,fontFamily:M,testId:`timeline-unit`}))}];c.periods.length>0&&m.push({id:`calendar-bands`,primitives:c.periods.map(e=>({shape:`rect`,x:e.x,y:18,width:e.width,height:40,fill:e.kind===void 0?`#a1a1aa`:u(e.kind).stroke,fillOpacity:e.kind===void 0?.1:.12}))}),c.headerLabels.length>0&&m.push({id:`calendar-names`,primitives:c.headerLabels.map(e=>{let t=e.of===`period`?c.periods.find(t=>t.index===e.index)?.kind:c.references.find(t=>t.index===e.index)?.kind;return{shape:`text`,...e.of===`reference`?{x:e.x+e.width/2,textAnchor:`middle`}:{x:e.x},y:12,text:e.text,fontSize:10,fill:t===void 0?Tl:u(t).stroke,fontFamily:M,testId:`timeline-${e.of}-name`}})});let h=d===`dated`?Vu(t.today):`Today`;if(d!==`none`&&`x`in c.today){let e=c.today.x,t=Math.max(44,h.length*6+10);m.push({id:`today-tag`,testId:`timeline-today-tag`,primitives:[{shape:`rect`,x:e-t/2,y:1,width:t,height:15,rx:3,fill:ku},{shape:`text`,x:e,y:12,text:h,fontSize:10,fontWeight:600,textAnchor:`middle`,fill:`#ffffff`,fontFamily:M},{shape:`line`,x1:e,x2:e,y1:16,y2:58,stroke:ku,strokeWidth:2}]})}if(d!==`none`&&`outside`in c.today){let e=c.today.outside===`before`,t=d===`dated`?Vu(c.today.day):`Today (${Be(c.today.day)})`;m.push({id:`today-outside`,primitives:[{shape:`text`,x:e?4:c.width-4,y:12,text:e?`◂ ${t} is before this range`:`${t} is after this range ▸`,fontSize:10,fontWeight:600,textAnchor:e?`start`:`end`,fill:ku,fontFamily:M,testId:`timeline-today-outside`,data:{side:c.today.outside}}]})}let g=(()=>{if(t.selection===void 0)return;let e=n.rows[t.selection.row];if(e?.type===`task`)return t.selection.item===void 0?e.id:e.items[t.selection.item]?.id})(),_=e=>g!==void 0&&(e.from===g||e.to===g),v=[{id:`rows-ground`,primitives:[{shape:`rect`,x:0,y:0,width:c.width,height:c.height,fill:`#ffffff`},...c.unitLines.map(e=>({shape:`line`,x1:e,x2:e,y1:0,y2:c.height,stroke:Ou}))]},...c.rows.map(e=>e.type===`separator`?{id:`separator-${e.row}`,testId:`timeline-separator`,primitives:[{shape:`rect`,x:0,y:e.y,width:c.width,height:e.height,fill:`#f4f4f5`},{shape:`line`,x1:0,x2:c.width,y1:e.y+.5,y2:e.y+.5,stroke:`#a1a1aa`,strokeWidth:1.5}]}:e.type===`section`?{id:`section-${e.row}`,testId:`timeline-section`,primitives:[{shape:`line`,x1:0,x2:c.width,y1:e.y+.5,y2:e.y+.5,stroke:`#a1a1aa`,strokeWidth:1.5}]}:{id:`row-${e.row}`,primitives:[{shape:`line`,x1:0,x2:c.width,y1:e.y+.5,y2:e.y+.5,stroke:`#f4f4f5`}]})];for(let e of c.periods){let t=n.periods[e.index],r=`${t.label??`Period`}: ${Vu(ze(t.start))} – ${Vu(ze(t.end))}`,i=[{shape:`rect`,x:e.x,y:0,width:e.width,height:c.height,fill:e.kind===void 0?`#a1a1aa`:u(e.kind).stroke,fillOpacity:e.kind===void 0?.1:.12}];e.kind===void 0&&i.push(...Bu(e.x,0,e.width,c.height)),v.push({id:`period-${e.index}`,testId:`timeline-period`,title:r,data:{...e.kind?{kind:e.kind}:{}},primitives:i})}for(let e of c.references){let t=e.kind===void 0?`#3f3f46`:u(e.kind).stroke;v.push({id:`reference-${e.index}`,testId:`timeline-reference`,title:`${e.label}: ${Vu(ze(e.date))}`,data:{...e.kind?{kind:e.kind}:{}},primitives:[{shape:`line`,x1:e.x,x2:e.x,y1:0,y2:c.height,stroke:t,strokeWidth:1.5,strokeDasharray:`6 3`}]})}if(f)for(let e of c.dependencies){let t=_(e),r=t?ju:e.satisfied?Tl:Au,i=n.dependencies[e.index];v.push({id:`dependency-${e.index}`,testId:`timeline-dependency`,title:yt(n,i,e.satisfied),data:{from:e.from,to:e.to,type:e.type,satisfied:String(e.satisfied),emphasised:String(t)},primitives:[{shape:`path`,d:`M${e.points.map(e=>`${e.x},${e.y}`).join(` L`)}`,stroke:r,strokeWidth:t?2.25:1.25,...e.satisfied?{}:{strokeDasharray:`4 3`},markerEnd:au(`tl`,r)}]})}for(let e of c.items){let r=u(e.kind),i=t.selection?.row===e.row&&t.selection.item===e.item,a=[],o=e.change===`removed`;if(e.ghost!==void 0&&(e.type===`activity`?a.push({shape:`rect`,x:e.ghost.x,y:e.ghost.y,width:e.ghost.width,height:e.ghost.height,rx:3,fill:`none`,stroke:r.stroke,strokeWidth:1.25,strokeDasharray:`4 3`,data:{previous:`true`}}):e.ghostCenter!==void 0&&(e.ghostCenter.y===e.center.y&&a.push({shape:`line`,x1:e.ghostCenter.x,x2:e.center.x,y1:e.center.y,y2:e.center.y,stroke:Tl,strokeWidth:1,strokeDasharray:`2 2`}),a.push({shape:`path`,d:zu(e.ghostCenter.x,e.ghostCenter.y,7),fill:`none`,stroke:r.stroke,strokeWidth:1,strokeDasharray:`2 2`,data:{previous:`true`}}))),o)a.push(e.type===`activity`?{shape:`rect`,x:e.glyph.x,y:e.glyph.y,width:e.glyph.width,height:e.glyph.height,rx:3,fill:`none`,stroke:r.stroke,strokeWidth:1.25,strokeDasharray:`4 3`}:{shape:`path`,d:zu(e.center.x,e.center.y,7),fill:`none`,stroke:r.stroke,strokeWidth:1,strokeDasharray:`2 2`});else if(e.type===`activity`){let t=e.kind!==void 0;a.push({shape:`rect`,x:e.glyph.x,y:e.glyph.y,width:e.glyph.width,height:e.glyph.height,rx:3,fill:t?r.stroke:r.fill,...t?{fillOpacity:Nu}:{},stroke:i?ju:r.stroke,strokeWidth:i?2.5:1.25}),r.hatch!==void 0&&a.push(...Bu(e.glyph.x,e.glyph.y,e.glyph.width,e.glyph.height,r.hatch,r.stroke,4,.8))}else a.push({shape:`path`,d:zu(e.center.x,e.center.y,7),fill:r.stroke,stroke:i?ju:`#ffffff`,strokeWidth:i?2:.75});e.label!==void 0&&a.push({shape:`text`,x:e.label.x,y:e.label.y+12,...e.label.note!==void 0&&e.label.text.endsWith(e.label.note)?{text:e.label.text.slice(0,-e.label.note.length).trimEnd(),note:e.label.note}:{text:e.label.text},fontSize:11,fill:wl,fontFamily:M,testId:`timeline-annotation`,...e.label.struck?{textDecoration:`line-through`}:{},...e.label.inside?{}:{stroke:`#ffffff`,strokeWidth:3,paintOrder:`stroke`}}),v.push({id:`item-${e.row}-${e.item}`,testId:`timeline-${e.type}`,title:Uu(n,c,e),data:{row:String(e.row),item:String(e.item),...e.kind===void 0?{}:{kind:e.kind},...e.change===void 0?{}:{change:e.change},selected:String(i)},primitives:a})}d!==`none`&&`x`in c.today&&v.push({id:`today`,testId:`timeline-today`,primitives:[{shape:`line`,x1:c.today.x,x2:c.today.x,y1:0,y2:c.height,stroke:ku,strokeWidth:2,opacity:.85}]});let y=c.rows.map(e=>{let t=58+e.y,n=e.type===`section`?`${e.label??``} (${e.tasks.length})`.trim():e.type===`separator`?e.label??``:e.label,i=e.type!==`task`;return{id:`label-${e.row}`,primitives:[...i?[{shape:`line`,x1:0,x2:r,y1:t+.5,y2:t+.5,stroke:`#a1a1aa`,strokeWidth:1}]:[],{shape:`text`,x:8,y:e.type===`separator`?t+e.height-6:t+e.height/2+4,text:Hu(n,r-12),fontSize:11,...i?{fontWeight:600}:{},fill:i?Tl:wl,fontFamily:M}]}}),b=new Map;for(let e of n.rows)if(e.type===`task`)for(let t of e.items){if(t.kind===void 0)continue;let e=b.get(t.kind)??{activity:!1,milestone:!1};e[t.type]=!0,b.set(t.kind,e)}let x=Fl(c.kinds,l),S=[],C=0,w=0,T=r+c.width;for(let e of c.kinds){let t=u(e),n=b.get(e);if(n===void 0)continue;let r=x.has(e)?`${e} (same colour as ${x.get(e).join(`, `)})`:e,i=(n.activity?22:0)+(n.milestone?16:0)+r.length*Te+18;C>0&&C+i>T&&(C=0,w+=1);let a=w*Lu,o=[],s=C;n.activity&&(o.push({shape:`rect`,x:s,y:a+4,width:16,height:8,rx:2,fill:t.stroke,stroke:t.stroke,fillOpacity:Nu}),t.hatch!==void 0&&o.push(...Bu(s,a+4,16,8,t.hatch,t.stroke,4,.8)),s+=22),n.milestone&&(o.push({shape:`path`,d:zu(s+6,a+8,6),fill:t.stroke}),s+=16),o.push({shape:`text`,x:s,y:a+12,text:r,fontSize:10,fill:Tl,fontFamily:M}),S.push({id:`legend-${e}`,...t.declared===!0?{title:`${e} — project colour`,data:{kind:e,"colour-source":`project`}}:{data:{kind:e}},primitives:o}),C+=i}let ee=[...c.periods.map(e=>({kind:e.kind,line:!1,text:n.periods[e.index].label??`Period`})),...c.references.map(e=>({kind:e.kind,line:!0,text:e.label}))];if(ee.length>0&&(C>0&&(C=0,w+=1),ee.forEach((e,t)=>{let n=22+e.text.length*Te+18;C>0&&C+n>T&&(C=0,w+=1);let r=w*Lu,i=e.kind===void 0?e.line?`#3f3f46`:`#a1a1aa`:u(e.kind).stroke;S.push({id:`legend-calendar-${t}`,testId:`timeline-calendar-legend`,primitives:[e.line?{shape:`line`,x1:C+8,x2:C+8,y1:r+2,y2:r+14,stroke:i,strokeWidth:1.5,strokeDasharray:`3 2`}:{shape:`rect`,x:C,y:r+3,width:16,height:10,fill:i,fillOpacity:.25},{shape:`text`,x:C+22,y:r+12,text:e.text,fontSize:10,fill:Tl,fontFamily:M}]}),C+=n})),n.comparedTo!==void 0){C>0&&(C=0,w+=1);let e=w*Lu,t=[{shape:`rect`,x:0,y:e+4,width:16,height:8,rx:2,fill:`none`,stroke:Tl,strokeDasharray:`4 3`},{shape:`text`,x:22,y:e+12,text:`previous dates (${n.comparedTo.label})`,fontSize:10,fill:Tl,fontFamily:M}],r=22+(`previous dates (${n.comparedTo.label})`.length+3)*Te;t.push({shape:`text`,x:r,y:e+12,text:`(new)`,fontStyle:`italic`,fontSize:10,fill:Tl,fontFamily:M},{shape:`text`,x:r+5*Te,y:e+12,text:`: added since`,fontSize:10,fill:Tl,fontFamily:M},{shape:`text`,x:r+20*Te,y:e+12,text:`removed`,fontSize:10,fill:Tl,fontFamily:M,textDecoration:`line-through`},{shape:`text`,x:r+28*Te,y:e+12,text:`: dropped since`,fontSize:10,fill:Tl,fontFamily:M}),S.push({id:`legend-comparison`,testId:`timeline-comparison-legend`,primitives:t})}let te=S.length===0?0:(w+1)*Lu+6;return{layout:c,pxPerDay:a,overWidth:o,labelWidth:r,tints:l,markers:p,header:m,rows:v,labels:y,legend:{groups:S,height:te}}}function Gu(e,t,n){let r=e=>{switch(e.shape){case`rect`:case`text`:return{...e,x:e.x+t,y:e.y+n};case`line`:return{...e,x1:e.x1+t,x2:e.x2+t,y1:e.y1+n,y2:e.y2+n};case`path`:return{...e,d:Ku(e.d,t,n)}}};return{...e,primitives:e.primitives.map(r),...e.groups?{groups:e.groups.map(e=>Gu(e,t,n))}:{}}}function Ku(e,t,n){return e.replace(/(-?\d+(?:\.\d+)?),(-?\d+(?:\.\d+)?)/g,(e,r,i)=>`${+(Number(r)+t).toFixed(2)},${+(Number(i)+n).toFixed(2)}`)}function qu(e,t){let n=Wu(e,{...t,selection:void 0}),r=t.comparison===`new`?void 0:e.comparedTo,i=Fu+(e.title?Iu:0)+(r?18:0),a=Fu,o=a+n.labelWidth,s=[];if(e.title&&s.push({id:`title`,primitives:[{shape:`text`,x:a,y:23,text:e.title,fontSize:13,fontWeight:600,fill:wl,fontFamily:M}]}),r){let t=Fu+(e.title?Iu:0)+12;s.push({id:`compared-to`,testId:`timeline-compared-to`,primitives:[{shape:`text`,x:a,y:t,text:`Compared with ${r.label}${r.date?` (${Vu(ze(r.date)??0)})`:``}`,fontSize:11,fill:Tl,fontFamily:M}]})}s.push(...n.header.map(e=>Gu(e,o,i))),s.push(...n.rows.map(e=>Gu(e,o,i+58))),s.push(...n.labels.map(e=>Gu(e,a,i)));let c=i+58+n.layout.height+10;s.push(...n.legend.groups.map(e=>Gu(e,a,c)));let l=Math.ceil(o+n.layout.width+Fu),u=Math.ceil(c+n.legend.height+Fu);return{width:l,height:u,viewBox:`0 0 ${l} ${u}`,ariaLabel:`Timeline${e.title?` "${e.title}"`:``} from ${e.time.start} to ${e.time.end}`,background:`#ffffff`,markers:n.markers,groups:s,overWidth:n.overWidth}}var Ju=.21,Yu=.65;function Xu(e){return e<=.04045?e/12.92:((e+.055)/1.055)**2.4}function Zu(e){return e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055}function Qu(e,t,n){let r=Xu(e),i=Xu(t),a=Xu(n),o=Math.cbrt(.4122214708*r+.5363325363*i+.0514459929*a),s=Math.cbrt(.2119034982*r+.6806995451*i+.1073969566*a),c=Math.cbrt(.0883024619*r+.2817188376*i+.6299787005*a);return{l:.2104542553*o+.793617785*s-.0040720468*c,a:1.9779984951*o-2.428592205*s+.4505937099*c,b:.0259040371*o+.7827717662*s-.808675766*c}}function $u({l:e,a:t,b:n}){let r=(e+.3963377774*t+.2158037573*n)**3,i=(e-.1055613458*t-.0638541728*n)**3,a=(e-.0894841775*t-1.291485548*n)**3;return[4.0767416621*r-3.3077115913*i+.2309699292*a,-1.2684380046*r+2.6097574011*i-.3413193965*a,-.0041960863*r-.7034186147*i+1.707614701*a]}var ed=e=>e.every(e=>e>=-1e-4&&e<=1.0001);function td(e){return`#${e.map(e=>Math.round(Math.min(1,Math.max(0,Zu(Math.min(1,Math.max(0,e)))))*255).toString(16).padStart(2,`0`)).join(``)}`}var nd=/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i,rd=new Map;function id(e){if(!nd.test(e))return e;let t=rd.get(e);if(t!==void 0)return t;let[n,r,i]=(e.length===4?[...e.slice(1)].map(e=>e+e):[1,3,5].map(t=>e.slice(t,t+2))).map(e=>Number.parseInt(e,16)/255),a=Qu(n,r,i),o=Ju+.73*(1-Math.min(1,Math.max(0,a.l)))**Yu,s=1,c=$u({l:o,a:a.a,b:a.b});if(!ed(c)){let e=0,t=1;for(let n=0;n<20;n++)s=(e+t)/2,ed($u({l:o,a:a.a*s,b:a.b*s}))?e=s:t=s;s=e,c=$u({l:o,a:a.a*s,b:a.b*s})}let l=td(c);return rd.set(e,l),l}function ad(e){if(e!==void 0&&nd.test(e))return`light-dark(${e}, ${id(e)})`}function od(e){let t=ad(e.fill),n=ad(e.stroke);if(t!==void 0||n!==void 0)return{...t===void 0?{}:{fill:t},...n===void 0?{}:{stroke:n}}}function sd({primitive:e}){let t=Object.fromEntries(Object.entries(e.data??{}).map(([e,t])=>[`data-${e}`,t]));switch(e.shape){case`rect`:return(0,o.jsx)(`rect`,{...t,x:e.x,y:e.y,width:e.width,height:e.height,rx:e.rx,fill:e.fill,fillOpacity:e.fillOpacity,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.strokeDasharray,opacity:e.opacity,style:od(e)});case`text`:{let n={x:e.x,y:e.y,fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontStyle:e.fontStyle,textAnchor:e.textAnchor},r=(0,o.jsxs)(o.Fragment,{children:[e.text,e.note!==void 0&&(0,o.jsxs)(o.Fragment,{children:[` `,(0,o.jsx)(`tspan`,{fontStyle:`italic`,children:e.note})]})]}),i=e.paintOrder===`stroke`,a=(0,o.jsx)(`text`,{...t,"data-testid":e.testId,...n,fill:e.fill,stroke:i?void 0:e.stroke,strokeWidth:i?void 0:e.strokeWidth,textDecoration:e.textDecoration,opacity:e.opacity,style:od({fill:e.fill,stroke:i?void 0:e.stroke}),children:r});return i?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`text`,{...n,fill:e.stroke,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,style:od({fill:e.stroke,stroke:e.stroke}),"aria-hidden":`true`,children:r}),a]}):a}case`line`:return(0,o.jsx)(`line`,{...t,x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.strokeDasharray,opacity:e.opacity,markerEnd:e.markerEnd===void 0?void 0:`url(#${e.markerEnd})`,style:od(e)});case`path`:return(0,o.jsx)(`path`,{...t,d:e.d,fill:e.fill??`none`,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.strokeDasharray,strokeLinecap:e.strokeLinecap,opacity:e.opacity,markerEnd:e.markerEnd===void 0?void 0:`url(#${e.markerEnd})`,pointerEvents:`none`,style:od(e)})}}function cd({group:e,interaction:t}){let n=Object.fromEntries(Object.entries(e.data??{}).map(([e,t])=>[`data-${e}`,t])),{extra:r,before:i}=t?.(e)??{};return(0,o.jsxs)(`g`,{...n,"data-testid":e.testId,opacity:e.opacity,...r,children:[e.title===void 0?null:(0,o.jsx)(`title`,{children:e.title}),i,e.primitives.map((e,t)=>(0,o.jsx)(sd,{primitive:e},t)),(e.groups??[]).map(e=>(0,o.jsx)(cd,{group:e,interaction:t},e.id))]})}function ld({markers:e}){return(0,o.jsx)(`defs`,{children:e.map(e=>(0,o.jsx)(`marker`,{id:e.id,markerWidth:`7`,markerHeight:`7`,refX:`9`,refY:`5`,viewBox:`0 0 10 10`,markerUnits:`userSpaceOnUse`,orient:`auto`,children:(0,o.jsx)(`path`,{d:`M0,0 L10,5 L0,10 z`,fill:e.paint,style:od({fill:e.paint})})},e.id))})}var ud=`#2563eb`,dd={fill:`#e4e4e7`,stroke:`#52525b`};function fd(e){let t=e.replace(/[^\p{L}\p{N}._-]+/gu,`-`),n=0,r=t.length;for(;n<r&&t[n]===`-`;)n+=1;for(;r>n&&t[r-1]===`-`;)--r;return t.slice(n,r)}var pd=[`week`,`month`,`quarter`,`fit`];function md(e){return{scale:e.time.scale,compact:!1,showDependencies:!0,comparison:`compare`,onlyChanged:!1}}function hd(e){return e.type===`activity`?`${e.start} to ${e.end}`:e.date}function gd({data:e,today:t,appearance:n,display:r,onDisplayChange:i,onSelect:s,saveFigure:c,exportRef:l}){let u=t??Ve(),[d,f]=(0,a.useState)(()=>md(e)),p=r??d,m=i??f,h=e=>t=>m(n=>({...n,[e]:typeof t==`function`?t(n[e]):t})),g=e.comparedTo!==void 0,{comparison:_,onlyChanged:v,compact:y,showDependencies:b,scale:x}=p,S=h(`comparison`),C=h(`onlyChanged`),w=(0,a.useMemo)(()=>g&&_===`new`?Du(e):e,[e,g,_]),T=g&&_===`compare`&&v,ee=h(`compact`),te=h(`showDependencies`),[E,D]=(0,a.useState)(void 0),ne=h(`scale`),re=(0,a.useRef)(null),[ie,ae]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=re.current;if(e===null||(ae(e.clientWidth),typeof ResizeObserver>`u`))return;let t=0,n=new ResizeObserver(()=>{cancelAnimationFrame(t),t=requestAnimationFrame(()=>ae(e.clientWidth))});return n.observe(e),()=>{cancelAnimationFrame(t),n.disconnect()}},[]);let oe=(ze(w.time.end)??0)-(ze(w.time.start)??0)+1,se=ie>0?ie/oe:0,ce=x===`fit`?{pxPerDay:Math.max(Pu,se)}:{pxPerDay:Math.max(et[x],se),unit:x},[le,ue]=(0,a.useState)(void 0),de=(0,a.useMemo)(()=>Wu(w,{today:u,compact:y,showDependencies:b,appearance:n??null,referenceLine:`today`,onlyChanged:T,...ce,...E===void 0?{}:{selection:E.type===`item`?{row:E.row,item:E.item}:{row:E.row}}}),[w,u,y,b,n,E,T,x,ie]),O=de.layout,fe=de.tints,pe=(0,a.useMemo)(()=>{let e=!1;for(let t of w.rows)if(t.type===`separator`)e=!0;else if(e)return!0;return!1},[w]),me=(0,a.useMemo)(()=>Fl(O.kinds,fe),[O.kinds,fe]),he=(0,a.useMemo)(()=>_t(w),[w]),ge=(0,a.useMemo)(()=>{let e=new Map;for(let t of w.rows)if(t.type===`task`)for(let n of t.items){if(n.kind===void 0)continue;let t=e.get(n.kind)??{activity:!1,milestone:!1};t[n.type]=!0,e.set(n.kind,t)}return e},[w]),_e=e=>e===void 0?dd:fe.get(e)??dd,ve=(e,t)=>e!==void 0&&e.type===t.type&&e.row===t.row&&(e.type===`task`||t.type===`item`&&e.item===t.item),ye=e=>{let t=ve(E,e);if(D(t=>ve(t,e)?void 0:e),!s)return;let n=w.rows[e.row];if(t||n?.type!==`task`)return s(void 0);s(e.type===`item`?{task:n,item:n.items[e.item]}:{task:n})},be=(e,t)=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),ye(t))},xe=e=>{let t=e.data?.row,n=e.data?.item;if(e.testId!==`timeline-activity`&&e.testId!==`timeline-milestone`||t===void 0||n===void 0)return{};let r={type:`item`,row:Number(t),item:Number(n)},i=`${t}:${n}`,a=O.items.find(e=>e.row===r.row&&e.item===r.item);return{extra:{role:`button`,tabIndex:0,"aria-label":e.title,"aria-pressed":e.data?.selected===`true`,style:{cursor:`pointer`,outline:`none`},onClick:()=>ye(r),onKeyDown:e=>be(e,r),onFocus:()=>ue(i),onBlur:()=>ue(e=>e===i?void 0:e)},before:a===void 0?void 0:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`rect`,{"data-testid":`timeline-hit`,x:a.glyph.x,y:a.glyph.y,width:a.glyph.width,height:a.glyph.height,fill:`transparent`}),le===i&&(0,o.jsx)(`rect`,{"data-testid":`timeline-focus-ring`,x:a.glyph.x-3,y:a.glyph.y-3,width:a.glyph.width+6,height:a.glyph.height+6,rx:4,fill:`none`,stroke:ud,strokeWidth:1.5,strokeDasharray:`3 2`,style:od({stroke:ud})})]})}},[Se,Ce]=(0,a.useState)(null),we=()=>Ul(qu(w,{today:u,compact:y,showDependencies:b,onlyChanged:T,appearance:n??null,referenceLine:`dated`,...ce})),Te=`timeline-${fd(w.title??`plan`)||`plan`}.svg`,Ee=async()=>{if(c){let e=await c(Te,we()).catch(()=>!1);Ce(e===!1?`could not save`:e)}else{let e=URL.createObjectURL(new Blob([we()],{type:`image/svg+xml`})),t=document.createElement(`a`);t.href=e,t.download=Te,t.click(),URL.revokeObjectURL(e),Ce(`SVG downloaded`)}window.setTimeout(()=>Ce(null),2500)};(0,a.useImperativeHandle)(l,()=>({svg:()=>void Ee()}));let De=async()=>{Ce(await Ht(we())?`SVG markup copied`:`could not copy`),window.setTimeout(()=>Ce(null),2500)};(0,a.useEffect)(()=>{let e=re.current;if(e===null)return;let t=pt(O,e.clientWidth);t!==void 0&&(e.scrollLeft=t)},[]);let Oe=(0,a.useRef)(void 0),ke=e=>{let t=re.current;t!==null&&(Oe.current=O.start+(t.scrollLeft+t.clientWidth/2)/de.pxPerDay),ne(e)};return(0,a.useLayoutEffect)(()=>{let e=re.current,t=Oe.current;Oe.current=void 0,e!==null&&t!==void 0&&(e.scrollLeft=Math.max(0,(t-O.start)*de.pxPerDay-e.clientWidth/2))},[de.pxPerDay,O.start]),(0,o.jsxs)(`div`,{"data-testid":`timeline`,className:`w-full min-w-0 rounded border border-zinc-200 bg-white text-zinc-800 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100`,onKeyDown:e=>{e.key===`Escape`&&D(void 0)},children:[w.title!==void 0&&w.title!==``&&(0,o.jsx)(`p`,{className:`border-b border-zinc-200 px-2 py-1 text-sm font-medium dark:border-zinc-700`,"data-testid":`timeline-title`,children:w.title}),g&&_===`compare`&&(0,o.jsxs)(`p`,{className:`border-b border-zinc-200 px-2 py-0.5 text-xs text-zinc-500 dark:border-zinc-700 dark:text-zinc-400`,"data-testid":`timeline-compared-to`,children:[`Compared with `,(0,o.jsx)(`span`,{className:`font-medium text-zinc-700 dark:text-zinc-200`,children:e.comparedTo.label}),e.comparedTo.date===void 0?``:` (${e.comparedTo.date})`]}),(0,o.jsxs)(`div`,{className:`flex`,children:[(0,o.jsxs)(`div`,{className:`shrink-0 border-r border-zinc-200 text-xs dark:border-zinc-700`,style:{width:he},"data-testid":`timeline-labels`,children:[(0,o.jsx)(`div`,{style:{height:58}}),O.rows.map(e=>e.type===`section`?(0,o.jsxs)(`div`,{"data-testid":`timeline-section-label`,className:`flex items-center border-t border-zinc-400 px-2 font-semibold text-zinc-600 dark:border-zinc-600 dark:text-zinc-300`,style:{height:e.height},title:`${e.label??`Untitled section`}: ${e.tasks.length} ${e.tasks.length===1?`task`:`tasks`}`,children:[(0,o.jsx)(`span`,{className:`truncate`,children:e.label??``}),(0,o.jsxs)(`span`,{className:`ml-1 shrink-0 font-normal text-zinc-400 dark:text-zinc-500`,children:[`(`,e.tasks.length,`)`]})]},e.row):e.type===`separator`?(0,o.jsx)(`div`,{"data-testid":`timeline-separator-label`,className:`flex items-end border-t border-zinc-400 px-2 font-semibold text-zinc-600 dark:border-zinc-600 dark:text-zinc-300`,style:{height:e.height},children:e.label??``},e.row):(0,o.jsx)(`button`,{type:`button`,"data-testid":`timeline-task-label`,"aria-pressed":E?.type===`task`&&E.row===e.row,className:`block w-full truncate border-t border-zinc-100 px-2 text-left hover:bg-zinc-50 dark:border-zinc-800 dark:hover:bg-zinc-800 `+(E?.type===`task`&&E.row===e.row?`bg-blue-50 font-medium dark:bg-blue-950/50`:``),style:{height:e.height},title:`${e.label} (${e.id})`,onClick:()=>ye({type:`task`,row:e.row}),children:e.label},e.row))]}),(0,o.jsxs)(`div`,{ref:re,className:`min-w-0 flex-1 overflow-x-auto`,"data-testid":`timeline-scroller`,children:[(0,o.jsx)(`svg`,{width:O.width,height:58,role:`img`,"aria-label":`Calendar from ${w.time.start} to ${w.time.end}`,"data-testid":`timeline-header`,xmlns:`http://www.w3.org/2000/svg`,style:{display:`block`},children:de.header.map(e=>(0,o.jsx)(cd,{group:e},e.id))}),(0,o.jsxs)(`svg`,{width:O.width,height:O.height,role:`group`,"aria-label":`Tasks and items${w.title?` of ${w.title}`:``}`,"data-testid":`timeline-body`,xmlns:`http://www.w3.org/2000/svg`,style:{display:`block`},children:[(0,o.jsx)(ld,{markers:de.markers}),de.rows.map(e=>(0,o.jsx)(cd,{group:e,interaction:xe},e.id))]})]})]}),(0,o.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-t border-zinc-200 px-2 py-1 text-xs dark:border-zinc-700`,children:[(0,o.jsx)(`span`,{className:`flex items-center gap-1 text-zinc-500 dark:text-zinc-400`,role:`group`,"aria-label":`Scale`,"data-testid":`timeline-scale`,children:pd.map((e,t)=>(0,o.jsxs)(`span`,{className:`flex items-center gap-1`,children:[t>0&&(0,o.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,o.jsx)(`button`,{type:`button`,"data-scale":e,"aria-pressed":x===e,className:x===e?`font-semibold text-zinc-800 dark:text-zinc-100`:`text-zinc-600 underline dark:text-zinc-300`,onClick:()=>ke(e),children:e})]},e))}),g&&(0,o.jsx)(`button`,{type:`button`,"data-testid":`timeline-comparison-toggle`,"aria-pressed":_===`new`,className:`text-zinc-600 underline dark:text-zinc-300`,onClick:()=>{D(void 0),S(e=>e===`compare`?`new`:`compare`)},children:_===`compare`?`new version only`:`show the comparison`}),g&&_===`compare`&&(0,o.jsx)(`button`,{type:`button`,"data-testid":`timeline-only-changed-toggle`,"aria-pressed":v,className:`text-zinc-600 underline dark:text-zinc-300`,onClick:()=>{D(void 0),C(e=>!e)},children:v?`show every task`:`only what moved`}),T&&O.hiddenTasks>0&&(0,o.jsxs)(`span`,{className:`text-amber-700 dark:text-amber-400`,"data-testid":`timeline-unchanged-hidden`,children:[O.hiddenTasks,` unchanged `,O.hiddenTasks===1?`task`:`tasks`,` hidden`]}),pe&&(0,o.jsx)(`button`,{type:`button`,"data-testid":`timeline-compact-toggle`,"aria-pressed":y,className:`text-zinc-600 underline dark:text-zinc-300`,onClick:()=>{D(e=>e?.type===`task`?void 0:e),ee(e=>!e)},children:y?`one row per task`:`one row per section`}),(w.dependencies??[]).length>0&&(0,o.jsx)(`button`,{type:`button`,"data-testid":`timeline-dependencies-toggle`,"aria-pressed":!b,className:`text-zinc-600 underline dark:text-zinc-300`,onClick:()=>te(e=>!e),children:b?`hide dependencies`:`show dependencies`}),!b&&(0,o.jsxs)(`span`,{className:`text-amber-700 dark:text-amber-400`,"data-testid":`timeline-dependencies-hidden`,children:[O.dependencies.length,` `,O.dependencies.length===1?`dependency`:`dependencies`,` hidden`,O.dependencies.some(e=>!e.satisfied)?`, some not satisfied by the dates`:``]}),(0,o.jsx)(`button`,{type:`button`,"data-testid":`timeline-download-svg`,className:`text-zinc-600 underline dark:text-zinc-300`,onClick:()=>void Ee(),children:`⤓ download SVG`}),(0,o.jsx)(`button`,{type:`button`,"data-testid":`timeline-copy-svg`,className:`text-zinc-600 underline dark:text-zinc-300`,onClick:()=>void De(),children:`copy markup`}),Se!==null&&(0,o.jsx)(`span`,{role:`status`,className:`text-emerald-700 dark:text-emerald-400`,children:Se})]}),g&&_===`compare`&&(0,o.jsxs)(`p`,{className:`flex flex-wrap items-center gap-3 border-t border-zinc-200 px-2 py-1 text-xs text-zinc-500 dark:border-zinc-700 dark:text-zinc-400`,"data-testid":`timeline-comparison-key`,children:[(0,o.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,o.jsx)(`svg`,{width:18,height:12,"aria-hidden":`true`,children:(0,o.jsx)(`rect`,{x:1,y:2,width:16,height:8,rx:2,fill:`none`,stroke:`#71717a`,strokeDasharray:`4 3`,style:od({stroke:`#71717a`})})}),`previous dates`]}),(0,o.jsxs)(`span`,{children:[(0,o.jsx)(`i`,{children:`(new)`}),`: added since`]}),(0,o.jsxs)(`span`,{children:[(0,o.jsx)(`span`,{className:`line-through`,children:`removed`}),`: dropped since`]})]}),(O.periods.length>0||O.references.length>0)&&(0,o.jsxs)(`ul`,{className:`flex flex-wrap gap-3 border-t border-zinc-200 px-2 py-1 text-xs text-zinc-600 dark:border-zinc-700 dark:text-zinc-300`,"data-testid":`timeline-calendar-legend`,children:[O.periods.map(e=>{let t=w.periods[e.index];return(0,o.jsxs)(`li`,{className:`flex items-center gap-1`,"data-period":e.index,title:`${t.label??`Period`}: ${t.start} – ${t.end}`,children:[(0,o.jsx)(`span`,{"aria-hidden":`true`,className:`inline-block h-2.5 w-4 rounded-sm`,style:{background:ad(e.kind===void 0?`#a1a1aa`:_e(e.kind).stroke),opacity:.35}}),t.label??`Period`]},`p${e.index}`)}),O.references.map(e=>(0,o.jsxs)(`li`,{className:`flex items-center gap-1`,"data-reference":e.index,title:`${e.label}: ${w.references[e.index].date}`,children:[(0,o.jsx)(`span`,{"aria-hidden":`true`,className:`inline-block h-3 border-l-2 border-dashed`,style:{borderColor:ad(e.kind===void 0?`#3f3f46`:_e(e.kind).stroke)}}),e.label]},`r${e.index}`))]}),O.kinds.some(e=>ge.has(e))&&(0,o.jsx)(`ul`,{className:`flex flex-wrap gap-3 border-t border-zinc-200 px-2 py-1 text-xs dark:border-zinc-700`,"data-testid":`timeline-legend`,children:O.kinds.filter(e=>ge.has(e)).map(e=>{let t=_e(e);return(0,o.jsxs)(`li`,{className:`flex items-center gap-1`,"data-kind":e,...t.declared===!0?{"data-colour-source":`project`,title:`${e} — project colour`}:{},children:[ge.get(e)?.activity&&(0,o.jsxs)(`svg`,{width:18,height:12,"aria-hidden":`true`,"data-testid":`timeline-legend-bar`,children:[(0,o.jsx)(`rect`,{x:1,y:2,width:16,height:8,rx:2,fill:t.stroke,fillOpacity:.35,stroke:t.stroke,style:od({fill:t.stroke,stroke:t.stroke})}),t.hatch!==void 0&&Bu(1,2,16,8,t.hatch,t.stroke,4,.8).map((e,t)=>e.shape===`line`?(0,o.jsx)(`line`,{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,style:od({stroke:e.stroke})},t):null)]}),ge.get(e)?.milestone&&(0,o.jsx)(`svg`,{width:14,height:14,"aria-hidden":`true`,"data-testid":`timeline-legend-star`,children:(0,o.jsx)(`path`,{d:zu(7,7,6),fill:t.stroke,style:od({fill:t.stroke})})}),(0,o.jsx)(`span`,{className:`font-mono`,children:e}),t.declared===!0&&(0,o.jsx)(`span`,{className:`sr-only`,children:` (project colour)`}),me.has(e)&&(0,o.jsxs)(`span`,{className:`text-zinc-500 dark:text-zinc-400`,"data-testid":`timeline-legend-shared`,children:[`(same colour as `,me.get(e).join(`, `),`)`]})]},e)})}),E!==void 0&&(0,o.jsx)(_d,{data:w,selection:E,dependencies:O.dependencies})]})}function _d({data:e,selection:t,dependencies:n}){let r=e.rows[t.row];if(r?.type!==`task`)return null;let i=t.type===`item`?r.items[t.item]:void 0,a=t.type===`task`?r.id:i?.id,s=a===void 0?[]:n.filter(e=>e.to===a),c=a===void 0?[]:n.filter(e=>e.from===a),l=(t,n)=>(0,o.jsxs)(`li`,{"data-satisfied":String(t.satisfied),className:t.satisfied?``:`text-red-700`,children:[vt(e,n),` — `,t.type,t.satisfied?``:` — not satisfied by the dates`]},t.index);return(0,o.jsx)(`div`,{className:`border-t border-zinc-200 px-2 py-1 text-xs dark:border-zinc-700`,"data-testid":`timeline-details`,role:`status`,children:(0,o.jsxs)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5`,children:[(0,o.jsx)(`dt`,{className:`text-zinc-500 dark:text-zinc-400`,children:`Task`}),(0,o.jsxs)(`dd`,{children:[r.label,` `,(0,o.jsxs)(`span`,{className:`font-mono text-zinc-500 dark:text-zinc-400`,children:[`(`,r.id,`)`]})]}),i!==void 0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`dt`,{className:`text-zinc-500 dark:text-zinc-400`,children:`Type`}),(0,o.jsx)(`dd`,{children:i.type}),(0,o.jsx)(`dt`,{className:`text-zinc-500 dark:text-zinc-400`,children:i.type===`activity`?`Dates`:`Date`}),(0,o.jsx)(`dd`,{className:`font-mono`,children:hd(i)}),i.label!==void 0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`dt`,{className:`text-zinc-500 dark:text-zinc-400`,children:`Label`}),(0,o.jsx)(`dd`,{children:i.label})]}),i.kind!==void 0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`dt`,{className:`text-zinc-500 dark:text-zinc-400`,children:`Kind`}),(0,o.jsx)(`dd`,{className:`font-mono`,children:i.kind})]}),i.id!==void 0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`dt`,{className:`text-zinc-500 dark:text-zinc-400`,children:`Identifier`}),(0,o.jsx)(`dd`,{className:`font-mono`,children:i.id})]})]}),s.length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`dt`,{className:`text-zinc-500 dark:text-zinc-400`,children:`Waits on`}),(0,o.jsx)(`dd`,{children:(0,o.jsx)(`ul`,{"data-testid":`timeline-predecessors`,children:s.map(e=>l(e,e.from))})})]}),c.length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`dt`,{className:`text-zinc-500 dark:text-zinc-400`,children:`Needed by`}),(0,o.jsx)(`dd`,{children:(0,o.jsx)(`ul`,{"data-testid":`timeline-successors`,children:c.map(e=>l(e,e.to))})})]})]})})}var vd=(0,a.createContext)(null);function yd(e){let t=e.startsWith(`workspace:`)?e.slice(10):/^[a-z][a-z0-9+.-]*:/i.test(e)?null:e;if(t===null||t===``||/^(?:[\\/]|[a-z]:[\\/])/i.test(t))return null;let n=t.replaceAll(`\\`,`/`);return n.split(`/`).includes(`..`)?null:n}function bd(e){let t=yd(e);if(t!==null)return{kind:`workspace-file`,path:t};if(/^https?:\/\//i.test(e))return{kind:`external-url`,url:e}}function xd(){let[e,t]=(0,a.useState)(void 0);return{hover:e=>({onPointerEnter:n=>t({text:e,x:n.clientX,y:n.clientY}),onPointerMove:n=>t({text:e,x:n.clientX,y:n.clientY}),onPointerLeave:()=>t(void 0)}),Tooltip:()=>e===void 0?null:(0,o.jsx)(`div`,{"data-testid":`diagram-tooltip`,role:`tooltip`,style:{position:`fixed`,left:e.x+14,top:e.y+14,zIndex:120},className:`pointer-events-none max-w-sm rounded bg-zinc-900 px-2 py-1 text-xs text-white shadow-lg dark:bg-zinc-100 dark:text-zinc-900`,children:e.text})}}function Sd({data:e,isProposal:t,nudges:n,setNudges:r,hidden:i,setHidden:s,orientation:c,viewpoint:l}){let u=(0,a.useRef)(null),[d,f]=(0,a.useState)(void 0),[p,m]=(0,a.useState)(!1),{hover:h,Tooltip:g}=xd(),_=(0,a.useRef)(void 0);(0,a.useEffect)(()=>()=>_.current?.(),[]);let v=(0,a.useContext)(vd),y=(0,a.useMemo)(()=>du(e,{isProposal:t,hidden:i,nudges:n,orientation:c,...l===void 0?{}:{viewpoint:l},...v===null?{}:{appearance:v}}),[e,t,i,n,c,l,v]),b=e=>{if(e.button!==0)return;let t=e.target;if(t.closest(`[data-draggable="node"]`)!==null||t.closest(`[data-legend-entry]`)!==null)return;let n=u.current?.parentElement??null;for(;n!==null&&n.scrollWidth<=n.clientWidth&&n.scrollHeight<=n.clientHeight;)n=n.parentElement;if(n===null)return;e.preventDefault();let r=e.clientX,i=e.clientY,a=n.scrollLeft,o=n.scrollTop,s=e.currentTarget;s.setPointerCapture?.(e.pointerId),m(!0);let c=e=>{n.scrollLeft=a-(e.clientX-r),n.scrollTop=o-(e.clientY-i)},l=()=>{_.current=void 0,s.releasePointerCapture?.(e.pointerId),s.removeEventListener(`pointermove`,c),s.removeEventListener(`pointerup`,l),s.removeEventListener(`pointercancel`,l),m(!1)};_.current?.(),_.current=l,s.addEventListener(`pointermove`,c),s.addEventListener(`pointerup`,l),s.addEventListener(`pointercancel`,l)},x=e=>t=>{if(t.button!==0)return;t.preventDefault();let i=u.current,a=i===null?1:(i.getBoundingClientRect().width||y.width)/y.width,o=t.clientX,s=t.clientY,c=n.get(e)??{dx:0,dy:0},l=t.currentTarget;l.setPointerCapture?.(t.pointerId),f(e);let d=t=>{let i=new Map(n);i.set(e,{dx:c.dx+(t.clientX-o)/a,dy:c.dy+(t.clientY-s)/a}),r(i)},p=()=>{_.current=void 0,l.releasePointerCapture?.(t.pointerId),l.removeEventListener(`pointermove`,d),l.removeEventListener(`pointerup`,p),l.removeEventListener(`pointercancel`,p),f(void 0)};_.current?.(),_.current=p,l.addEventListener(`pointermove`,d),l.addEventListener(`pointerup`,p),l.addEventListener(`pointercancel`,p)},S=e=>{let t=new Set(i);t.delete(e)||t.add(e),s(t)},C=e=>{let t=e.data?.[`element-id`];if(e.data?.draggable===`node`&&t!==void 0)return{extra:{onPointerDown:x(t),style:{cursor:d===t?`grabbing`:`grab`},...e.title===void 0?{}:h(e.title)}};if(e.data?.[`relationship-role`]!==void 0){let t=e.primitives.find(e=>e.shape===`path`&&e.data?.edge===`line`);return{extra:e.title===void 0?{}:h(e.title),before:t===void 0||t.shape!==`path`?null:(0,o.jsx)(`path`,{"data-edge":`hit`,"data-hit":`edge`,d:t.d,fill:`none`,stroke:`transparent`,strokeWidth:14,pointerEvents:`stroke`})}}let n=e.data?.[`legend-entry`];if(n!==void 0&&e.data?.toggles===`true`){let t=e.primitives[0],r=t.shape===`rect`?t.x:t.shape===`line`?t.x1:0,i=t.shape===`rect`?t.y:t.shape===`line`?t.y1-5:0,a=e.primitives.find(e=>e.shape===`text`),s=a?.shape===`text`?Yl(a.text.replace(` (hidden)`,``))-8:0;return{extra:{onClick:()=>S(n),style:{cursor:`pointer`}},before:(0,o.jsx)(`rect`,{"data-hit":`legend`,x:r-3,y:i-3,width:s,height:16,fill:`transparent`})}}return{}};return(0,o.jsxs)(o.Fragment,{children:[n.size>0&&(0,o.jsx)(`button`,{type:`button`,className:`mb-1 text-xs underline text-neutral-500 hover:text-neutral-800 dark:hover:text-neutral-200`,onClick:()=>r(new Map),children:`reset layout`}),(0,o.jsx)(g,{}),(0,o.jsxs)(`svg`,{ref:u,role:`img`,"aria-label":y.ariaLabel,viewBox:y.viewBox,width:y.width,height:y.height,xmlns:`http://www.w3.org/2000/svg`,onPointerDown:b,style:{cursor:p?`grabbing`:`grab`,touchAction:`none`},children:[(0,o.jsx)(`rect`,{x:Number(y.viewBox.split(` `)[0]),y:Number(y.viewBox.split(` `)[1]),width:y.width,height:y.height,fill:y.background,style:od({fill:y.background})}),(0,o.jsx)(ld,{markers:y.markers}),y.groups.map(e=>(0,o.jsx)(cd,{group:e,interaction:C},e.id))]})]})}function Cd({data:e,isProposal:t}){let{hover:n,Tooltip:r}=xd(),i=(0,a.useContext)(vd),s=(0,a.useMemo)(()=>fu(e,{isProposal:t,...i===null?{}:{appearance:i}}),[e,t,i]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(`svg`,{role:`img`,"aria-label":s.ariaLabel,viewBox:s.viewBox,width:s.width,height:s.height,xmlns:`http://www.w3.org/2000/svg`,children:[(0,o.jsx)(`rect`,{x:0,y:0,width:s.width,height:s.height,fill:s.background,style:od({fill:s.background})}),(0,o.jsx)(ld,{markers:s.markers}),s.groups.map(e=>(0,o.jsx)(cd,{group:e,interaction:e=>e.title===void 0?{}:{extra:n(e.title)}},e.id))]}),(0,o.jsx)(r,{})]})}var wd={added:`bg-emerald-50 dark:bg-emerald-950/40`,changed:`bg-amber-50 dark:bg-amber-950/40`,context:`bg-zinc-50 text-zinc-500 dark:bg-zinc-900/60 dark:text-zinc-400`,removed:`bg-red-50 text-red-800 dark:bg-red-950/40 dark:text-red-200`},Td={added:`border-emerald-600 bg-emerald-100 dark:border-emerald-400 dark:bg-emerald-900`,changed:`border-amber-600 bg-amber-100 dark:border-amber-400 dark:bg-amber-900`,context:`border-zinc-400 bg-zinc-100 dark:border-zinc-500 dark:bg-zinc-800`,removed:`border-red-600 bg-red-100 dark:border-red-400 dark:bg-red-900`},Ed=48,Dd=16,Od={attribute:{label:`is`,className:`text-zinc-600 dark:text-zinc-300`},expects:{label:`expects`,className:`text-amber-700 dark:text-amber-400`},assigns:{label:`asks to set`,className:`text-blue-700 dark:text-blue-400`},removes:{label:`asks to unset`,className:`text-rose-700 line-through dark:text-rose-400`}};function kd({uri:e,text:t,dispatch:n,sha256:r}){let i=bd(e);return i===void 0||n===void 0?(0,o.jsx)(`span`,{"data-followable":`no`,children:t}):i.kind===`workspace-file`?(0,o.jsx)(`button`,{type:`button`,"data-followable":`workspace-file`,className:`text-left underline decoration-dotted underline-offset-2 hover:decoration-solid`,onClick:()=>n({kind:`openFile`,path:i.path,...r===void 0?{}:{sha256:r}}),children:t}):(0,o.jsx)(`a`,{"data-followable":`external-url`,className:`underline decoration-dotted underline-offset-2 hover:decoration-solid`,href:i.url,target:`_blank`,rel:`noreferrer`,children:t})}function Ad({item:e,traces:t,dispatch:n}){let r=[...e.attributes.map(([e,t])=>[`attribute`,e,Pe(t)]),...e.expectations.map(([e,t])=>[`expects`,e,Pe(t)]),...e.assignments.map(([e,t])=>[`assigns`,e,Pe(t)]),...e.removedAttributes.map(e=>[`removes`,e,``])],i=t??[];if(r.length===0&&e.locations.length===0&&e.artifacts.length===0&&i.length===0)return null;let s=[r.length>0?`${r.length} attribute${r.length===1?``:`s`}`:``,i.length>0?`${i.length} relation${i.length===1?``:`s`}`:``,e.locations.length>0?`${e.locations.length} location${e.locations.length===1?``:`s`}`:``,e.artifacts.length>0?`${e.artifacts.length} artifact${e.artifacts.length===1?``:`s`}`:``].filter(Boolean);return(0,o.jsxs)(`details`,{className:`mt-1 text-[11px]`,"data-testid":`structured-enrichment`,children:[(0,o.jsx)(`summary`,{className:`cursor-pointer text-zinc-500 dark:text-zinc-400`,children:s.join(`, `)}),(0,o.jsxs)(`dl`,{className:`mt-1 grid grid-cols-[auto_auto_1fr] gap-x-2 gap-y-0.5`,children:[r.map(([e,t,n],r)=>(0,o.jsxs)(a.Fragment,{children:[(0,o.jsx)(`dt`,{className:`font-medium ${Od[e].className}`,"data-claim":e,children:Od[e].label}),(0,o.jsx)(`dd`,{className:`font-mono text-zinc-700 dark:text-zinc-200`,children:t}),(0,o.jsx)(`dd`,{className:`break-words text-zinc-600 dark:text-zinc-300`,children:n})]},`${e}-${t}-${r}`)),i.map((e,t)=>(0,o.jsxs)(a.Fragment,{children:[(0,o.jsx)(`dt`,{className:`font-medium text-violet-700 dark:text-violet-400`,"data-claim":`relates`,children:e.kind}),(0,o.jsxs)(`dd`,{className:`col-span-2 break-words text-zinc-600 dark:text-zinc-300`,children:[e.fromLabel,` → `,e.toLabel,e.toRow===void 0&&e.toRef!==void 0?` (outside this document)`:``]})]},`trace-${t}`)),e.locations.map((e,t)=>(0,o.jsxs)(a.Fragment,{children:[(0,o.jsx)(`dt`,{className:`font-medium text-zinc-500 dark:text-zinc-400`,"data-claim":`location`,children:`at`}),(0,o.jsx)(`dd`,{className:`col-span-2 break-all font-mono text-zinc-600 dark:text-zinc-300`,children:(0,o.jsx)(kd,{uri:e.uri,text:Fe(e),dispatch:n})})]},`location-${t}`)),e.artifacts.map((e,t)=>(0,o.jsxs)(a.Fragment,{children:[(0,o.jsx)(`dt`,{className:`font-medium text-zinc-500 dark:text-zinc-400`,"data-claim":`artifact`,children:e.rel}),(0,o.jsx)(`dd`,{className:`col-span-2 break-all font-mono text-zinc-600 dark:text-zinc-300`,children:(0,o.jsx)(kd,{uri:e.uri,text:Ie(e),dispatch:n,sha256:e.sha256})})]},`artifact-${t}`))]})]})}function jd({data:e,hidden:t,setHidden:n,rows:r,traces:i=[],dispatch:s}){let[c,l]=(0,a.useState)(null),u=(0,a.useRef)(null),d=(0,a.useCallback)(()=>[...u.current?.querySelectorAll(`th`)??[]].map(e=>Math.max(Ed,Math.round(e.getBoundingClientRect().width))),[]),f=(0,a.useCallback)((e,t)=>l(n=>{let r=n??d(),i=[...r];return i[e]=Math.max(Ed,Math.round(t(r[e]??Ed))),i}),[d]);function p(e,t){e.preventDefault();let n=e.clientX,r=c??d();l(r);let i=e=>{let i=r[t]??Ed;f(t,()=>i+(e.clientX-n))},a=()=>{window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a),window.removeEventListener(`pointercancel`,a)};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a),window.addEventListener(`pointercancel`,a)}let m=c?.reduce((e,t)=>e+t,0),h=(e,t,n)=>(0,o.jsx)(`div`,{role:n?`separator`:`presentation`,"aria-orientation":n?`vertical`:void 0,"aria-label":n?`Resize column ${t}`:void 0,"aria-hidden":!n||void 0,tabIndex:n?0:void 0,onPointerDown:t=>p(t,e),onKeyDown:t=>{if(t.key!==`ArrowLeft`&&t.key!==`ArrowRight`)return;t.preventDefault();let n=t.key===`ArrowRight`?Dd:-16;f(e,e=>e+n)},className:`absolute -right-px top-0 h-full w-1.5 cursor-col-resize touch-none hover:bg-zinc-400 focus:bg-zinc-400 focus:outline-none dark:hover:bg-zinc-500 dark:focus:bg-zinc-500`}),g=Lc(e),_=(e,t)=>r?.[t]?.role??Rc(e,g),v=[...new Set(e.rows.map(_).filter(e=>e!==void 0))].sort((e,t)=>Ic.indexOf(e)-Ic.indexOf(t)),y=e.rows.map((e,t)=>({row:e,index:t})).filter(({row:e,index:n})=>{let r=_(e,n);return r===void 0||!t.has(il(`role`,r))}),b=new Map;for(let e of i)for(let t of[e.fromRow,e.toRow]){if(t===void 0)continue;let n=b.get(t);n===void 0?b.set(t,[e]):n.includes(e)||n.push(e)}let x=e=>{let r=new Set(t),i=il(`role`,e);r.has(i)?r.delete(i):r.add(i),n(r)};return(0,o.jsxs)(`div`,{className:`overflow-x-auto`,children:[v.length>0&&(0,o.jsx)(`div`,{className:`mb-2 flex flex-wrap items-center gap-2 text-[11px]`,"data-testid":`table-role-key`,children:v.map(e=>{let n=t.has(il(`role`,e));return(0,o.jsxs)(`button`,{type:`button`,onClick:()=>x(e),"aria-pressed":!n,className:`flex items-center gap-1 rounded border border-zinc-300 px-1.5 py-0.5 dark:border-zinc-700 ${n?`opacity-50`:``}`,children:[(0,o.jsx)(`span`,{"data-role-swatch":e,className:`inline-block h-3 w-3 rounded-sm border-2 ${Td[e]}`}),(0,o.jsxs)(`span`,{children:[Fc[e],n?` (hidden)`:``]})]},e)})}),(0,o.jsxs)(`table`,{className:`border-collapse text-xs ${c?``:`w-full`}`,style:m===void 0?void 0:{tableLayout:`fixed`,width:m},children:[(0,o.jsx)(`colgroup`,{children:e.columns.map((e,t)=>(0,o.jsx)(`col`,{style:c?{width:c[t]}:void 0},t))}),(0,o.jsx)(`thead`,{children:(0,o.jsx)(`tr`,{ref:u,children:e.columns.map((e,t)=>(0,o.jsxs)(`th`,{className:`relative border border-zinc-300 px-2 py-1 text-left font-medium dark:border-zinc-700`,children:[(0,o.jsx)(`span`,{className:`block truncate`,children:e}),h(t,e,!0)]},t))})}),(0,o.jsx)(`tbody`,{children:y.map(({row:t,index:n},i)=>{let{cells:a,heading:c}=ce(t),l=r?.[n],u=l?.role??Rc(t,g),d=l?.id===void 0?[]:b.get(l.id)??[];if(c!==void 0){let t=Math.min(Math.max(l?.depth??1,1),6);return(0,o.jsx)(`tr`,{"data-row-heading":t,className:u===void 0?void 0:wd[u],children:(0,o.jsx)(`th`,{scope:`colgroup`,colSpan:e.columns.length,style:{paddingLeft:`${.5+(t-1)*.75}rem`},className:`border border-zinc-200 bg-zinc-50 py-1 text-left font-semibold dark:border-zinc-800 dark:bg-zinc-900 ${t===1?`text-xs`:`text-[11px] font-medium`} ${u===`removed`?`line-through`:``}`,children:c})},i)}return(0,o.jsx)(`tr`,{className:u===void 0?void 0:wd[u],"data-row-role":u,"data-row-kind":l?.kind,"data-row-ref":l?.ref,children:a.map((t,n)=>(0,o.jsxs)(`td`,{className:`relative border border-zinc-200 px-2 py-1 align-top break-words dark:border-zinc-800 ${u===`removed`?`line-through`:``}`,children:[t===null?(0,o.jsx)(`span`,{className:`opacity-40`,children:`—`}):String(t),n===0&&l!==void 0?(0,o.jsx)(Ad,{item:l,traces:d,dispatch:s}):null,h(n,e.columns[n]??``,!1)]},n))},i)})})]})]})}function Md(e,t){if(e===void 0)return JSON.stringify(t,null,2);try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function Nd(e,t=` `){let n=[],r=(e,r)=>{for(let i of r)n.push(`${t}${e}: ${i}`)};return r(`attribute`,e.attributes.map(([e,t])=>Ne(e,t))),r(`expects`,e.expectations.map(([e,t])=>Ne(e,t))),r(`asks to set`,e.assignments.map(([e,t])=>Ne(e,t))),r(`asks to unset`,e.removedAttributes),r(`at`,e.locations.map(e=>Fe(e))),r(`artifact`,e.artifacts.map(e=>Ie(e))),n}function Pd(e){let t=e.profile===void 0?``:` "${e.profile}"`;if(e.state===`unchecked`)return`Could not be checked against this project's profile${t}: the project's profile registry cannot be used right now.`;if(e.state===`strays`)return`Does not conform to this project's profile${t} as it stands now.`;let n=e.openValues,r=e.findings??0,i=[n===0?void 0:`${n} value${n===1?``:`s`} outside its open enumerations`,r===0?void 0:`${r} finding${r===1?``:`s`} to check`].filter(e=>e!==void 0);return`Conforms to this project's profile${t}${i.length===0?``:`, with ${i.join(` and `)}`}.`}function Fd(e,t,n=al,r){let i=Qc(e,t),a=[];if(i.profile!==void 0&&a.push(`Profile: ${i.profile}`),r!==void 0&&a.push(`Conformance: ${Pd(r)}`),i.target!==void 0){let e=i.target.revision===void 0?``:`, prepared against ${i.target.revision}`;a.push(`Proposes changes to ${i.target.ref}${e}`),a.push(`Expectations below are the producer's; the receiving authority checks them before applying.`)}for(let e of i.artifacts)a.push(`Artifact — ${Ie(e)}`);if(a.length>0&&a.push(``),e.kind===`timeline`)return a.push(...bt(e.data)),a.join(`
14
- `);if(i.columns!==void 0&&i.rows!==void 0){let e=e=>e!==void 0&&n.has(il(`role`,e)),t=i.rows.filter(t=>e(t.role));t.length>0&&(a.push(`Filtered view — ${t.length} of ${i.rows.length} rows hidden (${[...new Set(t.map(e=>Fc[e.role]))].join(`, `)}).`),a.push(``)),a.push(i.columns.join(` | `));for(let t of i.rows){if(e(t.role))continue;if(t.heading!==void 0){a.push(``),a.push(`${`#`.repeat(t.depth??1)} ${t.heading}${t.role===void 0?``:` (${Fc[t.role]})`}`);continue}let n=t.cells.map(e=>e===null?``:String(e)).join(` | `),r=t.kind===void 0?``:` [${t.kind}]`;a.push(`${n}${r}${t.role===void 0?``:` (${Fc[t.role]})`}`);for(let e of t.changes)a.push(` ${Me(e)}`);a.push(...Nd(t))}if(i.traces.length>0){a.push(``);for(let e of i.traces){let t=e.label===void 0?``:`: ${e.label}`;a.push(`${e.fromLabel} —${e.kind}${t}→ ${e.toLabel}`)}}}else{if(a.push([`${i.things.length} ${i.thingNoun}s`,`${i.links.length} ${i.linkNoun}s`,...i.containers.length>0?[`${i.containers.length} containers`]:[]].join(`, `)),a.push(``),i.containers.length>0){for(let e of i.containers){let t=i.things.filter(t=>t.container===e.id);a.push(`${e.label}: ${t.length===0?`no members`:t.map(e=>e.label).join(`, `)}`)}a.push(``)}let e=new Map(i.containers.map(e=>[e.id,e.label]));for(let t of i.things){let n=t.container===void 0?void 0:e.get(t.container);a.push([t.label,t.kind===void 0?``:` [${t.kind}]`,n===void 0?``:` in ${n}`,t.role===`unchanged`?``:` (${Pc[t.role]})`,t.changes.length===0?``:` — ${t.changes.map(Me).join(`, `)}`].join(``)),a.push(...Nd(t))}i.links.length>0&&a.push(``),i.links.forEach((e,t)=>{let n=[e.kind,e.label].filter(e=>e!==void 0&&e!==``),r=n.length===0?`→`:`—${n.join(`: `)}→`;a.push([i.linkNoun===`message`?`${t+1}. `:``,`${e.fromLabel} ${r} ${e.toLabel}`,e.isLoop?` (to itself)`:``,e.role===`unchanged`?``:` (${Pc[e.role]})`,e.changes.length===0?``:` — ${e.changes.map(Me).join(`, `)}`].join(``)),a.push(...Nd(e))})}if(i.removals.length>0){a.push(``);for(let e of i.removals)a.push(`removed ${e.type}: ${e.ref}`)}return a.join(`
15
- `)}function Id(e,t){let n=e=>{if(e===void 0)return;let n=t.data,r=[...n.nodes??[],...n.participants??[]].find(t=>t.id===e||t.ref===e);return r===void 0?e:$c(r)},r=t.data,i=[...r.nodes??[],...r.participants??[],...r.edges??[],...r.messages??[]].find(t=>`ref`in t&&t.ref===e.ref),a=e.from!==void 0||e.to!==void 0?`${n(e.from)??`?`} → ${n(e.to)??`?`}`:i!==void 0&&`from`in i?`${n(i.from)} → ${n(i.to)}`:void 0,o=e.label??(i===void 0?void 0:i.label),s=e.kind??(i===void 0?void 0:i.kind),c=[o,s===void 0?void 0:`[${s}]`,a].filter(e=>e!==void 0&&e!==``);return c.length===0?e.ref:`${c.join(` `)} (${e.ref})`}var Ld=C;function Rd(e){let t=e.target;if(typeof t!=`object`||!t)return;let n=t.revision;return typeof n==`string`?n:void 0}function zd(e){let t=e.target;if(typeof t==`string`)return t;if(typeof t==`object`&&t&&typeof t.ref==`string`)return t.ref}function Bd({envelope:e,source:t,rawOutput:n,dispatch:r,conformance:i,exportRef:s}){let c=(0,a.useContext)(vd),[l,u]=(0,a.useState)(!1),[d,p]=(0,a.useState)(!1),[h,g]=(0,a.useState)(!1),[_,v]=(0,a.useState)(!1),[y,b]=(0,a.useState)(!1),[x,S]=(0,a.useState)(null),T=(0,a.useRef)(null),ee=(0,a.useRef)(null),[te,E]=(0,a.useState)(new Map),[D,ne]=(0,a.useState)(al),[re,ie]=(0,a.useState)(void 0),[ae,oe]=(0,a.useState)(void 0),[se,ce]=(0,a.useState)(void 0),le=(0,a.useRef)(null),ue=(0,a.useMemo)(()=>el(e),[e]),de=e.target!==void 0,O=e.removals??[],fe=(0,a.useMemo)(()=>Qc(e,de),[e,de]),pe=(0,a.useMemo)(()=>e.kind===`graph`?uu(e.data,D):`landscape`,[e,D]),me=re??pe,he=(0,a.useMemo)(()=>e.kind===`graph`?sl(e):[],[e]),ge=he.find(e=>e.id===ae),_e=ge!==void 0&&!ll(D,cl(e.data,ge)),ve=t=>{let n=he.find(e=>e.id===t);oe(n?.id),ne(n===void 0?al:cl(e.data,n))},ye=()=>{ie(e=>m(e??pe)),E(new Map)},be=e.kind===`graph`?(0,o.jsx)(Sd,{data:e.data,isProposal:de,nudges:te,setNudges:E,hidden:D,setHidden:ne,orientation:me,viewpoint:ge}):e.kind===`sequence`?(0,o.jsx)(Cd,{data:e.data,isProposal:de}):e.kind===`timeline`?(0,o.jsx)(gd,{data:e.data,appearance:c,display:se??md(e.data),onDisplayChange:t=>ce(n=>t(n??md(e.data))),exportRef:le}):(0,o.jsx)(jd,{data:e.data,hidden:D,setHidden:ne,rows:fe.rows,traces:fe.traces,dispatch:r}),xe=`${e.kind}-${zd(e)??`diagram`}.svg`.replace(/[^\w.-]+/g,`-`),Se=`${e.kind}-${zd(e)??`data`}`.replace(/[^\w.-]+/g,`-`),Ce=()=>_u(e.data,D,fe.rows),we=e.kind===`table`?Ce().withheld:0;function Te(e){let t=e.cloneNode(!0);for(let e of t.querySelectorAll(`[data-hit]`))e.remove();for(let e of[t,...t.querySelectorAll(`[style]`)])e.style.removeProperty(`cursor`),e.style.removeProperty(`touch-action`),e.style.removeProperty(`fill`),e.style.removeProperty(`stroke`),e.getAttribute(`style`)===``&&e.removeAttribute(`style`);return t}function Ee(){let e=(ee.current??T.current)?.querySelector(`svg`);return e?new XMLSerializer().serializeToString(Te(e)):void 0}(0,a.useImperativeHandle)(s,()=>e.kind===`timeline`?{svg:()=>le.current?.svg?.()}:e.kind===`graph`||e.kind===`sequence`?{svg:De}:e.kind===`table`?{xlsx:()=>void wu(Ce(),`${Se}.xlsx`),markdown:()=>Su(e.data,D,fe.rows)}:null);function De(){let e=Ee();if(e===void 0)return;let t=URL.createObjectURL(new Blob([e],{type:`image/svg+xml`})),n=document.createElement(`a`);n.href=t,n.download=xe,n.click(),URL.revokeObjectURL(t),S(`SVG downloaded`),window.setTimeout(()=>S(null),2500)}async function Oe(){let e=Ee();e!==void 0&&(S(await Ht(e)?`SVG markup copied`:`could not copy`),window.setTimeout(()=>S(null),2500))}return(0,o.jsxs)(`div`,{className:`space-y-3 text-sm`,"data-testid":`structured-document`,children:[de&&(0,o.jsxs)(`p`,{className:`text-xs text-zinc-500`,"data-testid":`structured-proposal-note`,children:[`Proposed changes to `,(0,o.jsx)(`span`,{className:`font-mono`,children:zd(e)}),Rd(e)===void 0?null:(0,o.jsxs)(o.Fragment,{children:[`, prepared against `,(0,o.jsx)(`span`,{className:`font-mono`,children:Rd(e)})]}),`. Anything not mentioned is left as it is; anything shown without a change is here for context.`]}),fe.profile===void 0?null:(0,o.jsxs)(`p`,{className:`text-xs text-zinc-500`,"data-testid":`structured-profile`,children:[`Vocabulary: `,(0,o.jsx)(`span`,{className:`font-mono`,children:fe.profile}),(0,o.jsx)(`span`,{className:`ml-1 text-zinc-400`,children:`— names what the kinds and attributes mean; not resolved here`})]}),i===void 0?null:(0,o.jsx)(`p`,{className:i.state===`conforms`?`text-xs text-emerald-700 dark:text-emerald-400`:`text-xs text-amber-700 dark:text-amber-400`,"data-testid":`structured-conformance`,"data-state":i.state,children:Pd(i)}),fe.artifacts.length>0&&(0,o.jsx)(`ul`,{className:`text-xs text-zinc-500`,"data-testid":`structured-document-artifacts`,children:fe.artifacts.map((e,t)=>(0,o.jsx)(`li`,{className:`break-all font-mono`,children:Ie(e)},t))}),fe.traces.length>0&&(0,o.jsxs)(`p`,{className:`text-xs text-zinc-500`,"data-testid":`structured-relation-key`,children:[`Relations:`,` `,[...new Set(fe.traces.map(e=>e.kind))].map((e,t)=>(0,o.jsxs)(`span`,{className:`font-mono`,children:[t>0?`, `:``,e]},e)),(0,o.jsx)(`span`,{className:`ml-1 text-zinc-400`,children:`— declared by the producer; nothing is inferred about what is missing`})]}),(D.size>0||ge!==void 0)&&(0,o.jsxs)(`p`,{"data-testid":`structured-filtered`,className:`flex flex-wrap items-center gap-2 rounded border border-amber-300 bg-amber-50 px-2 py-1 text-xs text-amber-900 dark:border-amber-700 dark:bg-amber-950/40 dark:text-amber-200`,children:[ge!==void 0&&(0,o.jsxs)(`span`,{"data-testid":`structured-viewpoint`,children:[`Viewpoint: `,(0,o.jsx)(`strong`,{children:ge.label}),` — `,ge.concern,_e?` Adjusted with the key.`:``]}),D.size>0&&(0,o.jsxs)(`span`,{children:[`Filtered view — `,[...D].map(e=>e.replace(/^(element|relationship|role):/,``)).join(`, `),` hidden.`,` `,de?`The full proposal still applies.`:``]}),(0,o.jsx)(`button`,{type:`button`,className:`underline`,onClick:()=>ve(``),children:`show everything`})]}),(0,o.jsx)(`div`,{ref:T,className:`overflow-x-auto`,children:be}),(0,o.jsx)(f,{label:`${e.kind} view`,open:l,onClose:()=>u(!1),containerRef:ee,anchorRef:T,actions:(e.kind===`graph`||e.kind===`sequence`)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`button`,{type:`button`,onClick:De,className:Ld,children:`⤓ download SVG`}),(0,o.jsx)(`button`,{type:`button`,onClick:Oe,className:Ld,children:`copy markup`}),x!==null&&(0,o.jsx)(`span`,{className:`text-xs text-zinc-500`,children:x})]}),children:be}),O.length>0&&(0,o.jsx)(`ul`,{className:`space-y-1`,"data-testid":`structured-removals`,children:O.map((t,n)=>(0,o.jsxs)(`li`,{"data-relationship-role":`removed`,className:`rounded border border-red-300 bg-red-50 px-2 py-1 text-xs text-red-800 dark:border-red-800 dark:bg-red-950/40 dark:text-red-200`,children:[(0,o.jsx)(`span`,{className:`line-through`,children:Id(t,e)}),Id(t,e)===t.ref&&(0,o.jsx)(`span`,{className:`ml-2 not-italic opacity-70`,"data-testid":`removal-undescribed`,children:`— the proposal does not say what this is`}),(0,o.jsx)(`span`,{className:`ml-2 font-mono opacity-60`,children:t.type})]},n))}),(0,o.jsxs)(`div`,{className:w,children:[he.length>0&&(0,o.jsxs)(`label`,{className:`flex items-center gap-1 text-zinc-500`,children:[`viewpoint`,(0,o.jsxs)(`select`,{"data-testid":`viewpoint-select`,className:`rounded border border-zinc-300 bg-white px-1 py-0.5 text-xs text-zinc-700 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-300`,value:ge?.id??``,onChange:e=>ve(e.target.value),children:[(0,o.jsx)(`option`,{value:``,children:`Whole document`}),he.map(e=>(0,o.jsx)(`option`,{value:e.id,children:e.label},e.id))]})]}),(0,o.jsx)(`button`,{type:`button`,className:C,"aria-label":`Show ${e.kind} view at full size`,onClick:()=>u(!0),children:`⤢ enlarge`}),e.kind===`graph`&&(0,o.jsx)(`button`,{type:`button`,className:`text-xs text-zinc-500 underline hover:text-zinc-800 dark:hover:text-zinc-200 disabled:opacity-50`,"data-testid":`diagram-orientation`,title:me===`portrait`?`Turn it across the page — it is drawn down`:`Turn it down the page — it is drawn across`,"aria-label":`Turn the diagram ${m(me)}`,onClick:ye,children:me===`portrait`?`↔ landscape`:`↕ portrait`}),e.kind===`table`?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`button`,{type:`button`,className:`text-zinc-500 underline`,title:we===0?`Save as .csv — opens in any spreadsheet`:`Save as .csv — ${we} hidden rows are left out`,onClick:()=>Cu(Ce(),`${Se}.csv`),children:`⤓ download CSV`}),(0,o.jsx)(`button`,{type:`button`,className:`text-zinc-500 underline`,title:we===0?`Save as .xlsx — one sheet, values typed as they are declared`:`Save as .xlsx — ${we} hidden rows are left out`,onClick:()=>void wu(Ce(),`${Se}.xlsx`),children:`⤓ download XLSX`}),(0,o.jsx)(`button`,{type:`button`,className:`text-zinc-500 underline`,title:we===0?`Save as .md — each chapter a heading, its rows a table`:`Save as .md — ${we} hidden rows are left out`,onClick:()=>Tu(e.data,D,fe.rows,`${Se}.md`),children:`⤓ download Markdown`}),we>0&&(0,o.jsxs)(`span`,{className:`text-xs text-amber-700 dark:text-amber-300`,"data-testid":`table-export-narrowed`,children:[`exports `,we,` rows fewer than the table declares`]})]}):e.kind===`timeline`?null:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`button`,{type:`button`,className:C,title:`Save as .svg — insert it as a picture in a document`,onClick:De,children:`⤓ download SVG`}),(0,o.jsx)(`button`,{type:`button`,className:`text-zinc-500 underline`,title:`Copy the SVG markup, for somewhere that takes it directly`,onClick:()=>void Oe(),children:`copy markup`})]}),(0,o.jsxs)(`button`,{type:`button`,className:`text-zinc-500 underline`,onClick:()=>p(e=>!e),children:[d?`hide`:`show`,` text equivalent`]}),ue!==void 0&&(0,o.jsxs)(`button`,{type:`button`,className:`text-zinc-500 underline`,onClick:()=>g(e=>!e),children:[h?`hide`:`show`,` derived diagram syntax`]}),(0,o.jsxs)(`button`,{type:`button`,className:`text-zinc-500 underline`,onClick:()=>b(e=>!e),children:[y?`hide`:`show`,` envelope`]}),n!==void 0&&(0,o.jsxs)(`button`,{type:`button`,className:`text-zinc-500 underline`,onClick:()=>v(e=>!e),children:[_?`hide`:`show`,` original output`]}),x!==null&&(0,o.jsx)(`span`,{role:`status`,className:`text-emerald-600 dark:text-emerald-400`,children:x})]}),d&&(0,o.jsx)(`pre`,{"data-testid":`structured-text-equivalent`,className:`overflow-x-auto rounded bg-zinc-100 p-2 text-xs dark:bg-zinc-800`,children:Fd(e,de,D,i)}),h&&ue!==void 0&&(0,o.jsxs)(`div`,{children:[(0,o.jsx)(`p`,{className:`mb-1 text-[11px] text-zinc-500`,children:`Derived from the structured data above. It is an export, not the source.`}),(0,o.jsx)(`pre`,{"data-testid":`structured-derived-export`,className:`overflow-x-auto rounded bg-zinc-100 p-2 text-xs dark:bg-zinc-800`,children:ue})]}),y&&(0,o.jsxs)(`div`,{children:[(0,o.jsx)(`p`,{className:`mb-1 text-[11px] text-zinc-500`,children:`The validated document this view is drawn from. It is not sent to the model.`}),(0,o.jsx)(`pre`,{"data-testid":`structured-envelope`,className:`max-h-80 overflow-auto rounded bg-zinc-100 p-2 text-xs dark:bg-zinc-800`,children:t})]}),_&&n!==void 0&&(0,o.jsx)(`pre`,{"data-testid":`structured-raw-output`,className:`overflow-x-auto rounded bg-zinc-100 p-2 text-xs dark:bg-zinc-800`,children:n})]})}function Vd({item:e,dispatch:t}){let n=xl(e.structured);return n===void 0?null:(0,o.jsx)(Bd,{envelope:n,source:Md(e.structured,n),rawOutput:e.output,dispatch:t,...e.structuredConformance===void 0?{}:{conformance:e.structuredConformance}})}var Hd={id:`structured-exchange`,match:e=>xl(e.structured)!==void 0,stable:!1,showsRawReveal:!0,startsExpanded:!0,Expanded:Vd},Ud=class extends a.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e,t){console.error(`[pi-outpost] viewer crashed:`,e,t.componentStack)}render(){return this.state.failed?(0,o.jsx)(`div`,{className:`flex h-full items-center justify-center p-6`,children:(0,o.jsxs)(`p`,{className:`max-w-md text-center text-sm text-zinc-600 dark:text-zinc-400`,children:[this.props.label??`This file`,` could not be displayed. Close and reopen it to try again.`]})}):this.props.children}},Wd=(0,a.createContext)({});function Gd(e){let t=E(e.children,`json`);return t===null?(0,o.jsx)(ne,{...e}):(0,o.jsx)(Kd,{code:t,pre:e})}function Kd({code:e,pre:t}){let n=(0,a.useContext)(Wd),r=(0,a.useMemo)(()=>Sl(e),[e]);if(r.status===`not-a-document`)return(0,o.jsx)(ne,{...t});if(r.status===`valid`){let t=n[Vt(e)];return(0,o.jsx)(Ud,{label:`This diagram`,children:(0,o.jsx)(`div`,{className:`my-2`,"data-testid":`reply-structured-exchange`,children:(0,o.jsx)(Bd,{envelope:r.envelope,source:e,...t?{conformance:t}:{}})})})}return(0,o.jsxs)(`div`,{children:[(0,o.jsxs)(`p`,{"data-testid":`reply-structured-exchange-refused`,className:`mb-1 text-xs text-amber-700 dark:text-amber-400`,children:[`This structured-exchange document could not be drawn: `,qd(r)]}),(0,o.jsx)(ne,{...t})]})}function qd(e){if(e.status===`unsupported-version`)return`${e.schema} is not a version this application implements.`;let t=e.status===`invalid`?e.issues[0]:e.issue;return t===void 0?`it does not satisfy the schema it declares.`:`${t.message} (${t.rule}${t.path?` at ${t.path}`:``})`}function Jd(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Yd(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Xd=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Zd=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qd={};function $d(e,t){return((t||Qd).jsx?Zd:Xd).test(e)}var ef=/[ \t\n\f\r]/g;function tf(e){return typeof e==`object`?e.type===`text`&&nf(e.value):nf(e)}function nf(e){return e.replace(ef,``)===``}var rf=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};rf.prototype.normal={},rf.prototype.property={},rf.prototype.space=void 0;function af(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new rf(n,r,t)}function of(e){return e.toLowerCase()}var sf=class{constructor(e,t){this.attribute=t,this.property=e}};sf.prototype.attribute=``,sf.prototype.booleanish=!1,sf.prototype.boolean=!1,sf.prototype.commaOrSpaceSeparated=!1,sf.prototype.commaSeparated=!1,sf.prototype.defined=!1,sf.prototype.mustUseProperty=!1,sf.prototype.number=!1,sf.prototype.overloadedBoolean=!1,sf.prototype.property=``,sf.prototype.spaceSeparated=!1,sf.prototype.space=void 0;var cf=e.n({boolean:()=>N,booleanish:()=>uf,commaOrSpaceSeparated:()=>pf,commaSeparated:()=>ff,number:()=>P,overloadedBoolean:()=>df,spaceSeparated:()=>F}),lf=0,N=mf(),uf=mf(),df=mf(),P=mf(),F=mf(),ff=mf(),pf=mf();function mf(){return 2**++lf}var hf=Object.keys(cf),gf=class extends sf{constructor(e,t,n,r){let i=-1;if(super(e,t),_f(this,`space`,r),typeof n==`number`)for(;++i<hf.length;){let e=hf[i];_f(this,hf[i],(n&cf[e])===cf[e])}}};gf.prototype.defined=!0;function _f(e,t,n){n&&(e[t]=n)}function vf(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new gf(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[of(r)]=r,n[of(a.attribute)]=r}return new rf(t,n,e.space)}var yf=vf({properties:{ariaActiveDescendant:null,ariaAtomic:uf,ariaAutoComplete:null,ariaBusy:uf,ariaChecked:uf,ariaColCount:P,ariaColIndex:P,ariaColSpan:P,ariaControls:F,ariaCurrent:null,ariaDescribedBy:F,ariaDetails:null,ariaDisabled:uf,ariaDropEffect:F,ariaErrorMessage:null,ariaExpanded:uf,ariaFlowTo:F,ariaGrabbed:uf,ariaHasPopup:null,ariaHidden:uf,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:F,ariaLevel:P,ariaLive:null,ariaModal:uf,ariaMultiLine:uf,ariaMultiSelectable:uf,ariaOrientation:null,ariaOwns:F,ariaPlaceholder:null,ariaPosInSet:P,ariaPressed:uf,ariaReadOnly:uf,ariaRelevant:null,ariaRequired:uf,ariaRoleDescription:F,ariaRowCount:P,ariaRowIndex:P,ariaRowSpan:P,ariaSelected:uf,ariaSetSize:P,ariaSort:null,ariaValueMax:P,ariaValueMin:P,ariaValueNow:P,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function bf(e,t){return t in e?e[t]:t}function xf(e,t){return bf(e,t.toLowerCase())}var Sf=vf({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:ff,acceptCharset:F,accessKey:F,action:null,allow:null,allowFullScreen:N,allowPaymentRequest:N,allowUserMedia:N,alpha:N,alt:null,as:null,async:N,autoCapitalize:null,autoComplete:F,autoFocus:N,autoPlay:N,blocking:F,capture:null,charSet:null,checked:N,cite:null,className:F,closedBy:null,colorSpace:null,cols:P,colSpan:P,command:null,commandFor:null,content:null,contentEditable:uf,controls:N,controlsList:F,coords:P|ff,crossOrigin:null,data:null,dateTime:null,decoding:null,default:N,defer:N,dir:null,dirName:null,disabled:N,download:df,draggable:uf,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:N,formTarget:null,headers:F,height:P,hidden:df,high:P,href:null,hrefLang:null,htmlFor:F,httpEquiv:F,id:null,imageSizes:null,imageSrcSet:null,inert:N,inputMode:null,integrity:null,is:null,isMap:N,itemId:null,itemProp:F,itemRef:F,itemScope:N,itemType:F,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:N,low:P,manifest:null,max:null,maxLength:P,media:null,method:null,min:null,minLength:P,multiple:N,muted:N,name:null,nonce:null,noModule:N,noValidate:N,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:N,optimum:P,pattern:null,ping:F,placeholder:null,playsInline:N,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:N,referrerPolicy:null,rel:F,required:N,reversed:N,rows:P,rowSpan:P,sandbox:F,scope:null,scoped:N,seamless:N,selected:N,shadowRootClonable:N,shadowRootCustomElementRegistry:N,shadowRootDelegatesFocus:N,shadowRootMode:null,shadowRootSerializable:N,shape:null,size:P,sizes:null,slot:null,span:P,spellCheck:uf,src:null,srcDoc:null,srcLang:null,srcSet:null,start:P,step:null,style:null,tabIndex:P,target:null,title:null,translate:null,type:null,typeMustMatch:N,useMap:null,value:uf,width:P,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:F,axis:null,background:null,bgColor:null,border:P,borderColor:null,bottomMargin:P,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:N,declare:N,event:null,face:null,frame:null,frameBorder:null,hSpace:P,leftMargin:P,link:null,longDesc:null,lowSrc:null,marginHeight:P,marginWidth:P,noResize:N,noHref:N,noShade:N,noWrap:N,object:null,profile:null,prompt:null,rev:null,rightMargin:P,rules:null,scheme:null,scrolling:uf,standby:null,summary:null,text:null,topMargin:P,valueType:null,version:null,vAlign:null,vLink:null,vSpace:P,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:N,disablePictureInPicture:N,disableRemotePlayback:N,exportParts:ff,part:F,prefix:null,property:null,results:P,security:null,unselectable:null},space:`html`,transform:xf}),Cf=vf({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:pf,accentHeight:P,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:P,amplitude:P,arabicForm:null,ascent:P,attributeName:null,attributeType:null,azimuth:P,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:P,by:null,calcMode:null,capHeight:P,className:F,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:P,diffuseConstant:P,direction:null,display:null,dur:null,divisor:P,dominantBaseline:null,download:N,dx:null,dy:null,edgeMode:null,editable:null,elevation:P,enableBackground:null,end:null,event:null,exponent:P,externalResourcesRequired:null,fill:null,fillOpacity:P,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:ff,g2:ff,glyphName:ff,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:P,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:P,horizOriginX:P,horizOriginY:P,id:null,ideographic:P,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:P,k:P,k1:P,k2:P,k3:P,k4:P,kernelMatrix:pf,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:P,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:P,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:P,overlineThickness:P,paintOrder:null,panose1:null,path:null,pathLength:P,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:F,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:P,pointsAtY:P,pointsAtZ:P,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:pf,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:pf,rev:pf,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:pf,requiredFeatures:pf,requiredFonts:pf,requiredFormats:pf,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:P,specularExponent:P,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:P,strikethroughThickness:P,string:null,stroke:null,strokeDashArray:pf,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:P,strokeOpacity:P,strokeWidth:null,style:null,surfaceScale:P,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:pf,tabIndex:P,tableValues:null,target:null,targetX:P,targetY:P,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:pf,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:P,underlineThickness:P,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:P,values:null,vAlphabetic:P,vMathematical:P,vectorEffect:null,vHanging:P,vIdeographic:P,version:null,vertAdvY:P,vertOriginX:P,vertOriginY:P,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:P,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:bf}),wf=vf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Tf=vf({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:xf}),Ef=vf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Df={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`},Of=/[A-Z]/g,kf=/-[a-z]/g,Af=/^data[-\w.:]+$/i;function jf(e,t){let n=of(t),r=t,i=sf;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Af.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(kf,Nf);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!kf.test(e)){let n=e.replace(Of,Mf);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=gf}return new i(r,t)}function Mf(e){return`-`+e.toLowerCase()}function Nf(e){return e.charAt(1).toUpperCase()}var Pf=af([yf,Sf,wf,Tf,Ef],`html`),Ff=af([yf,Cf,wf,Tf,Ef],`svg`);function If(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Lf(e){return e.join(` `).trim()}var Rf=e.t(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
16
- `);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),zf=e.t(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(Rf());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n||={},n[r]=i)}),n}})),Bf=e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Vf=e.t(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(zf()),i=Bf();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a})),Hf=Wf(`end`),Uf=Wf(`start`);function Wf(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Gf(e){let t=Uf(e),n=Hf(e);if(t&&n)return{start:t,end:n}}var Kf=e.r(Vf(),1),qf={}.hasOwnProperty,Jf=new Map,Yf=/[A-Z]/g,Xf=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Zf=new Set([`td`,`th`]),Qf=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function $f(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=up(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=lp(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Ff:Pf,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=ep(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ep(e,t,n){if(t.type===`element`)return tp(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return np(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return ip(e,t,n);if(t.type===`mdxjsEsm`)return rp(e,t);if(t.type===`root`)return ap(e,t,n);if(t.type===`text`)return op(e,t)}function tp(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Ff,e.schema=i),e.ancestors.push(t);let a=gp(e,t.tagName,!1),o=dp(e,t),s=pp(e,t);return Xf.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!tf(e)})),sp(e,o,a,t),cp(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function np(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}_p(e,t.position)}function rp(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);_p(e,t.position)}function ip(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Ff,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:gp(e,t.name,!0),o=fp(e,t),s=pp(e,t);return sp(e,o,a,t),cp(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function ap(e,t,n){let r={};return cp(r,pp(e,t)),e.create(t,e.Fragment,r,n)}function op(e,t){return t.value}function sp(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function cp(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function lp(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function up(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Uf(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function dp(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&qf.call(t.properties,i)){let a=mp(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Zf.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function fp(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else _p(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else _p(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function pp(e,t){let n=[],r=-1,i=e.passKeys?new Map:Jf;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=ep(e,a,o);s!==void 0&&n.push(s)}return n}function mp(e,t,n){let r=jf(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Yd(n):Lf(n)),r.property===`style`){let t=typeof n==`object`?n:hp(e,String(n));return e.stylePropertyNameCase===`css`&&(t=vp(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Df[r.property]||r.property:r.attribute,n]}}function hp(e,n){try{return(0,Kf.default)(n,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let r=n,i=new t.f("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw i.file=e.filePath||void 0,i.url=Qf+`#cannot-parse-style-attribute`,i}}function gp(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=$d(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=$d(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return qf.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);_p(e)}function _p(e,n){let r=new t.f("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Qf+`#cannot-handle-mdx-estrees-without-createevaluater`,r}function vp(e){let t={},n;for(n in e)qf.call(e,n)&&(t[yp(n)]=e[n]);return t}function yp(e){let t=e.replace(Yf,bp);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function bp(e){return`-`+e.toLowerCase()}var xp={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]};function Sp(e){let n=[],r=-1,i=0,a=0;for(;++r<e.length;){let o=e.charCodeAt(r),s=``;if(o===37&&t.d(e.charCodeAt(r+1))&&t.d(e.charCodeAt(r+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){let t=e.charCodeAt(r+1);o<56320&&t>56319&&t<57344?(s=String.fromCharCode(o,t),a=1):s=`�`}else s=String.fromCharCode(o);s&&=(n.push(e.slice(i,r),encodeURIComponent(s)),i=r+a+1,``),a&&=(r+=a,0)}return n.join(``)+e.slice(i)}function Cp(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function wp(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
17
- `}]}function Tp(e,t){let n=t.value?t.value+`
18
- `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Ep(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Dp(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Op(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Sp(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function kp(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ap(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function jp(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Mp(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return jp(e,t);let i={src:Sp(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Np(e,t){let n={src:Sp(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Pp(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Fp(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return jp(e,t);let i={href:Sp(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Ip(e,t){let n={href:Sp(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Lp(e,t,n){let r=e.all(t),i=n?Rp(n):zp(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
19
- `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
20
- `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Rp(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=zp(n[r])}return t}function zp(e){return e.spread??e.children.length>1}function Bp(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Vp(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Hp(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Up(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Wp(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Uf(t.children[1]),o=Hf(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Gp(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Kp(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var qp=9,Jp=32;function Yp(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Xp(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Xp(t.slice(i),i>0,!1)),a.join(``)}function Xp(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===qp||t===Jp;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===qp||t===Jp;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Zp(e,t){let n={type:`text`,value:Yp(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Qp(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var $p={blockquote:Cp,break:wp,code:Tp,delete:Ep,emphasis:Dp,footnoteReference:Op,heading:kp,html:Ap,imageReference:Mp,image:Np,inlineCode:Pp,linkReference:Fp,link:Ip,listItem:Lp,list:Bp,paragraph:Vp,root:Hp,strong:Up,table:Wp,tableCell:Kp,tableRow:Gp,text:Zp,thematicBreak:Qp,toml:em,yaml:em,definition:em,footnoteDefinition:em};function em(){}var{defineProperty:tm}=Object,nm=typeof self==`object`?self:globalThis,rm=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new nm[e](t)},im=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?tm(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof nm[e]==`function`?rm(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(rm(a,o),i)};return r},am=e=>im(new Map,e)(0),om=``,{toString:sm}={},{keys:cm,is:lm}=Object,um=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=sm.call(e).slice(8,-1);switch(n){case`Array`:return[1,om];case`Object`:return[2,om];case`Date`:return[3,om];case`RegExp`:return[4,om];case`Map`:return[5,om];case`Set`:return[6,om];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},dm=([e,t])=>e===0&&(t===`function`||t===`symbol`),fm=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=um(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&lm(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of cm(o))(e||!dm(um(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?om:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(dm(um(n))||dm(um(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!dm(um(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},pm=(e,{json:t,lossy:n}={})=>{let r=[];return fm(!(t||n),!!t,new Map,r)(e),r},mm=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?am(pm(e,t)):structuredClone(e):(e,t)=>am(pm(e,t));function hm(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function gm(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function _m(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||hm,r=e.options.footnoteBackLabel||gm,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=Sp(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...mm(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
21
- `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
22
- `}]}}var vm={}.hasOwnProperty,ym={};function bm(e,n){let r=n||ym,i=new Map,a=new Map,o={all:c,applyData:Sm,definitionById:i,footnoteById:a,footnoteCounts:new Map,footnoteOrder:[],handlers:{...$p,...r.handlers},one:s,options:r,patch:xm,wrap:wm};return t.o(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?i:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o;function s(e,t){let n=e.type,r=o.handlers[n];if(vm.call(o.handlers,n)&&r)return r(o,e,t);if(o.options.passThrough&&o.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=mm(n);return r.children=o.all(e),r}return mm(e)}return(o.options.unknownHandler||Cm)(o,e,t)}function c(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=o.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=Tm(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=Tm(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function xm(e,t){e.position&&(t.position=Gf(e))}function Sm(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,mm(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Cm(e,t){let n=t.data||{},r=`value`in t&&!(vm.call(n,`hProperties`)||vm.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function wm(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
23
- `});++r<e.length;)r&&n.push({type:`text`,value:`
24
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
25
- `}),n}function Tm(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Em(e,t){let n=bm(e,t),r=n.one(e,void 0),i=_m(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
26
- `},i)),a}function Dm(e,t){return e&&`run`in e?async function(n,r){let i=Em(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Em(n,{file:r,...e||t})}}var Om=[],km={allowDangerousHtml:!0},Am=/^(https?|ircs?|mailto|xmpp)$/i,jm=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Mm(e){let t=Nm(e),n=Pm(e);return Fm(t.runSync(t.parse(n),n),e)}function Nm(e){let n=e.rehypePlugins||Om,r=e.remarkPlugins||Om,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...km}:km;return t.i().use(t.u).use(r).use(Dm,i).use(n)}function Pm(e){let n=e.children||``,r=new t.a;return typeof n==`string`?r.value=n:``+n,r}function Fm(e,n){let r=n.allowedElements,i=n.allowElement,a=n.components,s=n.disallowedElements,c=n.skipHtml,l=n.unwrapDisallowed,u=n.urlTransform||Im;for(let e of jm)Object.hasOwn(n,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return t.o(e,d),$f(e,{Fragment:o.Fragment,components:a,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0});function d(e,t,n){if(e.type===`raw`&&n&&typeof t==`number`)return c?n.children.splice(t,1):n.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in xp)if(Object.hasOwn(xp,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=xp[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=u(String(n||``),t,e))}}if(e.type===`element`){let a=r?!r.includes(e.tagName):s?s.includes(e.tagName):!1;if(!a&&i&&typeof t==`number`&&(a=!i(e,t,n)),a&&n&&typeof t==`number`)return l&&e.children?n.children.splice(t,1,...e.children):n.children.splice(t,1),t}}}function Im(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Am.test(e.slice(0,t))?e:``}var Lm=/[#.]/g;function Rm(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){Lm.lastIndex=i;let e=Lm.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function zm(e,t,n){let r=n?Gm(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=Rm(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,Bm(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Vm(e,o.properties,t,n)}for(let e of a)Hm(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function Bm(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function Vm(e,t,n,r){let i=jf(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?If(r):i.commaSeparated?Jd(r):i.commaOrSpaceSeparated?If(Jd(r).join(` `)):Um(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Wm(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(Um(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Hm(e,t){if(t!=null){if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)Hm(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?Hm(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}}function Um(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||of(n)===of(t)))return!0}return n}function Wm(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Gm(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Km=`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`.split(`.`),qm=zm(Pf,`div`),Jm=zm(Ff,`g`,Km);function Ym(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=Xm(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=Xm(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function Xm(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
27
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var Zm={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`},Qm={}.hasOwnProperty,$m=Object.prototype;function eh(e,t){let n=t||{};return th({file:n.file||void 0,location:!1,schema:n.space===`svg`?Ff:Pf,verbose:n.verbose||!1},e)}function th(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},ih(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:nh(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=Ym(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},ih(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},ih(e,r,n),n}default:return n=rh(e,t),n}}function nh(e,t){let n=-1,r=[];for(;++n<t.length;){let i=th(e,t[n]);r.push(i)}return r}function rh(e,t){let n=e.schema;e.schema=t.namespaceURI===Zm.svg?Ff:Pf;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;Qm.call($m,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?Jm:qm)(t.tagName,i,nh(e,t.childNodes));if(ih(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&oh(r.startTag),o=r&&r.endTag&&oh(r.endTag),s=th(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function ih(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=ah(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function ah(e,t,n){let r=oh(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)Qm.call(n.attrs,i)&&(r[jf(e.schema,i).property]=oh(n.attrs[i]));n.startTag;let a=oh(n.startTag),o=n.endTag?oh(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function oh(e){let t=sh({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=sh({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function sh(e){return e.line&&e.column?e:void 0}var ch=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]),I;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(I||={});var lh={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function uh(e){return e>=55296&&e<=57343}function dh(e){return e>=56320&&e<=57343}function fh(e,t){return(e-55296)*1024+9216+t}function ph(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function mh(e){return e>=64976&&e<=65007||ch.has(e)}var L;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(L||={});var hh=65536,gh=class{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=hh,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_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){let t=this.html.charCodeAt(this.pos+1);if(dh(t))return this.pos++,this._addGap(),fh(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,I.EOF;return this._err(L.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,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,I.EOF;let n=this.html.charCodeAt(t);return n===I.CARRIAGE_RETURN?I.LINE_FEED:n}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,I.EOF;let e=this.html.charCodeAt(this.pos);return e===I.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,I.LINE_FEED):e===I.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,uh(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===I.LINE_FEED||e===I.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){ph(e)?this._err(L.controlCharacterInInputStream):mh(e)&&this._err(L.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},R;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(R||={});function _h(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var vh=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ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀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℮ℯ檈Ā;q℮ℛim;拧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肻\xA0ଷ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(e=>e.charCodeAt(0))),yh=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]]);String.fromCodePoint;function bh(e){return e>=55296&&e<=57343||e>1114111?65533:yh.get(e)??e}var xh;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(xh||={});var Sh=32,Ch;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(Ch||={});function wh(e){return e>=xh.ZERO&&e<=xh.NINE}function Th(e){return e>=xh.UPPER_A&&e<=xh.UPPER_F||e>=xh.LOWER_A&&e<=xh.LOWER_F}function Eh(e){return e>=xh.UPPER_A&&e<=xh.UPPER_Z||e>=xh.LOWER_A&&e<=xh.LOWER_Z||wh(e)}function Dh(e){return e===xh.EQUALS||Eh(e)}var Oh;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(Oh||={});var kh;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(kh||={});var Ah=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Oh.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=kh.Strict}startEntity(e){this.decodeMode=e,this.state=Oh.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Oh.EntityStart:return e.charCodeAt(t)===xh.NUM?(this.state=Oh.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Oh.NamedEntity,this.stateNamedEntity(e,t));case Oh.NumericStart:return this.stateNumericStart(e,t);case Oh.NumericDecimal:return this.stateNumericDecimal(e,t);case Oh.NumericHex:return this.stateNumericHex(e,t);case Oh.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Sh)===xh.LOWER_X?(this.state=Oh.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Oh.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(wh(r)||Th(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(wh(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===xh.SEMI)this.consumed+=1;else if(this.decodeMode===kh.Strict)return 0;return this.emitCodePoint(bh(this.result),this.consumed),this.errors&&(e!==xh.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&Ch.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=jh(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===kh.Attribute&&(i===0||Dh(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&Ch.VALUE_LENGTH)>>14,i!==0){if(a===xh.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==kh.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&Ch.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~Ch.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case Oh.NamedEntity:return this.result!==0&&(this.decodeMode!==kh.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Oh.NumericDecimal:return this.emitNumericEntity(0,2);case Oh.NumericHex:return this.emitNumericEntity(0,3);case Oh.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Oh.EntityStart:return 0}}};function jh(e,t,n,r){let i=(t&Ch.BRANCH_LENGTH)>>7,a=t&Ch.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var z;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(z||={});var Mh;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(Mh||={});var Nh;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(Nh||={});var B;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(B||={});var V;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(V||={});var Ph=new Map([[B.A,V.A],[B.ADDRESS,V.ADDRESS],[B.ANNOTATION_XML,V.ANNOTATION_XML],[B.APPLET,V.APPLET],[B.AREA,V.AREA],[B.ARTICLE,V.ARTICLE],[B.ASIDE,V.ASIDE],[B.B,V.B],[B.BASE,V.BASE],[B.BASEFONT,V.BASEFONT],[B.BGSOUND,V.BGSOUND],[B.BIG,V.BIG],[B.BLOCKQUOTE,V.BLOCKQUOTE],[B.BODY,V.BODY],[B.BR,V.BR],[B.BUTTON,V.BUTTON],[B.CAPTION,V.CAPTION],[B.CENTER,V.CENTER],[B.CODE,V.CODE],[B.COL,V.COL],[B.COLGROUP,V.COLGROUP],[B.DD,V.DD],[B.DESC,V.DESC],[B.DETAILS,V.DETAILS],[B.DIALOG,V.DIALOG],[B.DIR,V.DIR],[B.DIV,V.DIV],[B.DL,V.DL],[B.DT,V.DT],[B.EM,V.EM],[B.EMBED,V.EMBED],[B.FIELDSET,V.FIELDSET],[B.FIGCAPTION,V.FIGCAPTION],[B.FIGURE,V.FIGURE],[B.FONT,V.FONT],[B.FOOTER,V.FOOTER],[B.FOREIGN_OBJECT,V.FOREIGN_OBJECT],[B.FORM,V.FORM],[B.FRAME,V.FRAME],[B.FRAMESET,V.FRAMESET],[B.H1,V.H1],[B.H2,V.H2],[B.H3,V.H3],[B.H4,V.H4],[B.H5,V.H5],[B.H6,V.H6],[B.HEAD,V.HEAD],[B.HEADER,V.HEADER],[B.HGROUP,V.HGROUP],[B.HR,V.HR],[B.HTML,V.HTML],[B.I,V.I],[B.IMG,V.IMG],[B.IMAGE,V.IMAGE],[B.INPUT,V.INPUT],[B.IFRAME,V.IFRAME],[B.KEYGEN,V.KEYGEN],[B.LABEL,V.LABEL],[B.LI,V.LI],[B.LINK,V.LINK],[B.LISTING,V.LISTING],[B.MAIN,V.MAIN],[B.MALIGNMARK,V.MALIGNMARK],[B.MARQUEE,V.MARQUEE],[B.MATH,V.MATH],[B.MENU,V.MENU],[B.META,V.META],[B.MGLYPH,V.MGLYPH],[B.MI,V.MI],[B.MO,V.MO],[B.MN,V.MN],[B.MS,V.MS],[B.MTEXT,V.MTEXT],[B.NAV,V.NAV],[B.NOBR,V.NOBR],[B.NOFRAMES,V.NOFRAMES],[B.NOEMBED,V.NOEMBED],[B.NOSCRIPT,V.NOSCRIPT],[B.OBJECT,V.OBJECT],[B.OL,V.OL],[B.OPTGROUP,V.OPTGROUP],[B.OPTION,V.OPTION],[B.P,V.P],[B.PARAM,V.PARAM],[B.PLAINTEXT,V.PLAINTEXT],[B.PRE,V.PRE],[B.RB,V.RB],[B.RP,V.RP],[B.RT,V.RT],[B.RTC,V.RTC],[B.RUBY,V.RUBY],[B.S,V.S],[B.SCRIPT,V.SCRIPT],[B.SEARCH,V.SEARCH],[B.SECTION,V.SECTION],[B.SELECT,V.SELECT],[B.SOURCE,V.SOURCE],[B.SMALL,V.SMALL],[B.SPAN,V.SPAN],[B.STRIKE,V.STRIKE],[B.STRONG,V.STRONG],[B.STYLE,V.STYLE],[B.SUB,V.SUB],[B.SUMMARY,V.SUMMARY],[B.SUP,V.SUP],[B.TABLE,V.TABLE],[B.TBODY,V.TBODY],[B.TEMPLATE,V.TEMPLATE],[B.TEXTAREA,V.TEXTAREA],[B.TFOOT,V.TFOOT],[B.TD,V.TD],[B.TH,V.TH],[B.THEAD,V.THEAD],[B.TITLE,V.TITLE],[B.TR,V.TR],[B.TRACK,V.TRACK],[B.TT,V.TT],[B.U,V.U],[B.UL,V.UL],[B.SVG,V.SVG],[B.VAR,V.VAR],[B.WBR,V.WBR],[B.XMP,V.XMP]]);function Fh(e){return Ph.get(e)??V.UNKNOWN}var H=V,Ih={[z.HTML]:new Set([H.ADDRESS,H.APPLET,H.AREA,H.ARTICLE,H.ASIDE,H.BASE,H.BASEFONT,H.BGSOUND,H.BLOCKQUOTE,H.BODY,H.BR,H.BUTTON,H.CAPTION,H.CENTER,H.COL,H.COLGROUP,H.DD,H.DETAILS,H.DIR,H.DIV,H.DL,H.DT,H.EMBED,H.FIELDSET,H.FIGCAPTION,H.FIGURE,H.FOOTER,H.FORM,H.FRAME,H.FRAMESET,H.H1,H.H2,H.H3,H.H4,H.H5,H.H6,H.HEAD,H.HEADER,H.HGROUP,H.HR,H.HTML,H.IFRAME,H.IMG,H.INPUT,H.LI,H.LINK,H.LISTING,H.MAIN,H.MARQUEE,H.MENU,H.META,H.NAV,H.NOEMBED,H.NOFRAMES,H.NOSCRIPT,H.OBJECT,H.OL,H.P,H.PARAM,H.PLAINTEXT,H.PRE,H.SCRIPT,H.SECTION,H.SELECT,H.SOURCE,H.STYLE,H.SUMMARY,H.TABLE,H.TBODY,H.TD,H.TEMPLATE,H.TEXTAREA,H.TFOOT,H.TH,H.THEAD,H.TITLE,H.TR,H.TRACK,H.UL,H.WBR,H.XMP]),[z.MATHML]:new Set([H.MI,H.MO,H.MN,H.MS,H.MTEXT,H.ANNOTATION_XML]),[z.SVG]:new Set([H.TITLE,H.FOREIGN_OBJECT,H.DESC]),[z.XLINK]:new Set,[z.XML]:new Set,[z.XMLNS]:new Set},Lh=new Set([H.H1,H.H2,H.H3,H.H4,H.H5,H.H6]);B.STYLE,B.SCRIPT,B.XMP,B.IFRAME,B.NOEMBED,B.NOFRAMES,B.PLAINTEXT;var U;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(U||={});var Rh={DATA:U.DATA,RCDATA:U.RCDATA,RAWTEXT:U.RAWTEXT,SCRIPT_DATA:U.SCRIPT_DATA,PLAINTEXT:U.PLAINTEXT,CDATA_SECTION:U.CDATA_SECTION};function zh(e){return e>=I.DIGIT_0&&e<=I.DIGIT_9}function Bh(e){return e>=I.LATIN_CAPITAL_A&&e<=I.LATIN_CAPITAL_Z}function Vh(e){return e>=I.LATIN_SMALL_A&&e<=I.LATIN_SMALL_Z}function Hh(e){return Vh(e)||Bh(e)}function Uh(e){return Hh(e)||zh(e)}function Wh(e){return e+32}function Gh(e){return e===I.SPACE||e===I.LINE_FEED||e===I.TABULATION||e===I.FORM_FEED}function Kh(e){return Gh(e)||e===I.SOLIDUS||e===I.GREATER_THAN_SIGN}function qh(e){return e===I.NULL?L.nullCharacterReference:e>1114111?L.characterReferenceOutsideUnicodeRange:uh(e)?L.surrogateCharacterReference:mh(e)?L.noncharacterCharacterReference:ph(e)||e===I.CARRIAGE_RETURN?L.controlCharacterReference:null}var Jh=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=U.DATA,this.returnState=U.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new gh(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Ah(vh,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(L.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(L.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=qh(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}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;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}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 t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:R.START_TAG,tagName:``,tagID:V.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:R.END_TAG,tagName:``,tagID:V.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:R.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:R.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(_h(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(L.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(){let e=this.currentToken;this.prepareToken(e),e.tagID=Fh(e.tagName),e.type===R.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(L.endTagWithAttributes),e.selfClosing&&this._err(L.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 R.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case R.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case R.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:R.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){let t=Gh(e)?R.WHITESPACE_CHARACTER:e===I.NULL?R.NULL_CHARACTER:R.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(R.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=U.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?kh.Attribute:kh.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===U.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===U.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===U.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case U.DATA:this._stateData(e);break;case U.RCDATA:this._stateRcdata(e);break;case U.RAWTEXT:this._stateRawtext(e);break;case U.SCRIPT_DATA:this._stateScriptData(e);break;case U.PLAINTEXT:this._statePlaintext(e);break;case U.TAG_OPEN:this._stateTagOpen(e);break;case U.END_TAG_OPEN:this._stateEndTagOpen(e);break;case U.TAG_NAME:this._stateTagName(e);break;case U.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case U.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case U.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case U.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case U.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case U.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case U.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case U.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case U.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case U.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case U.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case U.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case U.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case U.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case U.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case U.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case U.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case U.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case U.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case U.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case U.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case U.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case U.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case U.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case U.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case U.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case U.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case U.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case U.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case U.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case U.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case U.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case U.BOGUS_COMMENT:this._stateBogusComment(e);break;case U.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case U.COMMENT_START:this._stateCommentStart(e);break;case U.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case U.COMMENT:this._stateComment(e);break;case U.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case U.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case U.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case U.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case U.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case U.COMMENT_END:this._stateCommentEnd(e);break;case U.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case U.DOCTYPE:this._stateDoctype(e);break;case U.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case U.DOCTYPE_NAME:this._stateDoctypeName(e);break;case U.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case U.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case U.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case U.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case U.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case U.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case U.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case U.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case U.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case U.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case U.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case U.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case U.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case U.CDATA_SECTION:this._stateCdataSection(e);break;case U.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case U.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case U.CHARACTER_REFERENCE:this._stateCharacterReference();break;case U.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case I.LESS_THAN_SIGN:this.state=U.TAG_OPEN;break;case I.AMPERSAND:this._startCharacterReference();break;case I.NULL:this._err(L.unexpectedNullCharacter),this._emitCodePoint(e);break;case I.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case I.AMPERSAND:this._startCharacterReference();break;case I.LESS_THAN_SIGN:this.state=U.RCDATA_LESS_THAN_SIGN;break;case I.NULL:this._err(L.unexpectedNullCharacter),this._emitChars(`�`);break;case I.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case I.LESS_THAN_SIGN:this.state=U.RAWTEXT_LESS_THAN_SIGN;break;case I.NULL:this._err(L.unexpectedNullCharacter),this._emitChars(`�`);break;case I.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case I.LESS_THAN_SIGN:this.state=U.SCRIPT_DATA_LESS_THAN_SIGN;break;case I.NULL:this._err(L.unexpectedNullCharacter),this._emitChars(`�`);break;case I.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case I.NULL:this._err(L.unexpectedNullCharacter),this._emitChars(`�`);break;case I.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Hh(e))this._createStartTagToken(),this.state=U.TAG_NAME,this._stateTagName(e);else switch(e){case I.EXCLAMATION_MARK:this.state=U.MARKUP_DECLARATION_OPEN;break;case I.SOLIDUS:this.state=U.END_TAG_OPEN;break;case I.QUESTION_MARK:this._err(L.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=U.BOGUS_COMMENT,this._stateBogusComment(e);break;case I.EOF:this._err(L.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(L.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=U.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Hh(e))this._createEndTagToken(),this.state=U.TAG_NAME,this._stateTagName(e);else switch(e){case I.GREATER_THAN_SIGN:this._err(L.missingEndTagName),this.state=U.DATA;break;case I.EOF:this._err(L.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(L.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=U.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:this.state=U.BEFORE_ATTRIBUTE_NAME;break;case I.SOLIDUS:this.state=U.SELF_CLOSING_START_TAG;break;case I.GREATER_THAN_SIGN:this.state=U.DATA,this.emitCurrentTagToken();break;case I.NULL:this._err(L.unexpectedNullCharacter),t.tagName+=`�`;break;case I.EOF:this._err(L.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(Bh(e)?Wh(e):e)}}_stateRcdataLessThanSign(e){e===I.SOLIDUS?this.state=U.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=U.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Hh(e)?(this.state=U.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=U.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=U.BEFORE_ATTRIBUTE_NAME,!1;case I.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=U.SELF_CLOSING_START_TAG,!1;case I.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=U.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=U.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===I.SOLIDUS?this.state=U.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=U.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Hh(e)?(this.state=U.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=U.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=U.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case I.SOLIDUS:this.state=U.SCRIPT_DATA_END_TAG_OPEN;break;case I.EXCLAMATION_MARK:this.state=U.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=U.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Hh(e)?(this.state=U.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=U.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=U.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===I.HYPHEN_MINUS?(this.state=U.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=U.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===I.HYPHEN_MINUS?(this.state=U.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=U.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case I.HYPHEN_MINUS:this.state=U.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case I.LESS_THAN_SIGN:this.state=U.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case I.NULL:this._err(L.unexpectedNullCharacter),this._emitChars(`�`);break;case I.EOF:this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case I.HYPHEN_MINUS:this.state=U.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case I.LESS_THAN_SIGN:this.state=U.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case I.NULL:this._err(L.unexpectedNullCharacter),this.state=U.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case I.EOF:this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=U.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case I.HYPHEN_MINUS:this._emitChars(`-`);break;case I.LESS_THAN_SIGN:this.state=U.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case I.GREATER_THAN_SIGN:this.state=U.SCRIPT_DATA,this._emitChars(`>`);break;case I.NULL:this._err(L.unexpectedNullCharacter),this.state=U.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case I.EOF:this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=U.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===I.SOLIDUS?this.state=U.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Hh(e)?(this._emitChars(`<`),this.state=U.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=U.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Hh(e)?(this.state=U.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=U.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=U.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(lh.SCRIPT,!1)&&Kh(this.preprocessor.peek(lh.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<lh.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=U.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case I.HYPHEN_MINUS:this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case I.LESS_THAN_SIGN:this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case I.NULL:this._err(L.unexpectedNullCharacter),this._emitChars(`�`);break;case I.EOF:this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case I.HYPHEN_MINUS:this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case I.LESS_THAN_SIGN:this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case I.NULL:this._err(L.unexpectedNullCharacter),this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case I.EOF:this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case I.HYPHEN_MINUS:this._emitChars(`-`);break;case I.LESS_THAN_SIGN:this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case I.GREATER_THAN_SIGN:this.state=U.SCRIPT_DATA,this._emitChars(`>`);break;case I.NULL:this._err(L.unexpectedNullCharacter),this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case I.EOF:this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===I.SOLIDUS?(this.state=U.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(lh.SCRIPT,!1)&&Kh(this.preprocessor.peek(lh.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<lh.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=U.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:this.state=U.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case I.EQUALS_SIGN:this._err(L.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=U.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=U.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:this._leaveAttrName(),this.state=U.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case I.EQUALS_SIGN:this._leaveAttrName(),this.state=U.BEFORE_ATTRIBUTE_VALUE;break;case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:this._err(L.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case I.NULL:this._err(L.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(Bh(e)?Wh(e):e)}}_stateAfterAttributeName(e){switch(e){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:this.state=U.SELF_CLOSING_START_TAG;break;case I.EQUALS_SIGN:this.state=U.BEFORE_ATTRIBUTE_VALUE;break;case I.GREATER_THAN_SIGN:this.state=U.DATA,this.emitCurrentTagToken();break;case I.EOF:this._err(L.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=U.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:this.state=U.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case I.APOSTROPHE:this.state=U.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case I.GREATER_THAN_SIGN:this._err(L.missingAttributeValue),this.state=U.DATA,this.emitCurrentTagToken();break;default:this.state=U.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case I.QUOTATION_MARK:this.state=U.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case I.AMPERSAND:this._startCharacterReference();break;case I.NULL:this._err(L.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case I.EOF:this._err(L.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case I.APOSTROPHE:this.state=U.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case I.AMPERSAND:this._startCharacterReference();break;case I.NULL:this._err(L.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case I.EOF:this._err(L.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:this._leaveAttrValue(),this.state=U.BEFORE_ATTRIBUTE_NAME;break;case I.AMPERSAND:this._startCharacterReference();break;case I.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=U.DATA,this.emitCurrentTagToken();break;case I.NULL:this._err(L.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:case I.EQUALS_SIGN:case I.GRAVE_ACCENT:this._err(L.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case I.EOF:this._err(L.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:this._leaveAttrValue(),this.state=U.BEFORE_ATTRIBUTE_NAME;break;case I.SOLIDUS:this._leaveAttrValue(),this.state=U.SELF_CLOSING_START_TAG;break;case I.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=U.DATA,this.emitCurrentTagToken();break;case I.EOF:this._err(L.eofInTag),this._emitEOFToken();break;default:this._err(L.missingWhitespaceBetweenAttributes),this.state=U.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case I.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=U.DATA,this.emitCurrentTagToken();break}case I.EOF:this._err(L.eofInTag),this._emitEOFToken();break;default:this._err(L.unexpectedSolidusInTag),this.state=U.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case I.GREATER_THAN_SIGN:this.state=U.DATA,this.emitCurrentComment(t);break;case I.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case I.NULL:this._err(L.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(lh.DASH_DASH,!0)?(this._createCommentToken(lh.DASH_DASH.length+1),this.state=U.COMMENT_START):this._consumeSequenceIfMatch(lh.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(lh.DOCTYPE.length+1),this.state=U.DOCTYPE):this._consumeSequenceIfMatch(lh.CDATA_START,!0)?this.inForeignNode?this.state=U.CDATA_SECTION:(this._err(L.cdataInHtmlContent),this._createCommentToken(lh.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=U.BOGUS_COMMENT):this._ensureHibernation()||(this._err(L.incorrectlyOpenedComment),this._createCommentToken(2),this.state=U.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case I.HYPHEN_MINUS:this.state=U.COMMENT_START_DASH;break;case I.GREATER_THAN_SIGN:{this._err(L.abruptClosingOfEmptyComment),this.state=U.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=U.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case I.HYPHEN_MINUS:this.state=U.COMMENT_END;break;case I.GREATER_THAN_SIGN:this._err(L.abruptClosingOfEmptyComment),this.state=U.DATA,this.emitCurrentComment(t);break;case I.EOF:this._err(L.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=U.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case I.HYPHEN_MINUS:this.state=U.COMMENT_END_DASH;break;case I.LESS_THAN_SIGN:t.data+=`<`,this.state=U.COMMENT_LESS_THAN_SIGN;break;case I.NULL:this._err(L.unexpectedNullCharacter),t.data+=`�`;break;case I.EOF:this._err(L.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case I.EXCLAMATION_MARK:t.data+=`!`,this.state=U.COMMENT_LESS_THAN_SIGN_BANG;break;case I.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=U.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===I.HYPHEN_MINUS?this.state=U.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=U.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===I.HYPHEN_MINUS?this.state=U.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=U.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==I.GREATER_THAN_SIGN&&e!==I.EOF&&this._err(L.nestedComment),this.state=U.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case I.HYPHEN_MINUS:this.state=U.COMMENT_END;break;case I.EOF:this._err(L.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=U.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case I.GREATER_THAN_SIGN:this.state=U.DATA,this.emitCurrentComment(t);break;case I.EXCLAMATION_MARK:this.state=U.COMMENT_END_BANG;break;case I.HYPHEN_MINUS:t.data+=`-`;break;case I.EOF:this._err(L.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=U.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case I.HYPHEN_MINUS:t.data+=`--!`,this.state=U.COMMENT_END_DASH;break;case I.GREATER_THAN_SIGN:this._err(L.incorrectlyClosedComment),this.state=U.DATA,this.emitCurrentComment(t);break;case I.EOF:this._err(L.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=U.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:this.state=U.BEFORE_DOCTYPE_NAME;break;case I.GREATER_THAN_SIGN:this.state=U.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case I.EOF:{this._err(L.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(L.missingWhitespaceBeforeDoctypeName),this.state=U.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Bh(e))this._createDoctypeToken(String.fromCharCode(Wh(e))),this.state=U.DOCTYPE_NAME;else switch(e){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.NULL:this._err(L.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=U.DOCTYPE_NAME;break;case I.GREATER_THAN_SIGN:{this._err(L.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=U.DATA;break}case I.EOF:{this._err(L.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=U.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:this.state=U.AFTER_DOCTYPE_NAME;break;case I.GREATER_THAN_SIGN:this.state=U.DATA,this.emitCurrentDoctype(t);break;case I.NULL:this._err(L.unexpectedNullCharacter),t.name+=`�`;break;case I.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Bh(e)?Wh(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:this.state=U.DATA,this.emitCurrentDoctype(t);break;case I.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(lh.PUBLIC,!1)?this.state=U.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(lh.SYSTEM,!1)?this.state=U.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(L.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=U.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:this.state=U.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case I.QUOTATION_MARK:this._err(L.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=U.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case I.APOSTROPHE:this._err(L.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=U.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case I.GREATER_THAN_SIGN:this._err(L.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=U.DATA,this.emitCurrentDoctype(t);break;case I.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(L.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=U.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:t.publicId=``,this.state=U.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case I.APOSTROPHE:t.publicId=``,this.state=U.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case I.GREATER_THAN_SIGN:this._err(L.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=U.DATA,this.emitCurrentDoctype(t);break;case I.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(L.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=U.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case I.QUOTATION_MARK:this.state=U.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case I.NULL:this._err(L.unexpectedNullCharacter),t.publicId+=`�`;break;case I.GREATER_THAN_SIGN:this._err(L.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=U.DATA;break;case I.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case I.APOSTROPHE:this.state=U.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case I.NULL:this._err(L.unexpectedNullCharacter),t.publicId+=`�`;break;case I.GREATER_THAN_SIGN:this._err(L.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=U.DATA;break;case I.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:this.state=U.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case I.GREATER_THAN_SIGN:this.state=U.DATA,this.emitCurrentDoctype(t);break;case I.QUOTATION_MARK:this._err(L.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=U.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case I.APOSTROPHE:this._err(L.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=U.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case I.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(L.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=U.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=U.DATA;break;case I.QUOTATION_MARK:t.systemId=``,this.state=U.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case I.APOSTROPHE:t.systemId=``,this.state=U.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case I.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(L.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=U.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:this.state=U.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case I.QUOTATION_MARK:this._err(L.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=U.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case I.APOSTROPHE:this._err(L.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=U.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case I.GREATER_THAN_SIGN:this._err(L.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=U.DATA,this.emitCurrentDoctype(t);break;case I.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(L.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=U.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:t.systemId=``,this.state=U.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case I.APOSTROPHE:t.systemId=``,this.state=U.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case I.GREATER_THAN_SIGN:this._err(L.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=U.DATA,this.emitCurrentDoctype(t);break;case I.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(L.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=U.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case I.QUOTATION_MARK:this.state=U.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case I.NULL:this._err(L.unexpectedNullCharacter),t.systemId+=`�`;break;case I.GREATER_THAN_SIGN:this._err(L.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=U.DATA;break;case I.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case I.APOSTROPHE:this.state=U.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case I.NULL:this._err(L.unexpectedNullCharacter),t.systemId+=`�`;break;case I.GREATER_THAN_SIGN:this._err(L.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=U.DATA;break;case I.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=U.DATA;break;case I.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(L.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=U.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case I.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=U.DATA;break;case I.NULL:this._err(L.unexpectedNullCharacter);break;case I.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case I.RIGHT_SQUARE_BRACKET:this.state=U.CDATA_SECTION_BRACKET;break;case I.EOF:this._err(L.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===I.RIGHT_SQUARE_BRACKET?this.state=U.CDATA_SECTION_END:(this._emitChars(`]`),this.state=U.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case I.GREATER_THAN_SIGN:this.state=U.DATA;break;case I.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=U.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(I.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Uh(this.preprocessor.peek(1))?U.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Uh(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===I.SEMICOLON&&this._err(L.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},Yh=new Set([V.DD,V.DT,V.LI,V.OPTGROUP,V.OPTION,V.P,V.RB,V.RP,V.RT,V.RTC]),Xh=new Set([...Yh,V.CAPTION,V.COLGROUP,V.TBODY,V.TD,V.TFOOT,V.TH,V.THEAD,V.TR]),Zh=new Set([V.APPLET,V.CAPTION,V.HTML,V.MARQUEE,V.OBJECT,V.TABLE,V.TD,V.TEMPLATE,V.TH]),Qh=new Set([...Zh,V.OL,V.UL]),$h=new Set([...Zh,V.BUTTON]),eg=new Set([V.ANNOTATION_XML,V.MI,V.MN,V.MO,V.MS,V.MTEXT]),tg=new Set([V.DESC,V.FOREIGN_OBJECT,V.TITLE]),ng=new Set([V.TR,V.TEMPLATE,V.HTML]),rg=new Set([V.TBODY,V.TFOOT,V.THEAD,V.TEMPLATE,V.HTML]),ig=new Set([V.TABLE,V.TEMPLATE,V.HTML]),ag=new Set([V.TD,V.TH]),og=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=V.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===V.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===z.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==z.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Lh,z.HTML)}popUntilTableCellPopped(){this.popUntilPopped(ag,z.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(ig,z.HTML)}clearBackToTableBodyContext(){this.clearBackTo(rg,z.HTML)}clearBackToTableRowContext(){this.clearBackTo(ng,z.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===V.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===V.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case z.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case z.SVG:if(tg.has(r))return!1;break;case z.MATHML:if(eg.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Zh)}hasInListItemScope(e){return this.hasInDynamicScope(e,Qh)}hasInButtonScope(e){return this.hasInDynamicScope(e,$h)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case z.HTML:if(Lh.has(t))return!0;if(Zh.has(t))return!1;break;case z.SVG:if(tg.has(t))return!1;break;case z.MATHML:if(eg.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===z.HTML)switch(this.tagIDs[t]){case e:return!0;case V.TABLE:case V.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===z.HTML)switch(this.tagIDs[e]){case V.TBODY:case V.THEAD:case V.TFOOT:return!0;case V.TABLE:case V.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===z.HTML)switch(this.tagIDs[t]){case e:return!0;case V.OPTION:case V.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Yh.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Xh.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&Xh.has(this.currentTagId);)this.pop()}},sg=3,cg;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(cg||={});var lg={type:cg.Marker},ug=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===cg.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<sg)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<sg)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=sg&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(lg)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:cg.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:cg.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(lg);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===cg.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===cg.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===cg.Element&&t.element===e)}},dg={createDocument(){return{nodeName:`#document`,mode:Nh.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};dg.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(dg.isTextNode(n)){n.value+=t;return}}dg.appendChild(e,dg.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&dg.isTextNode(r)?r.value+=t:dg.insertBefore(e,dg.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},fg=`html`,pg=`about:legacy-compat`,mg=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,hg=`+//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//`.split(`,`),gg=[...hg,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],_g=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),vg=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],yg=[...vg,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function bg(e,t){return t.some(t=>e.startsWith(t))}function xg(e){return e.name===fg&&e.publicId===null&&(e.systemId===null||e.systemId===pg)}function Sg(e){if(e.name!==fg)return Nh.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===mg)return Nh.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),_g.has(n))return Nh.QUIRKS;let e=t===null?gg:hg;if(bg(n,e))return Nh.QUIRKS;if(e=t===null?vg:yg,bg(n,e))return Nh.LIMITED_QUIRKS}return Nh.NO_QUIRKS}var Cg={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},wg=`definitionurl`,Tg=`definitionURL`,Eg=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`.split(`.`).map(e=>[e.toLowerCase(),e])),Dg=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:z.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:z.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:z.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:z.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:z.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:z.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:z.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:z.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:z.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:z.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:z.XMLNS}]]),Og=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`.split(`.`).map(e=>[e.toLowerCase(),e])),kg=new Set([V.B,V.BIG,V.BLOCKQUOTE,V.BODY,V.BR,V.CENTER,V.CODE,V.DD,V.DIV,V.DL,V.DT,V.EM,V.EMBED,V.H1,V.H2,V.H3,V.H4,V.H5,V.H6,V.HEAD,V.HR,V.I,V.IMG,V.LI,V.LISTING,V.MENU,V.META,V.NOBR,V.OL,V.P,V.PRE,V.RUBY,V.S,V.SMALL,V.SPAN,V.STRONG,V.STRIKE,V.SUB,V.SUP,V.TABLE,V.TT,V.U,V.UL,V.VAR]);function Ag(e){let t=e.tagID;return t===V.FONT&&e.attrs.some(({name:e})=>e===Mh.COLOR||e===Mh.SIZE||e===Mh.FACE)||kg.has(t)}function jg(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===wg){e.attrs[t].name=Tg;break}}function Mg(e){for(let t=0;t<e.attrs.length;t++){let n=Eg.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Ng(e){for(let t=0;t<e.attrs.length;t++){let n=Dg.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Pg(e){let t=Og.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Fh(e.tagName))}function Fg(e,t){return t===z.MATHML&&(e===V.MI||e===V.MO||e===V.MN||e===V.MS||e===V.MTEXT)}function Ig(e,t,n){if(t===z.MATHML&&e===V.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===Mh.ENCODING){let t=n[e].value.toLowerCase();return t===Cg.TEXT_HTML||t===Cg.APPLICATION_XML}}return t===z.SVG&&(e===V.FOREIGN_OBJECT||e===V.DESC||e===V.TITLE)}function Lg(e,t,n,r){return(!r||r===z.HTML)&&Ig(e,t,n)||(!r||r===z.MATHML)&&Fg(e,t)}var Rg=`hidden`,zg=8,Bg=3,W;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})(W||={});var Vg={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Hg=new Set([V.TABLE,V.TBODY,V.TFOOT,V.THEAD,V.TR]),Ug={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:dg,onParseError:null},Wg=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=W.INITIAL,this.originalInsertionMode=W.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={...Ug,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new Jh(this.options,this),this.activeFormattingElements=new ug(this.treeAdapter),this.fragmentContextID=n?Fh(this.treeAdapter.getTagName(n)):V.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new og(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...Ug,...t};e??=n.treeAdapter.createElement(B.TEMPLATE,z.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,z.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===V.TEMPLATE&&i.tmplInsertionModeStack.unshift(W.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??Vg,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===z.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,z.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=W.TEXT}switchToPlaintextParsing(){this.insertionMode=W.TEXT,this.originalInsertionMode=W.IN_BODY,this.tokenizer.state=Rh.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)===B.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===z.HTML)switch(this.fragmentContextID){case V.TITLE:case V.TEXTAREA:this.tokenizer.state=Rh.RCDATA;break;case V.STYLE:case V.XMP:case V.IFRAME:case V.NOEMBED:case V.NOFRAMES:case V.NOSCRIPT:this.tokenizer.state=Rh.RAWTEXT;break;case V.SCRIPT:this.tokenizer.state=Rh.SCRIPT_DATA;break;case V.PLAINTEXT:this.tokenizer.state=Rh.PLAINTEXT}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,z.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,z.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(B.HTML,z.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,V.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===R.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===V.SVG&&this.treeAdapter.getTagName(t)===B.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===z.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===V.MGLYPH||e.tagID===V.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,z.HTML)}_processToken(e){switch(e.type){case R.CHARACTER:this.onCharacter(e);break;case R.NULL_CHARACTER:this.onNullCharacter(e);break;case R.COMMENT:this.onComment(e);break;case R.DOCTYPE:this.onDoctype(e);break;case R.START_TAG:this._processStartTag(e);break;case R.END_TAG:this.onEndTag(e);break;case R.EOF:this.onEof(e);break;case R.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return Lg(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===cg.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=W.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(V.P),this.openElements.popUntilTagNamePopped(V.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case V.TR:this.insertionMode=W.IN_ROW;return;case V.TBODY:case V.THEAD:case V.TFOOT:this.insertionMode=W.IN_TABLE_BODY;return;case V.CAPTION:this.insertionMode=W.IN_CAPTION;return;case V.COLGROUP:this.insertionMode=W.IN_COLUMN_GROUP;return;case V.TABLE:this.insertionMode=W.IN_TABLE;return;case V.BODY:this.insertionMode=W.IN_BODY;return;case V.FRAMESET:this.insertionMode=W.IN_FRAMESET;return;case V.SELECT:this._resetInsertionModeForSelect(e);return;case V.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case V.HTML:this.insertionMode=this.headElement?W.AFTER_HEAD:W.BEFORE_HEAD;return;case V.TD:case V.TH:if(e>0){this.insertionMode=W.IN_CELL;return}break;case V.HEAD:if(e>0){this.insertionMode=W.IN_HEAD;return}}this.insertionMode=W.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===V.TEMPLATE)break;if(e===V.TABLE){this.insertionMode=W.IN_SELECT_IN_TABLE;return}}this.insertionMode=W.IN_SELECT}_isElementCausesFosterParenting(e){return Hg.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--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case V.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===z.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case V.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return Ih[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)cy(this,e);else switch(this.insertionMode){case W.INITIAL:r_(this,e);break;case W.BEFORE_HTML:o_(this,e);break;case W.BEFORE_HEAD:l_(this,e);break;case W.IN_HEAD:p_(this,e);break;case W.IN_HEAD_NO_SCRIPT:g_(this,e);break;case W.AFTER_HEAD:y_(this,e);break;case W.IN_BODY:case W.IN_CAPTION:case W.IN_CELL:case W.IN_TEMPLATE:S_(this,e);break;case W.TEXT:case W.IN_SELECT:case W.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case W.IN_TABLE:case W.IN_TABLE_BODY:case W.IN_ROW:_v(this,e);break;case W.IN_TABLE_TEXT:Av(this,e);break;case W.IN_COLUMN_GROUP:Lv(this,e);break;case W.AFTER_BODY:$v(this,e);break;case W.AFTER_AFTER_BODY:ay(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)sy(this,e);else switch(this.insertionMode){case W.INITIAL:r_(this,e);break;case W.BEFORE_HTML:o_(this,e);break;case W.BEFORE_HEAD:l_(this,e);break;case W.IN_HEAD:p_(this,e);break;case W.IN_HEAD_NO_SCRIPT:g_(this,e);break;case W.AFTER_HEAD:y_(this,e);break;case W.TEXT:this._insertCharacters(e);break;case W.IN_TABLE:case W.IN_TABLE_BODY:case W.IN_ROW:_v(this,e);break;case W.IN_COLUMN_GROUP:Lv(this,e);break;case W.AFTER_BODY:$v(this,e);break;case W.AFTER_AFTER_BODY:ay(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)Qg(this,e);else switch(this.insertionMode){case W.INITIAL:case W.BEFORE_HTML:case W.BEFORE_HEAD:case W.IN_HEAD:case W.IN_HEAD_NO_SCRIPT:case W.AFTER_HEAD:case W.IN_BODY:case W.IN_TABLE:case W.IN_CAPTION:case W.IN_COLUMN_GROUP:case W.IN_TABLE_BODY:case W.IN_ROW:case W.IN_CELL:case W.IN_SELECT:case W.IN_SELECT_IN_TABLE:case W.IN_TEMPLATE:case W.IN_FRAMESET:case W.AFTER_FRAMESET:Qg(this,e);break;case W.IN_TABLE_TEXT:jv(this,e);break;case W.AFTER_BODY:$g(this,e);break;case W.AFTER_AFTER_BODY:case W.AFTER_AFTER_FRAMESET:e_(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case W.INITIAL:n_(this,e);break;case W.BEFORE_HEAD:case W.IN_HEAD:case W.IN_HEAD_NO_SCRIPT:case W.AFTER_HEAD:this._err(e,L.misplacedDoctype);break;case W.IN_TABLE_TEXT:jv(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,L.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?uy(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case W.INITIAL:r_(this,e);break;case W.BEFORE_HTML:i_(this,e);break;case W.BEFORE_HEAD:s_(this,e);break;case W.IN_HEAD:u_(this,e);break;case W.IN_HEAD_NO_SCRIPT:m_(this,e);break;case W.AFTER_HEAD:__(this,e);break;case W.IN_BODY:tv(this,e);break;case W.IN_TABLE:Ev(this,e);break;case W.IN_TABLE_TEXT:jv(this,e);break;case W.IN_CAPTION:Nv(this,e);break;case W.IN_COLUMN_GROUP:Fv(this,e);break;case W.IN_TABLE_BODY:Rv(this,e);break;case W.IN_ROW:Bv(this,e);break;case W.IN_CELL:Hv(this,e);break;case W.IN_SELECT:Wv(this,e);break;case W.IN_SELECT_IN_TABLE:Kv(this,e);break;case W.IN_TEMPLATE:Jv(this,e);break;case W.AFTER_BODY:Zv(this,e);break;case W.IN_FRAMESET:ey(this,e);break;case W.AFTER_FRAMESET:ny(this,e);break;case W.AFTER_AFTER_BODY:iy(this,e);break;case W.AFTER_AFTER_FRAMESET:oy(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?dy(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case W.INITIAL:r_(this,e);break;case W.BEFORE_HTML:a_(this,e);break;case W.BEFORE_HEAD:c_(this,e);break;case W.IN_HEAD:d_(this,e);break;case W.IN_HEAD_NO_SCRIPT:h_(this,e);break;case W.AFTER_HEAD:v_(this,e);break;case W.IN_BODY:pv(this,e);break;case W.TEXT:hv(this,e);break;case W.IN_TABLE:Dv(this,e);break;case W.IN_TABLE_TEXT:jv(this,e);break;case W.IN_CAPTION:Pv(this,e);break;case W.IN_COLUMN_GROUP:Iv(this,e);break;case W.IN_TABLE_BODY:zv(this,e);break;case W.IN_ROW:Vv(this,e);break;case W.IN_CELL:Uv(this,e);break;case W.IN_SELECT:Gv(this,e);break;case W.IN_SELECT_IN_TABLE:qv(this,e);break;case W.IN_TEMPLATE:Yv(this,e);break;case W.AFTER_BODY:Qv(this,e);break;case W.IN_FRAMESET:ty(this,e);break;case W.AFTER_FRAMESET:ry(this,e);break;case W.AFTER_AFTER_BODY:ay(this,e)}}onEof(e){switch(this.insertionMode){case W.INITIAL:r_(this,e);break;case W.BEFORE_HTML:o_(this,e);break;case W.BEFORE_HEAD:l_(this,e);break;case W.IN_HEAD:p_(this,e);break;case W.IN_HEAD_NO_SCRIPT:g_(this,e);break;case W.AFTER_HEAD:y_(this,e);break;case W.IN_BODY:case W.IN_TABLE:case W.IN_CAPTION:case W.IN_COLUMN_GROUP:case W.IN_TABLE_BODY:case W.IN_ROW:case W.IN_CELL:case W.IN_SELECT:case W.IN_SELECT_IN_TABLE:mv(this,e);break;case W.TEXT:gv(this,e);break;case W.IN_TABLE_TEXT:jv(this,e);break;case W.IN_TEMPLATE:Xv(this,e);break;case W.AFTER_BODY:case W.IN_FRAMESET:case W.AFTER_FRAMESET:case W.AFTER_AFTER_BODY:case W.AFTER_AFTER_FRAMESET:t_(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===I.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case W.IN_HEAD:case W.IN_HEAD_NO_SCRIPT:case W.AFTER_HEAD:case W.TEXT:case W.IN_COLUMN_GROUP:case W.IN_SELECT:case W.IN_SELECT_IN_TABLE:case W.IN_FRAMESET:case W.AFTER_FRAMESET:this._insertCharacters(e);break;case W.IN_BODY:case W.IN_CAPTION:case W.IN_CELL:case W.IN_TEMPLATE:case W.AFTER_BODY:case W.AFTER_AFTER_BODY:case W.AFTER_AFTER_FRAMESET:x_(this,e);break;case W.IN_TABLE:case W.IN_TABLE_BODY:case W.IN_ROW:_v(this,e);break;case W.IN_TABLE_TEXT:kv(this,e)}}};function Gg(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):fv(e,t),n}function Kg(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function qg(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=Bg;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=Jg(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function Jg(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Yg(e,t,n){let r=Fh(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===V.TEMPLATE&&i===z.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Xg(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Zg(e,t){for(let n=0;n<zg;n++){let n=Gg(e,t);if(!n)break;let r=Kg(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=qg(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&Yg(e,a,i),Xg(e,r,n)}}function Qg(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function $g(e,t){e._appendCommentNode(t,e.openElements.items[0])}function e_(e,t){e._appendCommentNode(t,e.document)}function t_(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function n_(e,t){e._setDocumentType(t);let n=t.forceQuirks?Nh.QUIRKS:Sg(t);xg(t)||e._err(t,L.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=W.BEFORE_HTML}function r_(e,t){e._err(t,L.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Nh.QUIRKS),e.insertionMode=W.BEFORE_HTML,e._processToken(t)}function i_(e,t){t.tagID===V.HTML?(e._insertElement(t,z.HTML),e.insertionMode=W.BEFORE_HEAD):o_(e,t)}function a_(e,t){let n=t.tagID;(n===V.HTML||n===V.HEAD||n===V.BODY||n===V.BR)&&o_(e,t)}function o_(e,t){e._insertFakeRootElement(),e.insertionMode=W.BEFORE_HEAD,e._processToken(t)}function s_(e,t){switch(t.tagID){case V.HTML:tv(e,t);break;case V.HEAD:e._insertElement(t,z.HTML),e.headElement=e.openElements.current,e.insertionMode=W.IN_HEAD;break;default:l_(e,t)}}function c_(e,t){let n=t.tagID;n===V.HEAD||n===V.BODY||n===V.HTML||n===V.BR?l_(e,t):e._err(t,L.endTagWithoutMatchingOpenElement)}function l_(e,t){e._insertFakeElement(B.HEAD,V.HEAD),e.headElement=e.openElements.current,e.insertionMode=W.IN_HEAD,e._processToken(t)}function u_(e,t){switch(t.tagID){case V.HTML:tv(e,t);break;case V.BASE:case V.BASEFONT:case V.BGSOUND:case V.LINK:case V.META:e._appendElement(t,z.HTML),t.ackSelfClosing=!0;break;case V.TITLE:e._switchToTextParsing(t,Rh.RCDATA);break;case V.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Rh.RAWTEXT):(e._insertElement(t,z.HTML),e.insertionMode=W.IN_HEAD_NO_SCRIPT);break;case V.NOFRAMES:case V.STYLE:e._switchToTextParsing(t,Rh.RAWTEXT);break;case V.SCRIPT:e._switchToTextParsing(t,Rh.SCRIPT_DATA);break;case V.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=W.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(W.IN_TEMPLATE);break;case V.HEAD:e._err(t,L.misplacedStartTagForHeadElement);break;default:p_(e,t)}}function d_(e,t){switch(t.tagID){case V.HEAD:e.openElements.pop(),e.insertionMode=W.AFTER_HEAD;break;case V.BODY:case V.BR:case V.HTML:p_(e,t);break;case V.TEMPLATE:f_(e,t);break;default:e._err(t,L.endTagWithoutMatchingOpenElement)}}function f_(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==V.TEMPLATE&&e._err(t,L.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(V.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,L.endTagWithoutMatchingOpenElement)}function p_(e,t){e.openElements.pop(),e.insertionMode=W.AFTER_HEAD,e._processToken(t)}function m_(e,t){switch(t.tagID){case V.HTML:tv(e,t);break;case V.BASEFONT:case V.BGSOUND:case V.HEAD:case V.LINK:case V.META:case V.NOFRAMES:case V.STYLE:u_(e,t);break;case V.NOSCRIPT:e._err(t,L.nestedNoscriptInHead);break;default:g_(e,t)}}function h_(e,t){switch(t.tagID){case V.NOSCRIPT:e.openElements.pop(),e.insertionMode=W.IN_HEAD;break;case V.BR:g_(e,t);break;default:e._err(t,L.endTagWithoutMatchingOpenElement)}}function g_(e,t){let n=t.type===R.EOF?L.openElementsLeftAfterEof:L.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=W.IN_HEAD,e._processToken(t)}function __(e,t){switch(t.tagID){case V.HTML:tv(e,t);break;case V.BODY:e._insertElement(t,z.HTML),e.framesetOk=!1,e.insertionMode=W.IN_BODY;break;case V.FRAMESET:e._insertElement(t,z.HTML),e.insertionMode=W.IN_FRAMESET;break;case V.BASE:case V.BASEFONT:case V.BGSOUND:case V.LINK:case V.META:case V.NOFRAMES:case V.SCRIPT:case V.STYLE:case V.TEMPLATE:case V.TITLE:e._err(t,L.abandonedHeadElementChild),e.openElements.push(e.headElement,V.HEAD),u_(e,t),e.openElements.remove(e.headElement);break;case V.HEAD:e._err(t,L.misplacedStartTagForHeadElement);break;default:y_(e,t)}}function v_(e,t){switch(t.tagID){case V.BODY:case V.HTML:case V.BR:y_(e,t);break;case V.TEMPLATE:f_(e,t);break;default:e._err(t,L.endTagWithoutMatchingOpenElement)}}function y_(e,t){e._insertFakeElement(B.BODY,V.BODY),e.insertionMode=W.IN_BODY,b_(e,t)}function b_(e,t){switch(t.type){case R.CHARACTER:S_(e,t);break;case R.WHITESPACE_CHARACTER:x_(e,t);break;case R.COMMENT:Qg(e,t);break;case R.START_TAG:tv(e,t);break;case R.END_TAG:pv(e,t);break;case R.EOF:mv(e,t)}}function x_(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function S_(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function C_(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function w_(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function T_(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,z.HTML),e.insertionMode=W.IN_FRAMESET)}function E_(e,t){e.openElements.hasInButtonScope(V.P)&&e._closePElement(),e._insertElement(t,z.HTML)}function D_(e,t){e.openElements.hasInButtonScope(V.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Lh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,z.HTML)}function O_(e,t){e.openElements.hasInButtonScope(V.P)&&e._closePElement(),e._insertElement(t,z.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function k_(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(V.P)&&e._closePElement(),e._insertElement(t,z.HTML),n||(e.formElement=e.openElements.current))}function A_(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===V.LI&&r===V.LI||(n===V.DD||n===V.DT)&&(r===V.DD||r===V.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==V.ADDRESS&&r!==V.DIV&&r!==V.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(V.P)&&e._closePElement(),e._insertElement(t,z.HTML)}function j_(e,t){e.openElements.hasInButtonScope(V.P)&&e._closePElement(),e._insertElement(t,z.HTML),e.tokenizer.state=Rh.PLAINTEXT}function M_(e,t){e.openElements.hasInScope(V.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(V.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,z.HTML),e.framesetOk=!1}function N_(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(B.A);n&&(Zg(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,z.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function P_(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,z.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function F_(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(V.NOBR)&&(Zg(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,z.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function I_(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,z.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function L_(e,t){e.treeAdapter.getDocumentMode(e.document)!==Nh.QUIRKS&&e.openElements.hasInButtonScope(V.P)&&e._closePElement(),e._insertElement(t,z.HTML),e.framesetOk=!1,e.insertionMode=W.IN_TABLE}function R_(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,z.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function z_(e){let t=_h(e,Mh.TYPE);return t!=null&&t.toLowerCase()===Rg}function B_(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,z.HTML),z_(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function V_(e,t){e._appendElement(t,z.HTML),t.ackSelfClosing=!0}function H_(e,t){e.openElements.hasInButtonScope(V.P)&&e._closePElement(),e._appendElement(t,z.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function U_(e,t){t.tagName=B.IMG,t.tagID=V.IMG,R_(e,t)}function W_(e,t){e._insertElement(t,z.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Rh.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=W.TEXT}function G_(e,t){e.openElements.hasInButtonScope(V.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Rh.RAWTEXT)}function K_(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Rh.RAWTEXT)}function q_(e,t){e._switchToTextParsing(t,Rh.RAWTEXT)}function J_(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,z.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===W.IN_TABLE||e.insertionMode===W.IN_CAPTION||e.insertionMode===W.IN_TABLE_BODY||e.insertionMode===W.IN_ROW||e.insertionMode===W.IN_CELL?W.IN_SELECT_IN_TABLE:W.IN_SELECT}function Y_(e,t){e.openElements.currentTagId===V.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,z.HTML)}function X_(e,t){e.openElements.hasInScope(V.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,z.HTML)}function Z_(e,t){e.openElements.hasInScope(V.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(V.RTC),e._insertElement(t,z.HTML)}function Q_(e,t){e._reconstructActiveFormattingElements(),jg(t),Ng(t),t.selfClosing?e._appendElement(t,z.MATHML):e._insertElement(t,z.MATHML),t.ackSelfClosing=!0}function $_(e,t){e._reconstructActiveFormattingElements(),Mg(t),Ng(t),t.selfClosing?e._appendElement(t,z.SVG):e._insertElement(t,z.SVG),t.ackSelfClosing=!0}function ev(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,z.HTML)}function tv(e,t){switch(t.tagID){case V.I:case V.S:case V.B:case V.U:case V.EM:case V.TT:case V.BIG:case V.CODE:case V.FONT:case V.SMALL:case V.STRIKE:case V.STRONG:P_(e,t);break;case V.A:N_(e,t);break;case V.H1:case V.H2:case V.H3:case V.H4:case V.H5:case V.H6:D_(e,t);break;case V.P:case V.DL:case V.OL:case V.UL:case V.DIV:case V.DIR:case V.NAV:case V.MAIN:case V.MENU:case V.ASIDE:case V.CENTER:case V.FIGURE:case V.FOOTER:case V.HEADER:case V.HGROUP:case V.DIALOG:case V.DETAILS:case V.ADDRESS:case V.ARTICLE:case V.SEARCH:case V.SECTION:case V.SUMMARY:case V.FIELDSET:case V.BLOCKQUOTE:case V.FIGCAPTION:E_(e,t);break;case V.LI:case V.DD:case V.DT:A_(e,t);break;case V.BR:case V.IMG:case V.WBR:case V.AREA:case V.EMBED:case V.KEYGEN:R_(e,t);break;case V.HR:H_(e,t);break;case V.RB:case V.RTC:X_(e,t);break;case V.RT:case V.RP:Z_(e,t);break;case V.PRE:case V.LISTING:O_(e,t);break;case V.XMP:G_(e,t);break;case V.SVG:$_(e,t);break;case V.HTML:C_(e,t);break;case V.BASE:case V.LINK:case V.META:case V.STYLE:case V.TITLE:case V.SCRIPT:case V.BGSOUND:case V.BASEFONT:case V.TEMPLATE:u_(e,t);break;case V.BODY:w_(e,t);break;case V.FORM:k_(e,t);break;case V.NOBR:F_(e,t);break;case V.MATH:Q_(e,t);break;case V.TABLE:L_(e,t);break;case V.INPUT:B_(e,t);break;case V.PARAM:case V.TRACK:case V.SOURCE:V_(e,t);break;case V.IMAGE:U_(e,t);break;case V.BUTTON:M_(e,t);break;case V.APPLET:case V.OBJECT:case V.MARQUEE:I_(e,t);break;case V.IFRAME:K_(e,t);break;case V.SELECT:J_(e,t);break;case V.OPTION:case V.OPTGROUP:Y_(e,t);break;case V.NOEMBED:case V.NOFRAMES:q_(e,t);break;case V.FRAMESET:T_(e,t);break;case V.TEXTAREA:W_(e,t);break;case V.NOSCRIPT:e.options.scriptingEnabled?q_(e,t):ev(e,t);break;case V.PLAINTEXT:j_(e,t);break;case V.COL:case V.TH:case V.TD:case V.TR:case V.HEAD:case V.FRAME:case V.TBODY:case V.TFOOT:case V.THEAD:case V.CAPTION:case V.COLGROUP:break;default:ev(e,t)}}function nv(e,t){if(e.openElements.hasInScope(V.BODY)&&(e.insertionMode=W.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function rv(e,t){e.openElements.hasInScope(V.BODY)&&(e.insertionMode=W.AFTER_BODY,Qv(e,t))}function iv(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function av(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(V.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(V.FORM):n&&e.openElements.remove(n))}function ov(e){e.openElements.hasInButtonScope(V.P)||e._insertFakeElement(B.P,V.P),e._closePElement()}function sv(e){e.openElements.hasInListItemScope(V.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(V.LI),e.openElements.popUntilTagNamePopped(V.LI))}function cv(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function lv(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function uv(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function dv(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(B.BR,V.BR),e.openElements.pop(),e.framesetOk=!1}function fv(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==V.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function pv(e,t){switch(t.tagID){case V.A:case V.B:case V.I:case V.S:case V.U:case V.EM:case V.TT:case V.BIG:case V.CODE:case V.FONT:case V.NOBR:case V.SMALL:case V.STRIKE:case V.STRONG:Zg(e,t);break;case V.P:ov(e);break;case V.DL:case V.UL:case V.OL:case V.DIR:case V.DIV:case V.NAV:case V.PRE:case V.MAIN:case V.MENU:case V.ASIDE:case V.BUTTON:case V.CENTER:case V.FIGURE:case V.FOOTER:case V.HEADER:case V.HGROUP:case V.DIALOG:case V.ADDRESS:case V.ARTICLE:case V.DETAILS:case V.SEARCH:case V.SECTION:case V.SUMMARY:case V.LISTING:case V.FIELDSET:case V.BLOCKQUOTE:case V.FIGCAPTION:iv(e,t);break;case V.LI:sv(e);break;case V.DD:case V.DT:cv(e,t);break;case V.H1:case V.H2:case V.H3:case V.H4:case V.H5:case V.H6:lv(e);break;case V.BR:dv(e);break;case V.BODY:nv(e,t);break;case V.HTML:rv(e,t);break;case V.FORM:av(e);break;case V.APPLET:case V.OBJECT:case V.MARQUEE:uv(e,t);break;case V.TEMPLATE:f_(e,t);break;default:fv(e,t)}}function mv(e,t){e.tmplInsertionModeStack.length>0?Xv(e,t):t_(e,t)}function hv(e,t){var n;t.tagID===V.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function gv(e,t){e._err(t,L.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function _v(e,t){if(e.openElements.currentTagId!==void 0&&Hg.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=W.IN_TABLE_TEXT,t.type){case R.CHARACTER:Av(e,t);break;case R.WHITESPACE_CHARACTER:kv(e,t)}else Ov(e,t)}function vv(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,z.HTML),e.insertionMode=W.IN_CAPTION}function yv(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,z.HTML),e.insertionMode=W.IN_COLUMN_GROUP}function bv(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(B.COLGROUP,V.COLGROUP),e.insertionMode=W.IN_COLUMN_GROUP,Fv(e,t)}function xv(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,z.HTML),e.insertionMode=W.IN_TABLE_BODY}function Sv(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(B.TBODY,V.TBODY),e.insertionMode=W.IN_TABLE_BODY,Rv(e,t)}function Cv(e,t){e.openElements.hasInTableScope(V.TABLE)&&(e.openElements.popUntilTagNamePopped(V.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function wv(e,t){z_(t)?e._appendElement(t,z.HTML):Ov(e,t),t.ackSelfClosing=!0}function Tv(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,z.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ev(e,t){switch(t.tagID){case V.TD:case V.TH:case V.TR:Sv(e,t);break;case V.STYLE:case V.SCRIPT:case V.TEMPLATE:u_(e,t);break;case V.COL:bv(e,t);break;case V.FORM:Tv(e,t);break;case V.TABLE:Cv(e,t);break;case V.TBODY:case V.TFOOT:case V.THEAD:xv(e,t);break;case V.INPUT:wv(e,t);break;case V.CAPTION:vv(e,t);break;case V.COLGROUP:yv(e,t);break;default:Ov(e,t)}}function Dv(e,t){switch(t.tagID){case V.TABLE:e.openElements.hasInTableScope(V.TABLE)&&(e.openElements.popUntilTagNamePopped(V.TABLE),e._resetInsertionMode());break;case V.TEMPLATE:f_(e,t);break;case V.BODY:case V.CAPTION:case V.COL:case V.COLGROUP:case V.HTML:case V.TBODY:case V.TD:case V.TFOOT:case V.TH:case V.THEAD:case V.TR:break;default:Ov(e,t)}}function Ov(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,b_(e,t),e.fosterParentingEnabled=n}function kv(e,t){e.pendingCharacterTokens.push(t)}function Av(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function jv(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ov(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var Mv=new Set([V.CAPTION,V.COL,V.COLGROUP,V.TBODY,V.TD,V.TFOOT,V.TH,V.THEAD,V.TR]);function Nv(e,t){let n=t.tagID;Mv.has(n)?e.openElements.hasInTableScope(V.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(V.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=W.IN_TABLE,Ev(e,t)):tv(e,t)}function Pv(e,t){let n=t.tagID;switch(n){case V.CAPTION:case V.TABLE:e.openElements.hasInTableScope(V.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(V.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=W.IN_TABLE,n===V.TABLE&&Dv(e,t));break;case V.BODY:case V.COL:case V.COLGROUP:case V.HTML:case V.TBODY:case V.TD:case V.TFOOT:case V.TH:case V.THEAD:case V.TR:break;default:pv(e,t)}}function Fv(e,t){switch(t.tagID){case V.HTML:tv(e,t);break;case V.COL:e._appendElement(t,z.HTML),t.ackSelfClosing=!0;break;case V.TEMPLATE:u_(e,t);break;default:Lv(e,t)}}function Iv(e,t){switch(t.tagID){case V.COLGROUP:e.openElements.currentTagId===V.COLGROUP&&(e.openElements.pop(),e.insertionMode=W.IN_TABLE);break;case V.TEMPLATE:f_(e,t);break;case V.COL:break;default:Lv(e,t)}}function Lv(e,t){e.openElements.currentTagId===V.COLGROUP&&(e.openElements.pop(),e.insertionMode=W.IN_TABLE,e._processToken(t))}function Rv(e,t){switch(t.tagID){case V.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,z.HTML),e.insertionMode=W.IN_ROW;break;case V.TH:case V.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(B.TR,V.TR),e.insertionMode=W.IN_ROW,Bv(e,t);break;case V.CAPTION:case V.COL:case V.COLGROUP:case V.TBODY:case V.TFOOT:case V.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=W.IN_TABLE,Ev(e,t));break;default:Ev(e,t)}}function zv(e,t){let n=t.tagID;switch(t.tagID){case V.TBODY:case V.TFOOT:case V.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=W.IN_TABLE);break;case V.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=W.IN_TABLE,Dv(e,t));break;case V.BODY:case V.CAPTION:case V.COL:case V.COLGROUP:case V.HTML:case V.TD:case V.TH:case V.TR:break;default:Dv(e,t)}}function Bv(e,t){switch(t.tagID){case V.TH:case V.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,z.HTML),e.insertionMode=W.IN_CELL,e.activeFormattingElements.insertMarker();break;case V.CAPTION:case V.COL:case V.COLGROUP:case V.TBODY:case V.TFOOT:case V.THEAD:case V.TR:e.openElements.hasInTableScope(V.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=W.IN_TABLE_BODY,Rv(e,t));break;default:Ev(e,t)}}function Vv(e,t){switch(t.tagID){case V.TR:e.openElements.hasInTableScope(V.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=W.IN_TABLE_BODY);break;case V.TABLE:e.openElements.hasInTableScope(V.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=W.IN_TABLE_BODY,zv(e,t));break;case V.TBODY:case V.TFOOT:case V.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(V.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=W.IN_TABLE_BODY,zv(e,t));break;case V.BODY:case V.CAPTION:case V.COL:case V.COLGROUP:case V.HTML:case V.TD:case V.TH:break;default:Dv(e,t)}}function Hv(e,t){let n=t.tagID;Mv.has(n)?(e.openElements.hasInTableScope(V.TD)||e.openElements.hasInTableScope(V.TH))&&(e._closeTableCell(),Bv(e,t)):tv(e,t)}function Uv(e,t){let n=t.tagID;switch(n){case V.TD:case V.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=W.IN_ROW);break;case V.TABLE:case V.TBODY:case V.TFOOT:case V.THEAD:case V.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Vv(e,t));break;case V.BODY:case V.CAPTION:case V.COL:case V.COLGROUP:case V.HTML:break;default:pv(e,t)}}function Wv(e,t){switch(t.tagID){case V.HTML:tv(e,t);break;case V.OPTION:e.openElements.currentTagId===V.OPTION&&e.openElements.pop(),e._insertElement(t,z.HTML);break;case V.OPTGROUP:e.openElements.currentTagId===V.OPTION&&e.openElements.pop(),e.openElements.currentTagId===V.OPTGROUP&&e.openElements.pop(),e._insertElement(t,z.HTML);break;case V.HR:e.openElements.currentTagId===V.OPTION&&e.openElements.pop(),e.openElements.currentTagId===V.OPTGROUP&&e.openElements.pop(),e._appendElement(t,z.HTML),t.ackSelfClosing=!0;break;case V.INPUT:case V.KEYGEN:case V.TEXTAREA:case V.SELECT:e.openElements.hasInSelectScope(V.SELECT)&&(e.openElements.popUntilTagNamePopped(V.SELECT),e._resetInsertionMode(),t.tagID!==V.SELECT&&e._processStartTag(t));break;case V.SCRIPT:case V.TEMPLATE:u_(e,t)}}function Gv(e,t){switch(t.tagID){case V.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===V.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===V.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===V.OPTGROUP&&e.openElements.pop();break;case V.OPTION:e.openElements.currentTagId===V.OPTION&&e.openElements.pop();break;case V.SELECT:e.openElements.hasInSelectScope(V.SELECT)&&(e.openElements.popUntilTagNamePopped(V.SELECT),e._resetInsertionMode());break;case V.TEMPLATE:f_(e,t)}}function Kv(e,t){let n=t.tagID;n===V.CAPTION||n===V.TABLE||n===V.TBODY||n===V.TFOOT||n===V.THEAD||n===V.TR||n===V.TD||n===V.TH?(e.openElements.popUntilTagNamePopped(V.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Wv(e,t)}function qv(e,t){let n=t.tagID;n===V.CAPTION||n===V.TABLE||n===V.TBODY||n===V.TFOOT||n===V.THEAD||n===V.TR||n===V.TD||n===V.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(V.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Gv(e,t)}function Jv(e,t){switch(t.tagID){case V.BASE:case V.BASEFONT:case V.BGSOUND:case V.LINK:case V.META:case V.NOFRAMES:case V.SCRIPT:case V.STYLE:case V.TEMPLATE:case V.TITLE:u_(e,t);break;case V.CAPTION:case V.COLGROUP:case V.TBODY:case V.TFOOT:case V.THEAD:e.tmplInsertionModeStack[0]=W.IN_TABLE,e.insertionMode=W.IN_TABLE,Ev(e,t);break;case V.COL:e.tmplInsertionModeStack[0]=W.IN_COLUMN_GROUP,e.insertionMode=W.IN_COLUMN_GROUP,Fv(e,t);break;case V.TR:e.tmplInsertionModeStack[0]=W.IN_TABLE_BODY,e.insertionMode=W.IN_TABLE_BODY,Rv(e,t);break;case V.TD:case V.TH:e.tmplInsertionModeStack[0]=W.IN_ROW,e.insertionMode=W.IN_ROW,Bv(e,t);break;default:e.tmplInsertionModeStack[0]=W.IN_BODY,e.insertionMode=W.IN_BODY,tv(e,t)}}function Yv(e,t){t.tagID===V.TEMPLATE&&f_(e,t)}function Xv(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(V.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):t_(e,t)}function Zv(e,t){t.tagID===V.HTML?tv(e,t):$v(e,t)}function Qv(e,t){if(t.tagID===V.HTML){if(e.fragmentContext||(e.insertionMode=W.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===V.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else $v(e,t)}function $v(e,t){e.insertionMode=W.IN_BODY,b_(e,t)}function ey(e,t){switch(t.tagID){case V.HTML:tv(e,t);break;case V.FRAMESET:e._insertElement(t,z.HTML);break;case V.FRAME:e._appendElement(t,z.HTML),t.ackSelfClosing=!0;break;case V.NOFRAMES:u_(e,t)}}function ty(e,t){t.tagID===V.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==V.FRAMESET&&(e.insertionMode=W.AFTER_FRAMESET))}function ny(e,t){switch(t.tagID){case V.HTML:tv(e,t);break;case V.NOFRAMES:u_(e,t)}}function ry(e,t){t.tagID===V.HTML&&(e.insertionMode=W.AFTER_AFTER_FRAMESET)}function iy(e,t){t.tagID===V.HTML?tv(e,t):ay(e,t)}function ay(e,t){e.insertionMode=W.IN_BODY,b_(e,t)}function oy(e,t){switch(t.tagID){case V.HTML:tv(e,t);break;case V.NOFRAMES:u_(e,t)}}function sy(e,t){t.chars=`�`,e._insertCharacters(t)}function cy(e,t){e._insertCharacters(t),e.framesetOk=!1}function ly(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==z.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function uy(e,t){if(Ag(t))ly(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===z.MATHML?jg(t):r===z.SVG&&(Pg(t),Mg(t)),Ng(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function dy(e,t){if(t.tagID===V.P||t.tagID===V.BR)ly(e),e._endTagOutsideForeignContent(t);else for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===z.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}B.AREA,B.BASE,B.BASEFONT,B.BGSOUND,B.BR,B.COL,B.EMBED,B.FRAME,B.HR,B.IMG,B.INPUT,B.KEYGEN,B.LINK,B.META,B.PARAM,B.SOURCE,B.TRACK,B.WBR;function fy(e,t){return Wg.parse(e,t)}function py(e,t,n){typeof e==`string`&&(n=t,t=e,e=null);let r=Wg.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}var my={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`}},hy=`https://html.spec.whatwg.org/multipage/parsing.html#parse-error-`,gy=/-[a-z]/g,_y=/%c(?:([-+])(\d+))?/g,vy=/%x/g,yy={2:!0,1:!1,0:null},by={};function xy(e,n){let r=n||by,i=r.onerror,a=e instanceof t.a?e:new t.a(e),o=r.fragment?py:fy,s=String(a);return eh(o(s,{sourceCodeLocationInfo:!0,onParseError:r.onerror?c:null,scriptingEnabled:!1}),{file:a,space:r.space,verbose:r.verbose});function c(e){let n=e.code,o=Sy(n),c=r[o]??!0,l=typeof c==`number`?c:+!!c;if(l){let r=my[o],s=new t.f(u(r.reason),{place:{start:{line:e.startLine,column:e.startCol,offset:e.startOffset},end:{line:e.endLine,column:e.endCol,offset:e.endOffset}},ruleId:n,source:`hast-util-from-html`});a.path&&(s.file=a.path,s.name=a.path+`:`+s.name),s.fatal=yy[l],s.note=u(r.description),s.url=r.url===!1?void 0:hy+n,i(s)}function u(t){return t.replace(_y,n).replace(vy,r);function n(t,n,r){let i=(r?Number.parseInt(r,10):0)*(n===`-`?-1:1);return wy(s.charAt(e.startOffset+i))}function r(){return Ty(s.charCodeAt(e.startOffset))}}}}function Sy(e){return e.replace(gy,Cy)}function Cy(e){return e.charAt(1).toUpperCase()}function wy(e){return e==="`"?"` ` `":e}function Ty(e){return`0x`+e.toString(16).toUpperCase()}function Ey(e,n){let r=(n||{}).force||!1;t.o(e,i);function i(e){r?delete e.position:e.position=void 0}}function Dy(e,t){let n=xy(e,t);return Ey(n,{force:!0}),delete n.data,n}var Oy=(function(e,n,r){let i=t.l(r);if(!e||!e.type||!e.children)throw Error(`Expected parent node`);if(typeof n==`number`){if(n<0||n===1/0)throw Error(`Expected positive finite number as index`)}else if(n=e.children.indexOf(n),n<0)throw Error(`Expected child node or index`);for(;++n<e.children.length;)if(i(e.children[n],n,e))return e.children[n]}),ky=(function(e){if(e==null)return Ny;if(typeof e==`string`)return jy(e);if(typeof e==`object`)return Ay(e);if(typeof e==`function`)return My(e);throw Error("Expected function, string, or array as `test`")});function Ay(e){let t=[],n=-1;for(;++n<e.length;)t[n]=ky(e[n]);return My(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function jy(e){return My(t);function t(t){return t.tagName===e}}function My(e){return t;function t(t,n,r){return!!(Py(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Ny(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`element`&&`tagName`in e&&typeof e.tagName==`string`)}function Py(e){return typeof e==`object`&&!!e&&`type`in e&&`tagName`in e}var Fy=/\n/g,Iy=/[\t ]+/g,Ly=ky(`br`),Ry=ky(Zy),zy=ky(`p`),By=ky(`tr`),Vy=ky([`datalist`,`head`,`noembed`,`noframes`,`noscript`,`rp`,`script`,`style`,`template`,`title`,Xy,Qy]),Hy=ky(`address.article.aside.blockquote.body.caption.center.dd.dialog.dir.dl.dt.div.figure.figcaption.footer.form,.h1.h2.h3.h4.h5.h6.header.hgroup.hr.html.legend.li.listing.main.menu.nav.ol.p.plaintext.pre.section.ul.xmp`.split(`.`));function Uy(e,t){let n=t||{},r=`children`in e?e.children:[],i=Hy(e),a=Yy(e,{whitespace:n.whitespace||`normal`,breakBefore:!1,breakAfter:!1}),o=[];(e.type===`text`||e.type===`comment`)&&o.push(...Ky(e,{whitespace:a,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<r.length;)o.push(...Wy(r[s],e,{whitespace:a,breakBefore:s?void 0:i,breakAfter:s<r.length-1?Ly(r[s+1]):i}));let c=[],l;for(s=-1;++s<o.length;){let e=o[s];typeof e==`number`?l!==void 0&&e>l&&(l=e):e&&(l!==void 0&&l>-1&&c.push(`
28
- `.repeat(l)||` `),l=-1,c.push(e))}return c.join(``)}function Wy(e,t,n){return e.type===`element`?Gy(e,t,n):e.type===`text`?n.whitespace===`normal`?Ky(e,n):qy(e):[]}function Gy(e,t,n){let r=Yy(e,n),i=e.children||[],a=-1,o=[];if(Vy(e))return o;let s,c;for(Ly(e)||By(e)&&Oy(t,e,By)?c=`
29
- `:zy(e)?(s=2,c=2):Hy(e)&&(s=1,c=1);++a<i.length;)o=o.concat(Wy(i[a],e,{whitespace:r,breakBefore:a?void 0:s,breakAfter:a<i.length-1?Ly(i[a+1]):c}));return Ry(e)&&Oy(t,e,Ry)&&o.push(` `),s&&o.unshift(s),c&&o.push(c),o}function Ky(e,t){let n=String(e.value),r=[],i=[],a=0;for(;a<=n.length;){Fy.lastIndex=a;let e=Fy.exec(n),i=e&&`index`in e?e.index:n.length;r.push(Jy(n.slice(a,i).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,``),a!==0||t.breakBefore,i!==n.length||t.breakAfter)),a=i+1}let o=-1,s;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),s=void 0):r[o]?(typeof s==`number`&&i.push(s),i.push(r[o]),s=0):(o===0||o===r.length-1)&&i.push(0);return i}function qy(e){return[String(e.value)]}function Jy(e,t,n){let r=[],i=0,a;for(;i<e.length;){Iy.lastIndex=i;let n=Iy.exec(e);a=n?n.index:e.length,!i&&!a&&n&&!t&&r.push(``),i!==a&&r.push(e.slice(i,a)),i=n?a+n[0].length:a}return i!==a&&!n&&r.push(``),r.join(` `)}function Yy(e,t){if(e.type===`element`){let n=e.properties||{};switch(e.tagName){case`listing`:case`plaintext`:case`xmp`:return`pre`;case`nobr`:return`nowrap`;case`pre`:return n.wrap?`pre-wrap`:`pre`;case`td`:case`th`:return n.noWrap?`nowrap`:t.whitespace;case`textarea`:return`pre-wrap`}}return t.whitespace}function Xy(e){return!!(e.properties||{}).hidden}function Zy(e){return e.tagName===`td`||e.tagName===`th`}function Qy(e){return e.tagName===`dialog`&&!(e.properties||{}).open}var $y={},eb=[];function tb(e){let n=e||$y;return function(e,r){t.c(e,`element`,function(e,a){let o=Array.isArray(e.properties.className)?e.properties.className:eb,s=o.includes(`language-math`),c=o.includes(`math-display`),l=o.includes(`math-inline`),u=c;if(!s&&!c&&!l)return;let d=a[a.length-1],f=e;if(e.tagName===`code`&&s&&d&&d.type===`element`&&d.tagName===`pre`&&(f=d,d=a[a.length-2],u=!0),!d)return;let p=Uy(f,{whitespace:`pre`}),m;try{m=i.t.renderToString(p,{...n,displayMode:u,throwOnError:!0})}catch(t){let o=t,s=o.name.toLowerCase();r.message(`Could not render math with KaTeX`,{ancestors:[...a,e],cause:o,place:e.position,ruleId:s,source:`rehype-katex`});try{m=i.t.renderToString(p,{...n,displayMode:u,strict:`ignore`,throwOnError:!1})}catch{m=[{type:`element`,tagName:`span`,properties:{className:[`katex-error`],style:`color:`+(n.errorColor||`#cc0000`),title:String(t)},children:[{type:`text`,value:p}]}]}}typeof m==`string`&&(m=Dy(m,{fragment:!0}).children);let h=d.children.indexOf(f);return d.children.splice(h,1,...m),t.s})}}var nb={}.hasOwnProperty;function rb(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&nb.call(t,e)){let n=String(t[e]);i=nb.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var ib={},ab={}.hasOwnProperty,ob=rb(`type`,{handlers:{root:cb,element:pb,text:db,comment:fb,doctype:ub}});function sb(e,t){let n=(t||ib).space;return ob(e,n===`svg`?Ff:Pf)}function cb(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=hb(e.children,n,t),gb(e,n),n}function lb(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=hb(e.children,n,t),gb(e,n),n}function ub(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return gb(e,t),t}function db(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return gb(e,t),t}function fb(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return gb(e,t),t}function pb(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=Ff);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&ab.call(e.properties,a)){let t=mb(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Zm[o],childNodes:[],parentNode:null};return s.childNodes=hb(e.children,s,r),gb(e,s),e.tagName===`template`&&e.content&&(s.content=lb(e.content,r)),s}function mb(e,t,n){let r=jf(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Yd(n):Lf(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=Zm[r.space]}return i}function hb(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=ob(e[r],n);a.parentNode=t,i.push(a)}return i}function gb(e,t){let n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var _b=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],vb=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]),G;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(G||={});var yb={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function bb(e){return e>=55296&&e<=57343}function xb(e){return e>=56320&&e<=57343}function Sb(e,t){return(e-55296)*1024+9216+t}function Cb(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function wb(e){return e>=64976&&e<=65007||vb.has(e)}var K;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(K||={});var Tb=65536,Eb=class{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=Tb,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_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){let t=this.html.charCodeAt(this.pos+1);if(xb(t))return this.pos++,this._addGap(),Sb(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,G.EOF;return this._err(K.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,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,G.EOF;let n=this.html.charCodeAt(t);return n===G.CARRIAGE_RETURN?G.LINE_FEED:n}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,G.EOF;let e=this.html.charCodeAt(this.pos);return e===G.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,G.LINE_FEED):e===G.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,bb(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===G.LINE_FEED||e===G.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){Cb(e)?this._err(K.controlCharacterInInputStream):wb(e)&&this._err(K.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},q;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(q||={});function Db(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var Ob=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ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀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℮ℯ檈Ā;q℮ℛim;拧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肻\xA0ଷ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(e=>e.charCodeAt(0))),kb=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]]);String.fromCodePoint;function Ab(e){return e>=55296&&e<=57343||e>1114111?65533:kb.get(e)??e}var jb;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(jb||={});var Mb=32,Nb;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(Nb||={});function Pb(e){return e>=jb.ZERO&&e<=jb.NINE}function Fb(e){return e>=jb.UPPER_A&&e<=jb.UPPER_F||e>=jb.LOWER_A&&e<=jb.LOWER_F}function Ib(e){return e>=jb.UPPER_A&&e<=jb.UPPER_Z||e>=jb.LOWER_A&&e<=jb.LOWER_Z||Pb(e)}function Lb(e){return e===jb.EQUALS||Ib(e)}var Rb;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(Rb||={});var zb;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(zb||={});var Bb=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Rb.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=zb.Strict}startEntity(e){this.decodeMode=e,this.state=Rb.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Rb.EntityStart:return e.charCodeAt(t)===jb.NUM?(this.state=Rb.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Rb.NamedEntity,this.stateNamedEntity(e,t));case Rb.NumericStart:return this.stateNumericStart(e,t);case Rb.NumericDecimal:return this.stateNumericDecimal(e,t);case Rb.NumericHex:return this.stateNumericHex(e,t);case Rb.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Mb)===jb.LOWER_X?(this.state=Rb.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Rb.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(Pb(r)||Fb(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(Pb(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===jb.SEMI)this.consumed+=1;else if(this.decodeMode===zb.Strict)return 0;return this.emitCodePoint(Ab(this.result),this.consumed),this.errors&&(e!==jb.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&Nb.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=Vb(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===zb.Attribute&&(i===0||Lb(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&Nb.VALUE_LENGTH)>>14,i!==0){if(a===jb.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==zb.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&Nb.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~Nb.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case Rb.NamedEntity:return this.result!==0&&(this.decodeMode!==zb.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Rb.NumericDecimal:return this.emitNumericEntity(0,2);case Rb.NumericHex:return this.emitNumericEntity(0,3);case Rb.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Rb.EntityStart:return 0}}};function Vb(e,t,n,r){let i=(t&Nb.BRANCH_LENGTH)>>7,a=t&Nb.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var J;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(J||={});var Hb;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(Hb||={});var Ub;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(Ub||={});var Y;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(Y||={});var X;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(X||={});var Wb=new Map([[Y.A,X.A],[Y.ADDRESS,X.ADDRESS],[Y.ANNOTATION_XML,X.ANNOTATION_XML],[Y.APPLET,X.APPLET],[Y.AREA,X.AREA],[Y.ARTICLE,X.ARTICLE],[Y.ASIDE,X.ASIDE],[Y.B,X.B],[Y.BASE,X.BASE],[Y.BASEFONT,X.BASEFONT],[Y.BGSOUND,X.BGSOUND],[Y.BIG,X.BIG],[Y.BLOCKQUOTE,X.BLOCKQUOTE],[Y.BODY,X.BODY],[Y.BR,X.BR],[Y.BUTTON,X.BUTTON],[Y.CAPTION,X.CAPTION],[Y.CENTER,X.CENTER],[Y.CODE,X.CODE],[Y.COL,X.COL],[Y.COLGROUP,X.COLGROUP],[Y.DD,X.DD],[Y.DESC,X.DESC],[Y.DETAILS,X.DETAILS],[Y.DIALOG,X.DIALOG],[Y.DIR,X.DIR],[Y.DIV,X.DIV],[Y.DL,X.DL],[Y.DT,X.DT],[Y.EM,X.EM],[Y.EMBED,X.EMBED],[Y.FIELDSET,X.FIELDSET],[Y.FIGCAPTION,X.FIGCAPTION],[Y.FIGURE,X.FIGURE],[Y.FONT,X.FONT],[Y.FOOTER,X.FOOTER],[Y.FOREIGN_OBJECT,X.FOREIGN_OBJECT],[Y.FORM,X.FORM],[Y.FRAME,X.FRAME],[Y.FRAMESET,X.FRAMESET],[Y.H1,X.H1],[Y.H2,X.H2],[Y.H3,X.H3],[Y.H4,X.H4],[Y.H5,X.H5],[Y.H6,X.H6],[Y.HEAD,X.HEAD],[Y.HEADER,X.HEADER],[Y.HGROUP,X.HGROUP],[Y.HR,X.HR],[Y.HTML,X.HTML],[Y.I,X.I],[Y.IMG,X.IMG],[Y.IMAGE,X.IMAGE],[Y.INPUT,X.INPUT],[Y.IFRAME,X.IFRAME],[Y.KEYGEN,X.KEYGEN],[Y.LABEL,X.LABEL],[Y.LI,X.LI],[Y.LINK,X.LINK],[Y.LISTING,X.LISTING],[Y.MAIN,X.MAIN],[Y.MALIGNMARK,X.MALIGNMARK],[Y.MARQUEE,X.MARQUEE],[Y.MATH,X.MATH],[Y.MENU,X.MENU],[Y.META,X.META],[Y.MGLYPH,X.MGLYPH],[Y.MI,X.MI],[Y.MO,X.MO],[Y.MN,X.MN],[Y.MS,X.MS],[Y.MTEXT,X.MTEXT],[Y.NAV,X.NAV],[Y.NOBR,X.NOBR],[Y.NOFRAMES,X.NOFRAMES],[Y.NOEMBED,X.NOEMBED],[Y.NOSCRIPT,X.NOSCRIPT],[Y.OBJECT,X.OBJECT],[Y.OL,X.OL],[Y.OPTGROUP,X.OPTGROUP],[Y.OPTION,X.OPTION],[Y.P,X.P],[Y.PARAM,X.PARAM],[Y.PLAINTEXT,X.PLAINTEXT],[Y.PRE,X.PRE],[Y.RB,X.RB],[Y.RP,X.RP],[Y.RT,X.RT],[Y.RTC,X.RTC],[Y.RUBY,X.RUBY],[Y.S,X.S],[Y.SCRIPT,X.SCRIPT],[Y.SEARCH,X.SEARCH],[Y.SECTION,X.SECTION],[Y.SELECT,X.SELECT],[Y.SOURCE,X.SOURCE],[Y.SMALL,X.SMALL],[Y.SPAN,X.SPAN],[Y.STRIKE,X.STRIKE],[Y.STRONG,X.STRONG],[Y.STYLE,X.STYLE],[Y.SUB,X.SUB],[Y.SUMMARY,X.SUMMARY],[Y.SUP,X.SUP],[Y.TABLE,X.TABLE],[Y.TBODY,X.TBODY],[Y.TEMPLATE,X.TEMPLATE],[Y.TEXTAREA,X.TEXTAREA],[Y.TFOOT,X.TFOOT],[Y.TD,X.TD],[Y.TH,X.TH],[Y.THEAD,X.THEAD],[Y.TITLE,X.TITLE],[Y.TR,X.TR],[Y.TRACK,X.TRACK],[Y.TT,X.TT],[Y.U,X.U],[Y.UL,X.UL],[Y.SVG,X.SVG],[Y.VAR,X.VAR],[Y.WBR,X.WBR],[Y.XMP,X.XMP]]);function Gb(e){return Wb.get(e)??X.UNKNOWN}var Z=X,Kb={[J.HTML]:new Set([Z.ADDRESS,Z.APPLET,Z.AREA,Z.ARTICLE,Z.ASIDE,Z.BASE,Z.BASEFONT,Z.BGSOUND,Z.BLOCKQUOTE,Z.BODY,Z.BR,Z.BUTTON,Z.CAPTION,Z.CENTER,Z.COL,Z.COLGROUP,Z.DD,Z.DETAILS,Z.DIR,Z.DIV,Z.DL,Z.DT,Z.EMBED,Z.FIELDSET,Z.FIGCAPTION,Z.FIGURE,Z.FOOTER,Z.FORM,Z.FRAME,Z.FRAMESET,Z.H1,Z.H2,Z.H3,Z.H4,Z.H5,Z.H6,Z.HEAD,Z.HEADER,Z.HGROUP,Z.HR,Z.HTML,Z.IFRAME,Z.IMG,Z.INPUT,Z.LI,Z.LINK,Z.LISTING,Z.MAIN,Z.MARQUEE,Z.MENU,Z.META,Z.NAV,Z.NOEMBED,Z.NOFRAMES,Z.NOSCRIPT,Z.OBJECT,Z.OL,Z.P,Z.PARAM,Z.PLAINTEXT,Z.PRE,Z.SCRIPT,Z.SECTION,Z.SELECT,Z.SOURCE,Z.STYLE,Z.SUMMARY,Z.TABLE,Z.TBODY,Z.TD,Z.TEMPLATE,Z.TEXTAREA,Z.TFOOT,Z.TH,Z.THEAD,Z.TITLE,Z.TR,Z.TRACK,Z.UL,Z.WBR,Z.XMP]),[J.MATHML]:new Set([Z.MI,Z.MO,Z.MN,Z.MS,Z.MTEXT,Z.ANNOTATION_XML]),[J.SVG]:new Set([Z.TITLE,Z.FOREIGN_OBJECT,Z.DESC]),[J.XLINK]:new Set,[J.XML]:new Set,[J.XMLNS]:new Set},qb=new Set([Z.H1,Z.H2,Z.H3,Z.H4,Z.H5,Z.H6]);Y.STYLE,Y.SCRIPT,Y.XMP,Y.IFRAME,Y.NOEMBED,Y.NOFRAMES,Y.PLAINTEXT;var Q;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(Q||={});var Jb={DATA:Q.DATA,RCDATA:Q.RCDATA,RAWTEXT:Q.RAWTEXT,SCRIPT_DATA:Q.SCRIPT_DATA,PLAINTEXT:Q.PLAINTEXT,CDATA_SECTION:Q.CDATA_SECTION};function Yb(e){return e>=G.DIGIT_0&&e<=G.DIGIT_9}function Xb(e){return e>=G.LATIN_CAPITAL_A&&e<=G.LATIN_CAPITAL_Z}function Zb(e){return e>=G.LATIN_SMALL_A&&e<=G.LATIN_SMALL_Z}function Qb(e){return Zb(e)||Xb(e)}function $b(e){return Qb(e)||Yb(e)}function ex(e){return e+32}function tx(e){return e===G.SPACE||e===G.LINE_FEED||e===G.TABULATION||e===G.FORM_FEED}function nx(e){return tx(e)||e===G.SOLIDUS||e===G.GREATER_THAN_SIGN}function rx(e){return e===G.NULL?K.nullCharacterReference:e>1114111?K.characterReferenceOutsideUnicodeRange:bb(e)?K.surrogateCharacterReference:wb(e)?K.noncharacterCharacterReference:Cb(e)||e===G.CARRIAGE_RETURN?K.controlCharacterReference:null}var ix=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=Q.DATA,this.returnState=Q.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new Eb(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Bb(Ob,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(K.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(K.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=rx(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}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;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}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 t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:q.START_TAG,tagName:``,tagID:X.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:q.END_TAG,tagName:``,tagID:X.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:q.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:q.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(Db(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(K.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(){let e=this.currentToken;this.prepareToken(e),e.tagID=Gb(e.tagName),e.type===q.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(K.endTagWithAttributes),e.selfClosing&&this._err(K.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 q.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case q.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case q.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:q.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){let t=tx(e)?q.WHITESPACE_CHARACTER:e===G.NULL?q.NULL_CHARACTER:q.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(q.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Q.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?zb.Attribute:zb.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Q.DATA:this._stateData(e);break;case Q.RCDATA:this._stateRcdata(e);break;case Q.RAWTEXT:this._stateRawtext(e);break;case Q.SCRIPT_DATA:this._stateScriptData(e);break;case Q.PLAINTEXT:this._statePlaintext(e);break;case Q.TAG_OPEN:this._stateTagOpen(e);break;case Q.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Q.TAG_NAME:this._stateTagName(e);break;case Q.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Q.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Q.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Q.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Q.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Q.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Q.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Q.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Q.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Q.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Q.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Q.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Q.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Q.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Q.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Q.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Q.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Q.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Q.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Q.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Q.BOGUS_COMMENT:this._stateBogusComment(e);break;case Q.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Q.COMMENT_START:this._stateCommentStart(e);break;case Q.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Q.COMMENT:this._stateComment(e);break;case Q.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Q.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Q.COMMENT_END:this._stateCommentEnd(e);break;case Q.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Q.DOCTYPE:this._stateDoctype(e);break;case Q.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Q.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Q.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Q.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Q.CDATA_SECTION:this._stateCdataSection(e);break;case Q.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Q.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Q.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Q.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case G.LESS_THAN_SIGN:this.state=Q.TAG_OPEN;break;case G.AMPERSAND:this._startCharacterReference();break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitCodePoint(e);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case G.AMPERSAND:this._startCharacterReference();break;case G.LESS_THAN_SIGN:this.state=Q.RCDATA_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case G.LESS_THAN_SIGN:this.state=Q.RAWTEXT_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Qb(e))this._createStartTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case G.EXCLAMATION_MARK:this.state=Q.MARKUP_DECLARATION_OPEN;break;case G.SOLIDUS:this.state=Q.END_TAG_OPEN;break;case G.QUESTION_MARK:this._err(K.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e);break;case G.EOF:this._err(K.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(K.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=Q.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Qb(e))this._createEndTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case G.GREATER_THAN_SIGN:this._err(K.missingEndTagName),this.state=Q.DATA;break;case G.EOF:this._err(K.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(K.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case G.SOLIDUS:this.state=Q.SELF_CLOSING_START_TAG;break;case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentTagToken();break;case G.NULL:this._err(K.unexpectedNullCharacter),t.tagName+=`�`;break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(Xb(e)?ex(e):e)}}_stateRcdataLessThanSign(e){e===G.SOLIDUS?this.state=Q.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=Q.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Qb(e)?(this.state=Q.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=Q.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Q.BEFORE_ATTRIBUTE_NAME,!1;case G.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Q.SELF_CLOSING_START_TAG,!1;case G.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Q.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===G.SOLIDUS?this.state=Q.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Qb(e)?(this.state=Q.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case G.SOLIDUS:this.state=Q.SCRIPT_DATA_END_TAG_OPEN;break;case G.EXCLAMATION_MARK:this.state=Q.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Qb(e)?(this.state=Q.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===G.HYPHEN_MINUS?(this.state=Q.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===G.HYPHEN_MINUS?(this.state=Q.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case G.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case G.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case G.HYPHEN_MINUS:this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case G.GREATER_THAN_SIGN:this.state=Q.SCRIPT_DATA,this._emitChars(`>`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===G.SOLIDUS?this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Qb(e)?(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Qb(e)?(this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(yb.SCRIPT,!1)&&nx(this.preprocessor.peek(yb.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<yb.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case G.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case G.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case G.HYPHEN_MINUS:this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case G.GREATER_THAN_SIGN:this.state=Q.SCRIPT_DATA,this._emitChars(`>`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===G.SOLIDUS?(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(yb.SCRIPT,!1)&&nx(this.preprocessor.peek(yb.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<yb.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.SOLIDUS:case G.GREATER_THAN_SIGN:case G.EOF:this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case G.EQUALS_SIGN:this._err(K.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=Q.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:case G.SOLIDUS:case G.GREATER_THAN_SIGN:case G.EOF:this._leaveAttrName(),this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case G.EQUALS_SIGN:this._leaveAttrName(),this.state=Q.BEFORE_ATTRIBUTE_VALUE;break;case G.QUOTATION_MARK:case G.APOSTROPHE:case G.LESS_THAN_SIGN:this._err(K.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(Xb(e)?ex(e):e)}}_stateAfterAttributeName(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.SOLIDUS:this.state=Q.SELF_CLOSING_START_TAG;break;case G.EQUALS_SIGN:this.state=Q.BEFORE_ATTRIBUTE_VALUE;break;case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentTagToken();break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.QUOTATION_MARK:this.state=Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case G.APOSTROPHE:this.state=Q.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingAttributeValue),this.state=Q.DATA,this.emitCurrentTagToken();break;default:this.state=Q.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case G.QUOTATION_MARK:this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case G.AMPERSAND:this._startCharacterReference();break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case G.APOSTROPHE:this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case G.AMPERSAND:this._startCharacterReference();break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case G.AMPERSAND:this._startCharacterReference();break;case G.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case G.QUOTATION_MARK:case G.APOSTROPHE:case G.LESS_THAN_SIGN:case G.EQUALS_SIGN:case G.GRAVE_ACCENT:this._err(K.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case G.SOLIDUS:this._leaveAttrValue(),this.state=Q.SELF_CLOSING_START_TAG;break;case G.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this._err(K.missingWhitespaceBetweenAttributes),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case G.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=Q.DATA,this.emitCurrentTagToken();break}case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this._err(K.unexpectedSolidusInTag),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentComment(t);break;case G.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case G.NULL:this._err(K.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(yb.DASH_DASH,!0)?(this._createCommentToken(yb.DASH_DASH.length+1),this.state=Q.COMMENT_START):this._consumeSequenceIfMatch(yb.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(yb.DOCTYPE.length+1),this.state=Q.DOCTYPE):this._consumeSequenceIfMatch(yb.CDATA_START,!0)?this.inForeignNode?this.state=Q.CDATA_SECTION:(this._err(K.cdataInHtmlContent),this._createCommentToken(yb.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=Q.BOGUS_COMMENT):this._ensureHibernation()||(this._err(K.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case G.HYPHEN_MINUS:this.state=Q.COMMENT_START_DASH;break;case G.GREATER_THAN_SIGN:{this._err(K.abruptClosingOfEmptyComment),this.state=Q.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:this.state=Q.COMMENT_END;break;case G.GREATER_THAN_SIGN:this._err(K.abruptClosingOfEmptyComment),this.state=Q.DATA,this.emitCurrentComment(t);break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Q.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:this.state=Q.COMMENT_END_DASH;break;case G.LESS_THAN_SIGN:t.data+=`<`,this.state=Q.COMMENT_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.data+=`�`;break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case G.EXCLAMATION_MARK:t.data+=`!`,this.state=Q.COMMENT_LESS_THAN_SIGN_BANG;break;case G.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===G.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Q.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===G.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Q.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==G.GREATER_THAN_SIGN&&e!==G.EOF&&this._err(K.nestedComment),this.state=Q.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:this.state=Q.COMMENT_END;break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentComment(t);break;case G.EXCLAMATION_MARK:this.state=Q.COMMENT_END_BANG;break;case G.HYPHEN_MINUS:t.data+=`-`;break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:t.data+=`--!`,this.state=Q.COMMENT_END_DASH;break;case G.GREATER_THAN_SIGN:this._err(K.incorrectlyClosedComment),this.state=Q.DATA,this.emitCurrentComment(t);break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=Q.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_NAME;break;case G.GREATER_THAN_SIGN:this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case G.EOF:{this._err(K.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(K.missingWhitespaceBeforeDoctypeName),this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Xb(e))this._createDoctypeToken(String.fromCharCode(ex(e))),this.state=Q.DOCTYPE_NAME;else switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.NULL:this._err(K.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=Q.DOCTYPE_NAME;break;case G.GREATER_THAN_SIGN:{this._err(K.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Q.DATA;break}case G.EOF:{this._err(K.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=Q.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.AFTER_DOCTYPE_NAME;break;case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.NULL:this._err(K.unexpectedNullCharacter),t.name+=`�`;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Xb(e)?ex(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(yb.PUBLIC,!1)?this.state=Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(yb.SYSTEM,!1)?this.state=Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(K.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case G.QUOTATION_MARK:this._err(K.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:this._err(K.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.QUOTATION_MARK:t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case G.QUOTATION_MARK:this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.publicId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case G.APOSTROPHE:this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.publicId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.QUOTATION_MARK:this._err(K.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:this._err(K.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.QUOTATION_MARK:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case G.QUOTATION_MARK:this._err(K.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:this._err(K.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.QUOTATION_MARK:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case G.QUOTATION_MARK:this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.systemId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case G.APOSTROPHE:this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.systemId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case G.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.NULL:this._err(K.unexpectedNullCharacter);break;case G.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case G.RIGHT_SQUARE_BRACKET:this.state=Q.CDATA_SECTION_BRACKET;break;case G.EOF:this._err(K.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===G.RIGHT_SQUARE_BRACKET?this.state=Q.CDATA_SECTION_END:(this._emitChars(`]`),this.state=Q.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case G.GREATER_THAN_SIGN:this.state=Q.DATA;break;case G.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=Q.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(G.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&$b(this.preprocessor.peek(1))?Q.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){$b(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===G.SEMICOLON&&this._err(K.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},ax=new Set([X.DD,X.DT,X.LI,X.OPTGROUP,X.OPTION,X.P,X.RB,X.RP,X.RT,X.RTC]),ox=new Set([...ax,X.CAPTION,X.COLGROUP,X.TBODY,X.TD,X.TFOOT,X.TH,X.THEAD,X.TR]),sx=new Set([X.APPLET,X.CAPTION,X.HTML,X.MARQUEE,X.OBJECT,X.TABLE,X.TD,X.TEMPLATE,X.TH]),cx=new Set([...sx,X.OL,X.UL]),lx=new Set([...sx,X.BUTTON]),ux=new Set([X.ANNOTATION_XML,X.MI,X.MN,X.MO,X.MS,X.MTEXT]),dx=new Set([X.DESC,X.FOREIGN_OBJECT,X.TITLE]),fx=new Set([X.TR,X.TEMPLATE,X.HTML]),px=new Set([X.TBODY,X.TFOOT,X.THEAD,X.TEMPLATE,X.HTML]),mx=new Set([X.TABLE,X.TEMPLATE,X.HTML]),hx=new Set([X.TD,X.TH]),gx=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=X.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===X.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===J.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==J.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(qb,J.HTML)}popUntilTableCellPopped(){this.popUntilPopped(hx,J.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(mx,J.HTML)}clearBackToTableBodyContext(){this.clearBackTo(px,J.HTML)}clearBackToTableRowContext(){this.clearBackTo(fx,J.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===X.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===X.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case J.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case J.SVG:if(dx.has(r))return!1;break;case J.MATHML:if(ux.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,sx)}hasInListItemScope(e){return this.hasInDynamicScope(e,cx)}hasInButtonScope(e){return this.hasInDynamicScope(e,lx)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case J.HTML:if(qb.has(t))return!0;if(sx.has(t))return!1;break;case J.SVG:if(dx.has(t))return!1;break;case J.MATHML:if(ux.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML)switch(this.tagIDs[t]){case e:return!0;case X.TABLE:case X.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===J.HTML)switch(this.tagIDs[e]){case X.TBODY:case X.THEAD:case X.TFOOT:return!0;case X.TABLE:case X.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML)switch(this.tagIDs[t]){case e:return!0;case X.OPTION:case X.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&ax.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&ox.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&ox.has(this.currentTagId);)this.pop()}},_x=3,vx;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(vx||={});var yx={type:vx.Marker},bx=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===vx.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<_x)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<_x)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=_x&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(yx)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:vx.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:vx.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(yx);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===vx.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===vx.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===vx.Element&&t.element===e)}},xx={createDocument(){return{nodeName:`#document`,mode:Ub.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};xx.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(xx.isTextNode(n)){n.value+=t;return}}xx.appendChild(e,xx.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&xx.isTextNode(r)?r.value+=t:xx.insertBefore(e,xx.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Sx=`html`,Cx=`about:legacy-compat`,wx=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,Tx=`+//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//`.split(`,`),Ex=[...Tx,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],Dx=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),Ox=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],kx=[...Ox,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function Ax(e,t){return t.some(t=>e.startsWith(t))}function jx(e){return e.name===Sx&&e.publicId===null&&(e.systemId===null||e.systemId===Cx)}function Mx(e){if(e.name!==Sx)return Ub.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===wx)return Ub.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Dx.has(n))return Ub.QUIRKS;let e=t===null?Ex:Tx;if(Ax(n,e))return Ub.QUIRKS;if(e=t===null?Ox:kx,Ax(n,e))return Ub.LIMITED_QUIRKS}return Ub.NO_QUIRKS}var Nx={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},Px=`definitionurl`,Fx=`definitionURL`,Ix=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`.split(`.`).map(e=>[e.toLowerCase(),e])),Lx=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:J.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:J.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:J.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:J.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:J.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:J.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:J.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:J.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:J.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:J.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:J.XMLNS}]]),Rx=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`.split(`.`).map(e=>[e.toLowerCase(),e])),zx=new Set([X.B,X.BIG,X.BLOCKQUOTE,X.BODY,X.BR,X.CENTER,X.CODE,X.DD,X.DIV,X.DL,X.DT,X.EM,X.EMBED,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HR,X.I,X.IMG,X.LI,X.LISTING,X.MENU,X.META,X.NOBR,X.OL,X.P,X.PRE,X.RUBY,X.S,X.SMALL,X.SPAN,X.STRONG,X.STRIKE,X.SUB,X.SUP,X.TABLE,X.TT,X.U,X.UL,X.VAR]);function Bx(e){let t=e.tagID;return t===X.FONT&&e.attrs.some(({name:e})=>e===Hb.COLOR||e===Hb.SIZE||e===Hb.FACE)||zx.has(t)}function Vx(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Px){e.attrs[t].name=Fx;break}}function Hx(e){for(let t=0;t<e.attrs.length;t++){let n=Ix.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Ux(e){for(let t=0;t<e.attrs.length;t++){let n=Lx.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Wx(e){let t=Rx.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Gb(e.tagName))}function Gx(e,t){return t===J.MATHML&&(e===X.MI||e===X.MO||e===X.MN||e===X.MS||e===X.MTEXT)}function Kx(e,t,n){if(t===J.MATHML&&e===X.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===Hb.ENCODING){let t=n[e].value.toLowerCase();return t===Nx.TEXT_HTML||t===Nx.APPLICATION_XML}}return t===J.SVG&&(e===X.FOREIGN_OBJECT||e===X.DESC||e===X.TITLE)}function qx(e,t,n,r){return(!r||r===J.HTML)&&Kx(e,t,n)||(!r||r===J.MATHML)&&Gx(e,t)}var Jx=`hidden`,Yx=8,Xx=3,$;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})($||={});var Zx={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Qx=new Set([X.TABLE,X.TBODY,X.TFOOT,X.THEAD,X.TR]),$x={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:xx,onParseError:null},eS=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=$.INITIAL,this.originalInsertionMode=$.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={...$x,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new ix(this.options,this),this.activeFormattingElements=new bx(this.treeAdapter),this.fragmentContextID=n?Gb(this.treeAdapter.getTagName(n)):X.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new gx(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...$x,...t};e??=n.treeAdapter.createElement(Y.TEMPLATE,J.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,J.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===X.TEMPLATE&&i.tmplInsertionModeStack.unshift($.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??Zx,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===J.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,J.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=$.TEXT}switchToPlaintextParsing(){this.insertionMode=$.TEXT,this.originalInsertionMode=$.IN_BODY,this.tokenizer.state=Jb.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)===Y.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===J.HTML)switch(this.fragmentContextID){case X.TITLE:case X.TEXTAREA:this.tokenizer.state=Jb.RCDATA;break;case X.STYLE:case X.XMP:case X.IFRAME:case X.NOEMBED:case X.NOFRAMES:case X.NOSCRIPT:this.tokenizer.state=Jb.RAWTEXT;break;case X.SCRIPT:this.tokenizer.state=Jb.SCRIPT_DATA;break;case X.PLAINTEXT:this.tokenizer.state=Jb.PLAINTEXT}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,J.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,J.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(Y.HTML,J.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,X.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===q.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===X.SVG&&this.treeAdapter.getTagName(t)===Y.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===J.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===X.MGLYPH||e.tagID===X.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,J.HTML)}_processToken(e){switch(e.type){case q.CHARACTER:this.onCharacter(e);break;case q.NULL_CHARACTER:this.onNullCharacter(e);break;case q.COMMENT:this.onComment(e);break;case q.DOCTYPE:this.onDoctype(e);break;case q.START_TAG:this._processStartTag(e);break;case q.END_TAG:this.onEndTag(e);break;case q.EOF:this.onEof(e);break;case q.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return qx(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===vx.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=$.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(X.P),this.openElements.popUntilTagNamePopped(X.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case X.TR:this.insertionMode=$.IN_ROW;return;case X.TBODY:case X.THEAD:case X.TFOOT:this.insertionMode=$.IN_TABLE_BODY;return;case X.CAPTION:this.insertionMode=$.IN_CAPTION;return;case X.COLGROUP:this.insertionMode=$.IN_COLUMN_GROUP;return;case X.TABLE:this.insertionMode=$.IN_TABLE;return;case X.BODY:this.insertionMode=$.IN_BODY;return;case X.FRAMESET:this.insertionMode=$.IN_FRAMESET;return;case X.SELECT:this._resetInsertionModeForSelect(e);return;case X.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case X.HTML:this.insertionMode=this.headElement?$.AFTER_HEAD:$.BEFORE_HEAD;return;case X.TD:case X.TH:if(e>0){this.insertionMode=$.IN_CELL;return}break;case X.HEAD:if(e>0){this.insertionMode=$.IN_HEAD;return}}this.insertionMode=$.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===X.TEMPLATE)break;if(e===X.TABLE){this.insertionMode=$.IN_SELECT_IN_TABLE;return}}this.insertionMode=$.IN_SELECT}_isElementCausesFosterParenting(e){return Qx.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--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case X.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===J.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case X.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return Kb[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)vw(this,e);else switch(this.insertionMode){case $.INITIAL:pS(this,e);break;case $.BEFORE_HTML:gS(this,e);break;case $.BEFORE_HEAD:yS(this,e);break;case $.IN_HEAD:CS(this,e);break;case $.IN_HEAD_NO_SCRIPT:ES(this,e);break;case $.AFTER_HEAD:kS(this,e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:MS(this,e);break;case $.TEXT:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:DC(this,e);break;case $.IN_TABLE_TEXT:BC(this,e);break;case $.IN_COLUMN_GROUP:qC(this,e);break;case $.AFTER_BODY:lw(this,e);break;case $.AFTER_AFTER_BODY:hw(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)_w(this,e);else switch(this.insertionMode){case $.INITIAL:pS(this,e);break;case $.BEFORE_HTML:gS(this,e);break;case $.BEFORE_HEAD:yS(this,e);break;case $.IN_HEAD:CS(this,e);break;case $.IN_HEAD_NO_SCRIPT:ES(this,e);break;case $.AFTER_HEAD:kS(this,e);break;case $.TEXT:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:DC(this,e);break;case $.IN_COLUMN_GROUP:qC(this,e);break;case $.AFTER_BODY:lw(this,e);break;case $.AFTER_AFTER_BODY:hw(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)cS(this,e);else switch(this.insertionMode){case $.INITIAL:case $.BEFORE_HTML:case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_TEMPLATE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:cS(this,e);break;case $.IN_TABLE_TEXT:VC(this,e);break;case $.AFTER_BODY:lS(this,e);break;case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:uS(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case $.INITIAL:fS(this,e);break;case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:this._err(e,K.misplacedDoctype);break;case $.IN_TABLE_TEXT:VC(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,K.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?bw(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:pS(this,e);break;case $.BEFORE_HTML:mS(this,e);break;case $.BEFORE_HEAD:_S(this,e);break;case $.IN_HEAD:bS(this,e);break;case $.IN_HEAD_NO_SCRIPT:wS(this,e);break;case $.AFTER_HEAD:DS(this,e);break;case $.IN_BODY:dC(this,e);break;case $.IN_TABLE:IC(this,e);break;case $.IN_TABLE_TEXT:VC(this,e);break;case $.IN_CAPTION:UC(this,e);break;case $.IN_COLUMN_GROUP:GC(this,e);break;case $.IN_TABLE_BODY:JC(this,e);break;case $.IN_ROW:XC(this,e);break;case $.IN_CELL:QC(this,e);break;case $.IN_SELECT:ew(this,e);break;case $.IN_SELECT_IN_TABLE:nw(this,e);break;case $.IN_TEMPLATE:iw(this,e);break;case $.AFTER_BODY:sw(this,e);break;case $.IN_FRAMESET:uw(this,e);break;case $.AFTER_FRAMESET:fw(this,e);break;case $.AFTER_AFTER_BODY:mw(this,e);break;case $.AFTER_AFTER_FRAMESET:gw(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?xw(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:pS(this,e);break;case $.BEFORE_HTML:hS(this,e);break;case $.BEFORE_HEAD:vS(this,e);break;case $.IN_HEAD:xS(this,e);break;case $.IN_HEAD_NO_SCRIPT:TS(this,e);break;case $.AFTER_HEAD:OS(this,e);break;case $.IN_BODY:CC(this,e);break;case $.TEXT:TC(this,e);break;case $.IN_TABLE:LC(this,e);break;case $.IN_TABLE_TEXT:VC(this,e);break;case $.IN_CAPTION:WC(this,e);break;case $.IN_COLUMN_GROUP:KC(this,e);break;case $.IN_TABLE_BODY:YC(this,e);break;case $.IN_ROW:ZC(this,e);break;case $.IN_CELL:$C(this,e);break;case $.IN_SELECT:tw(this,e);break;case $.IN_SELECT_IN_TABLE:rw(this,e);break;case $.IN_TEMPLATE:aw(this,e);break;case $.AFTER_BODY:cw(this,e);break;case $.IN_FRAMESET:dw(this,e);break;case $.AFTER_FRAMESET:pw(this,e);break;case $.AFTER_AFTER_BODY:hw(this,e)}}onEof(e){switch(this.insertionMode){case $.INITIAL:pS(this,e);break;case $.BEFORE_HTML:gS(this,e);break;case $.BEFORE_HEAD:yS(this,e);break;case $.IN_HEAD:CS(this,e);break;case $.IN_HEAD_NO_SCRIPT:ES(this,e);break;case $.AFTER_HEAD:kS(this,e);break;case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:wC(this,e);break;case $.TEXT:EC(this,e);break;case $.IN_TABLE_TEXT:VC(this,e);break;case $.IN_TEMPLATE:ow(this,e);break;case $.AFTER_BODY:case $.IN_FRAMESET:case $.AFTER_FRAMESET:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:dS(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===G.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.TEXT:case $.IN_COLUMN_GROUP:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:this._insertCharacters(e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:case $.AFTER_BODY:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:jS(this,e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:DC(this,e);break;case $.IN_TABLE_TEXT:zC(this,e)}}};function tS(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):SC(e,t),n}function nS(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function rS(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=Xx;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=iS(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function iS(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function aS(e,t,n){let r=Gb(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===X.TEMPLATE&&i===J.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function oS(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function sS(e,t){for(let n=0;n<Yx;n++){let n=tS(e,t);if(!n)break;let r=nS(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=rS(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&aS(e,a,i),oS(e,r,n)}}function cS(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function lS(e,t){e._appendCommentNode(t,e.openElements.items[0])}function uS(e,t){e._appendCommentNode(t,e.document)}function dS(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function fS(e,t){e._setDocumentType(t);let n=t.forceQuirks?Ub.QUIRKS:Mx(t);jx(t)||e._err(t,K.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=$.BEFORE_HTML}function pS(e,t){e._err(t,K.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ub.QUIRKS),e.insertionMode=$.BEFORE_HTML,e._processToken(t)}function mS(e,t){t.tagID===X.HTML?(e._insertElement(t,J.HTML),e.insertionMode=$.BEFORE_HEAD):gS(e,t)}function hS(e,t){let n=t.tagID;(n===X.HTML||n===X.HEAD||n===X.BODY||n===X.BR)&&gS(e,t)}function gS(e,t){e._insertFakeRootElement(),e.insertionMode=$.BEFORE_HEAD,e._processToken(t)}function _S(e,t){switch(t.tagID){case X.HTML:dC(e,t);break;case X.HEAD:e._insertElement(t,J.HTML),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD;break;default:yS(e,t)}}function vS(e,t){let n=t.tagID;n===X.HEAD||n===X.BODY||n===X.HTML||n===X.BR?yS(e,t):e._err(t,K.endTagWithoutMatchingOpenElement)}function yS(e,t){e._insertFakeElement(Y.HEAD,X.HEAD),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD,e._processToken(t)}function bS(e,t){switch(t.tagID){case X.HTML:dC(e,t);break;case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.TITLE:e._switchToTextParsing(t,Jb.RCDATA);break;case X.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Jb.RAWTEXT):(e._insertElement(t,J.HTML),e.insertionMode=$.IN_HEAD_NO_SCRIPT);break;case X.NOFRAMES:case X.STYLE:e._switchToTextParsing(t,Jb.RAWTEXT);break;case X.SCRIPT:e._switchToTextParsing(t,Jb.SCRIPT_DATA);break;case X.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=$.IN_TEMPLATE,e.tmplInsertionModeStack.unshift($.IN_TEMPLATE);break;case X.HEAD:e._err(t,K.misplacedStartTagForHeadElement);break;default:CS(e,t)}}function xS(e,t){switch(t.tagID){case X.HEAD:e.openElements.pop(),e.insertionMode=$.AFTER_HEAD;break;case X.BODY:case X.BR:case X.HTML:CS(e,t);break;case X.TEMPLATE:SS(e,t);break;default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function SS(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==X.TEMPLATE&&e._err(t,K.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(X.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,K.endTagWithoutMatchingOpenElement)}function CS(e,t){e.openElements.pop(),e.insertionMode=$.AFTER_HEAD,e._processToken(t)}function wS(e,t){switch(t.tagID){case X.HTML:dC(e,t);break;case X.BASEFONT:case X.BGSOUND:case X.HEAD:case X.LINK:case X.META:case X.NOFRAMES:case X.STYLE:bS(e,t);break;case X.NOSCRIPT:e._err(t,K.nestedNoscriptInHead);break;default:ES(e,t)}}function TS(e,t){switch(t.tagID){case X.NOSCRIPT:e.openElements.pop(),e.insertionMode=$.IN_HEAD;break;case X.BR:ES(e,t);break;default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function ES(e,t){let n=t.type===q.EOF?K.openElementsLeftAfterEof:K.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=$.IN_HEAD,e._processToken(t)}function DS(e,t){switch(t.tagID){case X.HTML:dC(e,t);break;case X.BODY:e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=$.IN_BODY;break;case X.FRAMESET:e._insertElement(t,J.HTML),e.insertionMode=$.IN_FRAMESET;break;case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:case X.NOFRAMES:case X.SCRIPT:case X.STYLE:case X.TEMPLATE:case X.TITLE:e._err(t,K.abandonedHeadElementChild),e.openElements.push(e.headElement,X.HEAD),bS(e,t),e.openElements.remove(e.headElement);break;case X.HEAD:e._err(t,K.misplacedStartTagForHeadElement);break;default:kS(e,t)}}function OS(e,t){switch(t.tagID){case X.BODY:case X.HTML:case X.BR:kS(e,t);break;case X.TEMPLATE:SS(e,t);break;default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function kS(e,t){e._insertFakeElement(Y.BODY,X.BODY),e.insertionMode=$.IN_BODY,AS(e,t)}function AS(e,t){switch(t.type){case q.CHARACTER:MS(e,t);break;case q.WHITESPACE_CHARACTER:jS(e,t);break;case q.COMMENT:cS(e,t);break;case q.START_TAG:dC(e,t);break;case q.END_TAG:CC(e,t);break;case q.EOF:wC(e,t)}}function jS(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function MS(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function NS(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function PS(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function FS(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_FRAMESET)}function IS(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function LS(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&qb.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,J.HTML)}function RS(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function zS(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),n||(e.formElement=e.openElements.current))}function BS(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===X.LI&&r===X.LI||(n===X.DD||n===X.DT)&&(r===X.DD||r===X.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==X.ADDRESS&&r!==X.DIV&&r!==X.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function VS(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.tokenizer.state=Jb.PLAINTEXT}function HS(e,t){e.openElements.hasInScope(X.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1}function US(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Y.A);n&&(sS(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function WS(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function GS(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(X.NOBR)&&(sS(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function KS(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function qS(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ub.QUIRKS&&e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=$.IN_TABLE}function JS(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function YS(e){let t=Db(e,Hb.TYPE);return t!=null&&t.toLowerCase()===Jx}function XS(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),YS(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function ZS(e,t){e._appendElement(t,J.HTML),t.ackSelfClosing=!0}function QS(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function $S(e,t){t.tagName=Y.IMG,t.tagID=X.IMG,JS(e,t)}function eC(e,t){e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Jb.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=$.TEXT}function tC(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Jb.RAWTEXT)}function nC(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Jb.RAWTEXT)}function rC(e,t){e._switchToTextParsing(t,Jb.RAWTEXT)}function iC(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===$.IN_TABLE||e.insertionMode===$.IN_CAPTION||e.insertionMode===$.IN_TABLE_BODY||e.insertionMode===$.IN_ROW||e.insertionMode===$.IN_CELL?$.IN_SELECT_IN_TABLE:$.IN_SELECT}function aC(e,t){e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function oC(e,t){e.openElements.hasInScope(X.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,J.HTML)}function sC(e,t){e.openElements.hasInScope(X.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(X.RTC),e._insertElement(t,J.HTML)}function cC(e,t){e._reconstructActiveFormattingElements(),Vx(t),Ux(t),t.selfClosing?e._appendElement(t,J.MATHML):e._insertElement(t,J.MATHML),t.ackSelfClosing=!0}function lC(e,t){e._reconstructActiveFormattingElements(),Hx(t),Ux(t),t.selfClosing?e._appendElement(t,J.SVG):e._insertElement(t,J.SVG),t.ackSelfClosing=!0}function uC(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function dC(e,t){switch(t.tagID){case X.I:case X.S:case X.B:case X.U:case X.EM:case X.TT:case X.BIG:case X.CODE:case X.FONT:case X.SMALL:case X.STRIKE:case X.STRONG:WS(e,t);break;case X.A:US(e,t);break;case X.H1:case X.H2:case X.H3:case X.H4:case X.H5:case X.H6:LS(e,t);break;case X.P:case X.DL:case X.OL:case X.UL:case X.DIV:case X.DIR:case X.NAV:case X.MAIN:case X.MENU:case X.ASIDE:case X.CENTER:case X.FIGURE:case X.FOOTER:case X.HEADER:case X.HGROUP:case X.DIALOG:case X.DETAILS:case X.ADDRESS:case X.ARTICLE:case X.SEARCH:case X.SECTION:case X.SUMMARY:case X.FIELDSET:case X.BLOCKQUOTE:case X.FIGCAPTION:IS(e,t);break;case X.LI:case X.DD:case X.DT:BS(e,t);break;case X.BR:case X.IMG:case X.WBR:case X.AREA:case X.EMBED:case X.KEYGEN:JS(e,t);break;case X.HR:QS(e,t);break;case X.RB:case X.RTC:oC(e,t);break;case X.RT:case X.RP:sC(e,t);break;case X.PRE:case X.LISTING:RS(e,t);break;case X.XMP:tC(e,t);break;case X.SVG:lC(e,t);break;case X.HTML:NS(e,t);break;case X.BASE:case X.LINK:case X.META:case X.STYLE:case X.TITLE:case X.SCRIPT:case X.BGSOUND:case X.BASEFONT:case X.TEMPLATE:bS(e,t);break;case X.BODY:PS(e,t);break;case X.FORM:zS(e,t);break;case X.NOBR:GS(e,t);break;case X.MATH:cC(e,t);break;case X.TABLE:qS(e,t);break;case X.INPUT:XS(e,t);break;case X.PARAM:case X.TRACK:case X.SOURCE:ZS(e,t);break;case X.IMAGE:$S(e,t);break;case X.BUTTON:HS(e,t);break;case X.APPLET:case X.OBJECT:case X.MARQUEE:KS(e,t);break;case X.IFRAME:nC(e,t);break;case X.SELECT:iC(e,t);break;case X.OPTION:case X.OPTGROUP:aC(e,t);break;case X.NOEMBED:case X.NOFRAMES:rC(e,t);break;case X.FRAMESET:FS(e,t);break;case X.TEXTAREA:eC(e,t);break;case X.NOSCRIPT:e.options.scriptingEnabled?rC(e,t):uC(e,t);break;case X.PLAINTEXT:VS(e,t);break;case X.COL:case X.TH:case X.TD:case X.TR:case X.HEAD:case X.FRAME:case X.TBODY:case X.TFOOT:case X.THEAD:case X.CAPTION:case X.COLGROUP:break;default:uC(e,t)}}function fC(e,t){if(e.openElements.hasInScope(X.BODY)&&(e.insertionMode=$.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function pC(e,t){e.openElements.hasInScope(X.BODY)&&(e.insertionMode=$.AFTER_BODY,cw(e,t))}function mC(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function hC(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(X.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(X.FORM):n&&e.openElements.remove(n))}function gC(e){e.openElements.hasInButtonScope(X.P)||e._insertFakeElement(Y.P,X.P),e._closePElement()}function _C(e){e.openElements.hasInListItemScope(X.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(X.LI),e.openElements.popUntilTagNamePopped(X.LI))}function vC(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function yC(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function bC(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function xC(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Y.BR,X.BR),e.openElements.pop(),e.framesetOk=!1}function SC(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==X.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function CC(e,t){switch(t.tagID){case X.A:case X.B:case X.I:case X.S:case X.U:case X.EM:case X.TT:case X.BIG:case X.CODE:case X.FONT:case X.NOBR:case X.SMALL:case X.STRIKE:case X.STRONG:sS(e,t);break;case X.P:gC(e);break;case X.DL:case X.UL:case X.OL:case X.DIR:case X.DIV:case X.NAV:case X.PRE:case X.MAIN:case X.MENU:case X.ASIDE:case X.BUTTON:case X.CENTER:case X.FIGURE:case X.FOOTER:case X.HEADER:case X.HGROUP:case X.DIALOG:case X.ADDRESS:case X.ARTICLE:case X.DETAILS:case X.SEARCH:case X.SECTION:case X.SUMMARY:case X.LISTING:case X.FIELDSET:case X.BLOCKQUOTE:case X.FIGCAPTION:mC(e,t);break;case X.LI:_C(e);break;case X.DD:case X.DT:vC(e,t);break;case X.H1:case X.H2:case X.H3:case X.H4:case X.H5:case X.H6:yC(e);break;case X.BR:xC(e);break;case X.BODY:fC(e,t);break;case X.HTML:pC(e,t);break;case X.FORM:hC(e);break;case X.APPLET:case X.OBJECT:case X.MARQUEE:bC(e,t);break;case X.TEMPLATE:SS(e,t);break;default:SC(e,t)}}function wC(e,t){e.tmplInsertionModeStack.length>0?ow(e,t):dS(e,t)}function TC(e,t){var n;t.tagID===X.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function EC(e,t){e._err(t,K.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function DC(e,t){if(e.openElements.currentTagId!==void 0&&Qx.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=$.IN_TABLE_TEXT,t.type){case q.CHARACTER:BC(e,t);break;case q.WHITESPACE_CHARACTER:zC(e,t)}else RC(e,t)}function OC(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_CAPTION}function kC(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_COLUMN_GROUP}function AC(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.COLGROUP,X.COLGROUP),e.insertionMode=$.IN_COLUMN_GROUP,GC(e,t)}function jC(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_TABLE_BODY}function MC(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.TBODY,X.TBODY),e.insertionMode=$.IN_TABLE_BODY,JC(e,t)}function NC(e,t){e.openElements.hasInTableScope(X.TABLE)&&(e.openElements.popUntilTagNamePopped(X.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function PC(e,t){YS(t)?e._appendElement(t,J.HTML):RC(e,t),t.ackSelfClosing=!0}function FC(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,J.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function IC(e,t){switch(t.tagID){case X.TD:case X.TH:case X.TR:MC(e,t);break;case X.STYLE:case X.SCRIPT:case X.TEMPLATE:bS(e,t);break;case X.COL:AC(e,t);break;case X.FORM:FC(e,t);break;case X.TABLE:NC(e,t);break;case X.TBODY:case X.TFOOT:case X.THEAD:jC(e,t);break;case X.INPUT:PC(e,t);break;case X.CAPTION:OC(e,t);break;case X.COLGROUP:kC(e,t);break;default:RC(e,t)}}function LC(e,t){switch(t.tagID){case X.TABLE:e.openElements.hasInTableScope(X.TABLE)&&(e.openElements.popUntilTagNamePopped(X.TABLE),e._resetInsertionMode());break;case X.TEMPLATE:SS(e,t);break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TBODY:case X.TD:case X.TFOOT:case X.TH:case X.THEAD:case X.TR:break;default:RC(e,t)}}function RC(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,AS(e,t),e.fosterParentingEnabled=n}function zC(e,t){e.pendingCharacterTokens.push(t)}function BC(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function VC(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)RC(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var HC=new Set([X.CAPTION,X.COL,X.COLGROUP,X.TBODY,X.TD,X.TFOOT,X.TH,X.THEAD,X.TR]);function UC(e,t){let n=t.tagID;HC.has(n)?e.openElements.hasInTableScope(X.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,IC(e,t)):dC(e,t)}function WC(e,t){let n=t.tagID;switch(n){case X.CAPTION:case X.TABLE:e.openElements.hasInTableScope(X.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,n===X.TABLE&&LC(e,t));break;case X.BODY:case X.COL:case X.COLGROUP:case X.HTML:case X.TBODY:case X.TD:case X.TFOOT:case X.TH:case X.THEAD:case X.TR:break;default:CC(e,t)}}function GC(e,t){switch(t.tagID){case X.HTML:dC(e,t);break;case X.COL:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.TEMPLATE:bS(e,t);break;default:qC(e,t)}}function KC(e,t){switch(t.tagID){case X.COLGROUP:e.openElements.currentTagId===X.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE);break;case X.TEMPLATE:SS(e,t);break;case X.COL:break;default:qC(e,t)}}function qC(e,t){e.openElements.currentTagId===X.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE,e._processToken(t))}function JC(e,t){switch(t.tagID){case X.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_ROW;break;case X.TH:case X.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Y.TR,X.TR),e.insertionMode=$.IN_ROW,XC(e,t);break;case X.CAPTION:case X.COL:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,IC(e,t));break;default:IC(e,t)}}function YC(e,t){let n=t.tagID;switch(t.tagID){case X.TBODY:case X.TFOOT:case X.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE);break;case X.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,LC(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TD:case X.TH:case X.TR:break;default:LC(e,t)}}function XC(e,t){switch(t.tagID){case X.TH:case X.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_CELL,e.activeFormattingElements.insertMarker();break;case X.CAPTION:case X.COL:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:case X.TR:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,JC(e,t));break;default:IC(e,t)}}function ZC(e,t){switch(t.tagID){case X.TR:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY);break;case X.TABLE:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,YC(e,t));break;case X.TBODY:case X.TFOOT:case X.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(X.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,YC(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TD:case X.TH:break;default:LC(e,t)}}function QC(e,t){let n=t.tagID;HC.has(n)?(e.openElements.hasInTableScope(X.TD)||e.openElements.hasInTableScope(X.TH))&&(e._closeTableCell(),XC(e,t)):dC(e,t)}function $C(e,t){let n=t.tagID;switch(n){case X.TD:case X.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_ROW);break;case X.TABLE:case X.TBODY:case X.TFOOT:case X.THEAD:case X.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),ZC(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:break;default:CC(e,t)}}function ew(e,t){switch(t.tagID){case X.HTML:dC(e,t);break;case X.OPTION:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e._insertElement(t,J.HTML);break;case X.OPTGROUP:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop(),e._insertElement(t,J.HTML);break;case X.HR:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop(),e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.INPUT:case X.KEYGEN:case X.TEXTAREA:case X.SELECT:e.openElements.hasInSelectScope(X.SELECT)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),t.tagID!==X.SELECT&&e._processStartTag(t));break;case X.SCRIPT:case X.TEMPLATE:bS(e,t)}}function tw(e,t){switch(t.tagID){case X.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===X.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===X.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop();break;case X.OPTION:e.openElements.currentTagId===X.OPTION&&e.openElements.pop();break;case X.SELECT:e.openElements.hasInSelectScope(X.SELECT)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode());break;case X.TEMPLATE:SS(e,t)}}function nw(e,t){let n=t.tagID;n===X.CAPTION||n===X.TABLE||n===X.TBODY||n===X.TFOOT||n===X.THEAD||n===X.TR||n===X.TD||n===X.TH?(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),e._processStartTag(t)):ew(e,t)}function rw(e,t){let n=t.tagID;n===X.CAPTION||n===X.TABLE||n===X.TBODY||n===X.TFOOT||n===X.THEAD||n===X.TR||n===X.TD||n===X.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),e.onEndTag(t)):tw(e,t)}function iw(e,t){switch(t.tagID){case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:case X.NOFRAMES:case X.SCRIPT:case X.STYLE:case X.TEMPLATE:case X.TITLE:bS(e,t);break;case X.CAPTION:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:e.tmplInsertionModeStack[0]=$.IN_TABLE,e.insertionMode=$.IN_TABLE,IC(e,t);break;case X.COL:e.tmplInsertionModeStack[0]=$.IN_COLUMN_GROUP,e.insertionMode=$.IN_COLUMN_GROUP,GC(e,t);break;case X.TR:e.tmplInsertionModeStack[0]=$.IN_TABLE_BODY,e.insertionMode=$.IN_TABLE_BODY,JC(e,t);break;case X.TD:case X.TH:e.tmplInsertionModeStack[0]=$.IN_ROW,e.insertionMode=$.IN_ROW,XC(e,t);break;default:e.tmplInsertionModeStack[0]=$.IN_BODY,e.insertionMode=$.IN_BODY,dC(e,t)}}function aw(e,t){t.tagID===X.TEMPLATE&&SS(e,t)}function ow(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(X.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):dS(e,t)}function sw(e,t){t.tagID===X.HTML?dC(e,t):lw(e,t)}function cw(e,t){if(t.tagID===X.HTML){if(e.fragmentContext||(e.insertionMode=$.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===X.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else lw(e,t)}function lw(e,t){e.insertionMode=$.IN_BODY,AS(e,t)}function uw(e,t){switch(t.tagID){case X.HTML:dC(e,t);break;case X.FRAMESET:e._insertElement(t,J.HTML);break;case X.FRAME:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.NOFRAMES:bS(e,t)}}function dw(e,t){t.tagID===X.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==X.FRAMESET&&(e.insertionMode=$.AFTER_FRAMESET))}function fw(e,t){switch(t.tagID){case X.HTML:dC(e,t);break;case X.NOFRAMES:bS(e,t)}}function pw(e,t){t.tagID===X.HTML&&(e.insertionMode=$.AFTER_AFTER_FRAMESET)}function mw(e,t){t.tagID===X.HTML?dC(e,t):hw(e,t)}function hw(e,t){e.insertionMode=$.IN_BODY,AS(e,t)}function gw(e,t){switch(t.tagID){case X.HTML:dC(e,t);break;case X.NOFRAMES:bS(e,t)}}function _w(e,t){t.chars=`�`,e._insertCharacters(t)}function vw(e,t){e._insertCharacters(t),e.framesetOk=!1}function yw(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==J.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function bw(e,t){if(Bx(t))yw(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===J.MATHML?Vx(t):r===J.SVG&&(Wx(t),Hx(t)),Ux(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function xw(e,t){if(t.tagID===X.P||t.tagID===X.BR)yw(e),e._endTagOutsideForeignContent(t);else for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===J.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}Y.AREA,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BR,Y.COL,Y.EMBED,Y.FRAME,Y.HR,Y.IMG,Y.INPUT,Y.KEYGEN,Y.LINK,Y.META,Y.PARAM,Y.SOURCE,Y.TRACK,Y.WBR;var Sw=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Cw=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),ww={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Tw(e,n){let r=zw(e),i=rb(`type`,{handlers:{root:Dw,element:Ow,text:kw,comment:Mw,doctype:Aw,raw:Nw},unknown:Pw}),a={parser:r?new eS(ww):eS.getFragmentParser(void 0,ww),handle(e){i(e,a)},stitches:!1,options:n||{}};i(e,a),Fw(a,Uf());let o=eh(r?a.parser.document:a.parser.getFragment(),{file:a.options.file});return a.stitches&&t.o(o,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),o.type===`root`&&o.children.length===1&&o.children[0].type===e.type?o.children[0]:o}function Ew(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Dw(e,t){Ew(e.children,t)}function Ow(e,t){Lw(e,t),Ew(e.children,t),Rw(e,t)}function kw(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:q.CHARACTER,chars:e.value,location:Bw(e)};Fw(t,Uf(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Aw(e,t){let n={type:q.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:Bw(e)};Fw(t,Uf(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function jw(e,t){t.stitches=!0;let n=Vw(e);`children`in e&&`children`in n&&(n.children=Tw({type:`root`,children:e.children},t.options).children),Mw({type:`comment`,value:{stitch:n}},t)}function Mw(e,t){let n=e.value,r={type:q.COMMENT,data:n,location:Bw(e)};Fw(t,Uf(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Nw(e,t){if(t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Iw(t,Uf(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Sw,`&lt;$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function Pw(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))jw(n,t);else{let e=``;throw Cw.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function Fw(e,t){Iw(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Jb.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function Iw(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function Lw(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Jb.PLAINTEXT)return;Fw(t,Uf(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:Zm.html;i===Zm.html&&n===`svg`&&(i=Zm.svg);let a=sb({...e,children:[]},{space:i===Zm.svg?`svg`:`html`}),o={type:q.START_TAG,tagName:n,tagID:Gb(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:Bw(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Rw(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&_b.includes(n)||t.parser.tokenizer.state===Jb.PLAINTEXT)return;Fw(t,Hf(e));let r={type:q.END_TAG,tagName:n,tagID:Gb(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Bw(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Jb.RCDATA||t.parser.tokenizer.state===Jb.RAWTEXT||t.parser.tokenizer.state===Jb.SCRIPT_DATA)&&(t.parser.tokenizer.state=Jb.DATA)}function zw(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function Bw(e){let t=Uf(e)||{line:void 0,column:void 0,offset:void 0},n=Hf(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Vw(e){return`children`in e?mm({...e,children:[]}):mm(e)}function Hw(e){return function(t,n){return Tw(t,{...e,file:n})}}var Uw=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],Ww={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...Uw,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...Uw],h2:[[`className`,`sr-only`]],img:[...Uw,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...Uw,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...Uw],table:[...Uw],ul:[...Uw,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},Gw={}.hasOwnProperty;function Kw(e,t){let n={type:`root`,children:[]},r=qw({schema:t?{...Ww,...t}:Ww,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function qw(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return Jw(e,n);case`doctype`:return Yw(e,n);case`element`:return Xw(e,n);case`root`:return Zw(e,n);case`text`:return Qw(e,n)}}}function Jw(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return aT(r,t),r}}function Yw(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return aT(e,t),e}}function Xw(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=$w(e,t.children),i=eT(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Gw.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return aT(o,t),o}function Zw(e,t){let n={type:`root`,children:$w(e,t.children)};return aT(n,t),n}function Qw(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return aT(n,t),n}function $w(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=qw(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function eT(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&Gw.call(r,n)?r[n]:void 0,o=r&&Gw.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(Gw.call(s,l)){let t=s[l],n=tT(e,oT(a,l),l,t);n??=tT(e,oT(o,l),l,t),n!=null&&(c[l]=n)}if(i&&Gw.call(i,n)){let e=i[n];for(l in e)Gw.call(e,l)&&!Gw.call(c,l)&&(c[l]=e[l])}return c}function tT(e,t,n,r){return t?Array.isArray(r)?nT(e,t,n,r):rT(e,t,n,r):void 0}function nT(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=rT(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function rT(e,t,n,r){if((typeof r==`boolean`||typeof r==`number`||typeof r==`string`)&&iT(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function iT(e,t,n){let r=e.schema.protocols&&Gw.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function aT(e,t){let n=Gf(t);t.data&&(e.data=mm(t.data)),n&&(e.position=n)}function oT(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function sT(e){return function(t){return Kw(t,e)}}var cT={RENDER:`pi-outpost:drawio-render`,READY:`pi-outpost:drawio-ready`,RENDERED:`pi-outpost:drawio-rendered`,FAILED:`pi-outpost:drawio-failed`,EDIT:`pi-outpost:drawio-edit`,SAVE:`pi-outpost:drawio-save`,CLEAN:`pi-outpost:drawio-clean`,UNDO:`pi-outpost:drawio-undo`,REDO:`pi-outpost:drawio-redo`,EXPORT_SVG:`pi-outpost:drawio-export-svg`,WIRE_STYLE:`pi-outpost:drawio-wire-style`,CHANGED:`pi-outpost:drawio-changed`,SAVED:`pi-outpost:drawio-saved`,SVG:`pi-outpost:drawio-svg`,ESCAPE:`pi-outpost:drawio-escape`,FOCUS:`pi-outpost:drawio-focus`,PAGE_LOCKED:`pi-outpost:drawio-page-locked`};function lT(e,t=window.location.href){return new URL(`${e}/vendor/drawio/viewer-static.min.js`,t).href}function uT(e){return JSON.stringify(e).replace(/</g,`\\u003c`)}function dT(e){return e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function fT(e){let t=[`default-src 'none'`,`script-src ${e} 'unsafe-inline' 'unsafe-eval'`,`style-src 'unsafe-inline'`,`img-src data: blob:`,`font-src data:`].join(`; `),n=e.slice(0,e.lastIndexOf(`/`)),r={DRAWIO_BASE_URL:n,DRAWIO_LIGHTBOX_URL:n,DRAWIO_VIEWER_URL:e,PROXY_URL:n,STENCIL_PATH:n,SHAPES_PATH:n,STYLE_PATH:n,GRAPH_IMAGE_PATH:n,DRAW_MATH_URL:n,mxImageBasePath:n,mxBasePath:n,mxLoadResources:!1,mxLoadStylesheets:!1};return`<!doctype html>
30
- <html><head><meta charset="utf-8">
31
- <meta http-equiv="Content-Security-Policy" content="${dT(t)}">
32
- <style>
33
- html, body { margin: 0; height: 100%; }
34
- body { font-family: system-ui, sans-serif; background: #ffffff; color: #18181b; box-sizing: border-box; padding: 8px; }
35
- body.dark { background: #09090b; color: #e4e4e7; }
36
- /* No padding on the graph's own container: mxGraph places the pointer against the
37
- container's border box, so a padded one shifts every hit by the padding — wires missed
38
- by a few pixels, connection points that never answer. The margin is the body's. */
39
- #diagram { box-sizing: border-box; width: 100%; }
40
- /* mxGraph's common.css, the part touch-up needs (the viewer is told not to load stylesheets).
41
- Without it the label editor opens at the foot of the page and never commits. */
42
- div.mxRubberband { position: absolute; overflow: hidden; border: 1px solid #29b6f2; background: #29b6f2; opacity: .2; }
43
- .mxCellEditor { position: absolute; display: inline-block; overflow: visible; word-wrap: normal; border: 0; min-width: 1px; resize: none; padding: 0; margin: 0; outline: none; cursor: text; }
44
- .mxPlainTextEditor * { padding: 0; margin: 0; }
45
- </style>
46
- </head><body>
47
- <script>
48
- (function () {
49
- var globals = ${uT(r)};
50
- for (var name in globals) window[name] = globals[name];
51
- })();
52
- <\/script>
53
- <script src="${dT(e)}"><\/script>
54
- <script>
55
- (function () {
56
- var M = ${uT(cT)};
57
- function tell(message) { parent.postMessage(message, "*"); }
58
- // The page the reader is on: a saved or retyped diagram keeps it, rather than
59
- // jumping back to the first page under someone reading the third
60
- var viewer = null;
61
- // The last text and theme posted: leaving touch-up redraws them, dropping the edits
62
- var last = null;
63
- var editing = false;
64
- // Touch-up state for the viewer drawn now: its history, keys and saved point
65
- var touch = null;
66
-
67
- // What draw.io would open: an <mxfile> of pages, or a bare <mxGraphModel>
68
- function pagesOf(root) {
69
- if (root.nodeName === "mxGraphModel") return 1;
70
- if (root.nodeName !== "mxfile") return 0;
71
- return root.getElementsByTagName("diagram").length;
72
- }
73
-
74
- function render(xml, dark) {
75
- last = { xml: xml, dark: dark };
76
- stopTouchUp();
77
- document.body.className = dark ? "dark" : "";
78
- // The viewer's own colours are light-dark() pairs: they follow the color-scheme
79
- document.documentElement.style.colorScheme = dark ? "dark" : "light";
80
- var old = document.getElementById("diagram");
81
- if (old) old.remove();
82
- var doc = new DOMParser().parseFromString(xml, "text/xml");
83
- var broken = doc.getElementsByTagName("parsererror")[0];
84
- if (broken) {
85
- // The browser's own preamble says nothing the reader needs
86
- var detail = (broken.textContent || "").replace(/^This page contains the following errors:\\s*/, "").split("\\n")[0];
87
- tell({ type: M.FAILED, message: "This is not well-formed XML: " + detail });
88
- return;
89
- }
90
- var pages = pagesOf(doc.documentElement);
91
- if (pages === 0) {
92
- tell({ type: M.FAILED, message: "This is not a draw.io diagram: its root is <" + doc.documentElement.nodeName + ">, not <mxfile> or <mxGraphModel>." });
93
- return;
94
- }
95
- var page = viewer !== null ? Math.min(viewer.currentPage || 0, pages - 1) : 0;
96
- var container = document.createElement("div");
97
- container.id = "diagram";
98
- document.body.appendChild(container);
99
- try {
100
- viewer = new GraphViewer(container, doc.documentElement, {
101
- page: page,
102
- toolbar: "pages zoom layers",
103
- // Always shown, at its default place: the viewer reserves the container's top
104
- // margin for it. "inline" draws it above the container, outside this frame.
105
- "toolbar-nohide": true,
106
- nav: true,
107
- lightbox: false,
108
- resize: false,
109
- "auto-fit": true,
110
- center: true,
111
- "check-visible-state": false,
112
- // A string, not a boolean: GraphViewer.isDarkMode compares with "dark" and "auto"
113
- "dark-mode": dark ? "dark" : "light",
114
- });
115
- fitWidth(viewer);
116
- tell({ type: M.RENDERED, pages: pages });
117
- if (editing) startTouchUp();
118
- } catch (error) {
119
- viewer = null;
120
- tell({ type: M.FAILED, message: "draw.io could not draw this diagram: " + (error && error.message ? error.message : String(error)) });
121
- }
122
- }
123
-
124
- // With its zoom toolbar on, the viewer draws at full size and widens its container to
125
- // match: a diagram wider than the frame runs off its edge, behind a scrollbar a Mac
126
- // hides — and a box out there cannot be touched up. Scaled down to the frame's width.
127
- function fitWidth(shown) {
128
- var graph = shown.graph;
129
- var available = window.innerWidth - 16 - 2 * graph.border;
130
- var width = graph.getGraphBounds().width / graph.view.scale;
131
- if (!(width > available) || available <= 0) return;
132
- graph.zoomTo(available / width);
133
- var bounds = graph.getGraphBounds();
134
- shown.updateContainerWidth(graph.container, bounds.width + 2 * graph.border);
135
- shown.updateContainerHeight(graph.container, Math.max(shown.minHeight || 0, bounds.height + 2 * graph.border + 1));
136
- }
137
-
138
- function changed() {
139
- if (touch === null) return;
140
- var undo = touch.undo;
141
- // A label being typed is an edit too: leaving now would drop it
142
- var typing = viewer !== null && viewer.graph.isEditing();
143
- tell({ type: M.CHANGED, dirty: typing || undo.indexOfNextAdd !== touch.clean, canUndo: undo.canUndo(), canRedo: undo.canRedo(), wireStyle: viewer === null ? null : targetWireStyle(viewer.graph) });
144
- }
145
-
146
- // Wire styles as draw.io's Waypoints menu sets them (Menus.js, edgeStyleChange): the keys
147
- // each one writes, null removing a key
148
- var WIRE_STYLES = {
149
- straight: { edgeStyle: null, curved: null, noEdgeStyle: null, elbow: null },
150
- orthogonal: { edgeStyle: "orthogonalEdgeStyle", curved: null, noEdgeStyle: null, elbow: null },
151
- curved: { edgeStyle: "orthogonalEdgeStyle", curved: "1", noEdgeStyle: null, elbow: null }
152
- };
153
-
154
- function wireStyleOf(graph, cell) {
155
- var style = graph.getCurrentCellStyle(cell);
156
- if (style.noEdgeStyle == 1 || style.edgeStyle == null || style.edgeStyle === "none") return "straight";
157
- return style.curved == 1 ? "curved" : "orthogonal";
158
- }
159
-
160
- function pageWires(graph) {
161
- var model = graph.getModel();
162
- return Object.keys(model.cells).map(function (id) { return model.cells[id]; }).filter(function (cell) { return model.isEdge(cell); });
163
- }
164
-
165
- // The wires a choice changes: the selected ones, else all of the page's
166
- function targetWires(graph) {
167
- var selected = graph.getSelectionCells().filter(function (cell) { return graph.getModel().isEdge(cell); });
168
- return selected.length > 0 ? selected : pageWires(graph);
169
- }
170
-
171
- function targetWireStyle(graph) {
172
- var wires = targetWires(graph);
173
- if (wires.length === 0) return newWireStyle(graph);
174
- var first = wireStyleOf(graph, wires[0]);
175
- for (var i = 1; i < wires.length; i++) if (wireStyleOf(graph, wires[i]) !== first) return "mixed";
176
- return first;
177
- }
178
-
179
- function newWireStyle(graph) {
180
- var current = graph.currentEdgeStyle || {};
181
- if (current.edgeStyle == null || current.edgeStyle === "none") return "straight";
182
- return current.curved == "1" ? "curved" : "orthogonal";
183
- }
184
-
185
- // New wires take this style (Graph.createCurrentEdgeStyle reads currentEdgeStyle)
186
- function setNewWireStyle(graph, name) {
187
- var current = mxUtils.clone(graph.currentEdgeStyle || {});
188
- var keys = WIRE_STYLES[name];
189
- for (var key in keys) {
190
- if (keys[key] === null) delete current[key];
191
- else current[key] = keys[key];
192
- }
193
- graph.currentEdgeStyle = current;
194
- }
195
-
196
- // One model update: one undo takes it back. Waypoints go, as draw.io resets them: laid out
197
- // for one style, they make no sense in another
198
- function applyWireStyle(name) {
199
- if (touch === null || viewer === null || !WIRE_STYLES[name]) return;
200
- var graph = viewer.graph;
201
- if (graph.isEditing()) graph.stopEditing(false);
202
- var wires = targetWires(graph);
203
- var model = graph.getModel();
204
- model.beginUpdate();
205
- try {
206
- for (var i = 0; i < wires.length; i++) {
207
- graph.resetEdge(wires[i]);
208
- var keys = WIRE_STYLES[name];
209
- for (var key in keys) graph.setCellStyles(key, keys[key], [wires[i]]);
210
- }
211
- } finally {
212
- model.endUpdate();
213
- }
214
- setNewWireStyle(graph, name);
215
- changed();
216
- }
217
-
218
- // The viewer holds back the editing core it bundles; this lets it go, for the page shown
219
- function startTouchUp() {
220
- if (viewer === null || touch !== null) return;
221
- var graph = viewer.graph;
222
- graph.setEnabled(true);
223
- // The viewer replaces click with a no-op: nothing would select on click, and an edge —
224
- // selected by click, not by mousedown like a shape — would never show its handles
225
- delete graph.click;
226
- graph.setCellsLocked(false);
227
- graph.setDisconnectOnMove(false);
228
- // A wire must end on a shape: one left hanging is what drawio_check reports as an
229
- // error, and a touch-up should not hand the agent a file it would refuse
230
- graph.setAllowDanglingEdges(false);
231
- // The file's own grid, as draw.io would snap to it: a box dropped at x=1089 is one
232
- // the next reader nudges by hand, and the drawio skill asks for multiples of 10
233
- var page = originalModel();
234
- graph.setGridEnabled(page === null || page.getAttribute("grid") !== "0");
235
- graph.gridSize = Number(page !== null && page.getAttribute("gridSize")) || 10;
236
- var undo = new mxUndoManager();
237
- var record = function (sender, event) { undo.undoableEditHappened(event.getProperty("edit")); changed(); };
238
- graph.getModel().addListener(mxEvent.UNDO, record);
239
- graph.getView().addListener(mxEvent.UNDO, record);
240
- // The viewer sizes its drawing area once, to the diagram as it came: a box dragged past
241
- // its right or bottom edge would vanish there, moved but out of reach. The area grows
242
- // with the diagram instead, as draw.io's page does, and the frame scrolls to it; past
243
- // the left or top edge there is nothing to scroll to, so a box stops at the origin.
244
- graph.setAllowNegativeCoordinates(false);
245
- var shown = viewer;
246
- var grow = function () {
247
- var bounds = graph.getGraphBounds();
248
- var width = bounds.x + bounds.width + 2 * graph.border;
249
- var height = bounds.y + bounds.height + 2 * graph.border;
250
- if (width > container.offsetWidth) shown.updateContainerWidth(container, width);
251
- if (height > container.offsetHeight) shown.updateContainerHeight(container, height);
252
- };
253
- graph.getModel().addListener(mxEvent.CHANGE, grow);
254
- // New wires start in the style most of the page's wires have: an agent's diagonal wires
255
- // get diagonal neighbours, not draw.io's orthogonal default
256
- var counts = { straight: 0, orthogonal: 0, curved: 0 };
257
- pageWires(graph).forEach(function (cell) { counts[wireStyleOf(graph, cell)] += 1; });
258
- var most = counts.orthogonal >= counts.straight && counts.orthogonal >= counts.curved ? "orthogonal" : counts.straight >= counts.curved ? "straight" : "curved";
259
- setNewWireStyle(graph, most);
260
- graph.getSelectionModel().addListener(mxEvent.CHANGE, changed);
261
- graph.addListener(mxEvent.EDITING_STARTED, changed);
262
- graph.addListener(mxEvent.EDITING_STOPPED, changed);
263
- // The keys are the graph's own, not the document's: mxKeyHandler only takes an event
264
- // whose target is its element, and a frame's keys otherwise land on <body>
265
- var container = graph.container;
266
- container.setAttribute("tabindex", "-1");
267
- container.style.outline = "none";
268
- var keys = new mxKeyHandler(graph, container);
269
- var remove = function () { if (graph.isEnabled() && !graph.isSelectionEmpty()) graph.deleteCells(graph.getDeletableCells(graph.getSelectionCells())); };
270
- keys.bindKey(46, remove);
271
- keys.bindKey(8, remove);
272
- // Undo and redo by hand: mxKeyHandler's control bindings never see ⌘ on a Mac
273
- var history = function (event) {
274
- if (graph.isEditing() || !(event.metaKey || event.ctrlKey) || event.altKey) return;
275
- var key = (event.key || "").toLowerCase();
276
- if (key !== "z" && key !== "y") return;
277
- event.preventDefault();
278
- undoOrRedo(key === "y" || event.shiftKey);
279
- };
280
- container.addEventListener("keydown", history);
281
- // mxGraph prevents the default of a pointerdown, which is what would have given the
282
- // graph the keyboard — and with it the mousedown that would follow, so this listens
283
- // for the pointer: without it Delete and ⌘Z go nowhere. Not while a label is being
284
- // typed, which has the keyboard already
285
- // A frame cannot always take the keyboard from its parent by itself (a headless
286
- // browser, a window not in front): the parent is asked to focus it too
287
- var focus = function () {
288
- if (graph.isEditing()) return;
289
- container.focus({ preventScroll: true });
290
- tell({ type: M.FOCUS });
291
- };
292
- document.addEventListener("pointerdown", focus, true);
293
- // Another page would carry this one's history and edits with it: refused while dirty,
294
- // and a clean start on the page arrived at
295
- var showPage = viewer.updateGraphXml;
296
- viewer.updateGraphXml = function () {
297
- if (touch !== null && touch.undo.indexOfNextAdd !== touch.clean) {
298
- tell({ type: M.PAGE_LOCKED });
299
- return;
300
- }
301
- var result = showPage.apply(this, arguments);
302
- if (touch !== null) {
303
- touch.undo.clear();
304
- touch.clean = 0;
305
- changed();
306
- }
307
- return result;
308
- };
309
- touch = { undo: undo, keys: keys, clean: 0, record: record, showPage: showPage, focus: focus, history: history, container: container, grow: grow };
310
- changed();
311
- }
312
-
313
- function stopTouchUp() {
314
- if (touch === null) return;
315
- var current = touch;
316
- touch = null;
317
- current.keys.destroy();
318
- document.removeEventListener("pointerdown", current.focus, true);
319
- current.container.removeEventListener("keydown", current.history);
320
- if (viewer !== null) {
321
- viewer.updateGraphXml = current.showPage;
322
- viewer.graph.getModel().removeListener(current.record);
323
- viewer.graph.getModel().removeListener(current.grow);
324
- viewer.graph.removeListener(changed);
325
- viewer.graph.getSelectionModel().removeListener(changed);
326
- viewer.graph.getView().removeListener(current.record);
327
- }
328
- }
329
-
330
- function undoOrRedo(redo) {
331
- if (touch === null) return;
332
- if (viewer.graph.isEditing()) viewer.graph.stopEditing(false);
333
- if (redo) { if (touch.undo.canRedo()) touch.undo.redo(); }
334
- else if (touch.undo.canUndo()) touch.undo.undo();
335
- changed();
336
- }
337
-
338
- // The page shown as draw.io's file had it: its <mxGraphModel>, inflated if it was compressed
339
- function originalModel() {
340
- var node = viewer.diagrams && viewer.diagrams.length > 0 ? viewer.diagrams[viewer.currentPage || 0] : viewer.xmlNode;
341
- if (node.nodeName === "mxGraphModel") return node;
342
- var models = node.getElementsByTagName("mxGraphModel");
343
- if (models.length > 0) return models[0];
344
- var text = mxUtils.getTextContent(node);
345
- return text ? mxUtils.parseXml(Graph.decompress(text)).documentElement : null;
346
- }
347
-
348
- function save() {
349
- var graph = viewer.graph;
350
- // A label still being typed is part of what the reader means to save
351
- if (graph.isEditing()) graph.stopEditing(false);
352
- var model = new mxCodec(mxUtils.createXmlDocument()).encode(graph.getModel());
353
- // The codec writes only the cells: grid, page size and the rest are the file's own
354
- var original = originalModel();
355
- if (original !== null) {
356
- for (var i = 0; i < original.attributes.length; i++) {
357
- var attribute = original.attributes[i];
358
- if (!model.hasAttribute(attribute.name)) model.setAttribute(attribute.name, attribute.value);
359
- }
360
- }
361
- if (touch !== null) touch.saving = touch.undo.indexOfNextAdd;
362
- tell({ type: M.SAVED, page: viewer.currentPage || 0, xml: mxUtils.getPrettyXml(model) });
363
- }
364
-
365
- function exportSvg() {
366
- var graph = viewer.graph;
367
- // Plain text beside each HTML label (draw.io's <switch> fallback), for readers that
368
- // ignore foreignObject — Word among them
369
- var svg = graph.getSvg(null, 1, 10, false, null, true);
370
- var names = viewer.diagrams && viewer.diagrams.length > 0 ? viewer.diagrams[viewer.currentPage || 0].getAttribute("name") : null;
371
- tell({ type: M.SVG, page: viewer.currentPage || 0, name: names, svg: '<?xml version="1.0" encoding="UTF-8"?>\\n' + mxUtils.getXml(svg) });
372
- }
373
-
374
- // The keyboard is in this frame once it has been clicked, so the application never sees
375
- // an Escape typed here: passed on, except while a label is typed, where Escape cancels
376
- // the label first, as in draw.io
377
- // On the window, capturing: before mxGraph's own handlers, which take Escape to cancel
378
- // a gesture in progress and can keep it from bubbling — right after a drag, it was lost
379
- window.addEventListener("keydown", function (event) {
380
- if (event.key !== "Escape") return;
381
- if (viewer !== null && viewer.graph.isEditing()) return;
382
- tell({ type: M.ESCAPE });
383
- }, true);
384
-
385
- window.addEventListener("message", function (event) {
386
- // Only the application that holds this frame
387
- if (event.source !== parent) return;
388
- var data = event.data;
389
- if (!data) return;
390
- if (data.type === M.RENDER && typeof data.xml === "string") render(data.xml, data.dark === true);
391
- else if (data.type === M.EDIT) {
392
- editing = data.on === true;
393
- if (editing) startTouchUp();
394
- // The text to come back to, when the parent has a newer one (a save landed); else the last
395
- else if (typeof data.xml === "string") render(data.xml, data.dark === true);
396
- else if (touch !== null && last !== null) render(last.xml, last.dark);
397
- }
398
- else if (viewer === null) return;
399
- else if (data.type === M.SAVE && touch !== null) save();
400
- else if (data.type === M.CLEAN && touch !== null && touch.saving !== undefined) { touch.clean = touch.saving; changed(); }
401
- else if (data.type === M.UNDO) undoOrRedo(false);
402
- else if (data.type === M.REDO) undoOrRedo(true);
403
- else if (data.type === M.EXPORT_SVG) exportSvg();
404
- else if (data.type === M.WIRE_STYLE && typeof data.style === "string") applyWireStyle(data.style);
405
- });
406
-
407
- if (typeof GraphViewer === "undefined") {
408
- tell({ type: M.FAILED, message: "The draw.io viewer could not be loaded." });
409
- } else {
410
- tell({ type: M.READY });
411
- }
412
- })();
413
- <\/script>
414
- </body></html>`}var pT=`allow-scripts`,mT=1e4,hT=(0,a.forwardRef)(function({xml:e,serverUrl:t,title:n,fallback:r,editing:i=!1,onTouchUpChange:s,onPageLocked:c,onEscape:u,onRendered:d,className:f=`flex h-full min-h-[24rem] flex-col`},p){let m=(0,a.useRef)(null),h=l()===`dark`,g=(0,a.useMemo)(()=>fT(lT(t)),[t]),[_,v]=(0,a.useState)(0),[y,b]=(0,a.useState)(null),x=(0,a.useRef)(new Map),S=(0,a.useRef)({onTouchUpChange:s,onPageLocked:c,onEscape:u,onRendered:d});S.current={onTouchUpChange:s,onPageLocked:c,onEscape:u,onRendered:d};let C=(0,a.useRef)(null),w=(0,a.useRef)(i);function T(e){m.current?.contentWindow?.postMessage(e,`*`)}function ee(e,t){return new Promise((n,r)=>{x.current.get(t)?.reject(Error(`superseded`));let i=setTimeout(()=>{x.current.delete(t),r(Error(`the diagram did not answer`))},mT);x.current.set(t,{resolve:(e=>{clearTimeout(i),n(e)}),reject:e=>{clearTimeout(i),r(e)}}),T({type:e})})}return(0,a.useImperativeHandle)(p,()=>({save:()=>ee(cT.SAVE,cT.SAVED),markClean:()=>T({type:cT.CLEAN}),undo:()=>T({type:cT.UNDO}),redo:()=>T({type:cT.REDO}),setWireStyle:e=>T({type:cT.WIRE_STYLE,style:e}),exportSvg:()=>ee(cT.EXPORT_SVG,cT.SVG)})),(0,a.useEffect)(()=>{let e=x.current;function t(t){if(m.current===null||t.source!==m.current.contentWindow)return;let n=t.data;if(typeof n==`object`&&n){if(n.type===cT.READY)C.current=null,w.current=!1,v(e=>e+1);else if(n.type===cT.RENDERED)b(null),S.current.onRendered?.(null);else if(n.type===cT.FAILED){let e=typeof n.message==`string`?n.message:`The diagram could not be drawn.`;b(e),S.current.onRendered?.(e)}else if(n.type===cT.CHANGED){let e=[`straight`,`orthogonal`,`curved`,`mixed`].includes(n.wireStyle)?n.wireStyle:void 0;S.current.onTouchUpChange?.({dirty:n.dirty===!0,canUndo:n.canUndo===!0,canRedo:n.canRedo===!0,...e?{wireStyle:e}:{}})}else n.type===cT.FOCUS?m.current!==null&&document.activeElement!==m.current&&m.current.focus({preventScroll:!0}):n.type===cT.ESCAPE?S.current.onEscape?.():n.type===cT.PAGE_LOCKED?S.current.onPageLocked?.():n.type===cT.SAVED&&typeof n.xml==`string`&&typeof n.page==`number`?(e.get(cT.SAVED)?.resolve({page:n.page,xml:n.xml}),e.delete(cT.SAVED)):n.type===cT.SVG&&typeof n.svg==`string`&&typeof n.page==`number`&&(e.get(cT.SVG)?.resolve({page:n.page,name:typeof n.name==`string`?n.name:null,svg:n.svg}),e.delete(cT.SVG))}}return window.addEventListener(`message`,t),()=>{window.removeEventListener(`message`,t);for(let t of e.values())t.reject(Error(`the diagram was closed`));e.clear()}},[]),(0,a.useEffect)(()=>{_!==0&&(i?(!w.current&&(C.current===null||C.current.xml!==e||C.current.dark!==h)&&(C.current={xml:e,dark:h},T({type:cT.RENDER,xml:e,dark:h})),w.current||T({type:cT.EDIT,on:!0}),w.current=!0):w.current?(w.current=!1,C.current={xml:e,dark:h},T({type:cT.EDIT,on:!1,xml:e,dark:h})):(C.current===null||C.current.xml!==e||C.current.dark!==h)&&(C.current={xml:e,dark:h},T({type:cT.RENDER,xml:e,dark:h})))},[_,e,h,i]),(0,o.jsxs)(`div`,{className:f,"data-testid":`drawio-view`,children:[y!==null&&(0,o.jsx)(`div`,{role:`alert`,"data-testid":`drawio-failure`,className:`border-b border-amber-300 bg-amber-50 px-3 py-1.5 text-xs text-amber-900 dark:border-amber-700 dark:bg-amber-950/40 dark:text-amber-200`,children:y}),(0,o.jsx)(`iframe`,{ref:m,title:n,"data-testid":`drawio-frame`,sandbox:pT,srcDoc:g,className:y===null?`min-h-0 w-full flex-1 border-0`:`h-0 w-full border-0`}),y!==null&&(0,o.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto`,children:r})]})}),gT=(0,a.createContext)({serverUrl:``});function _T(){return(0,a.useContext)(gT)}var vT=class extends Error{reason;constructor(e,t){super(e),this.name=`FileIoError`,this.reason=t}},yT=class extends Error{};function bT(e){let t=[],n=/<diagram(?=[\s/>])[^>]*?(\/?)>/g,r;for(;(r=n.exec(e))!==null;){let i=r.index,a=i+r[0].length;if(r[1]===`/`){t.push({start:i,end:a,innerStart:a,innerEnd:a});continue}let o=e.indexOf(`</diagram>`,a);if(o===-1)throw new yT(`a <diagram> element is not closed`);t.push({start:i,end:o+10,innerStart:a,innerEnd:o}),n.lastIndex=o+10}return t}function xT(e,t){let n=e.lastIndexOf(`
415
- `,t-1)+1;return/^[ \t]*/.exec(e.slice(n,t))[0]}function ST(e,t){return e.trim().split(/\r?\n/).map(e=>t+e).join(`
416
- `)}function CT(e,t,n){if(!/^\s*<mxGraphModel[\s>]/.test(n))throw new yT(`the page to save is not an <mxGraphModel>`);let r=e.includes(`\r
417
- `)?`\r
418
- `:`
419
- `,i=bT(e);if(i.length===0){let i=e.search(/<mxGraphModel[\s>]/),a=e.lastIndexOf(`</mxGraphModel>`);if(i===-1||a===-1||t!==0)throw new yT(`the file has no page to put this one in`);let o=a+15;return e.slice(0,i)+ST(n,xT(e,i)).trimStart().split(`
420
- `).join(r)+e.slice(o)}let a=i[t];if(a===void 0)throw new yT(`the file has no page ${t+1}`);let o=xT(e,a.start),s=ST(n,o+` `).split(`
421
- `).join(r),c=e.slice(a.start,a.innerStart).replace(/\s*\/>$/,`>`);return e.slice(0,a.start)+c+r+s+r+o+`</diagram>`+e.slice(a.end)}var wT={dirty:!1,canUndo:!1,canRedo:!1},TT=`Discard the unsaved touch-ups to this diagram?`;function ET(e){return e.slice(e.lastIndexOf(`/`)+1).replace(/\.(drawio|dio)$/i,``)||`diagram`}function DT(e,t,n){let r=URL.createObjectURL(new Blob([t],{type:n}));try{let t=document.createElement(`a`);t.href=r,t.download=e,t.click()}finally{URL.revokeObjectURL(r)}}function OT(e,t){let n=t?.trim().replace(/[^\p{L}\p{N}._-]+/gu,`-`).replace(/^-+|-+$/g,``);return`${ET(e)}${n?`-${n}`:``}.svg`}function kT(e,t,n){let{fileIo:r}=_T(),[i,o]=(0,a.useState)({status:`loading`}),s=(0,a.useRef)(0),c=(0,a.useCallback)(()=>{if(!t)return;if(r===void 0){o({status:`failed`,message:`files cannot be read here`});return}let n=++s.current;r.read(e).then(({content:e})=>{n===s.current&&o({status:`loaded`,content:e})},e=>{n===s.current&&o({status:`failed`,message:e instanceof Error?e.message:String(e)})})},[t,r,e]);return(0,a.useEffect)(()=>{n&&c()},[c,n]),(0,a.useEffect)(()=>{if(t&&n&&r!==void 0)return r.onChanged(e,c)},[t,n,r,e,c]),i}function AT(e,t){let[n,r]=(0,a.useState)(!t||typeof IntersectionObserver>`u`);return(0,a.useEffect)(()=>{if(n||e.current===null)return;let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&r(!0)},{rootMargin:`600px 0px`});return t.observe(e.current),()=>t.disconnect()},[n,e]),n}function jT({path:e,xml:t,variant:n,fallback:r,onTouchUpDirtyChange:i}){let{serverUrl:s,fileIo:c,onOpenFile:l}=_T(),u=(0,a.useRef)(null),d=AT(u,n===`reply`),p=kT(e,t===void 0,d),m=t??(p.status===`loaded`?p.content:null),h=(0,a.useRef)(null),g=(0,a.useRef)(null),[_,v]=(0,a.useState)(!1),[y,b]=(0,a.useState)(null),[x,S]=(0,a.useState)(null),[T,ee]=(0,a.useState)(null),te=(0,a.useRef)(null),[E,D]=(0,a.useState)(wT),[ne,re]=(0,a.useState)(!1),ie=(0,a.useRef)(!1),[ae,oe]=(0,a.useState)(null),[se,ce]=(0,a.useState)(null),le=e=>e===`inline`?h:g,ue=e=>T===e&&te.current!==null?te.current.content:m,de=c!==void 0,O=T!==null&&E.dirty;(0,a.useEffect)(()=>{i?.(O)},[O,i]),(0,a.useEffect)(()=>()=>i?.(!1),[i]);async function fe(t){if(c!==void 0&&T===null){oe(null),ce(null);try{te.current=await c.read(e),D(wT),ee(t)}catch(e){oe({message:e instanceof Error?e.message:String(e),conflict:!1})}}}function pe(){return O&&!window.confirm(TT)?!1:(ee(null),D(wT),oe(null),ce(null),te.current=null,!0)}async function me(){let t=T,n=te.current;if(!(t===null||n===null||c===void 0||ie.current)){ie.current=!0,re(!0),oe(null);try{let r=await le(t).current.save(),i=CT(n.content,r.page,r.xml),{mtimeMs:a}=await c.write(e,i,n.mtimeMs);te.current={content:i,mtimeMs:a},le(t).current?.markClean()}catch(e){let t=e instanceof vT&&e.reason===`conflict`;oe({message:t?`The file changed on disk, or was removed, since this touch-up began, so it was not saved. Leave without saving to see what is there now.`:`Could not save: ${e instanceof Error?e.message:String(e)}`,conflict:t})}finally{ie.current=!1,re(!1)}}}async function he(t){S(null);try{let n=await le(t).current.exportSvg();DT(OT(e,n.name),n.svg,`image/svg+xml;charset=utf-8`)}catch(e){S(e instanceof Error?e.message:String(e))}}function ge(){(T!==`enlarged`||pe())&&v(!1)}let _e=(0,a.useCallback)(()=>ce(`Save or undo the touch-ups on this page before turning to another.`),[]),ve=(0,a.useRef)(pe);ve.current=pe;let ye=(0,a.useRef)(ge);ye.current=ge;let be=(0,a.useRef)(T);be.current=T;let xe=(0,a.useRef)(_);xe.current=_;let Se=(0,a.useCallback)(()=>{be.current===null?xe.current&&ye.current():ve.current()},[]);(0,a.useEffect)(()=>{if(T===null)return;function e(e){e.key===`Escape`&&(e.preventDefault(),e.stopImmediatePropagation(),ve.current())}return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[T]);function Ce(t){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`button`,{type:`button`,className:C,disabled:m===null||y!==null,onClick:()=>void he(t),title:`Save the page shown as .svg — insert it as a picture in a document`,children:`⤓ download SVG`}),(0,o.jsx)(`button`,{type:`button`,className:C,disabled:m===null,onClick:()=>m!==null&&DT(e.slice(e.lastIndexOf(`/`)+1),m,`application/xml;charset=utf-8`),title:`Save the .drawio file, to open or share it`,children:`⤓ download .drawio`})]})}function we(e){return T===e?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`button`,{type:`button`,className:C,disabled:!E.dirty||ne,onClick:()=>void me(),children:ne?`saving…`:`✓ save`}),(0,o.jsx)(`button`,{type:`button`,className:C,disabled:!E.canUndo,onClick:()=>le(e).current?.undo(),title:`Undo (⌘Z / Ctrl+Z)`,children:`↶ undo`}),(0,o.jsx)(`button`,{type:`button`,className:C,disabled:!E.canRedo,onClick:()=>le(e).current?.redo(),title:`Redo (⇧⌘Z / Ctrl+Y)`,children:`↷ redo`}),(0,o.jsxs)(`label`,{className:`inline-flex items-center gap-1 text-xs text-zinc-500 dark:text-zinc-400`,title:`How the selected wires are drawn — or every wire of the page when none is selected — and new wires too`,children:[`wires`,(0,o.jsxs)(`select`,{className:C,"aria-label":`Wire style`,value:E.wireStyle??`orthogonal`,onChange:t=>{let n=t.target.value;n!==`mixed`&&le(e).current?.setWireStyle(n)},children:[(0,o.jsx)(`option`,{value:`straight`,children:`straight`}),(0,o.jsx)(`option`,{value:`orthogonal`,children:`orthogonal`}),(0,o.jsx)(`option`,{value:`curved`,children:`curved`}),E.wireStyle===`mixed`&&(0,o.jsx)(`option`,{value:`mixed`,disabled:!0,children:`mixed`})]})]}),(0,o.jsx)(`button`,{type:`button`,className:C,onClick:()=>pe(),title:`Leave touch-up (Escape); unsaved touch-ups are asked about first`,children:`done`}),(0,o.jsx)(`span`,{className:`text-xs text-zinc-400`,"data-testid":`drawio-touchup-status`,children:E.dirty?`● unsaved`:`touching up — drag boxes and wire ends, double-click a label`})]}):de&&T===null&&y===null?(0,o.jsx)(`button`,{type:`button`,className:C,disabled:m===null,onClick:()=>void fe(e),title:`Move boxes, re-attach wires and fix labels here; anything more in draw.io`,children:`✎ touch up`}):null}function Te(e){return(0,o.jsxs)(o.Fragment,{children:[T===e&&ae&&(0,o.jsx)(`span`,{role:`alert`,"data-testid":`drawio-touchup-problem`,className:`text-red-600 dark:text-red-400`,children:ae.message}),T===e&&se&&(0,o.jsx)(`span`,{role:`status`,className:`text-amber-700 dark:text-amber-300`,children:se}),T===null&&ae&&(0,o.jsxs)(`span`,{role:`alert`,className:`text-red-600 dark:text-red-400`,children:[`Could not start touch-up: `,ae.message]}),x&&(0,o.jsxs)(`span`,{role:`alert`,className:`text-red-600 dark:text-red-400`,children:[`Could not download SVG: `,x]})]})}if(n===`reply`&&p.status===`failed`)return(0,o.jsxs)(`div`,{ref:u,role:`alert`,"data-testid":`drawio-block-missing`,className:`my-2 rounded-lg border border-amber-300 bg-amber-50 px-3 py-2 text-xs text-amber-900 dark:border-amber-700 dark:bg-amber-950/40 dark:text-amber-200`,children:[`The diagram `,(0,o.jsx)(`code`,{children:e}),` could not be shown: `,p.message]});let Ee=r??(0,o.jsxs)(`p`,{className:`px-3 py-2 text-xs text-zinc-500`,children:[`The diagram `,(0,o.jsx)(`code`,{children:e}),` could not be drawn.`]}),De=(0,o.jsxs)(`div`,{className:`${w} ${n===`reply`?`order-3`:`shrink-0 px-3 py-1.5`}`,children:[T!==`inline`&&(0,o.jsx)(`button`,{type:`button`,className:`text-xs text-zinc-500 underline hover:text-zinc-800 dark:hover:text-zinc-200 disabled:opacity-50`,disabled:m===null||T!==null,onClick:()=>v(!0),"aria-label":`Show diagram at full size`,children:`⤢ enlarge`}),T!==`inline`&&Ce(`inline`),n===`reply`&&l&&(0,o.jsx)(`button`,{type:`button`,className:`text-xs text-zinc-500 underline hover:text-zinc-800 dark:hover:text-zinc-200 disabled:opacity-50`,onClick:()=>l(e),title:`Open the file in the file viewer`,children:`↗ open`}),n===`viewer`&&we(`inline`),Te(`inline`)]});return(0,o.jsxs)(`div`,{ref:u,"data-testid":n===`reply`?`drawio-block-reply`:`drawio-block-viewer`,className:n===`reply`?`my-2 flex flex-col gap-2 rounded-lg border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-800 dark:bg-zinc-900`:`flex h-full flex-col`,children:[n===`viewer`&&De,m===null||!d?(0,o.jsx)(`div`,{className:`h-80 animate-pulse rounded bg-zinc-100 dark:bg-zinc-800/60`,"data-testid":`drawio-block-loading`,"aria-label":`Loading ${e}`}):(0,o.jsx)(hT,{ref:h,xml:ue(`inline`),serverUrl:s,title:e,fallback:Ee,editing:T===`inline`,onTouchUpChange:D,onPageLocked:_e,onEscape:Se,onRendered:b,className:n===`reply`?`flex h-80 flex-col`:`flex min-h-[24rem] flex-1 flex-col`}),n===`reply`&&De,(0,o.jsx)(f,{label:e,testId:`drawio-enlarged`,open:_,onClose:ge,anchorRef:u,actions:(0,o.jsxs)(o.Fragment,{children:[Ce(`enlarged`),we(`enlarged`),Te(`enlarged`)]}),children:m!==null&&(0,o.jsx)(`div`,{style:{width:`90vw`,height:`75vh`},children:(0,o.jsx)(hT,{ref:g,xml:ue(`enlarged`),serverUrl:s,title:`${e}, full size`,fallback:Ee,editing:T===`enlarged`,onTouchUpChange:D,onPageLocked:_e,onEscape:Se,className:`flex h-full flex-col`})})})]})}function MT(e){return e===`className`||Array.isArray(e)&&e[0]===`className`}function NT(e){let t={};for(let[n,r]of Object.entries(e))t[n]=r.filter(e=>!MT(e));return t[`*`]=[...t[`*`]??[],`className`],t}var PT={...Ww,tagNames:[...new Set([...Ww.tagNames??[],`details`,`summary`])],attributes:NT(Ww.attributes??{})},FT=[Hw,[sT,PT],tb],IT=[t.n,t.t];function LT(e){let t=n.c(``,e);try{return decodeURIComponent(t)}catch{return t}}function RT(e){return typeof e==`string`&&e!==``&&!n.r(e)&&n.n(e.split(/[?#]/)[0])}function zT({text:e}){let[t,n]=(0,a.useState)(!1);return(0,o.jsxs)(`div`,{className:`my-1 rounded-lg border border-zinc-200 bg-zinc-50 text-sm dark:border-zinc-800/80 dark:bg-zinc-900/40`,children:[(0,o.jsxs)(`button`,{type:`button`,onClick:()=>n(!t),className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs text-zinc-500`,children:[(0,o.jsx)(`span`,{className:`italic`,children:`thinking`}),(0,o.jsx)(`span`,{className:`ml-auto`,children:t?`▾`:`▸`})]}),t&&(0,o.jsx)(`div`,{className:`whitespace-pre-wrap border-t border-zinc-200 px-3 py-2 text-xs italic text-zinc-500 dark:border-zinc-800/80`,children:e})]})}function BT({item:e,serverUrl:r=``,token:i=null,workspace:s,onOpenFile:c,hideReasoning:l=!1}){let d=l?e.blocks.filter(e=>e.type!==`thinking`):e.blocks,f=e.blocks.filter(e=>e.type===`text`).map(e=>e.text).join(`
422
-
423
- `).trim(),p=(0,a.useRef)(c);p.current=c;let m=(0,a.useMemo)(()=>{function e({src:e,alt:t,...a}){if(RT(e))return(0,o.jsx)(jT,{path:LT(e),variant:`reply`});let c=typeof e==`string`&&e!==``&&!n.r(e)?n.o(r,n.c(``,e),i,void 0,s):e;return(0,o.jsx)(`img`,{...a,src:c,alt:t??``,loading:`lazy`,className:`max-h-96 max-w-full rounded-lg object-contain`})}function t({href:e,children:t,...r}){if(typeof e==`string`&&e!==``&&!n.r(e)&&p.current){let i=n.c(``,e);return(0,o.jsx)(`a`,{...r,href:e,onClick:e=>{e.preventDefault(),p.current?.(i)},children:t})}return(0,o.jsx)(`a`,{...r,href:e,target:`_blank`,rel:`noreferrer`,children:t})}function a({node:e,children:t,...n}){let r=(e?.children??[]).filter(e=>e.type!==`text`||(e.value??``).trim()!==``);return r.length>0&&r.every(e=>e.type===`element`&&e.tagName===`img`&&RT(e.properties?.src))?(0,o.jsx)(`div`,{className:`my-2`,children:t}):(0,o.jsx)(`p`,{...n,children:t})}return{pre:Gd,img:e,a:t,p:a}},[r,i,s]);return d.length===0&&!e.errorMessage?null:(0,o.jsxs)(`div`,{className:`group max-w-none`,children:[f&&!e.streaming&&(0,o.jsx)(`div`,{className:`flex justify-end opacity-0 transition-opacity group-hover:opacity-100`,children:(0,o.jsx)(u,{text:f})}),d.map((e,n)=>e.type===`thinking`?(0,o.jsx)(zT,{text:e.text},e.contentIndex??n):(0,o.jsx)(`div`,{className:`prose-chat`,children:(0,o.jsx)(Mm,{remarkPlugins:IT,rehypePlugins:FT,components:m,children:t.g(e.text)})},e.contentIndex??n)),e.errorMessage&&(0,o.jsx)(`div`,{className:`mt-2 rounded-lg border border-red-300 bg-red-50 px-3 py-2 text-sm text-red-700 dark:border-red-900/60 dark:bg-red-950/30 dark:text-red-300`,children:e.errorMessage})]})}var VT=[`off`,`minimal`,`low`,`medium`,`high`,`xhigh`],HT=`worktree`,UT=class extends Error{kind;constructor(e,t){super(e),this.name=`HistoryError`,this.kind=t}};async function WT(e,t){let n=[];for(;;){let r=await e(n.length,50);if(r.items.length===0||(n.unshift(...r.items),t?.(n.length),r.remaining===0))return n}}Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return Sl}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return tf}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return Bd}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return Ud}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return Hd}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return jf}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return Wd}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return Mm}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return BT}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return Pf}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return vT}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return hT}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return sT}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return tb}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return rb}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return HT}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return vd}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return gT}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return _b}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return WT}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return PT}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return Hw}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return VT}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return jT}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return UT}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return _T}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return Dm}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return Yd}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return Ff}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return Lf}});