@joeyshi12/casper 0.10.0 → 0.10.1

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.
Files changed (68) hide show
  1. package/dist/mcp.js +1 -1
  2. package/dist/server.js +2 -2
  3. package/dist/web/assets/{abnfDiagram-N423BO3Z-DuqqTYEM.js → abnfDiagram-N423BO3Z-kolM6iA-.js} +1 -1
  4. package/dist/web/assets/{arc-BbitKrIO.js → arc-B6sXpTsU.js} +1 -1
  5. package/dist/web/assets/{architectureDiagram-T3A2C74G-Dc0p1FLK.js → architectureDiagram-T3A2C74G-OxTKamol.js} +1 -1
  6. package/dist/web/assets/{blockDiagram-VBNYF7ZC-A2tZMhwX.js → blockDiagram-VBNYF7ZC-CrzGu26P.js} +1 -1
  7. package/dist/web/assets/{c4Diagram-5PPSVZJV-BGYnWUNq.js → c4Diagram-5PPSVZJV-DbhlW2MG.js} +1 -1
  8. package/dist/web/assets/channel-BCnJe19k.js +1 -0
  9. package/dist/web/assets/{chunk-2GRJ4B5K-DGcSgggV.js → chunk-2GRJ4B5K-B9kcSVk5.js} +1 -1
  10. package/dist/web/assets/{chunk-2Q5K7J3B-Cqd5ykHS.js → chunk-2Q5K7J3B-D1RHbH0J.js} +1 -1
  11. package/dist/web/assets/{chunk-5RXB4S5H-4s-V0baK.js → chunk-5RXB4S5H-DsS4Kaly.js} +1 -1
  12. package/dist/web/assets/{chunk-5VM5RSS4-DN_MfTRV.js → chunk-5VM5RSS4-DyOH_9_m.js} +1 -1
  13. package/dist/web/assets/{chunk-6Q2QTUOP-6-ncud5-.js → chunk-6Q2QTUOP-r6YYakZy.js} +1 -1
  14. package/dist/web/assets/{chunk-GF5L2VYU-CkCAkajU.js → chunk-GF5L2VYU-C0TZsRe_.js} +1 -1
  15. package/dist/web/assets/{chunk-JWPE2WC7-B2HT0tHT.js → chunk-JWPE2WC7-BSrnLx8X.js} +1 -1
  16. package/dist/web/assets/{chunk-KBJHAD2P-DtYmpITE.js → chunk-KBJHAD2P-B3CrUOTy.js} +1 -1
  17. package/dist/web/assets/{chunk-RYQCIY6F-CqU4ZESr.js → chunk-RYQCIY6F-DXDDOuka.js} +1 -1
  18. package/dist/web/assets/{chunk-XXDRQBXY-5zlfmd8I.js → chunk-XXDRQBXY-J9uQk278.js} +1 -1
  19. package/dist/web/assets/classDiagram-JCYQIIEL-CkP6tQZt.js +1 -0
  20. package/dist/web/assets/classDiagram-v2-OCEON4UE-CkP6tQZt.js +1 -0
  21. package/dist/web/assets/{cose-bilkent-JH36ORCC-BtXxufQe.js → cose-bilkent-JH36ORCC-BuDAduIK.js} +1 -1
  22. package/dist/web/assets/{cynefin-VYW2F7L2-DFLsp7Rj.js → cynefin-VYW2F7L2-CG7bn45a.js} +1 -1
  23. package/dist/web/assets/{cynefinDiagram-MW4NZA55-BiXfZ5zy.js → cynefinDiagram-MW4NZA55-uwFsfwj5.js} +1 -1
  24. package/dist/web/assets/{dagre-VZM6K2ZE-MBbBcp4r.js → dagre-VZM6K2ZE-DZTMXAWW.js} +1 -1
  25. package/dist/web/assets/{diagram-7IWD3JNH-BBJQPRUY.js → diagram-7IWD3JNH-Brh-1lY7.js} +1 -1
  26. package/dist/web/assets/{diagram-B4RE2ZJO-D39huys8.js → diagram-B4RE2ZJO-DRJ9jz48.js} +1 -1
  27. package/dist/web/assets/{diagram-LBJQPF4R-BEI6m3xw.js → diagram-LBJQPF4R-Ci1wP1XA.js} +1 -1
  28. package/dist/web/assets/{diagram-Q27KOJAE-0mMWjfIY.js → diagram-Q27KOJAE-q3HfSRIb.js} +1 -1
  29. package/dist/web/assets/{diagram-UB23O5K3-Cq_AT0df.js → diagram-UB23O5K3-DPMadCyG.js} +1 -1
  30. package/dist/web/assets/{ebnfDiagram-BXEA7PRR-CspS7m6Z.js → ebnfDiagram-BXEA7PRR-CakDDHAQ.js} +1 -1
  31. package/dist/web/assets/{erDiagram-JOGREHBK-B6NxTPkb.js → erDiagram-JOGREHBK-DPAJjaAJ.js} +1 -1
  32. package/dist/web/assets/{flowDiagram-UKHOOZJN-D3Pt3-cN.js → flowDiagram-UKHOOZJN-CK1flOS3.js} +1 -1
  33. package/dist/web/assets/{ganttDiagram-PKOTCBZU-CV4orYkm.js → ganttDiagram-PKOTCBZU-ev8Z0O8-.js} +1 -1
  34. package/dist/web/assets/{gitGraphDiagram-DS77QQ5N-CANHeJZg.js → gitGraphDiagram-DS77QQ5N-iJcyO-dh.js} +1 -1
  35. package/dist/web/assets/{index-CK4YbLbU.js → index--yuGO85o.js} +4 -4
  36. package/dist/web/assets/{index-Cz-T9NEB.css → index-CTbulwN2.css} +1 -1
  37. package/dist/web/assets/{index-Dewf4nkF.js → index-UeZS9SPv.js} +1 -1
  38. package/dist/web/assets/{infoDiagram-6WML65LV-ySSVfb1E.js → infoDiagram-6WML65LV-DxOiXy9i.js} +1 -1
  39. package/dist/web/assets/{ishikawaDiagram-WSZJBQD7-C8PCYjFX.js → ishikawaDiagram-WSZJBQD7-BCnL1bCP.js} +1 -1
  40. package/dist/web/assets/{journeyDiagram-NVQOT4AX-BS_jBDBe.js → journeyDiagram-NVQOT4AX-D4Nx4bnN.js} +1 -1
  41. package/dist/web/assets/{kanban-definition-27J2QSJJ-H6jhmFjt.js → kanban-definition-27J2QSJJ-vipiDpz7.js} +1 -1
  42. package/dist/web/assets/{linear-YU9d9rPY.js → linear-DZFaVkiW.js} +1 -1
  43. package/dist/web/assets/{mermaid.core-DsId9yj5.js → mermaid.core-BZw29KJL.js} +4 -4
  44. package/dist/web/assets/{mindmap-definition-FAOFIHXS-DVFyeioX.js → mindmap-definition-FAOFIHXS-O_jFkrYs.js} +1 -1
  45. package/dist/web/assets/{pegDiagram-VL7TDLO6-BD4va82R.js → pegDiagram-VL7TDLO6-CkN8OpRg.js} +1 -1
  46. package/dist/web/assets/{pieDiagram-7S7Q4E2Y-CZAefhVe.js → pieDiagram-7S7Q4E2Y-CaYwpFJC.js} +1 -1
  47. package/dist/web/assets/{quadrantDiagram-CIZ2JOQS-D3RB1kgH.js → quadrantDiagram-CIZ2JOQS-BF5j8H9k.js} +1 -1
  48. package/dist/web/assets/{railroadDiagram-AXF67PYL-Cvnf0WjF.js → railroadDiagram-AXF67PYL-C8ZNLg_a.js} +1 -1
  49. package/dist/web/assets/{requirementDiagram-LRYGKXZP-C4B6vv6V.js → requirementDiagram-LRYGKXZP-DrtfbR4t.js} +1 -1
  50. package/dist/web/assets/{sankeyDiagram-W5VNT64P-C5xg3C0D.js → sankeyDiagram-W5VNT64P-DzderLXC.js} +1 -1
  51. package/dist/web/assets/{sequenceDiagram-SI44F4Z6-DjWE-t7c.js → sequenceDiagram-SI44F4Z6-CZNSPgAG.js} +1 -1
  52. package/dist/web/assets/{sizeCapture-X5ZJPWSS-Bf7ugfWa.js → sizeCapture-X5ZJPWSS-5MEaTz4H.js} +1 -1
  53. package/dist/web/assets/{stateDiagram-OKZ733FA-DxEitXwP.js → stateDiagram-OKZ733FA-BcE7PIHf.js} +1 -1
  54. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-CFi3MuJ7.js +1 -0
  55. package/dist/web/assets/{swimlanes-SLNWSIFB-DMW3T9iR.js → swimlanes-SLNWSIFB-1B7NQiEC.js} +2 -2
  56. package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-7TcTu5IQ.js +8 -0
  57. package/dist/web/assets/{timeline-definition-Z64GVDOM-whI5A_En.js → timeline-definition-Z64GVDOM-CYYoWuDj.js} +1 -1
  58. package/dist/web/assets/{vennDiagram-T6HMQDX7-DGdGbcJw.js → vennDiagram-T6HMQDX7-Bn_XtMKm.js} +1 -1
  59. package/dist/web/assets/{wardleyDiagram-T6FBY63Y-CTNpUHSX.js → wardleyDiagram-T6FBY63Y-Cb_ku0pE.js} +1 -1
  60. package/dist/web/assets/{xychartDiagram-ELKLHX3M-C2j32C85.js → xychartDiagram-ELKLHX3M-C7OphE1U.js} +1 -1
  61. package/dist/web/index.html +2 -2
  62. package/dist/web/sw.js +1 -1
  63. package/package.json +1 -1
  64. package/dist/web/assets/channel-oev4WWHD.js +0 -1
  65. package/dist/web/assets/classDiagram-JCYQIIEL-D4FIkEsQ.js +0 -1
  66. package/dist/web/assets/classDiagram-v2-OCEON4UE-D4FIkEsQ.js +0 -1
  67. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-BV8yVaCo.js +0 -1
  68. package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-DZu5mMsy.js +0 -8
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Dewf4nkF.js","assets/katex-C5jXJg4s.js","assets/katex-BYZTj3zW.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-UeZS9SPv.js","assets/katex-C5jXJg4s.js","assets/katex-BYZTj3zW.css"])))=>i.map(i=>d[i]);
2
2
  var DT=Object.defineProperty;var PT=(e,t,n)=>t in e?DT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Le=(e,t,n)=>PT(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();function $c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zl={exports:{}},_s={},$l={exports:{}},De={};/**
3
3
  * @license React
4
4
  * react.production.min.js
@@ -88,8 +88,8 @@ Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}
88
88
  `),h&&(b+=E.move(h+`
89
89
  `)),b+=E.move(g),x(),b}function s(o,l,d){let f=o.value||"",h=1;for(t||h++;new RegExp("(^|[^$])"+"\\$".repeat(h)+"([^$]|$)").test(f);)h++;const E="$".repeat(h);/[^ \r\n]/.test(f)&&(/^[ \r\n]/.test(f)&&/[ \r\n]$/.test(f)||/^\$|\$$/.test(f))&&(f=" "+f+" ");let g=-1;for(;++g<d.unsafe.length;){const x=d.unsafe[g];if(!x.atBreak)continue;const b=d.compilePattern(x);let N;for(;N=b.exec(f);){let w=N.index;f.codePointAt(w)===10&&f.codePointAt(w-1)===13&&w--,f=f.slice(0,w)+" "+f.slice(N.index+1)}}return E+f+E}function a(){return"$"}}const B3={tokenize:U3,concrete:!0,name:"mathFlow"},Nm={tokenize:H3,partial:!0};function U3(e,t,n){const s=this,a=s.events[s.events.length-1],o=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0;let l=0;return d;function d(F){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),f(F)}function f(F){return F===36?(e.consume(F),l++,f):l<2?n(F):(e.exit("mathFlowFenceSequence"),Me(e,h,"whitespace")(F))}function h(F){return F===null||ye(F)?g(F):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(F))}function E(F){return F===null||ye(F)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),g(F)):F===36?n(F):(e.consume(F),E)}function g(F){return e.exit("mathFlowFence"),s.interrupt?t(F):e.attempt(Nm,x,O)(F)}function x(F){return e.attempt({tokenize:A,partial:!0},O,b)(F)}function b(F){return(o?Me(e,N,"linePrefix",o+1):N)(F)}function N(F){return F===null?O(F):ye(F)?e.attempt(Nm,x,O)(F):(e.enter("mathFlowValue"),w(F))}function w(F){return F===null||ye(F)?(e.exit("mathFlowValue"),N(F)):(e.consume(F),w)}function O(F){return e.exit("mathFlow"),t(F)}function A(F,z,G){let ne=0;return Me(F,D,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function D(oe){return F.enter("mathFlowFence"),F.enter("mathFlowFenceSequence"),q(oe)}function q(oe){return oe===36?(ne++,F.consume(oe),q):ne<l?G(oe):(F.exit("mathFlowFenceSequence"),Me(F,Z,"whitespace")(oe))}function Z(oe){return oe===null||ye(oe)?(F.exit("mathFlowFence"),z(oe)):G(oe)}}}function H3(e,t,n){const s=this;return a;function a(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return s.parser.lazy[s.now().line]?n(l):t(l)}}function j3(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),{tokenize:s,resolve:z3,previous:$3,name:"mathText"};function s(a,o,l){let d=0,f,h;return E;function E(w){return a.enter("mathText"),a.enter("mathTextSequence"),g(w)}function g(w){return w===36?(a.consume(w),d++,g):d<2&&!n?l(w):(a.exit("mathTextSequence"),x(w))}function x(w){return w===null?l(w):w===36?(h=a.enter("mathTextSequence"),f=0,N(w)):w===32?(a.enter("space"),a.consume(w),a.exit("space"),x):ye(w)?(a.enter("lineEnding"),a.consume(w),a.exit("lineEnding"),x):(a.enter("mathTextData"),b(w))}function b(w){return w===null||w===32||w===36||ye(w)?(a.exit("mathTextData"),x(w)):(a.consume(w),b)}function N(w){return w===36?(a.consume(w),f++,N):f===d?(a.exit("mathTextSequence"),a.exit("mathText"),o(w)):(h.type="mathTextData",b(w))}}}function z3(e){let t=e.length-4,n=3,s,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(s=n;++s<t;)if(e[s][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[n][1].type="mathTextPadding",n+=2,t-=2;break}}for(s=n-1,t++;++s<=t;)a===void 0?s!==t&&e[s][1].type!=="lineEnding"&&(a=s):(s===t||e[s][1].type==="lineEnding")&&(e[a][1].type="mathTextData",s!==a+2&&(e[a][1].end=e[s-1][1].end,e.splice(a+2,s-a-2),t-=s-a-2,s=a+2),a=void 0);return e}function $3(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function W3(e){return{flow:{36:B3},text:{36:j3(e)}}}const Y3={};function V3(e){const t=this,n=e||Y3,s=t.data(),a=s.micromarkExtensions||(s.micromarkExtensions=[]),o=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),l=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);a.push(W3(n)),o.push(M3()),l.push(F3(n))}const q3=[P3,V3],Q3=/\\[a-zA-Z]+|[\^_]/,G3=/^\d[\d,.]*\s*(?:[kKmMbB]|bn|billion|million|thousand)?$/,K3=/^[a-zA-Z]{3,}$/,Am=/[=+\-*/<>≤≥±×÷]/,X3=/[.,;:!?]$/,J3=/\n/,Z3=/\s+/,eN=/\d,\d{3}\b/;function tN(e){const t=e.trim();if(!t||J3.test(e))return!1;if(Q3.test(t))return!0;if(G3.test(t))return!1;const n=t.split(Z3),s=n.filter(o=>K3.test(o.replace(X3,"")));return s.length>=2||eN.test(t)?!1:!!(n.every(o=>o.length<=4)&&(n.length===1||Am.test(t))||Am.test(t)&&s.length===0)}function nN(e,t){if(e.startsWith("```",t)||e.startsWith("~~~",t)){const n=e.slice(t,t+3),s=e.indexOf(`
90
90
  ${n}`,t+3);return s===-1?e.length:s+4}if(e[t]==="`"){let n=0;for(;e[t+n]==="`";)n++;const s=e.indexOf("`".repeat(n),t+n);return s===-1?t+n:s+n}return t}function rN(e){let t="",n=0;for(;n<e.length;){const s=nN(e,n);if(s>n){t+=e.slice(n,s),n=s;continue}if(e[n]==="$"&&e[n+1]==="$"){const a=e.indexOf("$$",n+2),o=a===-1?e.length:a+2;t+=e.slice(n,o),n=o;continue}if(e[n]==="$"&&e[n-1]!=="\\"){const a=e.indexOf("$",n+1);if(a!==-1){const o=e.slice(n+1,a);if(!tN(o)){t+=`\\$${o}`,n=a;continue}t+=e.slice(n,a+1),n=a+1;continue}}t+=e[n],n++}return t}const vm=/[#.]/g;function iN(e,t){const n=e||"",s={};let a=0,o,l;for(;a<n.length;){vm.lastIndex=a;const d=vm.exec(n),f=n.slice(a,d?d.index:n.length);f&&(o?o==="#"?s.id=f:Array.isArray(s.className)?s.className.push(f):s.className=[f]:l=f,a+=f.length),d&&(o=d[0],a++)}return{type:"element",tagName:l||t||"div",properties:s,children:[]}}function q1(e,t,n){const s=n?oN(n):void 0;function a(o,l,...d){let f;if(o==null){f={type:"root",children:[]};const h=l;d.unshift(h)}else{f=iN(o,t);const h=f.tagName.toLowerCase(),E=s?s.get(h):void 0;if(f.tagName=E||h,sN(l))d.unshift(l);else for(const[g,x]of Object.entries(l))aN(e,f.properties,g,x)}for(const h of d)Dc(f.children,h);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return a}function sN(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const s of n){const a=t[s];if(a&&typeof a=="object"){if(!Array.isArray(a))return!0;const o=a;for(const l of o)if(typeof l!="number"&&typeof l!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function aN(e,t,n,s){const a=Wu(e,n);let o;if(s!=null){if(typeof s=="number"){if(Number.isNaN(s))return;o=s}else typeof s=="boolean"?o=s:typeof s=="string"?a.spaceSeparated?o=Up(s):a.commaSeparated?o=Dp(s):a.commaOrSpaceSeparated?o=Up(Dp(s).join(" ")):o=wm(a,a.property,s):Array.isArray(s)?o=[...s]:o=a.property==="style"?uN(s):String(s);if(Array.isArray(o)){const l=[];for(const d of o)l.push(wm(a,a.property,d));o=l}a.property==="className"&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[a.property]=o}}function Dc(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Dc(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Dc(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function wm(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Ys(n)===Ys(t)))return!0}return n}function uN(e){const t=[];for(const[n,s]of Object.entries(e))t.push([n,s].join(": "));return t.join("; ")}function oN(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const lN=["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"],cN=q1(Zs,"div"),dN=q1(Tr,"g",lN);function fN(e){const t=String(e),n=[];return{toOffset:a,toPoint:s};function s(o){if(typeof o=="number"&&o>-1&&o<=t.length){let l=0;for(;;){let d=n[l];if(d===void 0){const f=Im(t,n[l-1]);d=f===-1?t.length+1:f+1,n[l]=d}if(d>o)return{line:l+1,column:o-(l>0?n[l-1]:0)+1,offset:o};l++}}}function a(o){if(o&&typeof o.line=="number"&&typeof o.column=="number"&&!Number.isNaN(o.line)&&!Number.isNaN(o.column)){for(;n.length<o.line;){const d=n[n.length-1],f=Im(t,d),h=f===-1?t.length+1:f+1;if(d===h)break;n.push(h)}const l=(o.line>1?n[o.line-2]:0)+o.column-1;if(l<n[o.line-1])return l}}}function Im(e,t){const n=e.indexOf("\r",t),s=e.indexOf(`
91
- `,t);return s===-1?n:n===-1||n+1===s?s:n<s?n:s}const jr={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/"},Q1={}.hasOwnProperty,hN=Object.prototype;function pN(e,t){const n=t||{};return Td({file:n.file||void 0,location:!1,schema:n.space==="svg"?Tr:Zs,verbose:n.verbose||!1},e)}function Td(e,t){let n;switch(t.nodeName){case"#comment":{const s=t;return n={type:"comment",value:s.data},vu(e,s,n),n}case"#document":case"#document-fragment":{const s=t,a="mode"in s?s.mode==="quirks"||s.mode==="limited-quirks":!1;if(n={type:"root",children:G1(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const o=String(e.file),l=fN(o),d=l.toPoint(0),f=l.toPoint(o.length);n.position={start:d,end:f}}return n}case"#documentType":{const s=t;return n={type:"doctype"},vu(e,s,n),n}case"#text":{const s=t;return n={type:"text",value:s.value},vu(e,s,n),n}default:return n=mN(e,t),n}}function G1(e,t){let n=-1;const s=[];for(;++n<t.length;){const a=Td(e,t[n]);s.push(a)}return s}function mN(e,t){const n=e.schema;e.schema=t.namespaceURI===jr.svg?Tr:Zs;let s=-1;const a={};for(;++s<t.attrs.length;){const d=t.attrs[s],f=(d.prefix?d.prefix+":":"")+d.name;Q1.call(hN,f)||(a[f]=d.value)}const l=(e.schema.space==="svg"?dN:cN)(t.tagName,a,G1(e,t.childNodes));if(vu(e,t,l),l.tagName==="template"){const d=t,f=d.sourceCodeLocation,h=f&&f.startTag&&Ai(f.startTag),E=f&&f.endTag&&Ai(f.endTag),g=Td(e,d.content);h&&E&&e.file&&(g.position={start:h.end,end:E.start}),l.content=g}return e.schema=n,l}function vu(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const s=gN(e,n,t.sourceCodeLocation);s&&(e.location=!0,n.position=s)}}function gN(e,t,n){const s=Ai(n);if(t.type==="element"){const a=t.children[t.children.length-1];if(s&&!n.endTag&&a&&a.position&&a.position.end&&(s.end=Object.assign({},a.position.end)),e.verbose){const o={};let l;if(n.attrs)for(l in n.attrs)Q1.call(n.attrs,l)&&(o[Wu(e.schema,l).property]=Ai(n.attrs[l]));n.startTag;const d=Ai(n.startTag),f=n.endTag?Ai(n.endTag):void 0,h={opening:d};f&&(h.closing=f),h.properties=o,t.data={position:h}}}return s}function Ai(e){const t=Lm({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Lm({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Lm(e){return e.line&&e.column?e:void 0}const EN={},TN={}.hasOwnProperty,K1=N1("type",{handlers:{root:xN,element:CN,text:SN,comment:_N,doctype:kN}});function yN(e,t){const s=(t||EN).space;return K1(e,s==="svg"?Tr:Zs)}function xN(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=yd(e.children,n,t),Pi(e,n),n}function bN(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=yd(e.children,n,t),Pi(e,n),n}function kN(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Pi(e,t),t}function SN(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Pi(e,t),t}function _N(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Pi(e,t),t}function CN(e,t){const n=t;let s=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(s=Tr);const a=[];let o;if(e.properties){for(o in e.properties)if(o!=="children"&&TN.call(e.properties,o)){const f=NN(s,o,e.properties[o]);f&&a.push(f)}}const l=s.space,d={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:jr[l],childNodes:[],parentNode:null};return d.childNodes=yd(e.children,d,s),Pi(e,d),e.tagName==="template"&&e.content&&(d.content=bN(e.content,s)),d}function NN(e,t,n){const s=Wu(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&s.boolean)return;Array.isArray(n)&&(n=s.commaSeparated?U0(n):q0(n));const a={name:s.attribute,value:n===!0?"":String(n)};if(s.space&&s.space!=="html"&&s.space!=="svg"){const o=a.name.indexOf(":");o<0?a.prefix="":(a.name=a.name.slice(o+1),a.prefix=s.attribute.slice(0,o)),a.namespace=jr[s.space]}return a}function yd(e,t,n){let s=-1;const a=[];if(e)for(;++s<e.length;){const o=K1(e[s],n);o.parentNode=t,a.push(o)}return a}function Pi(e,t){const 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})}const AN=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],vN=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]),Je="�";var _;(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"})(_||(_={}));const Ut={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function X1(e){return e>=55296&&e<=57343}function wN(e){return e>=56320&&e<=57343}function IN(e,t){return(e-55296)*1024+9216+t}function J1(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Z1(e){return e>=64976&&e<=65007||vN.has(e)}var V;(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"})(V||(V={}));const LN=65536;class RN{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=LN,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:s,col:a,offset:o}=this,l=a+n,d=o+n;return{code:t,startLine:s,endLine:s,startCol:l,endCol:l,startOffset:d,endOffset:d}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(wN(n))return this.pos++,this._addGap(),IN(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,_.EOF;return this._err(V.surrogateInInputStream),t}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(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let s=0;s<t.length;s++)if((this.html.charCodeAt(this.pos+s)|32)!==t.charCodeAt(s))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,_.EOF;const s=this.html.charCodeAt(n);return s===_.CARRIAGE_RETURN?_.LINE_FEED:s}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,_.EOF;let t=this.html.charCodeAt(this.pos);return t===_.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,_.LINE_FEED):t===_.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,X1(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===_.LINE_FEED||t===_.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){J1(t)?this._err(V.controlCharacterInInputStream):Z1(t)&&this._err(V.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Pe;(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"})(Pe||(Pe={}));function eg(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}const ON=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肻 ଷ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))),DN=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function PN(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=DN.get(e))!==null&&t!==void 0?t:e}var gt;(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"})(gt||(gt={}));const MN=32;var Er;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Er||(Er={}));function Pc(e){return e>=gt.ZERO&&e<=gt.NINE}function FN(e){return e>=gt.UPPER_A&&e<=gt.UPPER_F||e>=gt.LOWER_A&&e<=gt.LOWER_F}function BN(e){return e>=gt.UPPER_A&&e<=gt.UPPER_Z||e>=gt.LOWER_A&&e<=gt.LOWER_Z||Pc(e)}function UN(e){return e===gt.EQUALS||BN(e)}var mt;(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"})(mt||(mt={}));var zn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(zn||(zn={}));class HN{constructor(t,n,s){this.decodeTree=t,this.emitCodePoint=n,this.errors=s,this.state=mt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=zn.Strict}startEntity(t){this.decodeMode=t,this.state=mt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case mt.EntityStart:return t.charCodeAt(n)===gt.NUM?(this.state=mt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=mt.NamedEntity,this.stateNamedEntity(t,n));case mt.NumericStart:return this.stateNumericStart(t,n);case mt.NumericDecimal:return this.stateNumericDecimal(t,n);case mt.NumericHex:return this.stateNumericHex(t,n);case mt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|MN)===gt.LOWER_X?(this.state=mt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=mt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,s,a){if(n!==s){const o=s-n;this.result=this.result*Math.pow(a,o)+Number.parseInt(t.substr(n,o),a),this.consumed+=o}}stateNumericHex(t,n){const s=n;for(;n<t.length;){const a=t.charCodeAt(n);if(Pc(a)||FN(a))n+=1;else return this.addToNumericResult(t,s,n,16),this.emitNumericEntity(a,3)}return this.addToNumericResult(t,s,n,16),-1}stateNumericDecimal(t,n){const s=n;for(;n<t.length;){const a=t.charCodeAt(n);if(Pc(a))n+=1;else return this.addToNumericResult(t,s,n,10),this.emitNumericEntity(a,2)}return this.addToNumericResult(t,s,n,10),-1}emitNumericEntity(t,n){var s;if(this.consumed<=n)return(s=this.errors)===null||s===void 0||s.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===gt.SEMI)this.consumed+=1;else if(this.decodeMode===zn.Strict)return 0;return this.emitCodePoint(PN(this.result),this.consumed),this.errors&&(t!==gt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:s}=this;let a=s[this.treeIndex],o=(a&Er.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const l=t.charCodeAt(n);if(this.treeIndex=jN(s,a,this.treeIndex+Math.max(1,o),l),this.treeIndex<0)return this.result===0||this.decodeMode===zn.Attribute&&(o===0||UN(l))?0:this.emitNotTerminatedNamedEntity();if(a=s[this.treeIndex],o=(a&Er.VALUE_LENGTH)>>14,o!==0){if(l===gt.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==zn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:s}=this,a=(s[n]&Er.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,a,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,s){const{decodeTree:a}=this;return this.emitCodePoint(n===1?a[t]&~Er.VALUE_LENGTH:a[t+1],s),n===3&&this.emitCodePoint(a[t+2],s),s}end(){var t;switch(this.state){case mt.NamedEntity:return this.result!==0&&(this.decodeMode!==zn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case mt.NumericDecimal:return this.emitNumericEntity(0,2);case mt.NumericHex:return this.emitNumericEntity(0,3);case mt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case mt.EntityStart:return 0}}}function jN(e,t,n,s){const a=(t&Er.BRANCH_LENGTH)>>7,o=t&Er.JUMP_TABLE;if(a===0)return o!==0&&s===o?n:-1;if(o){const f=s-o;return f<0||f>=a?-1:e[n+f]-1}let l=n,d=l+a-1;for(;l<=d;){const f=l+d>>>1,h=e[f];if(h<s)l=f+1;else if(h>s)d=f-1;else return e[f+a]}return-1}var X;(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/"})(X||(X={}));var $r;(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"})($r||($r={}));var sn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(sn||(sn={}));var H;(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"})(H||(H={}));var p;(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"})(p||(p={}));const zN=new Map([[H.A,p.A],[H.ADDRESS,p.ADDRESS],[H.ANNOTATION_XML,p.ANNOTATION_XML],[H.APPLET,p.APPLET],[H.AREA,p.AREA],[H.ARTICLE,p.ARTICLE],[H.ASIDE,p.ASIDE],[H.B,p.B],[H.BASE,p.BASE],[H.BASEFONT,p.BASEFONT],[H.BGSOUND,p.BGSOUND],[H.BIG,p.BIG],[H.BLOCKQUOTE,p.BLOCKQUOTE],[H.BODY,p.BODY],[H.BR,p.BR],[H.BUTTON,p.BUTTON],[H.CAPTION,p.CAPTION],[H.CENTER,p.CENTER],[H.CODE,p.CODE],[H.COL,p.COL],[H.COLGROUP,p.COLGROUP],[H.DD,p.DD],[H.DESC,p.DESC],[H.DETAILS,p.DETAILS],[H.DIALOG,p.DIALOG],[H.DIR,p.DIR],[H.DIV,p.DIV],[H.DL,p.DL],[H.DT,p.DT],[H.EM,p.EM],[H.EMBED,p.EMBED],[H.FIELDSET,p.FIELDSET],[H.FIGCAPTION,p.FIGCAPTION],[H.FIGURE,p.FIGURE],[H.FONT,p.FONT],[H.FOOTER,p.FOOTER],[H.FOREIGN_OBJECT,p.FOREIGN_OBJECT],[H.FORM,p.FORM],[H.FRAME,p.FRAME],[H.FRAMESET,p.FRAMESET],[H.H1,p.H1],[H.H2,p.H2],[H.H3,p.H3],[H.H4,p.H4],[H.H5,p.H5],[H.H6,p.H6],[H.HEAD,p.HEAD],[H.HEADER,p.HEADER],[H.HGROUP,p.HGROUP],[H.HR,p.HR],[H.HTML,p.HTML],[H.I,p.I],[H.IMG,p.IMG],[H.IMAGE,p.IMAGE],[H.INPUT,p.INPUT],[H.IFRAME,p.IFRAME],[H.KEYGEN,p.KEYGEN],[H.LABEL,p.LABEL],[H.LI,p.LI],[H.LINK,p.LINK],[H.LISTING,p.LISTING],[H.MAIN,p.MAIN],[H.MALIGNMARK,p.MALIGNMARK],[H.MARQUEE,p.MARQUEE],[H.MATH,p.MATH],[H.MENU,p.MENU],[H.META,p.META],[H.MGLYPH,p.MGLYPH],[H.MI,p.MI],[H.MO,p.MO],[H.MN,p.MN],[H.MS,p.MS],[H.MTEXT,p.MTEXT],[H.NAV,p.NAV],[H.NOBR,p.NOBR],[H.NOFRAMES,p.NOFRAMES],[H.NOEMBED,p.NOEMBED],[H.NOSCRIPT,p.NOSCRIPT],[H.OBJECT,p.OBJECT],[H.OL,p.OL],[H.OPTGROUP,p.OPTGROUP],[H.OPTION,p.OPTION],[H.P,p.P],[H.PARAM,p.PARAM],[H.PLAINTEXT,p.PLAINTEXT],[H.PRE,p.PRE],[H.RB,p.RB],[H.RP,p.RP],[H.RT,p.RT],[H.RTC,p.RTC],[H.RUBY,p.RUBY],[H.S,p.S],[H.SCRIPT,p.SCRIPT],[H.SEARCH,p.SEARCH],[H.SECTION,p.SECTION],[H.SELECT,p.SELECT],[H.SOURCE,p.SOURCE],[H.SMALL,p.SMALL],[H.SPAN,p.SPAN],[H.STRIKE,p.STRIKE],[H.STRONG,p.STRONG],[H.STYLE,p.STYLE],[H.SUB,p.SUB],[H.SUMMARY,p.SUMMARY],[H.SUP,p.SUP],[H.TABLE,p.TABLE],[H.TBODY,p.TBODY],[H.TEMPLATE,p.TEMPLATE],[H.TEXTAREA,p.TEXTAREA],[H.TFOOT,p.TFOOT],[H.TD,p.TD],[H.TH,p.TH],[H.THEAD,p.THEAD],[H.TITLE,p.TITLE],[H.TR,p.TR],[H.TRACK,p.TRACK],[H.TT,p.TT],[H.U,p.U],[H.UL,p.UL],[H.SVG,p.SVG],[H.VAR,p.VAR],[H.WBR,p.WBR],[H.XMP,p.XMP]]);function Mi(e){var t;return(t=zN.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const te=p,$N={[X.HTML]:new Set([te.ADDRESS,te.APPLET,te.AREA,te.ARTICLE,te.ASIDE,te.BASE,te.BASEFONT,te.BGSOUND,te.BLOCKQUOTE,te.BODY,te.BR,te.BUTTON,te.CAPTION,te.CENTER,te.COL,te.COLGROUP,te.DD,te.DETAILS,te.DIR,te.DIV,te.DL,te.DT,te.EMBED,te.FIELDSET,te.FIGCAPTION,te.FIGURE,te.FOOTER,te.FORM,te.FRAME,te.FRAMESET,te.H1,te.H2,te.H3,te.H4,te.H5,te.H6,te.HEAD,te.HEADER,te.HGROUP,te.HR,te.HTML,te.IFRAME,te.IMG,te.INPUT,te.LI,te.LINK,te.LISTING,te.MAIN,te.MARQUEE,te.MENU,te.META,te.NAV,te.NOEMBED,te.NOFRAMES,te.NOSCRIPT,te.OBJECT,te.OL,te.P,te.PARAM,te.PLAINTEXT,te.PRE,te.SCRIPT,te.SECTION,te.SELECT,te.SOURCE,te.STYLE,te.SUMMARY,te.TABLE,te.TBODY,te.TD,te.TEMPLATE,te.TEXTAREA,te.TFOOT,te.TH,te.THEAD,te.TITLE,te.TR,te.TRACK,te.UL,te.WBR,te.XMP]),[X.MATHML]:new Set([te.MI,te.MO,te.MN,te.MS,te.MTEXT,te.ANNOTATION_XML]),[X.SVG]:new Set([te.TITLE,te.FOREIGN_OBJECT,te.DESC]),[X.XLINK]:new Set,[X.XML]:new Set,[X.XMLNS]:new Set},Mc=new Set([te.H1,te.H2,te.H3,te.H4,te.H5,te.H6]);H.STYLE,H.SCRIPT,H.XMP,H.IFRAME,H.NOEMBED,H.NOFRAMES,H.PLAINTEXT;var C;(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"})(C||(C={}));const st={DATA:C.DATA,RCDATA:C.RCDATA,RAWTEXT:C.RAWTEXT,SCRIPT_DATA:C.SCRIPT_DATA,PLAINTEXT:C.PLAINTEXT,CDATA_SECTION:C.CDATA_SECTION};function WN(e){return e>=_.DIGIT_0&&e<=_.DIGIT_9}function Ds(e){return e>=_.LATIN_CAPITAL_A&&e<=_.LATIN_CAPITAL_Z}function YN(e){return e>=_.LATIN_SMALL_A&&e<=_.LATIN_SMALL_Z}function pr(e){return YN(e)||Ds(e)}function Rm(e){return pr(e)||WN(e)}function Su(e){return e+32}function tg(e){return e===_.SPACE||e===_.LINE_FEED||e===_.TABULATION||e===_.FORM_FEED}function Om(e){return tg(e)||e===_.SOLIDUS||e===_.GREATER_THAN_SIGN}function VN(e){return e===_.NULL?V.nullCharacterReference:e>1114111?V.characterReferenceOutsideUnicodeRange:X1(e)?V.surrogateCharacterReference:Z1(e)?V.noncharacterCharacterReference:J1(e)||e===_.CARRIAGE_RETURN?V.controlCharacterReference:null}class qN{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=C.DATA,this.returnState=C.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new RN(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new HN(ON,(s,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(s)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(V.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:s=>{this._err(V.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+s)},validateNumericCharacterReference:s=>{const a=VN(s);a&&this._err(a,1)}}:void 0)}_err(t,n=0){var s,a;(a=(s=this.handler).onParseError)===null||a===void 0||a.call(s,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,s){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||s==null||s()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),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(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Pe.START_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Pe.END_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Pe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Pe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const s=this.currentToken;if(eg(s,this.currentAttr.name)===null){if(s.attrs.push(this.currentAttr),s.location&&this.currentLocation){const a=(t=(n=s.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);a[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(V.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Mi(t.tagName),t.type===Pe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(V.endTagWithAttributes),t.selfClosing&&this._err(V.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Pe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Pe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Pe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Pe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=tg(t)?Pe.WHITESPACE_CHARACTER:t===_.NULL?Pe.NULL_CHARACTER:Pe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Pe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=C.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?zn.Attribute:zn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===C.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===C.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===C.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case C.DATA:{this._stateData(t);break}case C.RCDATA:{this._stateRcdata(t);break}case C.RAWTEXT:{this._stateRawtext(t);break}case C.SCRIPT_DATA:{this._stateScriptData(t);break}case C.PLAINTEXT:{this._statePlaintext(t);break}case C.TAG_OPEN:{this._stateTagOpen(t);break}case C.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case C.TAG_NAME:{this._stateTagName(t);break}case C.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case C.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case C.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case C.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case C.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case C.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case C.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case C.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case C.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case C.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case C.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case C.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case C.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case C.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case C.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case C.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case C.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case C.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case C.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case C.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case C.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case C.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case C.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case C.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case C.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case C.BOGUS_COMMENT:{this._stateBogusComment(t);break}case C.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case C.COMMENT_START:{this._stateCommentStart(t);break}case C.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case C.COMMENT:{this._stateComment(t);break}case C.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case C.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case C.COMMENT_END:{this._stateCommentEnd(t);break}case C.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case C.DOCTYPE:{this._stateDoctype(t);break}case C.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case C.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case C.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case C.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case C.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case C.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case C.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case C.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case C.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case C.CDATA_SECTION:{this._stateCdataSection(t);break}case C.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case C.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case C.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case C.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case _.LESS_THAN_SIGN:{this.state=C.TAG_OPEN;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitCodePoint(t);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case _.AMPERSAND:{this._startCharacterReference();break}case _.LESS_THAN_SIGN:{this.state=C.RCDATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case _.LESS_THAN_SIGN:{this.state=C.RAWTEXT_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(pr(t))this._createStartTagToken(),this.state=C.TAG_NAME,this._stateTagName(t);else switch(t){case _.EXCLAMATION_MARK:{this.state=C.MARKUP_DECLARATION_OPEN;break}case _.SOLIDUS:{this.state=C.END_TAG_OPEN;break}case _.QUESTION_MARK:{this._err(V.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t);break}case _.EOF:{this._err(V.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(V.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=C.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(pr(t))this._createEndTagToken(),this.state=C.TAG_NAME,this._stateTagName(t);else switch(t){case _.GREATER_THAN_SIGN:{this._err(V.missingEndTagName),this.state=C.DATA;break}case _.EOF:{this._err(V.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(V.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_ATTRIBUTE_NAME;break}case _.SOLIDUS:{this.state=C.SELF_CLOSING_START_TAG;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentTagToken();break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.tagName+=Je;break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ds(t)?Su(t):t)}}_stateRcdataLessThanSign(t){t===_.SOLIDUS?this.state=C.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=C.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){pr(t)?(this.state=C.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=C.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=C.BEFORE_ATTRIBUTE_NAME,!1;case _.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=C.SELF_CLOSING_START_TAG,!1;case _.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=C.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===_.SOLIDUS?this.state=C.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){pr(t)?(this.state=C.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case _.SOLIDUS:{this.state=C.SCRIPT_DATA_END_TAG_OPEN;break}case _.EXCLAMATION_MARK:{this.state=C.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=C.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){pr(t)?(this.state=C.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===_.HYPHEN_MINUS?(this.state=C.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===_.HYPHEN_MINUS?(this.state=C.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_ESCAPED,this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case _.HYPHEN_MINUS:{this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.GREATER_THAN_SIGN:{this.state=C.SCRIPT_DATA,this._emitChars(">");break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_ESCAPED,this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===_.SOLIDUS?this.state=C.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:pr(t)?(this._emitChars("<"),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){pr(t)?(this.state=C.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Ut.SCRIPT,!1)&&Om(this.preprocessor.peek(Ut.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ut.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case _.HYPHEN_MINUS:{this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.GREATER_THAN_SIGN:{this.state=C.SCRIPT_DATA,this._emitChars(">");break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===_.SOLIDUS?(this.state=C.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Ut.SCRIPT,!1)&&Om(this.preprocessor.peek(Ut.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ut.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=C.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.SOLIDUS:case _.GREATER_THAN_SIGN:case _.EOF:{this.state=C.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case _.EQUALS_SIGN:{this._err(V.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=C.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=C.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:case _.SOLIDUS:case _.GREATER_THAN_SIGN:case _.EOF:{this._leaveAttrName(),this.state=C.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case _.EQUALS_SIGN:{this._leaveAttrName(),this.state=C.BEFORE_ATTRIBUTE_VALUE;break}case _.QUOTATION_MARK:case _.APOSTROPHE:case _.LESS_THAN_SIGN:{this._err(V.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.name+=Je;break}default:this.currentAttr.name+=String.fromCodePoint(Ds(t)?Su(t):t)}}_stateAfterAttributeName(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.SOLIDUS:{this.state=C.SELF_CLOSING_START_TAG;break}case _.EQUALS_SIGN:{this.state=C.BEFORE_ATTRIBUTE_VALUE;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=C.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{this.state=C.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this.state=C.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(V.missingAttributeValue),this.state=C.DATA,this.emitCurrentTagToken();break}default:this.state=C.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case _.QUOTATION_MARK:{this.state=C.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case _.APOSTROPHE:{this.state=C.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this._leaveAttrValue(),this.state=C.BEFORE_ATTRIBUTE_NAME;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=C.DATA,this.emitCurrentTagToken();break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case _.QUOTATION_MARK:case _.APOSTROPHE:case _.LESS_THAN_SIGN:case _.EQUALS_SIGN:case _.GRAVE_ACCENT:{this._err(V.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this._leaveAttrValue(),this.state=C.BEFORE_ATTRIBUTE_NAME;break}case _.SOLIDUS:{this._leaveAttrValue(),this.state=C.SELF_CLOSING_START_TAG;break}case _.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=C.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this._err(V.missingWhitespaceBetweenAttributes),this.state=C.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case _.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=C.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this._err(V.unexpectedSolidusInTag),this.state=C.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentComment(n);break}case _.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.data+=Je;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ut.DASH_DASH,!0)?(this._createCommentToken(Ut.DASH_DASH.length+1),this.state=C.COMMENT_START):this._consumeSequenceIfMatch(Ut.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ut.DOCTYPE.length+1),this.state=C.DOCTYPE):this._consumeSequenceIfMatch(Ut.CDATA_START,!0)?this.inForeignNode?this.state=C.CDATA_SECTION:(this._err(V.cdataInHtmlContent),this._createCommentToken(Ut.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=C.BOGUS_COMMENT):this._ensureHibernation()||(this._err(V.incorrectlyOpenedComment),this._createCommentToken(2),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_START_DASH;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptClosingOfEmptyComment),this.state=C.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=C.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_END;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptClosingOfEmptyComment),this.state=C.DATA,this.emitCurrentComment(n);break}case _.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=C.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_END_DASH;break}case _.LESS_THAN_SIGN:{n.data+="<",this.state=C.COMMENT_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.data+=Je;break}case _.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case _.EXCLAMATION_MARK:{n.data+="!",this.state=C.COMMENT_LESS_THAN_SIGN_BANG;break}case _.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=C.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===_.HYPHEN_MINUS?this.state=C.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=C.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===_.HYPHEN_MINUS?this.state=C.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=C.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==_.GREATER_THAN_SIGN&&t!==_.EOF&&this._err(V.nestedComment),this.state=C.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_END;break}case _.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=C.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentComment(n);break}case _.EXCLAMATION_MARK:{this.state=C.COMMENT_END_BANG;break}case _.HYPHEN_MINUS:{n.data+="-";break}case _.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=C.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{n.data+="--!",this.state=C.COMMENT_END_DASH;break}case _.GREATER_THAN_SIGN:{this._err(V.incorrectlyClosedComment),this.state=C.DATA,this.emitCurrentComment(n);break}case _.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=C.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this.state=C.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case _.EOF:{this._err(V.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingWhitespaceBeforeDoctypeName),this.state=C.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ds(t))this._createDoctypeToken(String.fromCharCode(Su(t))),this.state=C.DOCTYPE_NAME;else switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.NULL:{this._err(V.unexpectedNullCharacter),this._createDoctypeToken(Je),this.state=C.DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this._err(V.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=C.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.AFTER_DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.name+=Je;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ds(t)?Su(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ut.PUBLIC,!1)?this.state=C.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ut.SYSTEM,!1)?this.state=C.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(V.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.QUOTATION_MARK:{this._err(V.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(V.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(V.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(V.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case _.QUOTATION_MARK:{this.state=C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.publicId+=Je;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case _.APOSTROPHE:{this.state=C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.publicId+=Je;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.QUOTATION_MARK:{this._err(V.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(V.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.QUOTATION_MARK:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.QUOTATION_MARK:{this._err(V.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(V.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(V.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(V.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case _.QUOTATION_MARK:{this.state=C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.systemId+=Je;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case _.APOSTROPHE:{this.state=C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.systemId+=Je;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.NULL:{this._err(V.unexpectedNullCharacter);break}case _.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case _.RIGHT_SQUARE_BRACKET:{this.state=C.CDATA_SECTION_BRACKET;break}case _.EOF:{this._err(V.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===_.RIGHT_SQUARE_BRACKET?this.state=C.CDATA_SECTION_END:(this._emitChars("]"),this.state=C.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case _.GREATER_THAN_SIGN:{this.state=C.DATA;break}case _.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=C.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(_.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Rm(this.preprocessor.peek(1))?C.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Rm(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===_.SEMICOLON&&this._err(V.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const ng=new Set([p.DD,p.DT,p.LI,p.OPTGROUP,p.OPTION,p.P,p.RB,p.RP,p.RT,p.RTC]),Dm=new Set([...ng,p.CAPTION,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]),Pu=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),QN=new Set([...Pu,p.OL,p.UL]),GN=new Set([...Pu,p.BUTTON]),Pm=new Set([p.ANNOTATION_XML,p.MI,p.MN,p.MO,p.MS,p.MTEXT]),Mm=new Set([p.DESC,p.FOREIGN_OBJECT,p.TITLE]),KN=new Set([p.TR,p.TEMPLATE,p.HTML]),XN=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),JN=new Set([p.TABLE,p.TEMPLATE,p.HTML]),ZN=new Set([p.TD,p.TH]);class eA{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,s){this.treeAdapter=n,this.handler=s,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=p.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===p.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===X.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const s=this._indexOf(t);this.items[s]=n,s===this.stackTop&&(this.current=n)}insertAfter(t,n,s){const a=this._indexOf(t)+1;this.items.splice(a,0,n),this.tagIDs.splice(a,0,s),this.stackTop++,a===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,a===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==X.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const s=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(s,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Mc,X.HTML)}popUntilTableCellPopped(){this.popUntilPopped(ZN,X.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let s=this.stackTop;s>=0;s--)if(t.has(this.tagIDs[s])&&this.treeAdapter.getNamespaceURI(this.items[s])===n)return s;return-1}clearBackTo(t,n){const s=this._indexOfTagNames(t,n);this.shortenToLength(s+1)}clearBackToTableContext(){this.clearBackTo(JN,X.HTML)}clearBackToTableBodyContext(){this.clearBackTo(XN,X.HTML)}clearBackToTableRowContext(){this.clearBackTo(KN,X.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===p.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===p.HTML}hasInDynamicScope(t,n){for(let s=this.stackTop;s>=0;s--){const a=this.tagIDs[s];switch(this.treeAdapter.getNamespaceURI(this.items[s])){case X.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case X.SVG:{if(Mm.has(a))return!1;break}case X.MATHML:{if(Pm.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Pu)}hasInListItemScope(t){return this.hasInDynamicScope(t,QN)}hasInButtonScope(t){return this.hasInDynamicScope(t,GN)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case X.HTML:{if(Mc.has(n))return!0;if(Pu.has(n))return!1;break}case X.SVG:{if(Mm.has(n))return!1;break}case X.MATHML:{if(Pm.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===X.HTML)switch(this.tagIDs[n]){case t:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===X.HTML)switch(this.tagIDs[t]){case p.TBODY:case p.THEAD:case p.TFOOT:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===X.HTML)switch(this.tagIDs[n]){case t:return!0;case p.OPTION:case p.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&ng.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Dm.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Dm.has(this.currentTagId);)this.pop()}}const gc=3;var vn;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(vn||(vn={}));const Fm={type:vn.Marker};class tA{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const s=[],a=n.length,o=this.treeAdapter.getTagName(t),l=this.treeAdapter.getNamespaceURI(t);for(let d=0;d<this.entries.length;d++){const f=this.entries[d];if(f.type===vn.Marker)break;const{element:h}=f;if(this.treeAdapter.getTagName(h)===o&&this.treeAdapter.getNamespaceURI(h)===l){const E=this.treeAdapter.getAttrList(h);E.length===a&&s.push({idx:d,attrs:E})}}return s}_ensureNoahArkCondition(t){if(this.entries.length<gc)return;const n=this.treeAdapter.getAttrList(t),s=this._getNoahArkConditionCandidates(t,n);if(s.length<gc)return;const a=new Map(n.map(l=>[l.name,l.value]));let o=0;for(let l=0;l<s.length;l++){const d=s[l];d.attrs.every(f=>a.get(f.name)===f.value)&&(o+=1,o>=gc&&this.entries.splice(d.idx,1))}}insertMarker(){this.entries.unshift(Fm)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:vn.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const s=this.entries.indexOf(this.bookmark);this.entries.splice(s,0,{type:vn.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Fm);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(s=>s.type===vn.Marker||this.treeAdapter.getTagName(s.element)===t);return n&&n.type===vn.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===vn.Element&&n.element===t)}}const mr={createDocument(){return{nodeName:"#document",mode:sn.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){const s=e.childNodes.indexOf(n);e.childNodes.splice(s,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,s){const a=e.childNodes.find(o=>o.nodeName==="#documentType");if(a)a.name=t,a.publicId=n,a.systemId=s;else{const o={nodeName:"#documentType",name:t,publicId:n,systemId:s,parentNode:null};mr.appendChild(e,o)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(mr.isTextNode(n)){n.value+=t;return}}mr.appendChild(e,mr.createTextNode(t))},insertTextBefore(e,t,n){const s=e.childNodes[e.childNodes.indexOf(n)-1];s&&mr.isTextNode(s)?s.value+=t:mr.insertBefore(e,mr.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(s=>s.name));for(let s=0;s<t.length;s++)n.has(t[s].name)||e.attrs.push(t[s])},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}}},rg="html",nA="about:legacy-compat",rA="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",ig=["+//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//"],iA=[...ig,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],sA=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),sg=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],aA=[...sg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Bm(e,t){return t.some(n=>e.startsWith(n))}function uA(e){return e.name===rg&&e.publicId===null&&(e.systemId===null||e.systemId===nA)}function oA(e){if(e.name!==rg)return sn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===rA)return sn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),sA.has(n))return sn.QUIRKS;let s=t===null?iA:ig;if(Bm(n,s))return sn.QUIRKS;if(s=t===null?sg:aA,Bm(n,s))return sn.LIMITED_QUIRKS}return sn.NO_QUIRKS}const Um={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},lA="definitionurl",cA="definitionURL",dA=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),fA=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:X.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:X.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:X.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:X.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:X.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:X.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:X.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:X.XML}],["xml:space",{prefix:"xml",name:"space",namespace:X.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:X.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:X.XMLNS}]]),hA=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),pA=new Set([p.B,p.BIG,p.BLOCKQUOTE,p.BODY,p.BR,p.CENTER,p.CODE,p.DD,p.DIV,p.DL,p.DT,p.EM,p.EMBED,p.H1,p.H2,p.H3,p.H4,p.H5,p.H6,p.HEAD,p.HR,p.I,p.IMG,p.LI,p.LISTING,p.MENU,p.META,p.NOBR,p.OL,p.P,p.PRE,p.RUBY,p.S,p.SMALL,p.SPAN,p.STRONG,p.STRIKE,p.SUB,p.SUP,p.TABLE,p.TT,p.U,p.UL,p.VAR]);function mA(e){const t=e.tagID;return t===p.FONT&&e.attrs.some(({name:s})=>s===$r.COLOR||s===$r.SIZE||s===$r.FACE)||pA.has(t)}function ag(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===lA){e.attrs[t].name=cA;break}}function ug(e){for(let t=0;t<e.attrs.length;t++){const n=dA.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function xd(e){for(let t=0;t<e.attrs.length;t++){const n=fA.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 gA(e){const t=hA.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Mi(e.tagName))}function EA(e,t){return t===X.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function TA(e,t,n){if(t===X.MATHML&&e===p.ANNOTATION_XML){for(let s=0;s<n.length;s++)if(n[s].name===$r.ENCODING){const a=n[s].value.toLowerCase();return a===Um.TEXT_HTML||a===Um.APPLICATION_XML}}return t===X.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function yA(e,t,n,s){return(!s||s===X.HTML)&&TA(e,t,n)||(!s||s===X.MATHML)&&EA(e,t)}const xA="hidden",bA=8,kA=3;var R;(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"})(R||(R={}));const SA={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},og=new Set([p.TABLE,p.TBODY,p.TFOOT,p.THEAD,p.TR]),Hm={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:mr,onParseError:null};class jm{constructor(t,n,s=null,a=null){this.fragmentContext=s,this.scriptHandler=a,this.currentToken=null,this.stopped=!1,this.insertionMode=R.INITIAL,this.originalInsertionMode=R.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={...Hm,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new qN(this.options,this),this.activeFormattingElements=new tA(this.treeAdapter),this.fragmentContextID=s?Mi(this.treeAdapter.getTagName(s)):p.UNKNOWN,this._setContextModes(s??this.document,this.fragmentContextID),this.openElements=new eA(this.document,this.treeAdapter,this)}static parse(t,n){const s=new this(n);return s.tokenizer.write(t,!0),s.document}static getFragmentParser(t,n){const s={...Hm,...n};t??(t=s.treeAdapter.createElement(H.TEMPLATE,X.HTML,[]));const a=s.treeAdapter.createElement("documentmock",X.HTML,[]),o=new this(s,a,t);return o.fragmentContextID===p.TEMPLATE&&o.tmplInsertionModeStack.unshift(R.IN_TEMPLATE),o._initTokenizerForFragmentParsing(),o._insertFakeRootElement(),o._resetInsertionMode(),o._findFormInFragmentContext(),o}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,s){var a;if(!this.onParseError)return;const o=(a=t.location)!==null&&a!==void 0?a:SA,l={code:n,startLine:o.startLine,startCol:o.startCol,startOffset:o.startOffset,endLine:s?o.startLine:o.endLine,endCol:s?o.startCol:o.endCol,endOffset:s?o.startOffset:o.endOffset};this.onParseError(l)}onItemPush(t,n,s){var a,o;(o=(a=this.treeAdapter).onItemPush)===null||o===void 0||o.call(a,t),s&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var s,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(s=this.treeAdapter).onItemPop)===null||a===void 0||a.call(s,t,this.openElements.current),n){let o,l;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,l=this.fragmentContextID):{current:o,currentTagId:l}=this.openElements,this._setContextModes(o,l)}}_setContextModes(t,n){const s=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===X.HTML;this.currentNotInHTML=!s,this.tokenizer.inForeignNode=!s&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,X.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=R.TEXT}switchToPlaintextParsing(){this.insertionMode=R.TEXT,this.originalInsertionMode=R.IN_BODY,this.tokenizer.state=st.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===H.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==X.HTML))switch(this.fragmentContextID){case p.TITLE:case p.TEXTAREA:{this.tokenizer.state=st.RCDATA;break}case p.STYLE:case p.XMP:case p.IFRAME:case p.NOEMBED:case p.NOFRAMES:case p.NOSCRIPT:{this.tokenizer.state=st.RAWTEXT;break}case p.SCRIPT:{this.tokenizer.state=st.SCRIPT_DATA;break}case p.PLAINTEXT:{this.tokenizer.state=st.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",s=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,s,a),t.location){const l=this.treeAdapter.getChildNodes(this.document).find(d=>this.treeAdapter.isDocumentTypeNode(d));l&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const s=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,s)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const s=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(s??this.document,t)}}_appendElement(t,n){const s=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(s,t.location)}_insertElement(t,n){const s=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(s,t.location),this.openElements.push(s,t.tagID)}_insertFakeElement(t,n){const s=this.treeAdapter.createElement(t,X.HTML,[]);this._attachElementToTree(s,null),this.openElements.push(s,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,X.HTML,t.attrs),s=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,s),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(H.HTML,X.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,p.HTML)}_appendCommentNode(t,n){const s=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,s),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_insertCharacters(t){let n,s;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:s}=this._findFosterParentingLocation(),s?this.treeAdapter.insertTextBefore(n,t.chars,s):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const a=this.treeAdapter.getChildNodes(n),o=s?a.lastIndexOf(s):a.length,l=a[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(l)){const{endLine:f,endCol:h,endOffset:E}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(l,{endLine:f,endCol:h,endOffset:E})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}_adoptNodes(t,n){for(let s=this.treeAdapter.getFirstChild(t);s;s=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(s),this.treeAdapter.appendChild(n,s)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const s=n.location,a=this.treeAdapter.getTagName(t),o=n.type===Pe.END_TAG&&a===n.tagName?{endTag:{...s},endLine:s.endLine,endCol:s.endCol,endOffset:s.endOffset}:{endLine:s.startLine,endCol:s.startCol,endOffset:s.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,o)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,s;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,s=this.fragmentContextID):{current:n,currentTagId:s}=this.openElements,t.tagID===p.SVG&&this.treeAdapter.getTagName(n)===H.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===X.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===p.MGLYPH||t.tagID===p.MALIGNMARK)&&s!==void 0&&!this._isIntegrationPoint(s,n,X.HTML)}_processToken(t){switch(t.type){case Pe.CHARACTER:{this.onCharacter(t);break}case Pe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Pe.COMMENT:{this.onComment(t);break}case Pe.DOCTYPE:{this.onDoctype(t);break}case Pe.START_TAG:{this._processStartTag(t);break}case Pe.END_TAG:{this.onEndTag(t);break}case Pe.EOF:{this.onEof(t);break}case Pe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,s){const a=this.treeAdapter.getNamespaceURI(n),o=this.treeAdapter.getAttrList(n);return yA(t,a,o,s)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===vn.Marker||this.openElements.contains(a.element)),s=n===-1?t-1:n-1;for(let a=s;a>=0;a--){const o=this.activeFormattingElements.entries[a];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=R.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(p.P),this.openElements.popUntilTagNamePopped(p.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case p.TR:{this.insertionMode=R.IN_ROW;return}case p.TBODY:case p.THEAD:case p.TFOOT:{this.insertionMode=R.IN_TABLE_BODY;return}case p.CAPTION:{this.insertionMode=R.IN_CAPTION;return}case p.COLGROUP:{this.insertionMode=R.IN_COLUMN_GROUP;return}case p.TABLE:{this.insertionMode=R.IN_TABLE;return}case p.BODY:{this.insertionMode=R.IN_BODY;return}case p.FRAMESET:{this.insertionMode=R.IN_FRAMESET;return}case p.SELECT:{this._resetInsertionModeForSelect(t);return}case p.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case p.HTML:{this.insertionMode=this.headElement?R.AFTER_HEAD:R.BEFORE_HEAD;return}case p.TD:case p.TH:{if(t>0){this.insertionMode=R.IN_CELL;return}break}case p.HEAD:{if(t>0){this.insertionMode=R.IN_HEAD;return}break}}this.insertionMode=R.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const s=this.openElements.tagIDs[n];if(s===p.TEMPLATE)break;if(s===p.TABLE){this.insertionMode=R.IN_SELECT_IN_TABLE;return}}this.insertionMode=R.IN_SELECT}_isElementCausesFosterParenting(t){return og.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case p.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===X.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case p.TABLE:{const s=this.treeAdapter.getParentNode(n);return s?{parent:s,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const s=this.treeAdapter.getNamespaceURI(t);return $N[s].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Zv(this,t);return}switch(this.insertionMode){case R.INITIAL:{Is(this,t);break}case R.BEFORE_HTML:{Bs(this,t);break}case R.BEFORE_HEAD:{Us(this,t);break}case R.IN_HEAD:{Hs(this,t);break}case R.IN_HEAD_NO_SCRIPT:{js(this,t);break}case R.AFTER_HEAD:{zs(this,t);break}case R.IN_BODY:case R.IN_CAPTION:case R.IN_CELL:case R.IN_TEMPLATE:{cg(this,t);break}case R.TEXT:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case R.IN_TABLE:case R.IN_TABLE_BODY:case R.IN_ROW:{Ec(this,t);break}case R.IN_TABLE_TEXT:{gg(this,t);break}case R.IN_COLUMN_GROUP:{Mu(this,t);break}case R.AFTER_BODY:{Fu(this,t);break}case R.AFTER_AFTER_BODY:{wu(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Jv(this,t);return}switch(this.insertionMode){case R.INITIAL:{Is(this,t);break}case R.BEFORE_HTML:{Bs(this,t);break}case R.BEFORE_HEAD:{Us(this,t);break}case R.IN_HEAD:{Hs(this,t);break}case R.IN_HEAD_NO_SCRIPT:{js(this,t);break}case R.AFTER_HEAD:{zs(this,t);break}case R.TEXT:{this._insertCharacters(t);break}case R.IN_TABLE:case R.IN_TABLE_BODY:case R.IN_ROW:{Ec(this,t);break}case R.IN_COLUMN_GROUP:{Mu(this,t);break}case R.AFTER_BODY:{Fu(this,t);break}case R.AFTER_AFTER_BODY:{wu(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Fc(this,t);return}switch(this.insertionMode){case R.INITIAL:case R.BEFORE_HTML:case R.BEFORE_HEAD:case R.IN_HEAD:case R.IN_HEAD_NO_SCRIPT:case R.AFTER_HEAD:case R.IN_BODY:case R.IN_TABLE:case R.IN_CAPTION:case R.IN_COLUMN_GROUP:case R.IN_TABLE_BODY:case R.IN_ROW:case R.IN_CELL:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:case R.IN_TEMPLATE:case R.IN_FRAMESET:case R.AFTER_FRAMESET:{Fc(this,t);break}case R.IN_TABLE_TEXT:{Ls(this,t);break}case R.AFTER_BODY:{IA(this,t);break}case R.AFTER_AFTER_BODY:case R.AFTER_AFTER_FRAMESET:{LA(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case R.INITIAL:{RA(this,t);break}case R.BEFORE_HEAD:case R.IN_HEAD:case R.IN_HEAD_NO_SCRIPT:case R.AFTER_HEAD:{this._err(t,V.misplacedDoctype);break}case R.IN_TABLE_TEXT:{Ls(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,V.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?ew(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case R.INITIAL:{Is(this,t);break}case R.BEFORE_HTML:{OA(this,t);break}case R.BEFORE_HEAD:{PA(this,t);break}case R.IN_HEAD:{xn(this,t);break}case R.IN_HEAD_NO_SCRIPT:{BA(this,t);break}case R.AFTER_HEAD:{HA(this,t);break}case R.IN_BODY:{wt(this,t);break}case R.IN_TABLE:{Ii(this,t);break}case R.IN_TABLE_TEXT:{Ls(this,t);break}case R.IN_CAPTION:{Mv(this,t);break}case R.IN_COLUMN_GROUP:{Sd(this,t);break}case R.IN_TABLE_BODY:{eo(this,t);break}case R.IN_ROW:{to(this,t);break}case R.IN_CELL:{Uv(this,t);break}case R.IN_SELECT:{yg(this,t);break}case R.IN_SELECT_IN_TABLE:{jv(this,t);break}case R.IN_TEMPLATE:{$v(this,t);break}case R.AFTER_BODY:{Yv(this,t);break}case R.IN_FRAMESET:{Vv(this,t);break}case R.AFTER_FRAMESET:{Qv(this,t);break}case R.AFTER_AFTER_BODY:{Kv(this,t);break}case R.AFTER_AFTER_FRAMESET:{Xv(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?tw(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case R.INITIAL:{Is(this,t);break}case R.BEFORE_HTML:{DA(this,t);break}case R.BEFORE_HEAD:{MA(this,t);break}case R.IN_HEAD:{FA(this,t);break}case R.IN_HEAD_NO_SCRIPT:{UA(this,t);break}case R.AFTER_HEAD:{jA(this,t);break}case R.IN_BODY:{Zu(this,t);break}case R.TEXT:{Nv(this,t);break}case R.IN_TABLE:{Qs(this,t);break}case R.IN_TABLE_TEXT:{Ls(this,t);break}case R.IN_CAPTION:{Fv(this,t);break}case R.IN_COLUMN_GROUP:{Bv(this,t);break}case R.IN_TABLE_BODY:{Bc(this,t);break}case R.IN_ROW:{Tg(this,t);break}case R.IN_CELL:{Hv(this,t);break}case R.IN_SELECT:{xg(this,t);break}case R.IN_SELECT_IN_TABLE:{zv(this,t);break}case R.IN_TEMPLATE:{Wv(this,t);break}case R.AFTER_BODY:{kg(this,t);break}case R.IN_FRAMESET:{qv(this,t);break}case R.AFTER_FRAMESET:{Gv(this,t);break}case R.AFTER_AFTER_BODY:{wu(this,t);break}}}onEof(t){switch(this.insertionMode){case R.INITIAL:{Is(this,t);break}case R.BEFORE_HTML:{Bs(this,t);break}case R.BEFORE_HEAD:{Us(this,t);break}case R.IN_HEAD:{Hs(this,t);break}case R.IN_HEAD_NO_SCRIPT:{js(this,t);break}case R.AFTER_HEAD:{zs(this,t);break}case R.IN_BODY:case R.IN_TABLE:case R.IN_CAPTION:case R.IN_COLUMN_GROUP:case R.IN_TABLE_BODY:case R.IN_ROW:case R.IN_CELL:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:{pg(this,t);break}case R.TEXT:{Av(this,t);break}case R.IN_TABLE_TEXT:{Ls(this,t);break}case R.IN_TEMPLATE:{bg(this,t);break}case R.AFTER_BODY:case R.IN_FRAMESET:case R.AFTER_FRAMESET:case R.AFTER_AFTER_BODY:case R.AFTER_AFTER_FRAMESET:{kd(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===_.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case R.IN_HEAD:case R.IN_HEAD_NO_SCRIPT:case R.AFTER_HEAD:case R.TEXT:case R.IN_COLUMN_GROUP:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:case R.IN_FRAMESET:case R.AFTER_FRAMESET:{this._insertCharacters(t);break}case R.IN_BODY:case R.IN_CAPTION:case R.IN_CELL:case R.IN_TEMPLATE:case R.AFTER_BODY:case R.AFTER_AFTER_BODY:case R.AFTER_AFTER_FRAMESET:{lg(this,t);break}case R.IN_TABLE:case R.IN_TABLE_BODY:case R.IN_ROW:{Ec(this,t);break}case R.IN_TABLE_TEXT:{mg(this,t);break}}}}function _A(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):hg(e,t),n}function CA(e,t){let n=null,s=e.openElements.stackTop;for(;s>=0;s--){const a=e.openElements.items[s];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[s])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(s,0)),e.activeFormattingElements.removeEntry(t)),n}function NA(e,t,n){let s=t,a=e.openElements.getCommonAncestor(t);for(let o=0,l=a;l!==n;o++,l=a){a=e.openElements.getCommonAncestor(l);const d=e.activeFormattingElements.getElementEntry(l),f=d&&o>=kA;!d||f?(f&&e.activeFormattingElements.removeEntry(d),e.openElements.remove(l)):(l=AA(e,d),s===t&&(e.activeFormattingElements.bookmark=d),e.treeAdapter.detachNode(s),e.treeAdapter.appendChild(l,s),s=l)}return s}function AA(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),s=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,s),t.element=s,s}function vA(e,t,n){const s=e.treeAdapter.getTagName(t),a=Mi(s);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const o=e.treeAdapter.getNamespaceURI(t);a===p.TEMPLATE&&o===X.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function wA(e,t,n){const s=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,o=e.treeAdapter.createElement(a.tagName,s,a.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,a.tagID)}function bd(e,t){for(let n=0;n<bA;n++){const s=_A(e,t);if(!s)break;const a=CA(e,s);if(!a)break;e.activeFormattingElements.bookmark=s;const o=NA(e,a,s.element),l=e.openElements.getCommonAncestor(s.element);e.treeAdapter.detachNode(o),l&&vA(e,l,o),wA(e,a,s)}}function Fc(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function IA(e,t){e._appendCommentNode(t,e.openElements.items[0])}function LA(e,t){e._appendCommentNode(t,e.document)}function kd(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let s=e.openElements.stackTop;s>=n;s--)e._setEndLocation(e.openElements.items[s],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const s=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(s);if(a&&!a.endTag&&(e._setEndLocation(s,t),e.openElements.stackTop>=1)){const o=e.openElements.items[1],l=e.treeAdapter.getNodeSourceCodeLocation(o);l&&!l.endTag&&e._setEndLocation(o,t)}}}}function RA(e,t){e._setDocumentType(t);const n=t.forceQuirks?sn.QUIRKS:oA(t);uA(t)||e._err(t,V.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=R.BEFORE_HTML}function Is(e,t){e._err(t,V.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,sn.QUIRKS),e.insertionMode=R.BEFORE_HTML,e._processToken(t)}function OA(e,t){t.tagID===p.HTML?(e._insertElement(t,X.HTML),e.insertionMode=R.BEFORE_HEAD):Bs(e,t)}function DA(e,t){const n=t.tagID;(n===p.HTML||n===p.HEAD||n===p.BODY||n===p.BR)&&Bs(e,t)}function Bs(e,t){e._insertFakeRootElement(),e.insertionMode=R.BEFORE_HEAD,e._processToken(t)}function PA(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.HEAD:{e._insertElement(t,X.HTML),e.headElement=e.openElements.current,e.insertionMode=R.IN_HEAD;break}default:Us(e,t)}}function MA(e,t){const n=t.tagID;n===p.HEAD||n===p.BODY||n===p.HTML||n===p.BR?Us(e,t):e._err(t,V.endTagWithoutMatchingOpenElement)}function Us(e,t){e._insertFakeElement(H.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=R.IN_HEAD,e._processToken(t)}function xn(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:{e._appendElement(t,X.HTML),t.ackSelfClosing=!0;break}case p.TITLE:{e._switchToTextParsing(t,st.RCDATA);break}case p.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,st.RAWTEXT):(e._insertElement(t,X.HTML),e.insertionMode=R.IN_HEAD_NO_SCRIPT);break}case p.NOFRAMES:case p.STYLE:{e._switchToTextParsing(t,st.RAWTEXT);break}case p.SCRIPT:{e._switchToTextParsing(t,st.SCRIPT_DATA);break}case p.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=R.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(R.IN_TEMPLATE);break}case p.HEAD:{e._err(t,V.misplacedStartTagForHeadElement);break}default:Hs(e,t)}}function FA(e,t){switch(t.tagID){case p.HEAD:{e.openElements.pop(),e.insertionMode=R.AFTER_HEAD;break}case p.BODY:case p.BR:case p.HTML:{Hs(e,t);break}case p.TEMPLATE:{Gr(e,t);break}default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function Gr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==p.TEMPLATE&&e._err(t,V.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,V.endTagWithoutMatchingOpenElement)}function Hs(e,t){e.openElements.pop(),e.insertionMode=R.AFTER_HEAD,e._processToken(t)}function BA(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.BASEFONT:case p.BGSOUND:case p.HEAD:case p.LINK:case p.META:case p.NOFRAMES:case p.STYLE:{xn(e,t);break}case p.NOSCRIPT:{e._err(t,V.nestedNoscriptInHead);break}default:js(e,t)}}function UA(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=R.IN_HEAD;break}case p.BR:{js(e,t);break}default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function js(e,t){const n=t.type===Pe.EOF?V.openElementsLeftAfterEof:V.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=R.IN_HEAD,e._processToken(t)}function HA(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.BODY:{e._insertElement(t,X.HTML),e.framesetOk=!1,e.insertionMode=R.IN_BODY;break}case p.FRAMESET:{e._insertElement(t,X.HTML),e.insertionMode=R.IN_FRAMESET;break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{e._err(t,V.abandonedHeadElementChild),e.openElements.push(e.headElement,p.HEAD),xn(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,V.misplacedStartTagForHeadElement);break}default:zs(e,t)}}function jA(e,t){switch(t.tagID){case p.BODY:case p.HTML:case p.BR:{zs(e,t);break}case p.TEMPLATE:{Gr(e,t);break}default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function zs(e,t){e._insertFakeElement(H.BODY,p.BODY),e.insertionMode=R.IN_BODY,Ju(e,t)}function Ju(e,t){switch(t.type){case Pe.CHARACTER:{cg(e,t);break}case Pe.WHITESPACE_CHARACTER:{lg(e,t);break}case Pe.COMMENT:{Fc(e,t);break}case Pe.START_TAG:{wt(e,t);break}case Pe.END_TAG:{Zu(e,t);break}case Pe.EOF:{pg(e,t);break}}}function lg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function cg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function zA(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function $A(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function WA(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,X.HTML),e.insertionMode=R.IN_FRAMESET)}function YA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,X.HTML)}function VA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Mc.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,X.HTML)}function qA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,X.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function QA(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,X.HTML),n||(e.formElement=e.openElements.current))}function GA(e,t){e.framesetOk=!1;const n=t.tagID;for(let s=e.openElements.stackTop;s>=0;s--){const a=e.openElements.tagIDs[s];if(n===p.LI&&a===p.LI||(n===p.DD||n===p.DT)&&(a===p.DD||a===p.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==p.ADDRESS&&a!==p.DIV&&a!==p.P&&e._isSpecialElement(e.openElements.items[s],a))break}e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,X.HTML)}function KA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,X.HTML),e.tokenizer.state=st.PLAINTEXT}function XA(e,t){e.openElements.hasInScope(p.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML),e.framesetOk=!1}function JA(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(H.A);n&&(bd(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ZA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ev(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(bd(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,X.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function tv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function nv(e,t){e.treeAdapter.getDocumentMode(e.document)!==sn.QUIRKS&&e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,X.HTML),e.framesetOk=!1,e.insertionMode=R.IN_TABLE}function dg(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,X.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function fg(e){const t=eg(e,$r.TYPE);return t!=null&&t.toLowerCase()===xA}function rv(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,X.HTML),fg(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function iv(e,t){e._appendElement(t,X.HTML),t.ackSelfClosing=!0}function sv(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,X.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function av(e,t){t.tagName=H.IMG,t.tagID=p.IMG,dg(e,t)}function uv(e,t){e._insertElement(t,X.HTML),e.skipNextNewLine=!0,e.tokenizer.state=st.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=R.TEXT}function ov(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,st.RAWTEXT)}function lv(e,t){e.framesetOk=!1,e._switchToTextParsing(t,st.RAWTEXT)}function zm(e,t){e._switchToTextParsing(t,st.RAWTEXT)}function cv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===R.IN_TABLE||e.insertionMode===R.IN_CAPTION||e.insertionMode===R.IN_TABLE_BODY||e.insertionMode===R.IN_ROW||e.insertionMode===R.IN_CELL?R.IN_SELECT_IN_TABLE:R.IN_SELECT}function dv(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML)}function fv(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,X.HTML)}function hv(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(p.RTC),e._insertElement(t,X.HTML)}function pv(e,t){e._reconstructActiveFormattingElements(),ag(t),xd(t),t.selfClosing?e._appendElement(t,X.MATHML):e._insertElement(t,X.MATHML),t.ackSelfClosing=!0}function mv(e,t){e._reconstructActiveFormattingElements(),ug(t),xd(t),t.selfClosing?e._appendElement(t,X.SVG):e._insertElement(t,X.SVG),t.ackSelfClosing=!0}function $m(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML)}function wt(e,t){switch(t.tagID){case p.I:case p.S:case p.B:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.SMALL:case p.STRIKE:case p.STRONG:{ZA(e,t);break}case p.A:{JA(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{VA(e,t);break}case p.P:case p.DL:case p.OL:case p.UL:case p.DIV:case p.DIR:case p.NAV:case p.MAIN:case p.MENU:case p.ASIDE:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.DETAILS:case p.ADDRESS:case p.ARTICLE:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{YA(e,t);break}case p.LI:case p.DD:case p.DT:{GA(e,t);break}case p.BR:case p.IMG:case p.WBR:case p.AREA:case p.EMBED:case p.KEYGEN:{dg(e,t);break}case p.HR:{sv(e,t);break}case p.RB:case p.RTC:{fv(e,t);break}case p.RT:case p.RP:{hv(e,t);break}case p.PRE:case p.LISTING:{qA(e,t);break}case p.XMP:{ov(e,t);break}case p.SVG:{mv(e,t);break}case p.HTML:{zA(e,t);break}case p.BASE:case p.LINK:case p.META:case p.STYLE:case p.TITLE:case p.SCRIPT:case p.BGSOUND:case p.BASEFONT:case p.TEMPLATE:{xn(e,t);break}case p.BODY:{$A(e,t);break}case p.FORM:{QA(e,t);break}case p.NOBR:{ev(e,t);break}case p.MATH:{pv(e,t);break}case p.TABLE:{nv(e,t);break}case p.INPUT:{rv(e,t);break}case p.PARAM:case p.TRACK:case p.SOURCE:{iv(e,t);break}case p.IMAGE:{av(e,t);break}case p.BUTTON:{XA(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{tv(e,t);break}case p.IFRAME:{lv(e,t);break}case p.SELECT:{cv(e,t);break}case p.OPTION:case p.OPTGROUP:{dv(e,t);break}case p.NOEMBED:case p.NOFRAMES:{zm(e,t);break}case p.FRAMESET:{WA(e,t);break}case p.TEXTAREA:{uv(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?zm(e,t):$m(e,t);break}case p.PLAINTEXT:{KA(e,t);break}case p.COL:case p.TH:case p.TD:case p.TR:case p.HEAD:case p.FRAME:case p.TBODY:case p.TFOOT:case p.THEAD:case p.CAPTION:case p.COLGROUP:break;default:$m(e,t)}}function gv(e,t){if(e.openElements.hasInScope(p.BODY)&&(e.insertionMode=R.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Ev(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=R.AFTER_BODY,kg(e,t))}function Tv(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function yv(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(p.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(p.FORM):n&&e.openElements.remove(n))}function xv(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement(H.P,p.P),e._closePElement()}function bv(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function kv(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Sv(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function _v(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Cv(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(H.BR,p.BR),e.openElements.pop(),e.framesetOk=!1}function hg(e,t){const n=t.tagName,s=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const o=e.openElements.items[a],l=e.openElements.tagIDs[a];if(s===l&&(s!==p.UNKNOWN||e.treeAdapter.getTagName(o)===n)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(o,l))break}}function Zu(e,t){switch(t.tagID){case p.A:case p.B:case p.I:case p.S:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.NOBR:case p.SMALL:case p.STRIKE:case p.STRONG:{bd(e,t);break}case p.P:{xv(e);break}case p.DL:case p.UL:case p.OL:case p.DIR:case p.DIV:case p.NAV:case p.PRE:case p.MAIN:case p.MENU:case p.ASIDE:case p.BUTTON:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.ADDRESS:case p.ARTICLE:case p.DETAILS:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.LISTING:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{Tv(e,t);break}case p.LI:{bv(e);break}case p.DD:case p.DT:{kv(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{Sv(e);break}case p.BR:{Cv(e);break}case p.BODY:{gv(e,t);break}case p.HTML:{Ev(e,t);break}case p.FORM:{yv(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{_v(e,t);break}case p.TEMPLATE:{Gr(e,t);break}default:hg(e,t)}}function pg(e,t){e.tmplInsertionModeStack.length>0?bg(e,t):kd(e,t)}function Nv(e,t){var n;t.tagID===p.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Av(e,t){e._err(t,V.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ec(e,t){if(e.openElements.currentTagId!==void 0&&og.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=R.IN_TABLE_TEXT,t.type){case Pe.CHARACTER:{gg(e,t);break}case Pe.WHITESPACE_CHARACTER:{mg(e,t);break}}else na(e,t)}function vv(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,X.HTML),e.insertionMode=R.IN_CAPTION}function wv(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,X.HTML),e.insertionMode=R.IN_COLUMN_GROUP}function Iv(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(H.COLGROUP,p.COLGROUP),e.insertionMode=R.IN_COLUMN_GROUP,Sd(e,t)}function Lv(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,X.HTML),e.insertionMode=R.IN_TABLE_BODY}function Rv(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(H.TBODY,p.TBODY),e.insertionMode=R.IN_TABLE_BODY,eo(e,t)}function Ov(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Dv(e,t){fg(t)?e._appendElement(t,X.HTML):na(e,t),t.ackSelfClosing=!0}function Pv(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,X.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ii(e,t){switch(t.tagID){case p.TD:case p.TH:case p.TR:{Rv(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{xn(e,t);break}case p.COL:{Iv(e,t);break}case p.FORM:{Pv(e,t);break}case p.TABLE:{Ov(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{Lv(e,t);break}case p.INPUT:{Dv(e,t);break}case p.CAPTION:{vv(e,t);break}case p.COLGROUP:{wv(e,t);break}default:na(e,t)}}function Qs(e,t){switch(t.tagID){case p.TABLE:{e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode());break}case p.TEMPLATE:{Gr(e,t);break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:na(e,t)}}function na(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ju(e,t),e.fosterParentingEnabled=n}function mg(e,t){e.pendingCharacterTokens.push(t)}function gg(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ls(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)na(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Eg=new Set([p.CAPTION,p.COL,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]);function Mv(e,t){const n=t.tagID;Eg.has(n)?e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=R.IN_TABLE,Ii(e,t)):wt(e,t)}function Fv(e,t){const n=t.tagID;switch(n){case p.CAPTION:case p.TABLE:{e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=R.IN_TABLE,n===p.TABLE&&Qs(e,t));break}case p.BODY:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:Zu(e,t)}}function Sd(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.COL:{e._appendElement(t,X.HTML),t.ackSelfClosing=!0;break}case p.TEMPLATE:{xn(e,t);break}default:Mu(e,t)}}function Bv(e,t){switch(t.tagID){case p.COLGROUP:{e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=R.IN_TABLE);break}case p.TEMPLATE:{Gr(e,t);break}case p.COL:break;default:Mu(e,t)}}function Mu(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=R.IN_TABLE,e._processToken(t))}function eo(e,t){switch(t.tagID){case p.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,X.HTML),e.insertionMode=R.IN_ROW;break}case p.TH:case p.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(H.TR,p.TR),e.insertionMode=R.IN_ROW,to(e,t);break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE,Ii(e,t));break}default:Ii(e,t)}}function Bc(e,t){const n=t.tagID;switch(t.tagID){case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE);break}case p.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE,Qs(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:case p.TR:break;default:Qs(e,t)}}function to(e,t){switch(t.tagID){case p.TH:case p.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,X.HTML),e.insertionMode=R.IN_CELL,e.activeFormattingElements.insertMarker();break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE_BODY,eo(e,t));break}default:Ii(e,t)}}function Tg(e,t){switch(t.tagID){case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE_BODY);break}case p.TABLE:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE_BODY,Bc(e,t));break}case p.TBODY:case p.TFOOT:case p.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(p.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE_BODY,Bc(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:break;default:Qs(e,t)}}function Uv(e,t){const n=t.tagID;Eg.has(n)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),to(e,t)):wt(e,t)}function Hv(e,t){const n=t.tagID;switch(n){case p.TD:case p.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=R.IN_ROW);break}case p.TABLE:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Tg(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:break;default:Zu(e,t)}}function yg(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._insertElement(t,X.HTML);break}case p.OPTGROUP:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._insertElement(t,X.HTML);break}case p.HR:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._appendElement(t,X.HTML),t.ackSelfClosing=!0;break}case p.INPUT:case p.KEYGEN:case p.TEXTAREA:case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),t.tagID!==p.SELECT&&e._processStartTag(t));break}case p.SCRIPT:case p.TEMPLATE:{xn(e,t);break}}}function xg(e,t){switch(t.tagID){case p.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===p.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===p.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop();break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop();break}case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode());break}case p.TEMPLATE:{Gr(e,t);break}}}function jv(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e._processStartTag(t)):yg(e,t)}function zv(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e.onEndTag(t)):xg(e,t)}function $v(e,t){switch(t.tagID){case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{xn(e,t);break}case p.CAPTION:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.tmplInsertionModeStack[0]=R.IN_TABLE,e.insertionMode=R.IN_TABLE,Ii(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=R.IN_COLUMN_GROUP,e.insertionMode=R.IN_COLUMN_GROUP,Sd(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=R.IN_TABLE_BODY,e.insertionMode=R.IN_TABLE_BODY,eo(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=R.IN_ROW,e.insertionMode=R.IN_ROW,to(e,t);break}default:e.tmplInsertionModeStack[0]=R.IN_BODY,e.insertionMode=R.IN_BODY,wt(e,t)}}function Wv(e,t){t.tagID===p.TEMPLATE&&Gr(e,t)}function bg(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):kd(e,t)}function Yv(e,t){t.tagID===p.HTML?wt(e,t):Fu(e,t)}function kg(e,t){var n;if(t.tagID===p.HTML){if(e.fragmentContext||(e.insertionMode=R.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===p.HTML){e._setEndLocation(e.openElements.items[0],t);const s=e.openElements.items[1];s&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(s))===null||n===void 0)&&n.endTag)&&e._setEndLocation(s,t)}}else Fu(e,t)}function Fu(e,t){e.insertionMode=R.IN_BODY,Ju(e,t)}function Vv(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.FRAMESET:{e._insertElement(t,X.HTML);break}case p.FRAME:{e._appendElement(t,X.HTML),t.ackSelfClosing=!0;break}case p.NOFRAMES:{xn(e,t);break}}}function qv(e,t){t.tagID===p.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==p.FRAMESET&&(e.insertionMode=R.AFTER_FRAMESET))}function Qv(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.NOFRAMES:{xn(e,t);break}}}function Gv(e,t){t.tagID===p.HTML&&(e.insertionMode=R.AFTER_AFTER_FRAMESET)}function Kv(e,t){t.tagID===p.HTML?wt(e,t):wu(e,t)}function wu(e,t){e.insertionMode=R.IN_BODY,Ju(e,t)}function Xv(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.NOFRAMES:{xn(e,t);break}}}function Jv(e,t){t.chars=Je,e._insertCharacters(t)}function Zv(e,t){e._insertCharacters(t),e.framesetOk=!1}function Sg(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==X.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function ew(e,t){if(mA(t))Sg(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),s=e.treeAdapter.getNamespaceURI(n);s===X.MATHML?ag(t):s===X.SVG&&(gA(t),ug(t)),xd(t),t.selfClosing?e._appendElement(t,s):e._insertElement(t,s),t.ackSelfClosing=!0}}function tw(e,t){if(t.tagID===p.P||t.tagID===p.BR){Sg(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const s=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(s)===X.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(s);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}H.AREA,H.BASE,H.BASEFONT,H.BGSOUND,H.BR,H.COL,H.EMBED,H.FRAME,H.HR,H.IMG,H.INPUT,H.KEYGEN,H.LINK,H.META,H.PARAM,H.SOURCE,H.TRACK,H.WBR;const nw=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,rw=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Wm={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function _g(e,t){const n=hw(e),s=N1("type",{handlers:{root:iw,element:sw,text:aw,comment:Ng,doctype:uw,raw:lw},unknown:cw}),a={parser:n?new jm(Wm):jm.getFragmentParser(void 0,Wm),handle(d){s(d,a)},stitches:!1,options:t||{}};s(e,a),Fi(a,In());const o=n?a.parser.document:a.parser.getFragment(),l=pN(o,{file:a.options.file});return a.stitches&&Xu(l,"comment",function(d,f,h){const E=d;if(E.value.stitch&&h&&f!==void 0){const g=h.children;return g[f]=E.value.stitch,f}}),l.type==="root"&&l.children.length===1&&l.children[0].type===e.type?l.children[0]:l}function Cg(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function iw(e,t){Cg(e.children,t)}function sw(e,t){dw(e,t),Cg(e.children,t),fw(e,t)}function aw(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Pe.CHARACTER,chars:e.value,location:ra(e)};Fi(t,In(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function uw(e,t){const n={type:Pe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ra(e)};Fi(t,In(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ow(e,t){t.stitches=!0;const n=pw(e);if("children"in e&&"children"in n){const s=_g({type:"root",children:e.children},t.options);n.children=s.children}Ng({type:"comment",value:{stitch:n}},t)}function Ng(e,t){const n=e.value,s={type:Pe.COMMENT,data:n,location:ra(e)};Fi(t,In(e)),t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken)}function lw(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,Ag(t,In(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(nw,"&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;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function cw(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))ow(n,t);else{let s="";throw rw.has(n.type)&&(s=". 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"),new Error("Cannot compile `"+n.type+"` node"+s)}}function Fi(e,t){Ag(e,t);const 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=st.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 Ag(e,t){if(t&&t.offset!==void 0){const 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 dw(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===st.PLAINTEXT)return;Fi(t,In(e));const s=t.parser.openElements.current;let a="namespaceURI"in s?s.namespaceURI:jr.html;a===jr.html&&n==="svg"&&(a=jr.svg);const o=yN({...e,children:[]},{space:a===jr.svg?"svg":"html"}),l={type:Pe.START_TAG,tagName:n,tagID:Mi(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:ra(e)};t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function fw(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&AN.includes(n)||t.parser.tokenizer.state===st.PLAINTEXT)return;Fi(t,Yu(e));const s={type:Pe.END_TAG,tagName:n,tagID:Mi(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ra(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===st.RCDATA||t.parser.tokenizer.state===st.RAWTEXT||t.parser.tokenizer.state===st.SCRIPT_DATA)&&(t.parser.tokenizer.state=st.DATA)}function hw(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ra(e){const t=In(e)||{line:void 0,column:void 0,offset:void 0},n=Yu(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 pw(e){return"children"in e?Vr({...e,children:[]}):Vr(e)}function mw(e){return function(t,n){return _g(t,{...e,file:n})}}const Fr=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Uc={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Fr,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Fr],h2:[["className","sr-only"]],img:[...Fr,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Fr,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Fr],table:[...Fr],ul:[...Fr,["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"]},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"]},gr={}.hasOwnProperty;function gw(e,t){let n={type:"root",children:[]};const s={schema:t?{...Uc,...t}:Uc,stack:[]},a=vg(s,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function vg(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return Ew(e,n);case"doctype":return Tw(e,n);case"element":return yw(e,n);case"root":return xw(e,n);case"text":return bw(e,n)}}}function Ew(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",s=n.indexOf("-->"),o={type:"comment",value:s<0?n:n.slice(0,s)};return ia(o,t),o}}function Tw(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ia(n,t),n}}function yw(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const s=wg(e,t.children),a=kw(e,t.properties);e.stack.pop();let o=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(o=!0,e.schema.ancestors&&gr.call(e.schema.ancestors,n))){const d=e.schema.ancestors[n];let f=-1;for(o=!1;++f<d.length;)e.stack.includes(d[f])&&(o=!0)}if(!o)return e.schema.strip&&!e.schema.strip.includes(n)?s:void 0;const l={type:"element",tagName:n,properties:a,children:s};return ia(l,t),l}function xw(e,t){const s={type:"root",children:wg(e,t.children)};return ia(s,t),s}function bw(e,t){const s={type:"text",value:typeof t.value=="string"?t.value:""};return ia(s,t),s}function wg(e,t){const n=[];if(Array.isArray(t)){const s=t;let a=-1;for(;++a<s.length;){const o=vg(e,s[a]);o&&(Array.isArray(o)?n.push(...o):n.push(o))}}return n}function kw(e,t){const n=e.stack[e.stack.length-1],s=e.schema.attributes,a=e.schema.required,o=s&&gr.call(s,n)?s[n]:void 0,l=s&&gr.call(s,"*")?s["*"]:void 0,d=t&&typeof t=="object"?t:{},f={};let h;for(h in d)if(gr.call(d,h)){const E=d[h];let g=Ym(e,Vm(o,h),h,E);g==null&&(g=Ym(e,Vm(l,h),h,E)),g!=null&&(f[h]=g)}if(a&&gr.call(a,n)){const E=a[n];for(h in E)gr.call(E,h)&&!gr.call(f,h)&&(f[h]=E[h])}return f}function Ym(e,t,n,s){return t?Array.isArray(s)?Sw(e,t,n,s):Ig(e,t,n,s):void 0}function Sw(e,t,n,s){let a=-1;const o=[];for(;++a<s.length;){const l=Ig(e,t,n,s[a]);(typeof l=="number"||typeof l=="string")&&o.push(l)}return o}function Ig(e,t,n,s){if(!(typeof s!="boolean"&&typeof s!="number"&&typeof s!="string")&&_w(e,n,s)){if(typeof t=="object"&&t.length>1){let a=!1,o=0;for(;++o<t.length;){const l=t[o];if(l&&typeof l=="object"&&"flags"in l){if(l.test(String(s))){a=!0;break}}else if(l===s){a=!0;break}}if(!a)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+s:s}}function _w(e,t,n){const s=e.schema.protocols&&gr.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!s||s.length===0)return!0;const a=String(n),o=a.indexOf(":"),l=a.indexOf("?"),d=a.indexOf("#"),f=a.indexOf("/");if(o<0||f>-1&&o>f||l>-1&&o>l||d>-1&&o>d)return!0;let h=-1;for(;++h<s.length;){const E=s[h];if(o===E.length&&a.slice(0,E.length)===E)return!0}return!1}function ia(e,t){const n=G0(t);t.data&&(e.data=Vr(t.data)),n&&(e.position=n)}function Vm(e,t){let n,s=-1;if(e)for(;++s<e.length;){const a=e[s],o=typeof a=="string"?a:a[0];if(o===t)return a;o==="data*"&&(n=a)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Cw(e){return function(t){return gw(t,e)}}const Hc=Uc,Br=(e,...t)=>{var n;return[...((n=Hc.attributes)==null?void 0:n[e])??[],...t]},Nw={...Hc,attributes:{...Hc.attributes,p:Br("p","align"),div:Br("div","align"),h1:Br("h1","align"),h2:Br("h2","align"),h3:Br("h3","align"),img:Br("img","width","height","align"),a:Br("a","align")}},Aw=new Set(["code","pre","svg","math","style","script","textarea"]),vw="fade-word";function ww(e){const t=[];for(const n of e.split(/(\s+)/))if(n){if(/^\s+$/.test(n)){t.push({type:"text",value:n});continue}t.push({type:"element",tagName:"span",properties:{className:[vw]},children:[{type:"text",value:n}]})}return t}function Lg(e){const t=e.children;if(!t)return;const n=[];for(const s of t){if(s.type==="text"){n.push(...ww(s.value??""));continue}if(s.type==="element"&&Aw.has(s.tagName??"")){n.push(s);continue}Lg(s),n.push(s)}e.children=n}function Iw(){return e=>Lg(e)}const Lw=256*1024;let Ur=null,Rw=0;const Bu=new Map;function qm(e,t){var n;(n=Bu.get(e))==null||n(t),Bu.delete(e)}function Ow(){if(Ur)return Ur;try{Ur=new Worker(new URL("/assets/highlightWorker-DJp1Ce5p.js",import.meta.url),{type:"module"}),Ur.addEventListener("message",e=>qm(e.data.id,e.data.html)),Ur.addEventListener("error",()=>{for(const e of[...Bu.keys()])qm(e,null);Ur=null})}catch{return null}return Ur}async function _d(e,t){if(e.length>Lw)return null;const n=Ow();if(!n)return null;const s=++Rw;return new Promise(a=>{Bu.set(s,a),n.postMessage({id:s,code:e,lang:t})})}function Dw({code:e,lang:t}){const[n,s]=L.useState(null);L.useEffect(()=>{let o=!1;return _d(e,t).then(l=>{o||s(l)}).catch(()=>{o||s(null)}),()=>{o=!0}},[e,t]);const a=()=>{var o;return void((o=navigator.clipboard)==null?void 0:o.writeText(e))};return y.jsxs("div",{className:"codeblock",children:[y.jsxs("div",{className:"codeblock-bar",children:[y.jsx("span",{className:"codeblock-lang",children:t||"text"}),y.jsx("button",{className:"codeblock-copy",onClick:a,"aria-label":"Copy code",children:"copy"})]}),n?y.jsx("div",{className:"codeblock-body",dangerouslySetInnerHTML:{__html:n}}):y.jsx("pre",{className:"codeblock-body codeblock-plain",children:y.jsx("code",{children:e})})]})}let Tc=null;function Pw(){return Tc||(Tc=Sc(()=>import("./mermaid.core-DsId9yj5.js").then(e=>e.bp),[]).then(e=>(e.default.initialize({startOnLoad:!1,theme:"dark",securityLevel:"strict",themeVariables:{primaryColor:"#44475a",primaryTextColor:"#f8f8f2",primaryBorderColor:"#bd93f9",lineColor:"#8be9fd",fontFamily:"Inter, sans-serif"}}),e.default))),Tc}let Mw=0;function Fw({code:e}){const t=L.useRef(null),[n,s]=L.useState(!1);return L.useEffect(()=>{let a=!1;s(!1);const o=e.trim();if(o)return Pw().then(async l=>{const d=await l.parse(o,{suppressErrors:!0});if(a||!d)return;const{svg:f}=await l.render(`mermaid-${Mw++}`,o);a||!t.current||(t.current.innerHTML=f,s(!0))}).catch(()=>{}),()=>{a=!0}},[e]),y.jsxs("div",{className:"mermaid-wrap",children:[y.jsx("div",{className:`mermaid-block ${n?"":"is-hidden"}`,ref:t}),!n&&y.jsxs("div",{className:"codeblock",children:[y.jsx("div",{className:"codeblock-bar",children:y.jsx("span",{className:"codeblock-lang",children:"mermaid"})}),y.jsx("pre",{className:"codeblock-body codeblock-plain",children:y.jsx("code",{children:e})})]})]})}const Bw=/language-(\w+)/,Uw=/\n$/,Hw={code(e){const{className:t,children:n}=e,s=Bw.exec(t??""),a=String(n).replace(Uw,"");if(!t&&!a.includes(`
92
- `))return y.jsx("code",{className:"md-inline-code",children:a});const l=(s==null?void 0:s[1])??"";return l==="mermaid"?y.jsx(Fw,{code:a}):y.jsx(Dw,{code:a,lang:l})},a(e){return y.jsx("a",{...e,target:"_blank",rel:"noreferrer noopener"})}};let vi=null,Qm=null;function Rg(){return Qm??(Qm=Promise.all([Sc(()=>import("./index-Dewf4nkF.js"),__vite__mapDeps([0,1])),Sc(()=>Promise.resolve({}),__vite__mapDeps([2]))]).then(([e])=>{vi=e.default})),Qm}let Gm=!1;function jw(){if(Gm||vi)return;Gm=!0;const e=()=>void Rg(),t=globalThis.requestIdleCallback;t?t(e):setTimeout(e,2e3)}const zw=/(^|[^\\])\$/,Gs=L.memo(function({text:t,html:n=!1,streaming:s=!1}){const a=L.useMemo(()=>rN(t),[t]),o=zw.test(a),[l,d]=L.useState(()=>vi!==null);L.useEffect(()=>{if(vi)return;if(!o){jw();return}let h=!0;return Rg().then(()=>{h&&d(!0)}),()=>{h=!1}},[o]);const f=L.useMemo(()=>{const h=o&&vi?[vi]:[];return n?[mw,[Cw,Nw],...h]:s?[...h,Iw]:h},[n,s,o,l]);return y.jsx("div",{className:"md",children:y.jsx(S_,{remarkPlugins:q3,rehypePlugins:f,components:Hw,children:a})})});function $w(e,t){if(!e||!t)return null;if(!t.startsWith("/"))return Xm(t.replace(/^\.\//,""));const n=Km(e),s=Xm(Km(t));return s===null||s===n?null:s.startsWith(`${n}/`)?s.slice(n.length+1):null}const Km=e=>e.replace(/\/+$/,"");function Xm(e){const t=e.startsWith("/"),n=[];for(const a of e.split("/"))if(!(a===""||a===".")){if(a!==".."){n.push(a);continue}if(n.length===0)return null;n.pop()}const s=n.join("/");return t?`/${s}`:s}const Ww=4e5;function Jm(e,t){const n=e.split(`
91
+ `,t);return s===-1?n:n===-1||n+1===s?s:n<s?n:s}const jr={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/"},Q1={}.hasOwnProperty,hN=Object.prototype;function pN(e,t){const n=t||{};return Td({file:n.file||void 0,location:!1,schema:n.space==="svg"?Tr:Zs,verbose:n.verbose||!1},e)}function Td(e,t){let n;switch(t.nodeName){case"#comment":{const s=t;return n={type:"comment",value:s.data},vu(e,s,n),n}case"#document":case"#document-fragment":{const s=t,a="mode"in s?s.mode==="quirks"||s.mode==="limited-quirks":!1;if(n={type:"root",children:G1(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const o=String(e.file),l=fN(o),d=l.toPoint(0),f=l.toPoint(o.length);n.position={start:d,end:f}}return n}case"#documentType":{const s=t;return n={type:"doctype"},vu(e,s,n),n}case"#text":{const s=t;return n={type:"text",value:s.value},vu(e,s,n),n}default:return n=mN(e,t),n}}function G1(e,t){let n=-1;const s=[];for(;++n<t.length;){const a=Td(e,t[n]);s.push(a)}return s}function mN(e,t){const n=e.schema;e.schema=t.namespaceURI===jr.svg?Tr:Zs;let s=-1;const a={};for(;++s<t.attrs.length;){const d=t.attrs[s],f=(d.prefix?d.prefix+":":"")+d.name;Q1.call(hN,f)||(a[f]=d.value)}const l=(e.schema.space==="svg"?dN:cN)(t.tagName,a,G1(e,t.childNodes));if(vu(e,t,l),l.tagName==="template"){const d=t,f=d.sourceCodeLocation,h=f&&f.startTag&&Ai(f.startTag),E=f&&f.endTag&&Ai(f.endTag),g=Td(e,d.content);h&&E&&e.file&&(g.position={start:h.end,end:E.start}),l.content=g}return e.schema=n,l}function vu(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const s=gN(e,n,t.sourceCodeLocation);s&&(e.location=!0,n.position=s)}}function gN(e,t,n){const s=Ai(n);if(t.type==="element"){const a=t.children[t.children.length-1];if(s&&!n.endTag&&a&&a.position&&a.position.end&&(s.end=Object.assign({},a.position.end)),e.verbose){const o={};let l;if(n.attrs)for(l in n.attrs)Q1.call(n.attrs,l)&&(o[Wu(e.schema,l).property]=Ai(n.attrs[l]));n.startTag;const d=Ai(n.startTag),f=n.endTag?Ai(n.endTag):void 0,h={opening:d};f&&(h.closing=f),h.properties=o,t.data={position:h}}}return s}function Ai(e){const t=Lm({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Lm({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Lm(e){return e.line&&e.column?e:void 0}const EN={},TN={}.hasOwnProperty,K1=N1("type",{handlers:{root:xN,element:CN,text:SN,comment:_N,doctype:kN}});function yN(e,t){const s=(t||EN).space;return K1(e,s==="svg"?Tr:Zs)}function xN(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=yd(e.children,n,t),Pi(e,n),n}function bN(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=yd(e.children,n,t),Pi(e,n),n}function kN(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Pi(e,t),t}function SN(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Pi(e,t),t}function _N(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Pi(e,t),t}function CN(e,t){const n=t;let s=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(s=Tr);const a=[];let o;if(e.properties){for(o in e.properties)if(o!=="children"&&TN.call(e.properties,o)){const f=NN(s,o,e.properties[o]);f&&a.push(f)}}const l=s.space,d={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:jr[l],childNodes:[],parentNode:null};return d.childNodes=yd(e.children,d,s),Pi(e,d),e.tagName==="template"&&e.content&&(d.content=bN(e.content,s)),d}function NN(e,t,n){const s=Wu(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&s.boolean)return;Array.isArray(n)&&(n=s.commaSeparated?U0(n):q0(n));const a={name:s.attribute,value:n===!0?"":String(n)};if(s.space&&s.space!=="html"&&s.space!=="svg"){const o=a.name.indexOf(":");o<0?a.prefix="":(a.name=a.name.slice(o+1),a.prefix=s.attribute.slice(0,o)),a.namespace=jr[s.space]}return a}function yd(e,t,n){let s=-1;const a=[];if(e)for(;++s<e.length;){const o=K1(e[s],n);o.parentNode=t,a.push(o)}return a}function Pi(e,t){const 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})}const AN=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],vN=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]),Je="�";var _;(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"})(_||(_={}));const Ut={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function X1(e){return e>=55296&&e<=57343}function wN(e){return e>=56320&&e<=57343}function IN(e,t){return(e-55296)*1024+9216+t}function J1(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Z1(e){return e>=64976&&e<=65007||vN.has(e)}var V;(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"})(V||(V={}));const LN=65536;class RN{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=LN,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:s,col:a,offset:o}=this,l=a+n,d=o+n;return{code:t,startLine:s,endLine:s,startCol:l,endCol:l,startOffset:d,endOffset:d}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(wN(n))return this.pos++,this._addGap(),IN(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,_.EOF;return this._err(V.surrogateInInputStream),t}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(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let s=0;s<t.length;s++)if((this.html.charCodeAt(this.pos+s)|32)!==t.charCodeAt(s))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,_.EOF;const s=this.html.charCodeAt(n);return s===_.CARRIAGE_RETURN?_.LINE_FEED:s}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,_.EOF;let t=this.html.charCodeAt(this.pos);return t===_.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,_.LINE_FEED):t===_.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,X1(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===_.LINE_FEED||t===_.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){J1(t)?this._err(V.controlCharacterInInputStream):Z1(t)&&this._err(V.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Pe;(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"})(Pe||(Pe={}));function eg(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}const ON=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肻 ଷ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))),DN=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function PN(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=DN.get(e))!==null&&t!==void 0?t:e}var gt;(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"})(gt||(gt={}));const MN=32;var Er;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Er||(Er={}));function Pc(e){return e>=gt.ZERO&&e<=gt.NINE}function FN(e){return e>=gt.UPPER_A&&e<=gt.UPPER_F||e>=gt.LOWER_A&&e<=gt.LOWER_F}function BN(e){return e>=gt.UPPER_A&&e<=gt.UPPER_Z||e>=gt.LOWER_A&&e<=gt.LOWER_Z||Pc(e)}function UN(e){return e===gt.EQUALS||BN(e)}var mt;(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"})(mt||(mt={}));var zn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(zn||(zn={}));class HN{constructor(t,n,s){this.decodeTree=t,this.emitCodePoint=n,this.errors=s,this.state=mt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=zn.Strict}startEntity(t){this.decodeMode=t,this.state=mt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case mt.EntityStart:return t.charCodeAt(n)===gt.NUM?(this.state=mt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=mt.NamedEntity,this.stateNamedEntity(t,n));case mt.NumericStart:return this.stateNumericStart(t,n);case mt.NumericDecimal:return this.stateNumericDecimal(t,n);case mt.NumericHex:return this.stateNumericHex(t,n);case mt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|MN)===gt.LOWER_X?(this.state=mt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=mt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,s,a){if(n!==s){const o=s-n;this.result=this.result*Math.pow(a,o)+Number.parseInt(t.substr(n,o),a),this.consumed+=o}}stateNumericHex(t,n){const s=n;for(;n<t.length;){const a=t.charCodeAt(n);if(Pc(a)||FN(a))n+=1;else return this.addToNumericResult(t,s,n,16),this.emitNumericEntity(a,3)}return this.addToNumericResult(t,s,n,16),-1}stateNumericDecimal(t,n){const s=n;for(;n<t.length;){const a=t.charCodeAt(n);if(Pc(a))n+=1;else return this.addToNumericResult(t,s,n,10),this.emitNumericEntity(a,2)}return this.addToNumericResult(t,s,n,10),-1}emitNumericEntity(t,n){var s;if(this.consumed<=n)return(s=this.errors)===null||s===void 0||s.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===gt.SEMI)this.consumed+=1;else if(this.decodeMode===zn.Strict)return 0;return this.emitCodePoint(PN(this.result),this.consumed),this.errors&&(t!==gt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:s}=this;let a=s[this.treeIndex],o=(a&Er.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const l=t.charCodeAt(n);if(this.treeIndex=jN(s,a,this.treeIndex+Math.max(1,o),l),this.treeIndex<0)return this.result===0||this.decodeMode===zn.Attribute&&(o===0||UN(l))?0:this.emitNotTerminatedNamedEntity();if(a=s[this.treeIndex],o=(a&Er.VALUE_LENGTH)>>14,o!==0){if(l===gt.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==zn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:s}=this,a=(s[n]&Er.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,a,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,s){const{decodeTree:a}=this;return this.emitCodePoint(n===1?a[t]&~Er.VALUE_LENGTH:a[t+1],s),n===3&&this.emitCodePoint(a[t+2],s),s}end(){var t;switch(this.state){case mt.NamedEntity:return this.result!==0&&(this.decodeMode!==zn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case mt.NumericDecimal:return this.emitNumericEntity(0,2);case mt.NumericHex:return this.emitNumericEntity(0,3);case mt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case mt.EntityStart:return 0}}}function jN(e,t,n,s){const a=(t&Er.BRANCH_LENGTH)>>7,o=t&Er.JUMP_TABLE;if(a===0)return o!==0&&s===o?n:-1;if(o){const f=s-o;return f<0||f>=a?-1:e[n+f]-1}let l=n,d=l+a-1;for(;l<=d;){const f=l+d>>>1,h=e[f];if(h<s)l=f+1;else if(h>s)d=f-1;else return e[f+a]}return-1}var X;(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/"})(X||(X={}));var $r;(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"})($r||($r={}));var sn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(sn||(sn={}));var H;(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"})(H||(H={}));var p;(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"})(p||(p={}));const zN=new Map([[H.A,p.A],[H.ADDRESS,p.ADDRESS],[H.ANNOTATION_XML,p.ANNOTATION_XML],[H.APPLET,p.APPLET],[H.AREA,p.AREA],[H.ARTICLE,p.ARTICLE],[H.ASIDE,p.ASIDE],[H.B,p.B],[H.BASE,p.BASE],[H.BASEFONT,p.BASEFONT],[H.BGSOUND,p.BGSOUND],[H.BIG,p.BIG],[H.BLOCKQUOTE,p.BLOCKQUOTE],[H.BODY,p.BODY],[H.BR,p.BR],[H.BUTTON,p.BUTTON],[H.CAPTION,p.CAPTION],[H.CENTER,p.CENTER],[H.CODE,p.CODE],[H.COL,p.COL],[H.COLGROUP,p.COLGROUP],[H.DD,p.DD],[H.DESC,p.DESC],[H.DETAILS,p.DETAILS],[H.DIALOG,p.DIALOG],[H.DIR,p.DIR],[H.DIV,p.DIV],[H.DL,p.DL],[H.DT,p.DT],[H.EM,p.EM],[H.EMBED,p.EMBED],[H.FIELDSET,p.FIELDSET],[H.FIGCAPTION,p.FIGCAPTION],[H.FIGURE,p.FIGURE],[H.FONT,p.FONT],[H.FOOTER,p.FOOTER],[H.FOREIGN_OBJECT,p.FOREIGN_OBJECT],[H.FORM,p.FORM],[H.FRAME,p.FRAME],[H.FRAMESET,p.FRAMESET],[H.H1,p.H1],[H.H2,p.H2],[H.H3,p.H3],[H.H4,p.H4],[H.H5,p.H5],[H.H6,p.H6],[H.HEAD,p.HEAD],[H.HEADER,p.HEADER],[H.HGROUP,p.HGROUP],[H.HR,p.HR],[H.HTML,p.HTML],[H.I,p.I],[H.IMG,p.IMG],[H.IMAGE,p.IMAGE],[H.INPUT,p.INPUT],[H.IFRAME,p.IFRAME],[H.KEYGEN,p.KEYGEN],[H.LABEL,p.LABEL],[H.LI,p.LI],[H.LINK,p.LINK],[H.LISTING,p.LISTING],[H.MAIN,p.MAIN],[H.MALIGNMARK,p.MALIGNMARK],[H.MARQUEE,p.MARQUEE],[H.MATH,p.MATH],[H.MENU,p.MENU],[H.META,p.META],[H.MGLYPH,p.MGLYPH],[H.MI,p.MI],[H.MO,p.MO],[H.MN,p.MN],[H.MS,p.MS],[H.MTEXT,p.MTEXT],[H.NAV,p.NAV],[H.NOBR,p.NOBR],[H.NOFRAMES,p.NOFRAMES],[H.NOEMBED,p.NOEMBED],[H.NOSCRIPT,p.NOSCRIPT],[H.OBJECT,p.OBJECT],[H.OL,p.OL],[H.OPTGROUP,p.OPTGROUP],[H.OPTION,p.OPTION],[H.P,p.P],[H.PARAM,p.PARAM],[H.PLAINTEXT,p.PLAINTEXT],[H.PRE,p.PRE],[H.RB,p.RB],[H.RP,p.RP],[H.RT,p.RT],[H.RTC,p.RTC],[H.RUBY,p.RUBY],[H.S,p.S],[H.SCRIPT,p.SCRIPT],[H.SEARCH,p.SEARCH],[H.SECTION,p.SECTION],[H.SELECT,p.SELECT],[H.SOURCE,p.SOURCE],[H.SMALL,p.SMALL],[H.SPAN,p.SPAN],[H.STRIKE,p.STRIKE],[H.STRONG,p.STRONG],[H.STYLE,p.STYLE],[H.SUB,p.SUB],[H.SUMMARY,p.SUMMARY],[H.SUP,p.SUP],[H.TABLE,p.TABLE],[H.TBODY,p.TBODY],[H.TEMPLATE,p.TEMPLATE],[H.TEXTAREA,p.TEXTAREA],[H.TFOOT,p.TFOOT],[H.TD,p.TD],[H.TH,p.TH],[H.THEAD,p.THEAD],[H.TITLE,p.TITLE],[H.TR,p.TR],[H.TRACK,p.TRACK],[H.TT,p.TT],[H.U,p.U],[H.UL,p.UL],[H.SVG,p.SVG],[H.VAR,p.VAR],[H.WBR,p.WBR],[H.XMP,p.XMP]]);function Mi(e){var t;return(t=zN.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const te=p,$N={[X.HTML]:new Set([te.ADDRESS,te.APPLET,te.AREA,te.ARTICLE,te.ASIDE,te.BASE,te.BASEFONT,te.BGSOUND,te.BLOCKQUOTE,te.BODY,te.BR,te.BUTTON,te.CAPTION,te.CENTER,te.COL,te.COLGROUP,te.DD,te.DETAILS,te.DIR,te.DIV,te.DL,te.DT,te.EMBED,te.FIELDSET,te.FIGCAPTION,te.FIGURE,te.FOOTER,te.FORM,te.FRAME,te.FRAMESET,te.H1,te.H2,te.H3,te.H4,te.H5,te.H6,te.HEAD,te.HEADER,te.HGROUP,te.HR,te.HTML,te.IFRAME,te.IMG,te.INPUT,te.LI,te.LINK,te.LISTING,te.MAIN,te.MARQUEE,te.MENU,te.META,te.NAV,te.NOEMBED,te.NOFRAMES,te.NOSCRIPT,te.OBJECT,te.OL,te.P,te.PARAM,te.PLAINTEXT,te.PRE,te.SCRIPT,te.SECTION,te.SELECT,te.SOURCE,te.STYLE,te.SUMMARY,te.TABLE,te.TBODY,te.TD,te.TEMPLATE,te.TEXTAREA,te.TFOOT,te.TH,te.THEAD,te.TITLE,te.TR,te.TRACK,te.UL,te.WBR,te.XMP]),[X.MATHML]:new Set([te.MI,te.MO,te.MN,te.MS,te.MTEXT,te.ANNOTATION_XML]),[X.SVG]:new Set([te.TITLE,te.FOREIGN_OBJECT,te.DESC]),[X.XLINK]:new Set,[X.XML]:new Set,[X.XMLNS]:new Set},Mc=new Set([te.H1,te.H2,te.H3,te.H4,te.H5,te.H6]);H.STYLE,H.SCRIPT,H.XMP,H.IFRAME,H.NOEMBED,H.NOFRAMES,H.PLAINTEXT;var C;(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"})(C||(C={}));const st={DATA:C.DATA,RCDATA:C.RCDATA,RAWTEXT:C.RAWTEXT,SCRIPT_DATA:C.SCRIPT_DATA,PLAINTEXT:C.PLAINTEXT,CDATA_SECTION:C.CDATA_SECTION};function WN(e){return e>=_.DIGIT_0&&e<=_.DIGIT_9}function Ds(e){return e>=_.LATIN_CAPITAL_A&&e<=_.LATIN_CAPITAL_Z}function YN(e){return e>=_.LATIN_SMALL_A&&e<=_.LATIN_SMALL_Z}function pr(e){return YN(e)||Ds(e)}function Rm(e){return pr(e)||WN(e)}function Su(e){return e+32}function tg(e){return e===_.SPACE||e===_.LINE_FEED||e===_.TABULATION||e===_.FORM_FEED}function Om(e){return tg(e)||e===_.SOLIDUS||e===_.GREATER_THAN_SIGN}function VN(e){return e===_.NULL?V.nullCharacterReference:e>1114111?V.characterReferenceOutsideUnicodeRange:X1(e)?V.surrogateCharacterReference:Z1(e)?V.noncharacterCharacterReference:J1(e)||e===_.CARRIAGE_RETURN?V.controlCharacterReference:null}class qN{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=C.DATA,this.returnState=C.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new RN(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new HN(ON,(s,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(s)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(V.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:s=>{this._err(V.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+s)},validateNumericCharacterReference:s=>{const a=VN(s);a&&this._err(a,1)}}:void 0)}_err(t,n=0){var s,a;(a=(s=this.handler).onParseError)===null||a===void 0||a.call(s,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,s){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||s==null||s()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),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(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Pe.START_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Pe.END_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Pe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Pe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const s=this.currentToken;if(eg(s,this.currentAttr.name)===null){if(s.attrs.push(this.currentAttr),s.location&&this.currentLocation){const a=(t=(n=s.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);a[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(V.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Mi(t.tagName),t.type===Pe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(V.endTagWithAttributes),t.selfClosing&&this._err(V.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Pe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Pe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Pe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Pe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=tg(t)?Pe.WHITESPACE_CHARACTER:t===_.NULL?Pe.NULL_CHARACTER:Pe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Pe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=C.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?zn.Attribute:zn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===C.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===C.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===C.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case C.DATA:{this._stateData(t);break}case C.RCDATA:{this._stateRcdata(t);break}case C.RAWTEXT:{this._stateRawtext(t);break}case C.SCRIPT_DATA:{this._stateScriptData(t);break}case C.PLAINTEXT:{this._statePlaintext(t);break}case C.TAG_OPEN:{this._stateTagOpen(t);break}case C.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case C.TAG_NAME:{this._stateTagName(t);break}case C.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case C.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case C.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case C.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case C.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case C.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case C.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case C.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case C.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case C.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case C.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case C.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case C.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case C.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case C.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case C.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case C.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case C.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case C.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case C.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case C.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case C.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case C.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case C.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case C.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case C.BOGUS_COMMENT:{this._stateBogusComment(t);break}case C.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case C.COMMENT_START:{this._stateCommentStart(t);break}case C.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case C.COMMENT:{this._stateComment(t);break}case C.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case C.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case C.COMMENT_END:{this._stateCommentEnd(t);break}case C.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case C.DOCTYPE:{this._stateDoctype(t);break}case C.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case C.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case C.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case C.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case C.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case C.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case C.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case C.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case C.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case C.CDATA_SECTION:{this._stateCdataSection(t);break}case C.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case C.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case C.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case C.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case _.LESS_THAN_SIGN:{this.state=C.TAG_OPEN;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitCodePoint(t);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case _.AMPERSAND:{this._startCharacterReference();break}case _.LESS_THAN_SIGN:{this.state=C.RCDATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case _.LESS_THAN_SIGN:{this.state=C.RAWTEXT_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(pr(t))this._createStartTagToken(),this.state=C.TAG_NAME,this._stateTagName(t);else switch(t){case _.EXCLAMATION_MARK:{this.state=C.MARKUP_DECLARATION_OPEN;break}case _.SOLIDUS:{this.state=C.END_TAG_OPEN;break}case _.QUESTION_MARK:{this._err(V.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t);break}case _.EOF:{this._err(V.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(V.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=C.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(pr(t))this._createEndTagToken(),this.state=C.TAG_NAME,this._stateTagName(t);else switch(t){case _.GREATER_THAN_SIGN:{this._err(V.missingEndTagName),this.state=C.DATA;break}case _.EOF:{this._err(V.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(V.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_ATTRIBUTE_NAME;break}case _.SOLIDUS:{this.state=C.SELF_CLOSING_START_TAG;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentTagToken();break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.tagName+=Je;break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ds(t)?Su(t):t)}}_stateRcdataLessThanSign(t){t===_.SOLIDUS?this.state=C.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=C.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){pr(t)?(this.state=C.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=C.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=C.BEFORE_ATTRIBUTE_NAME,!1;case _.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=C.SELF_CLOSING_START_TAG,!1;case _.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=C.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===_.SOLIDUS?this.state=C.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){pr(t)?(this.state=C.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case _.SOLIDUS:{this.state=C.SCRIPT_DATA_END_TAG_OPEN;break}case _.EXCLAMATION_MARK:{this.state=C.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=C.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){pr(t)?(this.state=C.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===_.HYPHEN_MINUS?(this.state=C.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===_.HYPHEN_MINUS?(this.state=C.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_ESCAPED,this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case _.HYPHEN_MINUS:{this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.GREATER_THAN_SIGN:{this.state=C.SCRIPT_DATA,this._emitChars(">");break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_ESCAPED,this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===_.SOLIDUS?this.state=C.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:pr(t)?(this._emitChars("<"),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){pr(t)?(this.state=C.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Ut.SCRIPT,!1)&&Om(this.preprocessor.peek(Ut.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ut.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case _.HYPHEN_MINUS:{this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.GREATER_THAN_SIGN:{this.state=C.SCRIPT_DATA,this._emitChars(">");break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===_.SOLIDUS?(this.state=C.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Ut.SCRIPT,!1)&&Om(this.preprocessor.peek(Ut.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ut.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=C.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.SOLIDUS:case _.GREATER_THAN_SIGN:case _.EOF:{this.state=C.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case _.EQUALS_SIGN:{this._err(V.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=C.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=C.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:case _.SOLIDUS:case _.GREATER_THAN_SIGN:case _.EOF:{this._leaveAttrName(),this.state=C.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case _.EQUALS_SIGN:{this._leaveAttrName(),this.state=C.BEFORE_ATTRIBUTE_VALUE;break}case _.QUOTATION_MARK:case _.APOSTROPHE:case _.LESS_THAN_SIGN:{this._err(V.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.name+=Je;break}default:this.currentAttr.name+=String.fromCodePoint(Ds(t)?Su(t):t)}}_stateAfterAttributeName(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.SOLIDUS:{this.state=C.SELF_CLOSING_START_TAG;break}case _.EQUALS_SIGN:{this.state=C.BEFORE_ATTRIBUTE_VALUE;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=C.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{this.state=C.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this.state=C.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(V.missingAttributeValue),this.state=C.DATA,this.emitCurrentTagToken();break}default:this.state=C.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case _.QUOTATION_MARK:{this.state=C.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case _.APOSTROPHE:{this.state=C.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this._leaveAttrValue(),this.state=C.BEFORE_ATTRIBUTE_NAME;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=C.DATA,this.emitCurrentTagToken();break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case _.QUOTATION_MARK:case _.APOSTROPHE:case _.LESS_THAN_SIGN:case _.EQUALS_SIGN:case _.GRAVE_ACCENT:{this._err(V.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this._leaveAttrValue(),this.state=C.BEFORE_ATTRIBUTE_NAME;break}case _.SOLIDUS:{this._leaveAttrValue(),this.state=C.SELF_CLOSING_START_TAG;break}case _.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=C.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this._err(V.missingWhitespaceBetweenAttributes),this.state=C.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case _.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=C.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this._err(V.unexpectedSolidusInTag),this.state=C.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentComment(n);break}case _.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.data+=Je;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ut.DASH_DASH,!0)?(this._createCommentToken(Ut.DASH_DASH.length+1),this.state=C.COMMENT_START):this._consumeSequenceIfMatch(Ut.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ut.DOCTYPE.length+1),this.state=C.DOCTYPE):this._consumeSequenceIfMatch(Ut.CDATA_START,!0)?this.inForeignNode?this.state=C.CDATA_SECTION:(this._err(V.cdataInHtmlContent),this._createCommentToken(Ut.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=C.BOGUS_COMMENT):this._ensureHibernation()||(this._err(V.incorrectlyOpenedComment),this._createCommentToken(2),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_START_DASH;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptClosingOfEmptyComment),this.state=C.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=C.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_END;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptClosingOfEmptyComment),this.state=C.DATA,this.emitCurrentComment(n);break}case _.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=C.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_END_DASH;break}case _.LESS_THAN_SIGN:{n.data+="<",this.state=C.COMMENT_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.data+=Je;break}case _.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case _.EXCLAMATION_MARK:{n.data+="!",this.state=C.COMMENT_LESS_THAN_SIGN_BANG;break}case _.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=C.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===_.HYPHEN_MINUS?this.state=C.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=C.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===_.HYPHEN_MINUS?this.state=C.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=C.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==_.GREATER_THAN_SIGN&&t!==_.EOF&&this._err(V.nestedComment),this.state=C.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_END;break}case _.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=C.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentComment(n);break}case _.EXCLAMATION_MARK:{this.state=C.COMMENT_END_BANG;break}case _.HYPHEN_MINUS:{n.data+="-";break}case _.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=C.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{n.data+="--!",this.state=C.COMMENT_END_DASH;break}case _.GREATER_THAN_SIGN:{this._err(V.incorrectlyClosedComment),this.state=C.DATA,this.emitCurrentComment(n);break}case _.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=C.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this.state=C.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case _.EOF:{this._err(V.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingWhitespaceBeforeDoctypeName),this.state=C.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ds(t))this._createDoctypeToken(String.fromCharCode(Su(t))),this.state=C.DOCTYPE_NAME;else switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.NULL:{this._err(V.unexpectedNullCharacter),this._createDoctypeToken(Je),this.state=C.DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this._err(V.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=C.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.AFTER_DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.name+=Je;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ds(t)?Su(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ut.PUBLIC,!1)?this.state=C.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ut.SYSTEM,!1)?this.state=C.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(V.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.QUOTATION_MARK:{this._err(V.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(V.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(V.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(V.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case _.QUOTATION_MARK:{this.state=C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.publicId+=Je;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case _.APOSTROPHE:{this.state=C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.publicId+=Je;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.QUOTATION_MARK:{this._err(V.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(V.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.QUOTATION_MARK:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.QUOTATION_MARK:{this._err(V.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(V.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(V.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(V.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case _.QUOTATION_MARK:{this.state=C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.systemId+=Je;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case _.APOSTROPHE:{this.state=C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.systemId+=Je;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.NULL:{this._err(V.unexpectedNullCharacter);break}case _.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case _.RIGHT_SQUARE_BRACKET:{this.state=C.CDATA_SECTION_BRACKET;break}case _.EOF:{this._err(V.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===_.RIGHT_SQUARE_BRACKET?this.state=C.CDATA_SECTION_END:(this._emitChars("]"),this.state=C.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case _.GREATER_THAN_SIGN:{this.state=C.DATA;break}case _.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=C.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(_.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Rm(this.preprocessor.peek(1))?C.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Rm(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===_.SEMICOLON&&this._err(V.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const ng=new Set([p.DD,p.DT,p.LI,p.OPTGROUP,p.OPTION,p.P,p.RB,p.RP,p.RT,p.RTC]),Dm=new Set([...ng,p.CAPTION,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]),Pu=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),QN=new Set([...Pu,p.OL,p.UL]),GN=new Set([...Pu,p.BUTTON]),Pm=new Set([p.ANNOTATION_XML,p.MI,p.MN,p.MO,p.MS,p.MTEXT]),Mm=new Set([p.DESC,p.FOREIGN_OBJECT,p.TITLE]),KN=new Set([p.TR,p.TEMPLATE,p.HTML]),XN=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),JN=new Set([p.TABLE,p.TEMPLATE,p.HTML]),ZN=new Set([p.TD,p.TH]);class eA{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,s){this.treeAdapter=n,this.handler=s,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=p.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===p.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===X.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const s=this._indexOf(t);this.items[s]=n,s===this.stackTop&&(this.current=n)}insertAfter(t,n,s){const a=this._indexOf(t)+1;this.items.splice(a,0,n),this.tagIDs.splice(a,0,s),this.stackTop++,a===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,a===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==X.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const s=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(s,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Mc,X.HTML)}popUntilTableCellPopped(){this.popUntilPopped(ZN,X.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let s=this.stackTop;s>=0;s--)if(t.has(this.tagIDs[s])&&this.treeAdapter.getNamespaceURI(this.items[s])===n)return s;return-1}clearBackTo(t,n){const s=this._indexOfTagNames(t,n);this.shortenToLength(s+1)}clearBackToTableContext(){this.clearBackTo(JN,X.HTML)}clearBackToTableBodyContext(){this.clearBackTo(XN,X.HTML)}clearBackToTableRowContext(){this.clearBackTo(KN,X.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===p.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===p.HTML}hasInDynamicScope(t,n){for(let s=this.stackTop;s>=0;s--){const a=this.tagIDs[s];switch(this.treeAdapter.getNamespaceURI(this.items[s])){case X.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case X.SVG:{if(Mm.has(a))return!1;break}case X.MATHML:{if(Pm.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Pu)}hasInListItemScope(t){return this.hasInDynamicScope(t,QN)}hasInButtonScope(t){return this.hasInDynamicScope(t,GN)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case X.HTML:{if(Mc.has(n))return!0;if(Pu.has(n))return!1;break}case X.SVG:{if(Mm.has(n))return!1;break}case X.MATHML:{if(Pm.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===X.HTML)switch(this.tagIDs[n]){case t:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===X.HTML)switch(this.tagIDs[t]){case p.TBODY:case p.THEAD:case p.TFOOT:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===X.HTML)switch(this.tagIDs[n]){case t:return!0;case p.OPTION:case p.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&ng.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Dm.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Dm.has(this.currentTagId);)this.pop()}}const gc=3;var vn;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(vn||(vn={}));const Fm={type:vn.Marker};class tA{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const s=[],a=n.length,o=this.treeAdapter.getTagName(t),l=this.treeAdapter.getNamespaceURI(t);for(let d=0;d<this.entries.length;d++){const f=this.entries[d];if(f.type===vn.Marker)break;const{element:h}=f;if(this.treeAdapter.getTagName(h)===o&&this.treeAdapter.getNamespaceURI(h)===l){const E=this.treeAdapter.getAttrList(h);E.length===a&&s.push({idx:d,attrs:E})}}return s}_ensureNoahArkCondition(t){if(this.entries.length<gc)return;const n=this.treeAdapter.getAttrList(t),s=this._getNoahArkConditionCandidates(t,n);if(s.length<gc)return;const a=new Map(n.map(l=>[l.name,l.value]));let o=0;for(let l=0;l<s.length;l++){const d=s[l];d.attrs.every(f=>a.get(f.name)===f.value)&&(o+=1,o>=gc&&this.entries.splice(d.idx,1))}}insertMarker(){this.entries.unshift(Fm)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:vn.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const s=this.entries.indexOf(this.bookmark);this.entries.splice(s,0,{type:vn.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Fm);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(s=>s.type===vn.Marker||this.treeAdapter.getTagName(s.element)===t);return n&&n.type===vn.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===vn.Element&&n.element===t)}}const mr={createDocument(){return{nodeName:"#document",mode:sn.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){const s=e.childNodes.indexOf(n);e.childNodes.splice(s,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,s){const a=e.childNodes.find(o=>o.nodeName==="#documentType");if(a)a.name=t,a.publicId=n,a.systemId=s;else{const o={nodeName:"#documentType",name:t,publicId:n,systemId:s,parentNode:null};mr.appendChild(e,o)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(mr.isTextNode(n)){n.value+=t;return}}mr.appendChild(e,mr.createTextNode(t))},insertTextBefore(e,t,n){const s=e.childNodes[e.childNodes.indexOf(n)-1];s&&mr.isTextNode(s)?s.value+=t:mr.insertBefore(e,mr.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(s=>s.name));for(let s=0;s<t.length;s++)n.has(t[s].name)||e.attrs.push(t[s])},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}}},rg="html",nA="about:legacy-compat",rA="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",ig=["+//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//"],iA=[...ig,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],sA=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),sg=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],aA=[...sg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Bm(e,t){return t.some(n=>e.startsWith(n))}function uA(e){return e.name===rg&&e.publicId===null&&(e.systemId===null||e.systemId===nA)}function oA(e){if(e.name!==rg)return sn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===rA)return sn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),sA.has(n))return sn.QUIRKS;let s=t===null?iA:ig;if(Bm(n,s))return sn.QUIRKS;if(s=t===null?sg:aA,Bm(n,s))return sn.LIMITED_QUIRKS}return sn.NO_QUIRKS}const Um={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},lA="definitionurl",cA="definitionURL",dA=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),fA=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:X.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:X.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:X.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:X.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:X.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:X.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:X.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:X.XML}],["xml:space",{prefix:"xml",name:"space",namespace:X.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:X.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:X.XMLNS}]]),hA=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),pA=new Set([p.B,p.BIG,p.BLOCKQUOTE,p.BODY,p.BR,p.CENTER,p.CODE,p.DD,p.DIV,p.DL,p.DT,p.EM,p.EMBED,p.H1,p.H2,p.H3,p.H4,p.H5,p.H6,p.HEAD,p.HR,p.I,p.IMG,p.LI,p.LISTING,p.MENU,p.META,p.NOBR,p.OL,p.P,p.PRE,p.RUBY,p.S,p.SMALL,p.SPAN,p.STRONG,p.STRIKE,p.SUB,p.SUP,p.TABLE,p.TT,p.U,p.UL,p.VAR]);function mA(e){const t=e.tagID;return t===p.FONT&&e.attrs.some(({name:s})=>s===$r.COLOR||s===$r.SIZE||s===$r.FACE)||pA.has(t)}function ag(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===lA){e.attrs[t].name=cA;break}}function ug(e){for(let t=0;t<e.attrs.length;t++){const n=dA.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function xd(e){for(let t=0;t<e.attrs.length;t++){const n=fA.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 gA(e){const t=hA.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Mi(e.tagName))}function EA(e,t){return t===X.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function TA(e,t,n){if(t===X.MATHML&&e===p.ANNOTATION_XML){for(let s=0;s<n.length;s++)if(n[s].name===$r.ENCODING){const a=n[s].value.toLowerCase();return a===Um.TEXT_HTML||a===Um.APPLICATION_XML}}return t===X.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function yA(e,t,n,s){return(!s||s===X.HTML)&&TA(e,t,n)||(!s||s===X.MATHML)&&EA(e,t)}const xA="hidden",bA=8,kA=3;var R;(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"})(R||(R={}));const SA={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},og=new Set([p.TABLE,p.TBODY,p.TFOOT,p.THEAD,p.TR]),Hm={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:mr,onParseError:null};class jm{constructor(t,n,s=null,a=null){this.fragmentContext=s,this.scriptHandler=a,this.currentToken=null,this.stopped=!1,this.insertionMode=R.INITIAL,this.originalInsertionMode=R.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={...Hm,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new qN(this.options,this),this.activeFormattingElements=new tA(this.treeAdapter),this.fragmentContextID=s?Mi(this.treeAdapter.getTagName(s)):p.UNKNOWN,this._setContextModes(s??this.document,this.fragmentContextID),this.openElements=new eA(this.document,this.treeAdapter,this)}static parse(t,n){const s=new this(n);return s.tokenizer.write(t,!0),s.document}static getFragmentParser(t,n){const s={...Hm,...n};t??(t=s.treeAdapter.createElement(H.TEMPLATE,X.HTML,[]));const a=s.treeAdapter.createElement("documentmock",X.HTML,[]),o=new this(s,a,t);return o.fragmentContextID===p.TEMPLATE&&o.tmplInsertionModeStack.unshift(R.IN_TEMPLATE),o._initTokenizerForFragmentParsing(),o._insertFakeRootElement(),o._resetInsertionMode(),o._findFormInFragmentContext(),o}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,s){var a;if(!this.onParseError)return;const o=(a=t.location)!==null&&a!==void 0?a:SA,l={code:n,startLine:o.startLine,startCol:o.startCol,startOffset:o.startOffset,endLine:s?o.startLine:o.endLine,endCol:s?o.startCol:o.endCol,endOffset:s?o.startOffset:o.endOffset};this.onParseError(l)}onItemPush(t,n,s){var a,o;(o=(a=this.treeAdapter).onItemPush)===null||o===void 0||o.call(a,t),s&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var s,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(s=this.treeAdapter).onItemPop)===null||a===void 0||a.call(s,t,this.openElements.current),n){let o,l;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,l=this.fragmentContextID):{current:o,currentTagId:l}=this.openElements,this._setContextModes(o,l)}}_setContextModes(t,n){const s=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===X.HTML;this.currentNotInHTML=!s,this.tokenizer.inForeignNode=!s&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,X.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=R.TEXT}switchToPlaintextParsing(){this.insertionMode=R.TEXT,this.originalInsertionMode=R.IN_BODY,this.tokenizer.state=st.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===H.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==X.HTML))switch(this.fragmentContextID){case p.TITLE:case p.TEXTAREA:{this.tokenizer.state=st.RCDATA;break}case p.STYLE:case p.XMP:case p.IFRAME:case p.NOEMBED:case p.NOFRAMES:case p.NOSCRIPT:{this.tokenizer.state=st.RAWTEXT;break}case p.SCRIPT:{this.tokenizer.state=st.SCRIPT_DATA;break}case p.PLAINTEXT:{this.tokenizer.state=st.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",s=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,s,a),t.location){const l=this.treeAdapter.getChildNodes(this.document).find(d=>this.treeAdapter.isDocumentTypeNode(d));l&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const s=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,s)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const s=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(s??this.document,t)}}_appendElement(t,n){const s=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(s,t.location)}_insertElement(t,n){const s=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(s,t.location),this.openElements.push(s,t.tagID)}_insertFakeElement(t,n){const s=this.treeAdapter.createElement(t,X.HTML,[]);this._attachElementToTree(s,null),this.openElements.push(s,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,X.HTML,t.attrs),s=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,s),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(H.HTML,X.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,p.HTML)}_appendCommentNode(t,n){const s=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,s),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_insertCharacters(t){let n,s;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:s}=this._findFosterParentingLocation(),s?this.treeAdapter.insertTextBefore(n,t.chars,s):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const a=this.treeAdapter.getChildNodes(n),o=s?a.lastIndexOf(s):a.length,l=a[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(l)){const{endLine:f,endCol:h,endOffset:E}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(l,{endLine:f,endCol:h,endOffset:E})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}_adoptNodes(t,n){for(let s=this.treeAdapter.getFirstChild(t);s;s=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(s),this.treeAdapter.appendChild(n,s)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const s=n.location,a=this.treeAdapter.getTagName(t),o=n.type===Pe.END_TAG&&a===n.tagName?{endTag:{...s},endLine:s.endLine,endCol:s.endCol,endOffset:s.endOffset}:{endLine:s.startLine,endCol:s.startCol,endOffset:s.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,o)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,s;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,s=this.fragmentContextID):{current:n,currentTagId:s}=this.openElements,t.tagID===p.SVG&&this.treeAdapter.getTagName(n)===H.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===X.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===p.MGLYPH||t.tagID===p.MALIGNMARK)&&s!==void 0&&!this._isIntegrationPoint(s,n,X.HTML)}_processToken(t){switch(t.type){case Pe.CHARACTER:{this.onCharacter(t);break}case Pe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Pe.COMMENT:{this.onComment(t);break}case Pe.DOCTYPE:{this.onDoctype(t);break}case Pe.START_TAG:{this._processStartTag(t);break}case Pe.END_TAG:{this.onEndTag(t);break}case Pe.EOF:{this.onEof(t);break}case Pe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,s){const a=this.treeAdapter.getNamespaceURI(n),o=this.treeAdapter.getAttrList(n);return yA(t,a,o,s)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===vn.Marker||this.openElements.contains(a.element)),s=n===-1?t-1:n-1;for(let a=s;a>=0;a--){const o=this.activeFormattingElements.entries[a];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=R.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(p.P),this.openElements.popUntilTagNamePopped(p.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case p.TR:{this.insertionMode=R.IN_ROW;return}case p.TBODY:case p.THEAD:case p.TFOOT:{this.insertionMode=R.IN_TABLE_BODY;return}case p.CAPTION:{this.insertionMode=R.IN_CAPTION;return}case p.COLGROUP:{this.insertionMode=R.IN_COLUMN_GROUP;return}case p.TABLE:{this.insertionMode=R.IN_TABLE;return}case p.BODY:{this.insertionMode=R.IN_BODY;return}case p.FRAMESET:{this.insertionMode=R.IN_FRAMESET;return}case p.SELECT:{this._resetInsertionModeForSelect(t);return}case p.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case p.HTML:{this.insertionMode=this.headElement?R.AFTER_HEAD:R.BEFORE_HEAD;return}case p.TD:case p.TH:{if(t>0){this.insertionMode=R.IN_CELL;return}break}case p.HEAD:{if(t>0){this.insertionMode=R.IN_HEAD;return}break}}this.insertionMode=R.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const s=this.openElements.tagIDs[n];if(s===p.TEMPLATE)break;if(s===p.TABLE){this.insertionMode=R.IN_SELECT_IN_TABLE;return}}this.insertionMode=R.IN_SELECT}_isElementCausesFosterParenting(t){return og.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case p.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===X.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case p.TABLE:{const s=this.treeAdapter.getParentNode(n);return s?{parent:s,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const s=this.treeAdapter.getNamespaceURI(t);return $N[s].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Zv(this,t);return}switch(this.insertionMode){case R.INITIAL:{Is(this,t);break}case R.BEFORE_HTML:{Bs(this,t);break}case R.BEFORE_HEAD:{Us(this,t);break}case R.IN_HEAD:{Hs(this,t);break}case R.IN_HEAD_NO_SCRIPT:{js(this,t);break}case R.AFTER_HEAD:{zs(this,t);break}case R.IN_BODY:case R.IN_CAPTION:case R.IN_CELL:case R.IN_TEMPLATE:{cg(this,t);break}case R.TEXT:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case R.IN_TABLE:case R.IN_TABLE_BODY:case R.IN_ROW:{Ec(this,t);break}case R.IN_TABLE_TEXT:{gg(this,t);break}case R.IN_COLUMN_GROUP:{Mu(this,t);break}case R.AFTER_BODY:{Fu(this,t);break}case R.AFTER_AFTER_BODY:{wu(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Jv(this,t);return}switch(this.insertionMode){case R.INITIAL:{Is(this,t);break}case R.BEFORE_HTML:{Bs(this,t);break}case R.BEFORE_HEAD:{Us(this,t);break}case R.IN_HEAD:{Hs(this,t);break}case R.IN_HEAD_NO_SCRIPT:{js(this,t);break}case R.AFTER_HEAD:{zs(this,t);break}case R.TEXT:{this._insertCharacters(t);break}case R.IN_TABLE:case R.IN_TABLE_BODY:case R.IN_ROW:{Ec(this,t);break}case R.IN_COLUMN_GROUP:{Mu(this,t);break}case R.AFTER_BODY:{Fu(this,t);break}case R.AFTER_AFTER_BODY:{wu(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Fc(this,t);return}switch(this.insertionMode){case R.INITIAL:case R.BEFORE_HTML:case R.BEFORE_HEAD:case R.IN_HEAD:case R.IN_HEAD_NO_SCRIPT:case R.AFTER_HEAD:case R.IN_BODY:case R.IN_TABLE:case R.IN_CAPTION:case R.IN_COLUMN_GROUP:case R.IN_TABLE_BODY:case R.IN_ROW:case R.IN_CELL:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:case R.IN_TEMPLATE:case R.IN_FRAMESET:case R.AFTER_FRAMESET:{Fc(this,t);break}case R.IN_TABLE_TEXT:{Ls(this,t);break}case R.AFTER_BODY:{IA(this,t);break}case R.AFTER_AFTER_BODY:case R.AFTER_AFTER_FRAMESET:{LA(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case R.INITIAL:{RA(this,t);break}case R.BEFORE_HEAD:case R.IN_HEAD:case R.IN_HEAD_NO_SCRIPT:case R.AFTER_HEAD:{this._err(t,V.misplacedDoctype);break}case R.IN_TABLE_TEXT:{Ls(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,V.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?ew(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case R.INITIAL:{Is(this,t);break}case R.BEFORE_HTML:{OA(this,t);break}case R.BEFORE_HEAD:{PA(this,t);break}case R.IN_HEAD:{xn(this,t);break}case R.IN_HEAD_NO_SCRIPT:{BA(this,t);break}case R.AFTER_HEAD:{HA(this,t);break}case R.IN_BODY:{wt(this,t);break}case R.IN_TABLE:{Ii(this,t);break}case R.IN_TABLE_TEXT:{Ls(this,t);break}case R.IN_CAPTION:{Mv(this,t);break}case R.IN_COLUMN_GROUP:{Sd(this,t);break}case R.IN_TABLE_BODY:{eo(this,t);break}case R.IN_ROW:{to(this,t);break}case R.IN_CELL:{Uv(this,t);break}case R.IN_SELECT:{yg(this,t);break}case R.IN_SELECT_IN_TABLE:{jv(this,t);break}case R.IN_TEMPLATE:{$v(this,t);break}case R.AFTER_BODY:{Yv(this,t);break}case R.IN_FRAMESET:{Vv(this,t);break}case R.AFTER_FRAMESET:{Qv(this,t);break}case R.AFTER_AFTER_BODY:{Kv(this,t);break}case R.AFTER_AFTER_FRAMESET:{Xv(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?tw(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case R.INITIAL:{Is(this,t);break}case R.BEFORE_HTML:{DA(this,t);break}case R.BEFORE_HEAD:{MA(this,t);break}case R.IN_HEAD:{FA(this,t);break}case R.IN_HEAD_NO_SCRIPT:{UA(this,t);break}case R.AFTER_HEAD:{jA(this,t);break}case R.IN_BODY:{Zu(this,t);break}case R.TEXT:{Nv(this,t);break}case R.IN_TABLE:{Qs(this,t);break}case R.IN_TABLE_TEXT:{Ls(this,t);break}case R.IN_CAPTION:{Fv(this,t);break}case R.IN_COLUMN_GROUP:{Bv(this,t);break}case R.IN_TABLE_BODY:{Bc(this,t);break}case R.IN_ROW:{Tg(this,t);break}case R.IN_CELL:{Hv(this,t);break}case R.IN_SELECT:{xg(this,t);break}case R.IN_SELECT_IN_TABLE:{zv(this,t);break}case R.IN_TEMPLATE:{Wv(this,t);break}case R.AFTER_BODY:{kg(this,t);break}case R.IN_FRAMESET:{qv(this,t);break}case R.AFTER_FRAMESET:{Gv(this,t);break}case R.AFTER_AFTER_BODY:{wu(this,t);break}}}onEof(t){switch(this.insertionMode){case R.INITIAL:{Is(this,t);break}case R.BEFORE_HTML:{Bs(this,t);break}case R.BEFORE_HEAD:{Us(this,t);break}case R.IN_HEAD:{Hs(this,t);break}case R.IN_HEAD_NO_SCRIPT:{js(this,t);break}case R.AFTER_HEAD:{zs(this,t);break}case R.IN_BODY:case R.IN_TABLE:case R.IN_CAPTION:case R.IN_COLUMN_GROUP:case R.IN_TABLE_BODY:case R.IN_ROW:case R.IN_CELL:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:{pg(this,t);break}case R.TEXT:{Av(this,t);break}case R.IN_TABLE_TEXT:{Ls(this,t);break}case R.IN_TEMPLATE:{bg(this,t);break}case R.AFTER_BODY:case R.IN_FRAMESET:case R.AFTER_FRAMESET:case R.AFTER_AFTER_BODY:case R.AFTER_AFTER_FRAMESET:{kd(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===_.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case R.IN_HEAD:case R.IN_HEAD_NO_SCRIPT:case R.AFTER_HEAD:case R.TEXT:case R.IN_COLUMN_GROUP:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:case R.IN_FRAMESET:case R.AFTER_FRAMESET:{this._insertCharacters(t);break}case R.IN_BODY:case R.IN_CAPTION:case R.IN_CELL:case R.IN_TEMPLATE:case R.AFTER_BODY:case R.AFTER_AFTER_BODY:case R.AFTER_AFTER_FRAMESET:{lg(this,t);break}case R.IN_TABLE:case R.IN_TABLE_BODY:case R.IN_ROW:{Ec(this,t);break}case R.IN_TABLE_TEXT:{mg(this,t);break}}}}function _A(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):hg(e,t),n}function CA(e,t){let n=null,s=e.openElements.stackTop;for(;s>=0;s--){const a=e.openElements.items[s];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[s])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(s,0)),e.activeFormattingElements.removeEntry(t)),n}function NA(e,t,n){let s=t,a=e.openElements.getCommonAncestor(t);for(let o=0,l=a;l!==n;o++,l=a){a=e.openElements.getCommonAncestor(l);const d=e.activeFormattingElements.getElementEntry(l),f=d&&o>=kA;!d||f?(f&&e.activeFormattingElements.removeEntry(d),e.openElements.remove(l)):(l=AA(e,d),s===t&&(e.activeFormattingElements.bookmark=d),e.treeAdapter.detachNode(s),e.treeAdapter.appendChild(l,s),s=l)}return s}function AA(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),s=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,s),t.element=s,s}function vA(e,t,n){const s=e.treeAdapter.getTagName(t),a=Mi(s);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const o=e.treeAdapter.getNamespaceURI(t);a===p.TEMPLATE&&o===X.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function wA(e,t,n){const s=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,o=e.treeAdapter.createElement(a.tagName,s,a.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,a.tagID)}function bd(e,t){for(let n=0;n<bA;n++){const s=_A(e,t);if(!s)break;const a=CA(e,s);if(!a)break;e.activeFormattingElements.bookmark=s;const o=NA(e,a,s.element),l=e.openElements.getCommonAncestor(s.element);e.treeAdapter.detachNode(o),l&&vA(e,l,o),wA(e,a,s)}}function Fc(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function IA(e,t){e._appendCommentNode(t,e.openElements.items[0])}function LA(e,t){e._appendCommentNode(t,e.document)}function kd(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let s=e.openElements.stackTop;s>=n;s--)e._setEndLocation(e.openElements.items[s],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const s=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(s);if(a&&!a.endTag&&(e._setEndLocation(s,t),e.openElements.stackTop>=1)){const o=e.openElements.items[1],l=e.treeAdapter.getNodeSourceCodeLocation(o);l&&!l.endTag&&e._setEndLocation(o,t)}}}}function RA(e,t){e._setDocumentType(t);const n=t.forceQuirks?sn.QUIRKS:oA(t);uA(t)||e._err(t,V.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=R.BEFORE_HTML}function Is(e,t){e._err(t,V.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,sn.QUIRKS),e.insertionMode=R.BEFORE_HTML,e._processToken(t)}function OA(e,t){t.tagID===p.HTML?(e._insertElement(t,X.HTML),e.insertionMode=R.BEFORE_HEAD):Bs(e,t)}function DA(e,t){const n=t.tagID;(n===p.HTML||n===p.HEAD||n===p.BODY||n===p.BR)&&Bs(e,t)}function Bs(e,t){e._insertFakeRootElement(),e.insertionMode=R.BEFORE_HEAD,e._processToken(t)}function PA(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.HEAD:{e._insertElement(t,X.HTML),e.headElement=e.openElements.current,e.insertionMode=R.IN_HEAD;break}default:Us(e,t)}}function MA(e,t){const n=t.tagID;n===p.HEAD||n===p.BODY||n===p.HTML||n===p.BR?Us(e,t):e._err(t,V.endTagWithoutMatchingOpenElement)}function Us(e,t){e._insertFakeElement(H.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=R.IN_HEAD,e._processToken(t)}function xn(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:{e._appendElement(t,X.HTML),t.ackSelfClosing=!0;break}case p.TITLE:{e._switchToTextParsing(t,st.RCDATA);break}case p.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,st.RAWTEXT):(e._insertElement(t,X.HTML),e.insertionMode=R.IN_HEAD_NO_SCRIPT);break}case p.NOFRAMES:case p.STYLE:{e._switchToTextParsing(t,st.RAWTEXT);break}case p.SCRIPT:{e._switchToTextParsing(t,st.SCRIPT_DATA);break}case p.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=R.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(R.IN_TEMPLATE);break}case p.HEAD:{e._err(t,V.misplacedStartTagForHeadElement);break}default:Hs(e,t)}}function FA(e,t){switch(t.tagID){case p.HEAD:{e.openElements.pop(),e.insertionMode=R.AFTER_HEAD;break}case p.BODY:case p.BR:case p.HTML:{Hs(e,t);break}case p.TEMPLATE:{Gr(e,t);break}default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function Gr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==p.TEMPLATE&&e._err(t,V.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,V.endTagWithoutMatchingOpenElement)}function Hs(e,t){e.openElements.pop(),e.insertionMode=R.AFTER_HEAD,e._processToken(t)}function BA(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.BASEFONT:case p.BGSOUND:case p.HEAD:case p.LINK:case p.META:case p.NOFRAMES:case p.STYLE:{xn(e,t);break}case p.NOSCRIPT:{e._err(t,V.nestedNoscriptInHead);break}default:js(e,t)}}function UA(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=R.IN_HEAD;break}case p.BR:{js(e,t);break}default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function js(e,t){const n=t.type===Pe.EOF?V.openElementsLeftAfterEof:V.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=R.IN_HEAD,e._processToken(t)}function HA(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.BODY:{e._insertElement(t,X.HTML),e.framesetOk=!1,e.insertionMode=R.IN_BODY;break}case p.FRAMESET:{e._insertElement(t,X.HTML),e.insertionMode=R.IN_FRAMESET;break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{e._err(t,V.abandonedHeadElementChild),e.openElements.push(e.headElement,p.HEAD),xn(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,V.misplacedStartTagForHeadElement);break}default:zs(e,t)}}function jA(e,t){switch(t.tagID){case p.BODY:case p.HTML:case p.BR:{zs(e,t);break}case p.TEMPLATE:{Gr(e,t);break}default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function zs(e,t){e._insertFakeElement(H.BODY,p.BODY),e.insertionMode=R.IN_BODY,Ju(e,t)}function Ju(e,t){switch(t.type){case Pe.CHARACTER:{cg(e,t);break}case Pe.WHITESPACE_CHARACTER:{lg(e,t);break}case Pe.COMMENT:{Fc(e,t);break}case Pe.START_TAG:{wt(e,t);break}case Pe.END_TAG:{Zu(e,t);break}case Pe.EOF:{pg(e,t);break}}}function lg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function cg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function zA(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function $A(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function WA(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,X.HTML),e.insertionMode=R.IN_FRAMESET)}function YA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,X.HTML)}function VA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Mc.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,X.HTML)}function qA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,X.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function QA(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,X.HTML),n||(e.formElement=e.openElements.current))}function GA(e,t){e.framesetOk=!1;const n=t.tagID;for(let s=e.openElements.stackTop;s>=0;s--){const a=e.openElements.tagIDs[s];if(n===p.LI&&a===p.LI||(n===p.DD||n===p.DT)&&(a===p.DD||a===p.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==p.ADDRESS&&a!==p.DIV&&a!==p.P&&e._isSpecialElement(e.openElements.items[s],a))break}e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,X.HTML)}function KA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,X.HTML),e.tokenizer.state=st.PLAINTEXT}function XA(e,t){e.openElements.hasInScope(p.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML),e.framesetOk=!1}function JA(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(H.A);n&&(bd(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ZA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ev(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(bd(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,X.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function tv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function nv(e,t){e.treeAdapter.getDocumentMode(e.document)!==sn.QUIRKS&&e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,X.HTML),e.framesetOk=!1,e.insertionMode=R.IN_TABLE}function dg(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,X.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function fg(e){const t=eg(e,$r.TYPE);return t!=null&&t.toLowerCase()===xA}function rv(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,X.HTML),fg(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function iv(e,t){e._appendElement(t,X.HTML),t.ackSelfClosing=!0}function sv(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,X.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function av(e,t){t.tagName=H.IMG,t.tagID=p.IMG,dg(e,t)}function uv(e,t){e._insertElement(t,X.HTML),e.skipNextNewLine=!0,e.tokenizer.state=st.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=R.TEXT}function ov(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,st.RAWTEXT)}function lv(e,t){e.framesetOk=!1,e._switchToTextParsing(t,st.RAWTEXT)}function zm(e,t){e._switchToTextParsing(t,st.RAWTEXT)}function cv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===R.IN_TABLE||e.insertionMode===R.IN_CAPTION||e.insertionMode===R.IN_TABLE_BODY||e.insertionMode===R.IN_ROW||e.insertionMode===R.IN_CELL?R.IN_SELECT_IN_TABLE:R.IN_SELECT}function dv(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML)}function fv(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,X.HTML)}function hv(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(p.RTC),e._insertElement(t,X.HTML)}function pv(e,t){e._reconstructActiveFormattingElements(),ag(t),xd(t),t.selfClosing?e._appendElement(t,X.MATHML):e._insertElement(t,X.MATHML),t.ackSelfClosing=!0}function mv(e,t){e._reconstructActiveFormattingElements(),ug(t),xd(t),t.selfClosing?e._appendElement(t,X.SVG):e._insertElement(t,X.SVG),t.ackSelfClosing=!0}function $m(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML)}function wt(e,t){switch(t.tagID){case p.I:case p.S:case p.B:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.SMALL:case p.STRIKE:case p.STRONG:{ZA(e,t);break}case p.A:{JA(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{VA(e,t);break}case p.P:case p.DL:case p.OL:case p.UL:case p.DIV:case p.DIR:case p.NAV:case p.MAIN:case p.MENU:case p.ASIDE:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.DETAILS:case p.ADDRESS:case p.ARTICLE:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{YA(e,t);break}case p.LI:case p.DD:case p.DT:{GA(e,t);break}case p.BR:case p.IMG:case p.WBR:case p.AREA:case p.EMBED:case p.KEYGEN:{dg(e,t);break}case p.HR:{sv(e,t);break}case p.RB:case p.RTC:{fv(e,t);break}case p.RT:case p.RP:{hv(e,t);break}case p.PRE:case p.LISTING:{qA(e,t);break}case p.XMP:{ov(e,t);break}case p.SVG:{mv(e,t);break}case p.HTML:{zA(e,t);break}case p.BASE:case p.LINK:case p.META:case p.STYLE:case p.TITLE:case p.SCRIPT:case p.BGSOUND:case p.BASEFONT:case p.TEMPLATE:{xn(e,t);break}case p.BODY:{$A(e,t);break}case p.FORM:{QA(e,t);break}case p.NOBR:{ev(e,t);break}case p.MATH:{pv(e,t);break}case p.TABLE:{nv(e,t);break}case p.INPUT:{rv(e,t);break}case p.PARAM:case p.TRACK:case p.SOURCE:{iv(e,t);break}case p.IMAGE:{av(e,t);break}case p.BUTTON:{XA(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{tv(e,t);break}case p.IFRAME:{lv(e,t);break}case p.SELECT:{cv(e,t);break}case p.OPTION:case p.OPTGROUP:{dv(e,t);break}case p.NOEMBED:case p.NOFRAMES:{zm(e,t);break}case p.FRAMESET:{WA(e,t);break}case p.TEXTAREA:{uv(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?zm(e,t):$m(e,t);break}case p.PLAINTEXT:{KA(e,t);break}case p.COL:case p.TH:case p.TD:case p.TR:case p.HEAD:case p.FRAME:case p.TBODY:case p.TFOOT:case p.THEAD:case p.CAPTION:case p.COLGROUP:break;default:$m(e,t)}}function gv(e,t){if(e.openElements.hasInScope(p.BODY)&&(e.insertionMode=R.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Ev(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=R.AFTER_BODY,kg(e,t))}function Tv(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function yv(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(p.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(p.FORM):n&&e.openElements.remove(n))}function xv(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement(H.P,p.P),e._closePElement()}function bv(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function kv(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Sv(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function _v(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Cv(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(H.BR,p.BR),e.openElements.pop(),e.framesetOk=!1}function hg(e,t){const n=t.tagName,s=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const o=e.openElements.items[a],l=e.openElements.tagIDs[a];if(s===l&&(s!==p.UNKNOWN||e.treeAdapter.getTagName(o)===n)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(o,l))break}}function Zu(e,t){switch(t.tagID){case p.A:case p.B:case p.I:case p.S:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.NOBR:case p.SMALL:case p.STRIKE:case p.STRONG:{bd(e,t);break}case p.P:{xv(e);break}case p.DL:case p.UL:case p.OL:case p.DIR:case p.DIV:case p.NAV:case p.PRE:case p.MAIN:case p.MENU:case p.ASIDE:case p.BUTTON:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.ADDRESS:case p.ARTICLE:case p.DETAILS:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.LISTING:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{Tv(e,t);break}case p.LI:{bv(e);break}case p.DD:case p.DT:{kv(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{Sv(e);break}case p.BR:{Cv(e);break}case p.BODY:{gv(e,t);break}case p.HTML:{Ev(e,t);break}case p.FORM:{yv(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{_v(e,t);break}case p.TEMPLATE:{Gr(e,t);break}default:hg(e,t)}}function pg(e,t){e.tmplInsertionModeStack.length>0?bg(e,t):kd(e,t)}function Nv(e,t){var n;t.tagID===p.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Av(e,t){e._err(t,V.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ec(e,t){if(e.openElements.currentTagId!==void 0&&og.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=R.IN_TABLE_TEXT,t.type){case Pe.CHARACTER:{gg(e,t);break}case Pe.WHITESPACE_CHARACTER:{mg(e,t);break}}else na(e,t)}function vv(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,X.HTML),e.insertionMode=R.IN_CAPTION}function wv(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,X.HTML),e.insertionMode=R.IN_COLUMN_GROUP}function Iv(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(H.COLGROUP,p.COLGROUP),e.insertionMode=R.IN_COLUMN_GROUP,Sd(e,t)}function Lv(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,X.HTML),e.insertionMode=R.IN_TABLE_BODY}function Rv(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(H.TBODY,p.TBODY),e.insertionMode=R.IN_TABLE_BODY,eo(e,t)}function Ov(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Dv(e,t){fg(t)?e._appendElement(t,X.HTML):na(e,t),t.ackSelfClosing=!0}function Pv(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,X.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ii(e,t){switch(t.tagID){case p.TD:case p.TH:case p.TR:{Rv(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{xn(e,t);break}case p.COL:{Iv(e,t);break}case p.FORM:{Pv(e,t);break}case p.TABLE:{Ov(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{Lv(e,t);break}case p.INPUT:{Dv(e,t);break}case p.CAPTION:{vv(e,t);break}case p.COLGROUP:{wv(e,t);break}default:na(e,t)}}function Qs(e,t){switch(t.tagID){case p.TABLE:{e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode());break}case p.TEMPLATE:{Gr(e,t);break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:na(e,t)}}function na(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ju(e,t),e.fosterParentingEnabled=n}function mg(e,t){e.pendingCharacterTokens.push(t)}function gg(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ls(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)na(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Eg=new Set([p.CAPTION,p.COL,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]);function Mv(e,t){const n=t.tagID;Eg.has(n)?e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=R.IN_TABLE,Ii(e,t)):wt(e,t)}function Fv(e,t){const n=t.tagID;switch(n){case p.CAPTION:case p.TABLE:{e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=R.IN_TABLE,n===p.TABLE&&Qs(e,t));break}case p.BODY:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:Zu(e,t)}}function Sd(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.COL:{e._appendElement(t,X.HTML),t.ackSelfClosing=!0;break}case p.TEMPLATE:{xn(e,t);break}default:Mu(e,t)}}function Bv(e,t){switch(t.tagID){case p.COLGROUP:{e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=R.IN_TABLE);break}case p.TEMPLATE:{Gr(e,t);break}case p.COL:break;default:Mu(e,t)}}function Mu(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=R.IN_TABLE,e._processToken(t))}function eo(e,t){switch(t.tagID){case p.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,X.HTML),e.insertionMode=R.IN_ROW;break}case p.TH:case p.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(H.TR,p.TR),e.insertionMode=R.IN_ROW,to(e,t);break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE,Ii(e,t));break}default:Ii(e,t)}}function Bc(e,t){const n=t.tagID;switch(t.tagID){case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE);break}case p.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE,Qs(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:case p.TR:break;default:Qs(e,t)}}function to(e,t){switch(t.tagID){case p.TH:case p.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,X.HTML),e.insertionMode=R.IN_CELL,e.activeFormattingElements.insertMarker();break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE_BODY,eo(e,t));break}default:Ii(e,t)}}function Tg(e,t){switch(t.tagID){case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE_BODY);break}case p.TABLE:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE_BODY,Bc(e,t));break}case p.TBODY:case p.TFOOT:case p.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(p.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE_BODY,Bc(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:break;default:Qs(e,t)}}function Uv(e,t){const n=t.tagID;Eg.has(n)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),to(e,t)):wt(e,t)}function Hv(e,t){const n=t.tagID;switch(n){case p.TD:case p.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=R.IN_ROW);break}case p.TABLE:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Tg(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:break;default:Zu(e,t)}}function yg(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._insertElement(t,X.HTML);break}case p.OPTGROUP:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._insertElement(t,X.HTML);break}case p.HR:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._appendElement(t,X.HTML),t.ackSelfClosing=!0;break}case p.INPUT:case p.KEYGEN:case p.TEXTAREA:case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),t.tagID!==p.SELECT&&e._processStartTag(t));break}case p.SCRIPT:case p.TEMPLATE:{xn(e,t);break}}}function xg(e,t){switch(t.tagID){case p.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===p.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===p.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop();break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop();break}case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode());break}case p.TEMPLATE:{Gr(e,t);break}}}function jv(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e._processStartTag(t)):yg(e,t)}function zv(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e.onEndTag(t)):xg(e,t)}function $v(e,t){switch(t.tagID){case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{xn(e,t);break}case p.CAPTION:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.tmplInsertionModeStack[0]=R.IN_TABLE,e.insertionMode=R.IN_TABLE,Ii(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=R.IN_COLUMN_GROUP,e.insertionMode=R.IN_COLUMN_GROUP,Sd(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=R.IN_TABLE_BODY,e.insertionMode=R.IN_TABLE_BODY,eo(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=R.IN_ROW,e.insertionMode=R.IN_ROW,to(e,t);break}default:e.tmplInsertionModeStack[0]=R.IN_BODY,e.insertionMode=R.IN_BODY,wt(e,t)}}function Wv(e,t){t.tagID===p.TEMPLATE&&Gr(e,t)}function bg(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):kd(e,t)}function Yv(e,t){t.tagID===p.HTML?wt(e,t):Fu(e,t)}function kg(e,t){var n;if(t.tagID===p.HTML){if(e.fragmentContext||(e.insertionMode=R.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===p.HTML){e._setEndLocation(e.openElements.items[0],t);const s=e.openElements.items[1];s&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(s))===null||n===void 0)&&n.endTag)&&e._setEndLocation(s,t)}}else Fu(e,t)}function Fu(e,t){e.insertionMode=R.IN_BODY,Ju(e,t)}function Vv(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.FRAMESET:{e._insertElement(t,X.HTML);break}case p.FRAME:{e._appendElement(t,X.HTML),t.ackSelfClosing=!0;break}case p.NOFRAMES:{xn(e,t);break}}}function qv(e,t){t.tagID===p.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==p.FRAMESET&&(e.insertionMode=R.AFTER_FRAMESET))}function Qv(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.NOFRAMES:{xn(e,t);break}}}function Gv(e,t){t.tagID===p.HTML&&(e.insertionMode=R.AFTER_AFTER_FRAMESET)}function Kv(e,t){t.tagID===p.HTML?wt(e,t):wu(e,t)}function wu(e,t){e.insertionMode=R.IN_BODY,Ju(e,t)}function Xv(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.NOFRAMES:{xn(e,t);break}}}function Jv(e,t){t.chars=Je,e._insertCharacters(t)}function Zv(e,t){e._insertCharacters(t),e.framesetOk=!1}function Sg(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==X.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function ew(e,t){if(mA(t))Sg(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),s=e.treeAdapter.getNamespaceURI(n);s===X.MATHML?ag(t):s===X.SVG&&(gA(t),ug(t)),xd(t),t.selfClosing?e._appendElement(t,s):e._insertElement(t,s),t.ackSelfClosing=!0}}function tw(e,t){if(t.tagID===p.P||t.tagID===p.BR){Sg(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const s=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(s)===X.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(s);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}H.AREA,H.BASE,H.BASEFONT,H.BGSOUND,H.BR,H.COL,H.EMBED,H.FRAME,H.HR,H.IMG,H.INPUT,H.KEYGEN,H.LINK,H.META,H.PARAM,H.SOURCE,H.TRACK,H.WBR;const nw=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,rw=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Wm={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function _g(e,t){const n=hw(e),s=N1("type",{handlers:{root:iw,element:sw,text:aw,comment:Ng,doctype:uw,raw:lw},unknown:cw}),a={parser:n?new jm(Wm):jm.getFragmentParser(void 0,Wm),handle(d){s(d,a)},stitches:!1,options:t||{}};s(e,a),Fi(a,In());const o=n?a.parser.document:a.parser.getFragment(),l=pN(o,{file:a.options.file});return a.stitches&&Xu(l,"comment",function(d,f,h){const E=d;if(E.value.stitch&&h&&f!==void 0){const g=h.children;return g[f]=E.value.stitch,f}}),l.type==="root"&&l.children.length===1&&l.children[0].type===e.type?l.children[0]:l}function Cg(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function iw(e,t){Cg(e.children,t)}function sw(e,t){dw(e,t),Cg(e.children,t),fw(e,t)}function aw(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Pe.CHARACTER,chars:e.value,location:ra(e)};Fi(t,In(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function uw(e,t){const n={type:Pe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ra(e)};Fi(t,In(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ow(e,t){t.stitches=!0;const n=pw(e);if("children"in e&&"children"in n){const s=_g({type:"root",children:e.children},t.options);n.children=s.children}Ng({type:"comment",value:{stitch:n}},t)}function Ng(e,t){const n=e.value,s={type:Pe.COMMENT,data:n,location:ra(e)};Fi(t,In(e)),t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken)}function lw(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,Ag(t,In(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(nw,"&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;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function cw(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))ow(n,t);else{let s="";throw rw.has(n.type)&&(s=". 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"),new Error("Cannot compile `"+n.type+"` node"+s)}}function Fi(e,t){Ag(e,t);const 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=st.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 Ag(e,t){if(t&&t.offset!==void 0){const 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 dw(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===st.PLAINTEXT)return;Fi(t,In(e));const s=t.parser.openElements.current;let a="namespaceURI"in s?s.namespaceURI:jr.html;a===jr.html&&n==="svg"&&(a=jr.svg);const o=yN({...e,children:[]},{space:a===jr.svg?"svg":"html"}),l={type:Pe.START_TAG,tagName:n,tagID:Mi(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:ra(e)};t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function fw(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&AN.includes(n)||t.parser.tokenizer.state===st.PLAINTEXT)return;Fi(t,Yu(e));const s={type:Pe.END_TAG,tagName:n,tagID:Mi(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ra(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===st.RCDATA||t.parser.tokenizer.state===st.RAWTEXT||t.parser.tokenizer.state===st.SCRIPT_DATA)&&(t.parser.tokenizer.state=st.DATA)}function hw(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ra(e){const t=In(e)||{line:void 0,column:void 0,offset:void 0},n=Yu(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 pw(e){return"children"in e?Vr({...e,children:[]}):Vr(e)}function mw(e){return function(t,n){return _g(t,{...e,file:n})}}const Fr=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Uc={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Fr,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Fr],h2:[["className","sr-only"]],img:[...Fr,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Fr,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Fr],table:[...Fr],ul:[...Fr,["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"]},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"]},gr={}.hasOwnProperty;function gw(e,t){let n={type:"root",children:[]};const s={schema:t?{...Uc,...t}:Uc,stack:[]},a=vg(s,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function vg(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return Ew(e,n);case"doctype":return Tw(e,n);case"element":return yw(e,n);case"root":return xw(e,n);case"text":return bw(e,n)}}}function Ew(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",s=n.indexOf("-->"),o={type:"comment",value:s<0?n:n.slice(0,s)};return ia(o,t),o}}function Tw(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ia(n,t),n}}function yw(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const s=wg(e,t.children),a=kw(e,t.properties);e.stack.pop();let o=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(o=!0,e.schema.ancestors&&gr.call(e.schema.ancestors,n))){const d=e.schema.ancestors[n];let f=-1;for(o=!1;++f<d.length;)e.stack.includes(d[f])&&(o=!0)}if(!o)return e.schema.strip&&!e.schema.strip.includes(n)?s:void 0;const l={type:"element",tagName:n,properties:a,children:s};return ia(l,t),l}function xw(e,t){const s={type:"root",children:wg(e,t.children)};return ia(s,t),s}function bw(e,t){const s={type:"text",value:typeof t.value=="string"?t.value:""};return ia(s,t),s}function wg(e,t){const n=[];if(Array.isArray(t)){const s=t;let a=-1;for(;++a<s.length;){const o=vg(e,s[a]);o&&(Array.isArray(o)?n.push(...o):n.push(o))}}return n}function kw(e,t){const n=e.stack[e.stack.length-1],s=e.schema.attributes,a=e.schema.required,o=s&&gr.call(s,n)?s[n]:void 0,l=s&&gr.call(s,"*")?s["*"]:void 0,d=t&&typeof t=="object"?t:{},f={};let h;for(h in d)if(gr.call(d,h)){const E=d[h];let g=Ym(e,Vm(o,h),h,E);g==null&&(g=Ym(e,Vm(l,h),h,E)),g!=null&&(f[h]=g)}if(a&&gr.call(a,n)){const E=a[n];for(h in E)gr.call(E,h)&&!gr.call(f,h)&&(f[h]=E[h])}return f}function Ym(e,t,n,s){return t?Array.isArray(s)?Sw(e,t,n,s):Ig(e,t,n,s):void 0}function Sw(e,t,n,s){let a=-1;const o=[];for(;++a<s.length;){const l=Ig(e,t,n,s[a]);(typeof l=="number"||typeof l=="string")&&o.push(l)}return o}function Ig(e,t,n,s){if(!(typeof s!="boolean"&&typeof s!="number"&&typeof s!="string")&&_w(e,n,s)){if(typeof t=="object"&&t.length>1){let a=!1,o=0;for(;++o<t.length;){const l=t[o];if(l&&typeof l=="object"&&"flags"in l){if(l.test(String(s))){a=!0;break}}else if(l===s){a=!0;break}}if(!a)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+s:s}}function _w(e,t,n){const s=e.schema.protocols&&gr.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!s||s.length===0)return!0;const a=String(n),o=a.indexOf(":"),l=a.indexOf("?"),d=a.indexOf("#"),f=a.indexOf("/");if(o<0||f>-1&&o>f||l>-1&&o>l||d>-1&&o>d)return!0;let h=-1;for(;++h<s.length;){const E=s[h];if(o===E.length&&a.slice(0,E.length)===E)return!0}return!1}function ia(e,t){const n=G0(t);t.data&&(e.data=Vr(t.data)),n&&(e.position=n)}function Vm(e,t){let n,s=-1;if(e)for(;++s<e.length;){const a=e[s],o=typeof a=="string"?a:a[0];if(o===t)return a;o==="data*"&&(n=a)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Cw(e){return function(t){return gw(t,e)}}const Hc=Uc,Br=(e,...t)=>{var n;return[...((n=Hc.attributes)==null?void 0:n[e])??[],...t]},Nw={...Hc,attributes:{...Hc.attributes,p:Br("p","align"),div:Br("div","align"),h1:Br("h1","align"),h2:Br("h2","align"),h3:Br("h3","align"),img:Br("img","width","height","align"),a:Br("a","align")}},Aw=new Set(["code","pre","svg","math","style","script","textarea"]),vw="fade-word";function ww(e){const t=[];for(const n of e.split(/(\s+)/))if(n){if(/^\s+$/.test(n)){t.push({type:"text",value:n});continue}t.push({type:"element",tagName:"span",properties:{className:[vw]},children:[{type:"text",value:n}]})}return t}function Lg(e){const t=e.children;if(!t)return;const n=[];for(const s of t){if(s.type==="text"){n.push(...ww(s.value??""));continue}if(s.type==="element"&&Aw.has(s.tagName??"")){n.push(s);continue}Lg(s),n.push(s)}e.children=n}function Iw(){return e=>Lg(e)}const Lw=256*1024;let Ur=null,Rw=0;const Bu=new Map;function qm(e,t){var n;(n=Bu.get(e))==null||n(t),Bu.delete(e)}function Ow(){if(Ur)return Ur;try{Ur=new Worker(new URL("/assets/highlightWorker-DJp1Ce5p.js",import.meta.url),{type:"module"}),Ur.addEventListener("message",e=>qm(e.data.id,e.data.html)),Ur.addEventListener("error",()=>{for(const e of[...Bu.keys()])qm(e,null);Ur=null})}catch{return null}return Ur}async function _d(e,t){if(e.length>Lw)return null;const n=Ow();if(!n)return null;const s=++Rw;return new Promise(a=>{Bu.set(s,a),n.postMessage({id:s,code:e,lang:t})})}function Dw({code:e,lang:t}){const[n,s]=L.useState(null);L.useEffect(()=>{let o=!1;return _d(e,t).then(l=>{o||s(l)}).catch(()=>{o||s(null)}),()=>{o=!0}},[e,t]);const a=()=>{var o;return void((o=navigator.clipboard)==null?void 0:o.writeText(e))};return y.jsxs("div",{className:"codeblock",children:[y.jsxs("div",{className:"codeblock-bar",children:[y.jsx("span",{className:"codeblock-lang",children:t||"text"}),y.jsx("button",{className:"codeblock-copy",onClick:a,"aria-label":"Copy code",children:"copy"})]}),n?y.jsx("div",{className:"codeblock-body",dangerouslySetInnerHTML:{__html:n}}):y.jsx("pre",{className:"codeblock-body codeblock-plain",children:y.jsx("code",{children:e})})]})}let Tc=null;function Pw(){return Tc||(Tc=Sc(()=>import("./mermaid.core-BZw29KJL.js").then(e=>e.bp),[]).then(e=>(e.default.initialize({startOnLoad:!1,theme:"dark",securityLevel:"strict",themeVariables:{primaryColor:"#44475a",primaryTextColor:"#f8f8f2",primaryBorderColor:"#bd93f9",lineColor:"#8be9fd",fontFamily:"Inter, sans-serif"}}),e.default))),Tc}let Mw=0;function Fw({code:e}){const t=L.useRef(null),[n,s]=L.useState(!1);return L.useEffect(()=>{let a=!1;s(!1);const o=e.trim();if(o)return Pw().then(async l=>{const d=await l.parse(o,{suppressErrors:!0});if(a||!d)return;const{svg:f}=await l.render(`mermaid-${Mw++}`,o);a||!t.current||(t.current.innerHTML=f,s(!0))}).catch(()=>{}),()=>{a=!0}},[e]),y.jsxs("div",{className:"mermaid-wrap",children:[y.jsx("div",{className:`mermaid-block ${n?"":"is-hidden"}`,ref:t}),!n&&y.jsxs("div",{className:"codeblock",children:[y.jsx("div",{className:"codeblock-bar",children:y.jsx("span",{className:"codeblock-lang",children:"mermaid"})}),y.jsx("pre",{className:"codeblock-body codeblock-plain",children:y.jsx("code",{children:e})})]})]})}const Bw=/language-(\w+)/,Uw=/\n$/,Hw={code(e){const{className:t,children:n}=e,s=Bw.exec(t??""),a=String(n).replace(Uw,"");if(!t&&!a.includes(`
92
+ `))return y.jsx("code",{className:"md-inline-code",children:a});const l=(s==null?void 0:s[1])??"";return l==="mermaid"?y.jsx(Fw,{code:a}):y.jsx(Dw,{code:a,lang:l})},a(e){return y.jsx("a",{...e,target:"_blank",rel:"noreferrer noopener"})}};let vi=null,Qm=null;function Rg(){return Qm??(Qm=Promise.all([Sc(()=>import("./index-UeZS9SPv.js"),__vite__mapDeps([0,1])),Sc(()=>Promise.resolve({}),__vite__mapDeps([2]))]).then(([e])=>{vi=e.default})),Qm}let Gm=!1;function jw(){if(Gm||vi)return;Gm=!0;const e=()=>void Rg(),t=globalThis.requestIdleCallback;t?t(e):setTimeout(e,2e3)}const zw=/(^|[^\\])\$/,Gs=L.memo(function({text:t,html:n=!1,streaming:s=!1}){const a=L.useMemo(()=>rN(t),[t]),o=zw.test(a),[l,d]=L.useState(()=>vi!==null);L.useEffect(()=>{if(vi)return;if(!o){jw();return}let h=!0;return Rg().then(()=>{h&&d(!0)}),()=>{h=!1}},[o]);const f=L.useMemo(()=>{const h=o&&vi?[vi]:[];return n?[mw,[Cw,Nw],...h]:s?[...h,Iw]:h},[n,s,o,l]);return y.jsx("div",{className:"md",children:y.jsx(S_,{remarkPlugins:q3,rehypePlugins:f,components:Hw,children:a})})});function $w(e,t){if(!e||!t)return null;if(!t.startsWith("/"))return Xm(t.replace(/^\.\//,""));const n=Km(e),s=Xm(Km(t));return s===null||s===n?null:s.startsWith(`${n}/`)?s.slice(n.length+1):null}const Km=e=>e.replace(/\/+$/,"");function Xm(e){const t=e.startsWith("/"),n=[];for(const a of e.split("/"))if(!(a===""||a===".")){if(a!==".."){n.push(a);continue}if(n.length===0)return null;n.pop()}const s=n.join("/");return t?`/${s}`:s}const Ww=4e5;function Jm(e,t){const n=e.split(`
93
93
  `),s=t.split(`
94
94
  `),a=n.length,o=s.length;if(a*o>Ww)return[...n.map(E=>({type:"del",text:E})),...s.map(E=>({type:"add",text:E}))];const l=Array.from({length:a+1},()=>new Array(o+1).fill(0));for(let E=a-1;E>=0;E--)for(let g=o-1;g>=0;g--)l[E][g]=n[E]===s[g]?l[E+1][g+1]+1:Math.max(l[E+1][g],l[E][g+1]);const d=[];let f=0,h=0;for(;f<a&&h<o;)n[f]===s[h]?(d.push({type:"ctx",text:n[f]}),f++,h++):l[f+1][h]>=l[f][h+1]?(d.push({type:"del",text:n[f]}),f++):(d.push({type:"add",text:s[h]}),h++);for(;f<a;)d.push({type:"del",text:n[f++]});for(;h<o;)d.push({type:"add",text:s[h++]});return d}const Og={loading:"lazy",decoding:"async",ref:e=>{e!=null&&e.complete&&(e.dataset.loaded="")},onLoad:e=>{e.currentTarget.dataset.loaded=""}},En=e=>!!e&&typeof e=="object";function Cd(e){switch(e.name){case"shell":return"shell";case"write":case"strReplace":return"write";case"read":return"read";case"grep":return"grep";case"todo_list":return"todo";case"web_fetch":return"webfetch";case"web_search":return"websearch";case"introspect":return"introspect"}if(e.name)return"generic";const t=En(e.input)?e.input:{},n=e.kind,s=typeof t.command=="string"?t.command:void 0,a=o=>Object.prototype.hasOwnProperty.call(t,o);return e.title==="todo_list"||a("tasks")||a("task_list_description")||a("completed_task_ids")||a("remove_task_ids")||s!==void 0&&["complete","add","remove","list"].includes(s)?"todo":n==="read"||Array.isArray(t.operations)||e.title==="read"?"read":e.title==="grep"||typeof t.pattern=="string"&&!a("operations")?"grep":n==="edit"||e.title==="write"||e.title==="strReplace"||(s==="create"||s==="strReplace"||s==="insert")&&typeof t.path=="string"||typeof t.oldStr=="string"&&typeof t.newStr=="string"?"write":n==="execute"||e.title==="shell"||typeof t.command=="string"?"shell":typeof t.url=="string"?"webfetch":typeof t.query=="string"&&(n==="search"||e.title==="web_search")?"websearch":e.title==="introspect"||typeof t.doc_path=="string"?"introspect":"generic"}const Yw={shell:"shell",write:"write",read:"read",grep:"grep",todo:"todo_list",webfetch:"web_fetch",websearch:"web_search",introspect:"introspect",generic:void 0},Vw=/^@?([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)$/,qw=/@([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)/;function Qw(e){const t=Vw.exec(e.name??"");if(t)return`@${t[1]}/${t[2]}`;const n=qw.exec(e.title??"");return!n||e.name&&e.name!==n[2]?null:`@${n[1]}/${n[2]}`}function Gw(e){const t=Qw(e);if(t)return t;if(e.name)return e.name;const n=Yw[Cd(e)];if(n)return n;const s=e.title??"";return s&&!/\s/.test(s)?s:"tool"}function Dg(e){const t=e.trim().split("/").pop()??"",n=t.includes(".")?t.split(".").pop().toLowerCase():t.toLowerCase();return{ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",mjs:"javascript",cjs:"javascript",json:"json",jsonc:"json",css:"css",scss:"scss",less:"less",html:"html",htm:"html",xml:"xml",svg:"xml",vue:"vue",svelte:"svelte",md:"markdown",markdown:"markdown",py:"python",rb:"ruby",rs:"rust",go:"go",java:"java",kt:"kotlin",c:"c",h:"c",cpp:"cpp",cc:"cpp",hpp:"cpp",cs:"csharp",sh:"bash",bash:"bash",zsh:"bash",yml:"yaml",yaml:"yaml",toml:"toml",sql:"sql",php:"php",swift:"swift",lua:"lua",dockerfile:"docker",ini:"ini",conf:"ini",env:"ini",proto:"proto",graphql:"graphql"}[n]??"text"}function Kr(e){const t=[];for(const n of e)En(n)&&(n.type==="content"&&En(n.content)&&typeof n.content.text=="string"?t.push(n.content.text):n.type==="text"&&typeof n.text=="string"?t.push(n.text):n.kind==="text"&&typeof n.data=="string"&&t.push(n.data));return t.join("")}function Xr(e){for(const t of e)if(En(t)&&t.kind==="json"&&En(t.data))return t.data;return null}function Nd(e){const t=Object.keys(e);return t.length===1&&typeof e[t[0]]=="string"?e[t[0]]:null}function Kw(e){if(e==null)return[];if(typeof e=="string")return e?[{kind:"text",data:e}]:[];if(En(e)&&Array.isArray(e.items)){const t=[];for(const n of e.items)En(n)&&(typeof n.Text=="string"?t.push({kind:"text",data:n.Text}):En(n.Json)&&t.push({kind:"json",data:n.Json}));return t}return[]}function xr(e){return[...Array.isArray(e.content)?e.content:[],...Kw(e.output)]}function Xw(e){for(const t of e)if(En(t)&&t.type==="diff"&&typeof t.oldText=="string"&&typeof t.newText=="string")return{path:typeof t.path=="string"?t.path:void 0,oldText:t.oldText,newText:t.newText};return null}function Jw(e){let t=Xr(e);if(!t||!Array.isArray(t.tasks)){const n=Kr(e).trim();if(n.startsWith("{"))try{const s=JSON.parse(n);t=En(s)?s:null}catch{t=null}}return t&&Array.isArray(t.tasks)?t.tasks.map(n=>{const s=En(n)?n:{};return{desc:typeof s.task_description=="string"?s.task_description:"",done:s.completed===!0}}):null}const Zw=["https://cdnjs.cloudflare.com","https://cdn.jsdelivr.net","https://unpkg.com","https://esm.sh"];function eI(){const e=Zw.join(" ");return["default-src 'none'",`script-src 'unsafe-inline' ${e}`,`style-src 'unsafe-inline' ${e} https://fonts.googleapis.com`,"img-src data: blob: https:","font-src data: https:",`connect-src ${e}`].join("; ")}const tI=`
95
95
  (function () {
@@ -246,7 +246,7 @@ a { color: var(--color-accent, #bd93f9); }
246
246
  <script>${tI}<\/script>
247
247
  </body>
248
248
  </html>`}const iI=rI(),sI=256*1024;function aI(){const e=getComputedStyle(document.documentElement),t=n=>e.getPropertyValue(n).trim();return[`--color-background-primary:${t("--n0")}`,`--color-background-secondary:${t("--n1")}`,`--color-border:${t("--n2")}`,`--color-text-secondary:${t("--n4")}`,`--color-text-primary:${t("--n5")}`,`--color-accent:${t("--frost")}`,`--color-accent-alt:${t("--aurora-purple")}`,`--color-teal:${t("--frost-teal")}`,`--color-green:${t("--aurora-green")}`,`--color-yellow:${t("--aurora-yellow")}`,`--color-orange:${t("--aurora-orange")}`,`--color-red:${t("--aurora-red")}`,`--font-body:${t("--font-body")}`,`--font-mono:${t("--font-mono")}`].join(";")}function uI({code:e}){const t=L.useRef(null),[n,s]=L.useState(!1),[a,o]=L.useState(120),l=e.length>sI;L.useEffect(()=>{const f=t.current;if(!f)return;const h=E=>{if(E.source!==f.contentWindow)return;const g=E.data;(g==null?void 0:g.type)==="casper:height"&&typeof g.height=="number"?o(Math.min(Math.max(g.height,40),2e3)):(g==null?void 0:g.type)==="casper:prompt"&&typeof g.text=="string"&&O0(g.text)};return window.addEventListener("message",h),()=>window.removeEventListener("message",h)},[]),L.useEffect(()=>{var f,h;n&&((h=(f=t.current)==null?void 0:f.contentWindow)==null||h.postMessage({type:"casper:theme",css:aI()},"*"))},[n]),L.useEffect(()=>{var f,h;!n||l||(h=(f=t.current)==null?void 0:f.contentWindow)==null||h.postMessage({type:"casper:html",html:e.trimStart()},"*")},[e,n,l]);const d=()=>s(!0);return l?y.jsxs("div",{className:"widget-error",children:["Widget is ",Math.round(e.length/1024)," KB, too large to render."]}):y.jsx("div",{className:"widget-wrap",style:{height:a},children:y.jsx("iframe",{ref:t,className:"widget-frame",title:"Widget",sandbox:"allow-scripts",srcDoc:iI,onLoad:d})})}const oI="show_widget";function Pg(e){var a;if(!((a=e.name)!=null&&a.endsWith(oI)))return null;const t=e.input??{},n=typeof t.widget_code=="string"?t.widget_code:"";return{title:typeof t.title=="string"?t.title:"",code:n}}function lI(e){return e.replace(/_/g," ").trim()}function cI({tool:e}){const t=Pg(e);return t?e.status==="failed"?y.jsxs("div",{className:"widget-error",children:["Widget ",lI(t.title)||"call"," failed."]}):t.code?y.jsx(uI,{code:t.code}):null:null}function dI(e){var o;if(!((o=e.name)!=null&&o.endsWith("show_choice")))return null;const t=e.input??{},n=typeof t.question=="string"?t.question.trim():"",s=Array.isArray(t.options)?t.options:[],a=[];for(const l of s){const d=l??{},f=typeof d.label=="string"&&d.label.trim()?d.label:"";if(!f)continue;const h=typeof d.detail=="string"&&d.detail.trim()?d.detail:void 0,E=typeof d.prompt=="string"&&d.prompt.trim()?d.prompt:f;a.push({label:f,detail:h,prompt:E})}return!n||a.length<2?null:{question:n,options:a}}function fI(e,t){if(t===null)return{picked:null,superseded:!1};const n=e.find(s=>s.prompt.trim()===t.trim());return n?{picked:n.label,superseded:!1}:{picked:null,superseded:!0}}function hI(e){var a;const{items:t,pending:n}=be.getState(),s=t.findIndex(o=>o.type==="tool_call"&&o.tool.id===e);if(s===-1)return null;for(const o of t.slice(s+1))if(o.type==="message"&&o.message.role==="user")return o.message.text;return((a=n[0])==null?void 0:a.text)??null}function pI({data:e,toolId:t}){const n=be(E=>E.items),s=be(E=>E.pending),[a,o]=L.useState(null),l=fI(e.options,n.length||s.length?hI(t):null),d=a??l.picked,f=d!==null||l.superseded,h=E=>{f||O0(E.prompt)&&o(E.label)};return y.jsxs("div",{className:"tpl-choice",children:[y.jsx("p",{className:"tpl-choice-q",children:e.question}),y.jsx("div",{className:"tpl-choice-opts",children:e.options.map(E=>{const g=d===E.label;return y.jsxs("button",{className:`tpl-choice-opt${g?" is-picked":""}`,onClick:()=>h(E),disabled:f,"aria-pressed":g,children:[y.jsx("span",{className:"tpl-choice-label",children:E.label}),E.detail&&y.jsx("span",{className:"tpl-choice-detail",children:E.detail})]},E.label)})})]})}const mI={pending:"queued",in_progress:"running",completed:"done",failed:"failed"},bt=e=>e&&typeof e=="object"?e:null,$e=e=>typeof e=="string"?e:void 0,Zm=e=>e.split("/").pop()||e;function gI(e){const t=Array.isArray(e.operations)?e.operations:[];for(const n of t){const s=bt(n);if(s&&typeof s.path=="string")return s.path;if(s&&Array.isArray(s.image_paths)&&typeof s.image_paths[0]=="string")return s.image_paths[0]}}function EI(e){const t=bt(e.input);if(!t)return null;const n=$e(t.__tool_use_purpose);if(n)return{text:n};switch(Cd(e)){case"write":{const s=$e(t.path);return s?{text:Zm(s),title:s}:null}case"read":{const s=gI(t);return s?{text:Zm(s),title:s}:null}case"grep":{const s=$e(t.pattern);return s?{text:s}:null}case"websearch":case"introspect":{const s=$e(t.query)??$e(t.doc_path);return s?{text:s}:null}case"webfetch":{const s=$e(t.url);if(!s)return null;let a=s;try{a=new URL(s).hostname||s}catch{}return{text:a,title:s}}default:return null}}function Mg(e){const t=bt(e);if(!t||!Array.isArray(t.operations))return[];const n=[];for(const s of t.operations){const a=bt(s);if(a&&a.mode==="Image"&&Array.isArray(a.image_paths))for(const o of a.image_paths)typeof o=="string"&&n.push(o)}return n}const e0=e=>`/api/fs/image?path=${encodeURIComponent(e)}`;function TI({tool:e,arriving:t=!1}){if(Pg(e))return y.jsx(cI,{tool:e});const n=dI(e);if(n)return y.jsx(pI,{data:n,toolId:e.id});const s=e.status,[a,o]=L.useState(s==="failed"),l=EI(e),d=Mg(e.input);return y.jsxs("div",{className:`toolcall toolcall-${s} ${t?"is-arriving":""}`,children:[y.jsxs("button",{className:"toolcall-head",onClick:()=>o(f=>!f),children:[y.jsx("span",{className:`toolcall-dot dot-${s}`}),y.jsx("span",{className:"toolcall-title",children:Gw(e)}),l&&y.jsx("span",{className:"toolcall-summary",title:l.title??l.text,children:l.text}),y.jsx("span",{className:"toolcall-status",children:mI[s]??s}),y.jsx("span",{className:`toolcall-chevron ${a?"is-open":""}`,children:"▸"})]}),d.length>0&&y.jsx("div",{className:"toolcall-images",children:d.map(f=>y.jsx("a",{href:e0(f),target:"_blank",rel:"noopener noreferrer",className:"toolcall-image-link",children:y.jsx("img",{src:e0(f),alt:f.split("/").pop()??"image",className:"toolcall-image",...Og})},f))}),y.jsx(yI,{open:a,children:y.jsx("div",{className:"toolcall-body",children:xI(e)})})]})}function yI({open:e,children:t}){const[n,s]=L.useState(e);L.useEffect(()=>{e&&s(!0)},[e]);const a=o=>{o.propertyName==="grid-template-rows"&&!e&&s(!1)};return y.jsx("div",{className:`collapse ${e?"is-open":""}`,onTransitionEnd:a,children:y.jsx("div",{className:"collapse-inner",children:n?t:null})})}function xI(e){switch(Cd(e)){case"shell":return bI(e);case"write":return kI(e);case"read":return SI(e);case"grep":return _I(e);case"todo":return CI(e);case"webfetch":return AI(e);case"websearch":return wI(e);case"introspect":return NI(e);default:return br(e)}}function bI(e){const t=bt(e.input),n=$e(t==null?void 0:t.command)??"",s=xr(e),a=Xr(s),o=a?$e(a.stdout)??"":Kr(s),l=a?$e(a.stderr)??"":"",d=a?String(a.exit_status??""):"",f=d!==""&&!/\b0$/.test(d);return y.jsxs(y.Fragment,{children:[n&&y.jsx(an,{code:n,lang:"bash"}),o.trim()&&y.jsx(an,{code:o,lang:"text"}),l.trim()&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"stderr"}),y.jsx(an,{code:l,lang:"text"})]}),f&&y.jsx("div",{className:"toolcall-exit",children:d})]})}function Fg({path:e}){const t=be(l=>l.activeId),n=be(l=>{var d;return((d=l.sessions.find(f=>f.sessionId===l.activeId))==null?void 0:d.cwd)??""}),s=be(l=>l.openFilePreview),a=t?$w(n,e):null,o=a??e;return a?y.jsx("div",{className:"toolcall-file",children:y.jsx("button",{className:"toolcall-file-name",onClick:()=>s(a),title:`Preview ${e}`,children:o})}):y.jsx("div",{className:"toolcall-file",title:e,children:y.jsx("span",{className:"toolcall-file-name is-plain",children:o})})}function kI(e){const t=bt(e.input),n=$e(t==null?void 0:t.path)??"",s=f=>n?y.jsxs(y.Fragment,{children:[y.jsx(Fg,{path:n}),f]}):f,a=$e(t==null?void 0:t.command);if(a==="create"||a==="insert"){const f=$e(t==null?void 0:t.content);if(f!==void 0)return s(y.jsx(an,{code:f,lang:Dg(n)}))}const o=$e(t==null?void 0:t.oldStr),l=$e(t==null?void 0:t.newStr);if(o!==void 0&&l!==void 0)return s(y.jsx(t0,{diff:Jm(o,l)}));const d=Xw(e.content);return s(d?y.jsx(t0,{diff:Jm(d.oldText,d.newText)}):br(e))}function SI(e){const t=bt(e.input),n=t&&Array.isArray(t.operations)?t.operations:[],s=Kr(xr(e));if(!s.trim())return Mg(e.input).length>0?null:br(e);const a=n.map(bt).find(d=>d&&d.mode!=="Image"),o=a&&typeof a.path=="string"?a.path:"",l=(a==null?void 0:a.mode)==="Line"?Dg(o):"text";return y.jsxs(y.Fragment,{children:[o&&y.jsx(Fg,{path:o}),y.jsx(an,{code:s,lang:l})]})}function _I(e){const t=xr(e),n=Xr(t),s=n&&Array.isArray(n.results)?n.results.filter(o=>{const l=bt(o);return!!l&&(Array.isArray(l.matches)||typeof l.file=="string")}):null;if(s&&s.length>0)return y.jsx("div",{className:"grep",children:s.map((o,l)=>{const d=bt(o),f=d&&typeof d.file=="string"?d.file:"",h=d&&Array.isArray(d.matches)?d.matches.map(String):[];return y.jsxs("div",{className:"grep-file",children:[y.jsx("div",{className:"grep-fname",children:f}),y.jsx("pre",{className:"grep-matches",children:h.join(`
249
- `)})]},l)})});const a=Kr(t);return a.trim()?y.jsx(an,{code:a,lang:"text"}):br(e)}function CI(e){const t=Jw(xr(e));return!t||t.length===0?br(e):y.jsx("div",{className:"todo",children:t.map((n,s)=>y.jsxs("div",{className:`todo-item ${n.done?"is-done":""}`,children:[y.jsx("span",{className:"todo-check","aria-hidden":!0,children:n.done?"☑":"☐"}),y.jsx("span",{className:"todo-text",children:n.desc})]},s))})}function NI(e){const t=bt(e.input),n=$e(t==null?void 0:t.query)??$e(t==null?void 0:t.doc_path),s=xr(e),a=Xr(s),o=(a?$e(a.documentation)??Nd(a):null)??Kr(s);return y.jsxs(y.Fragment,{children:[n&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"query"}),y.jsx(an,{code:n,lang:"text"})]}),o.trim()?y.jsx("div",{className:"toolcall-doc",children:y.jsx(Gs,{text:o})}):br(e)]})}function AI(e){const t=bt(e.input),n=$e(t==null?void 0:t.url),s=$e(t==null?void 0:t.mode),a=$e(t==null?void 0:t.search_terms),o=xr(e),l=Xr(o),d=l?Nd(l)??$e(l.content)??JSON.stringify(l,null,2):Kr(o);return y.jsxs(y.Fragment,{children:[n&&y.jsxs("div",{className:"toolcall-meta",children:[y.jsx("a",{className:"toolcall-link",href:n,target:"_blank",rel:"noopener noreferrer",children:n}),s&&y.jsx("span",{className:"toolcall-tag",children:s})]}),a&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"search terms"}),y.jsx(an,{code:a,lang:"text"})]}),d.trim()?y.jsx(an,{code:d,lang:"markdown"}):br(e)]})}function vI(e){if(!e)return null;const t=Array.isArray(e.results)?e.results:Array.isArray(e.items)?e.items:Array.isArray(e.data)?e.data:null;if(!t)return null;const n=[];for(const s of t){const a=bt(s);a&&n.push({title:$e(a.title)??$e(a.name),url:$e(a.url)??$e(a.link)??$e(a.href),snippet:$e(a.snippet)??$e(a.description)??$e(a.content)??$e(a.text)})}return n.length?n:null}function wI(e){var a;const t=xr(e),n=vI(Xr(t));if(!n)return br(e);const s=$e((a=bt(e.input))==null?void 0:a.query);return y.jsxs(y.Fragment,{children:[s&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"query"}),y.jsx(an,{code:s,lang:"text"})]}),y.jsx("ol",{className:"websearch",children:n.map((o,l)=>y.jsxs("li",{className:"websearch-item",children:[o.url?y.jsx("a",{className:"websearch-title",href:o.url,target:"_blank",rel:"noopener noreferrer",children:o.title??o.url}):y.jsx("span",{className:"websearch-title",children:o.title??"(untitled)"}),o.url&&y.jsx("div",{className:"websearch-url",children:o.url}),o.snippet&&y.jsx("p",{className:"websearch-snippet",children:o.snippet})]},l))})]})}function br(e){const t=e.input;let n="";if(typeof t=="string")n=t;else if(bt(t)){const{__tool_use_purpose:f,...h}=bt(t);n=JSON.stringify(h,null,2)}const s=xr(e),a=Xr(s),o=a?Nd(a):null,l=o??(a?JSON.stringify(a,null,2):Kr(s)),d=o?"text":/^\s*[[{]/.test(l)?"json":"text";return y.jsxs(y.Fragment,{children:[n&&n!=="{}"&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"input"}),y.jsx(an,{code:n,lang:bt(t)?"json":"text"})]}),l.trim()&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"output"}),y.jsx(an,{code:l,lang:d})]})]})}function an({code:e,lang:t}){const[n,s]=L.useState(null);return L.useEffect(()=>{let a=!1;return _d(e,t).then(o=>!a&&s(o)).catch(()=>!a&&s(null)),()=>{a=!0}},[e,t]),n?y.jsx("div",{className:"toolcode",dangerouslySetInnerHTML:{__html:n}}):y.jsx("pre",{className:"toolcode toolcode-plain",children:e})}function t0({diff:e}){return y.jsx("div",{className:"diff-body",children:e.map((t,n)=>y.jsxs("div",{className:`diff-line diff-${t.type}`,children:[y.jsx("span",{className:"diff-sign","aria-hidden":!0,children:t.type==="add"?"+":t.type==="del"?"-":" "}),y.jsx("span",{className:"diff-code",children:t.text||" "})]},n))})}const II=L.memo(TI),LI=4,RI=300,OI=240,DI=80;function PI(e,t){if(e<=0)return{offset:0,limit:0};const n=Math.max(0,e-t);return{offset:n,limit:e-n}}function MI(e,t,n,s){const a=t-e,o=Math.max(0,s-n);return a>o+LI}class FI{constructor(t){Le(this,"ports");Le(this,"frames");Le(this,"follow",!1);Le(this,"lastScrollTop",0);Le(this,"lastMaxTop",0);Le(this,"anchor",null);Le(this,"loadingOlder",!1);Le(this,"showButton",!1);Le(this,"initializedFor",null);Le(this,"prevPendingCount",0);Le(this,"raf",0);Le(this,"content",{sessionId:null,itemCount:0,pendingCount:0,remainingOlder:0});Le(this,"followTick",()=>{var a,o;this.raf=0;const t=this.ports.element();if(!t||!this.follow)return;const n=this.bottomOf(t),s=n-t.scrollTop;if(s<=1||(o=(a=this.ports).reducedMotion)!=null&&o.call(a)){t.scrollTop=n,this.lastScrollTop=t.scrollTop,this.lastMaxTop=n;return}t.scrollTop+=Math.max(10,Math.ceil(s*.3)),this.lastScrollTop=t.scrollTop,this.lastMaxTop=n,this.raf=this.frames.request(this.followTick)});this.ports=t,this.frames=t.frames??{request:n=>requestAnimationFrame(n),cancel:n=>cancelAnimationFrame(n)}}reset(){this.follow=!1,this.prevPendingCount=0,this.anchor=null,this.cancelFollow(),this.setFlags({loadingOlder:!1,showScrollButton:!1})}dispose(){this.cancelFollow()}onContent(t){this.content=t;const n=this.ports.element();if(n){if(this.initializedFor!==t.sessionId&&t.itemCount>0){this.initializedFor=t.sessionId,this.follow=!1,n.scrollTop=this.bottomOf(n),this.lastScrollTop=n.scrollTop,this.lastMaxTop=this.bottomOf(n),this.prevPendingCount=t.pendingCount,this.setFlags({showScrollButton:!1});return}t.pendingCount>this.prevPendingCount&&(this.follow=!0),this.prevPendingCount=t.pendingCount,this.follow?this.scheduleFollow():this.updateButton(n)}}onScroll(){const t=this.ports.element();if(!t)return;const n=this.bottomOf(t);MI(t.scrollTop,this.lastScrollTop,n,this.lastMaxTop)&&(this.follow=!1),this.lastScrollTop=t.scrollTop,this.lastMaxTop=n,this.updateButton(t),t.scrollTop<RI&&this.loadOlder()}jumpToLatest(){this.follow=!0,this.setFlags({showScrollButton:!1}),this.scheduleFollow()}restoreAnchor(){if(this.anchor==null)return;const t=this.ports.element();t&&(t.scrollTop=t.scrollHeight-this.anchor),this.anchor=null,this.setFlags({loadingOlder:!1})}loadOlder(){const t=this.ports.element(),n=this.content.sessionId;if(!t||!n||this.loadingOlder||this.content.remainingOlder<=0)return;this.setFlags({loadingOlder:!0});const{offset:s,limit:a}=PI(this.content.remainingOlder,DI);this.anchor=t.scrollHeight-t.scrollTop,this.ports.fetchPage(n,s,a).then(o=>{if(this.content.sessionId!==n)return this.abandonPage();if(o.length===0)return this.abandonPage();this.ports.prepend(o)}).catch(()=>{this.abandonPage(),console.error("could not load earlier transcript page")})}abandonPage(){this.anchor=null,this.setFlags({loadingOlder:!1})}scheduleFollow(){this.raf||(this.raf=this.frames.request(this.followTick))}cancelFollow(){this.raf&&this.frames.cancel(this.raf),this.raf=0}bottomOf(t){return t.scrollHeight-t.clientHeight}updateButton(t){const n=this.bottomOf(t)-t.scrollTop;this.setFlags({showScrollButton:n>OI})}setFlags(t){const n=t.loadingOlder??this.loadingOlder,s=t.showScrollButton??this.showButton;n===this.loadingOlder&&s===this.showButton||(this.loadingOlder=n,this.showButton=s,this.ports.onFlags({loadingOlder:n,showScrollButton:s}))}}const BI=700,yc=typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,UI=L.memo(function({onRetry:t,onRetryTurn:n}){const s=be(D=>D.items),a=be(D=>D.streamingText),o=be(D=>D.streamingThought),l=be(D=>D.pending),d=l.some(D=>D.status==="sending"),f=be(D=>D.observability.turnStatus),h=be(D=>D.observability.compacting),E=be(D=>D.activeId),g=be(D=>D.remainingOlder),x=L.useRef({session:null,ids:new Set});x.current.session!==E&&(x.current={session:E,ids:new Set(s.filter(D=>D.type==="tool_call").map(D=>D.tool.id))});const b=D=>!x.current.ids.has(D),[N,w]=L.useState(!1);L.useEffect(()=>{if(w(!1),f!=="running")return;const D=setTimeout(()=>w(!0),BI);return()=>clearTimeout(D)},[f,a,o,s.length]);const O=L.useRef(null),[A,F]=L.useState({loadingOlder:!1,showScrollButton:!1}),z=L.useRef(null);z.current||(z.current=new FI({element:()=>O.current,fetchPage:(D,q,Z)=>dt.transcriptPage(D,q,Z).then(oe=>oe.items),prepend:D=>be.getState().prependItems(D),onFlags:F,reducedMotion:()=>(yc==null?void 0:yc.matches)??!1}));const G=z.current;L.useEffect(()=>(G.reset(),()=>G.dispose()),[E,G]),L.useEffect(()=>{G.onContent({sessionId:E,itemCount:s.length,pendingCount:l.length,remainingOlder:g})},[s,a,o,l,E,h,g,G]),L.useLayoutEffect(()=>{G.restoreAnchor()},[s,G]);const ne=s.length===0&&!a&&!o&&l.length===0;return y.jsxs("div",{className:"transcript-wrap",children:[A.loadingOlder&&y.jsxs("div",{className:"loading-older",role:"status",children:[y.jsx(Wr,{size:14}),y.jsx("span",{children:"Loading earlier messages…"})]}),y.jsxs("div",{className:"transcript",ref:O,onScroll:()=>G.onScroll(),children:[ne&&y.jsxs("div",{className:"transcript-empty",children:[y.jsx("p",{className:"empty-title",children:"Casper is here."}),y.jsx("p",{className:"empty-sub",children:"Hand off a task. Casper keeps working server-side and has it ready when you get back."})]}),s.map(D=>D.type==="message"?D.message.role==="thinking"?y.jsx(n0,{text:D.message.text},D.message.id):y.jsx("div",{className:`msg msg-${D.message.role}`,children:D.message.role==="assistant"?y.jsx(Gs,{text:D.message.text}):y.jsxs(y.Fragment,{children:[E&&D.message.imagePaths&&D.message.imagePaths.length>0&&y.jsx("div",{className:"msg-images",children:D.message.imagePaths.map(q=>y.jsx("a",{href:dt.attachmentUrl(E,q),target:"_blank",rel:"noopener noreferrer",className:"msg-image-link",children:y.jsx("img",{src:dt.attachmentUrl(E,q),alt:q.split("/").pop()??"image",className:"msg-image",...Og})},q))}),D.message.text&&y.jsx("div",{className:"msg-user-text",children:D.message.text})]})},D.message.id):D.type==="tool_call"?y.jsx(II,{tool:D.tool,arriving:b(D.tool.id)},D.tool.id):D.type==="turn_error"?y.jsx(HI,{message:D.message,onRetry:n},D.id):y.jsx(jI,{summary:D.summary},D.id)),l.map(D=>y.jsxs("div",{className:`msg msg-user msg-pending ${D.status==="failed"?"is-failed":""}`,children:[y.jsx("div",{className:"msg-user-text",children:D.text}),D.status==="failed"&&y.jsxs("div",{className:"msg-failed",children:[y.jsx("span",{className:"msg-failed-why",children:D.error??"Failed to send."}),y.jsx("button",{className:"msg-retry",onClick:()=>t(D.id,D.text),children:"Retry"})]})]},D.id)),o&&y.jsx(n0,{text:o,live:!0}),a&&y.jsx("div",{className:"msg msg-assistant",children:y.jsx(Gs,{text:a,streaming:!0})}),(f==="running"||d)&&(N||!a&&!o)&&y.jsxs("div",{className:"thinking",children:[y.jsx("span",{className:"thinking-dot"}),y.jsx("span",{className:"thinking-dot"}),y.jsx("span",{className:"thinking-dot"})]}),h&&y.jsx("div",{className:"compaction compaction-live",children:y.jsx("div",{className:"compaction-rule",children:y.jsxs("span",{className:"compaction-head",children:[y.jsx(Wr,{size:13,className:"compaction-icon"}),y.jsx("span",{className:"compaction-label",children:"Compacting conversation…"})]})})})]}),A.showScrollButton&&y.jsx("button",{className:"scroll-to-bottom",onClick:()=>G.jumpToLatest(),"aria-label":"Scroll to latest",title:"Scroll to latest",children:y.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:y.jsx("polyline",{points:"6 9 12 15 18 9"})})})]})});function n0({text:e,live:t=!1}){const[n,s]=L.useState(!1);return y.jsxs("div",{className:`thought ${t?"is-live":""}`,children:[y.jsxs("button",{className:"thought-head",onClick:()=>s(a=>!a),children:[y.jsx("span",{className:"thought-chevron",children:n?"▾":"▸"}),y.jsx("span",{className:`thought-label ${t?"is-live":""}`,children:"Thinking"})]}),n&&y.jsx("div",{className:"thought-body",children:y.jsx("div",{className:"thought-text",children:e})})]})}function HI({message:e,onRetry:t}){const[n,s]=L.useState(!1),[a,o]=L.useState(!1),l=I0(e),d=be(h=>{for(let E=h.items.length-1;E>=0;E--){const g=h.items[E];if(g.type==="message"&&g.message.role==="user")return g.message.text}return""}),f=()=>{var h;(h=navigator.clipboard)==null||h.writeText(e).then(()=>{o(!0),setTimeout(()=>o(!1),1500)},()=>{})};return y.jsxs("div",{className:"sysnote",children:[y.jsx("div",{className:"sysnote-rule",children:y.jsxs("button",{className:"sysnote-head",onClick:()=>s(h=>!h),"aria-expanded":n,children:[y.jsx("span",{"aria-hidden":!0,children:"⚠"}),y.jsx("span",{className:"sysnote-label",children:l.title}),y.jsx("span",{className:"sysnote-toggle",children:n?"Hide details":"Show details"})]})}),n&&y.jsxs("div",{className:"sysnote-body",children:[l.fix&&y.jsx("p",{className:"sysnote-fix",children:l.fix}),y.jsx("pre",{className:"sysnote-raw",children:e}),y.jsxs("div",{className:"sysnote-actions",children:[t&&d&&y.jsx("button",{className:"btn-sm is-danger",onClick:()=>t(d),children:"Retry turn"}),y.jsx("button",{className:"btn-sm",onClick:f,children:a?"Copied":"Copy details"})]})]})]})}function jI({summary:e}){const[t,n]=L.useState(!1);return y.jsxs("div",{className:"compaction",children:[y.jsx("div",{className:"compaction-rule",children:y.jsxs("button",{className:"compaction-head",onClick:()=>n(s=>!s),"aria-expanded":t,children:[y.jsx(nx,{size:14,className:"compaction-icon"}),y.jsx("span",{className:"compaction-label",children:"Conversation compacted"}),y.jsx("span",{className:"compaction-toggle",children:t?"Hide summary":"Show summary"})]})}),t&&y.jsx("div",{className:"compaction-body",children:y.jsx(Gs,{text:e})})]})}function zI({value:e,onChange:t,label:n="Working directory",placeholder:s="leave blank for server default",hint:a="A folder that doesn't exist yet will be created.",autoFocus:o=!1}){const[l,d]=L.useState([]),[f,h]=L.useState(!1),[E,g]=L.useState(null),x=L.useRef("");L.useEffect(()=>{const O=e;x.current=O;const A=setTimeout(()=>{dt.listDirs(O).then(F=>{x.current===O&&(d(F.entries),g({path:F.target,kind:F.targetKind}))}).catch(()=>{x.current===O&&(d([]),g(null))})},150);return()=>clearTimeout(A)},[e]);const b=e.trim()!=="",N=b&&(E==null?void 0:E.kind)==="missing",w=b&&(E==null?void 0:E.kind)==="file";return y.jsxs("label",{className:"picker cwd-field",children:[y.jsx("span",{className:"picker-label",children:n}),y.jsx("input",{className:"picker-input",value:e,placeholder:s,autoComplete:"off",spellCheck:!1,autoFocus:o,onFocus:()=>h(!0),onChange:O=>{t(O.target.value),h(!0)},onBlur:()=>setTimeout(()=>h(!1),120)}),f&&l.length>0&&y.jsx("div",{className:"cwd-suggestions",children:l.map(O=>y.jsx("button",{type:"button",className:"cwd-suggestion",onMouseDown:A=>A.preventDefault(),onClick:()=>{t(O),d([])},children:O},O))}),N&&y.jsxs("span",{className:"picker-hint cwd-will-create",children:["Doesn't exist yet - this folder will be created: ",y.jsx("code",{children:E.path})]}),w&&y.jsxs("span",{className:"picker-hint cwd-is-file",children:["That path is a file, not a folder: ",y.jsx("code",{children:E.path})]}),!N&&!w&&y.jsx("span",{className:"picker-hint",children:a})]})}function $I({sessionId:e,currentCwd:t,onChanged:n,onClose:s}){const[a,o]=L.useState(t??""),[l,d]=L.useState(!1),[f,h]=L.useState(null),E=async()=>{const g=a.trim();if(!(!g||l)){d(!0),h(null);try{const x=await dt.setSessionCwd(e,g);n(x.cwd),s()}catch(x){h(x.message)}finally{d(!1)}}};return y.jsx("div",{className:"sheet-backdrop",onClick:s,children:y.jsxs("div",{className:"sheet",onClick:g=>g.stopPropagation(),children:[y.jsx("div",{className:"sheet-handle"}),y.jsx("h2",{className:"sheet-title",children:"Change working directory"}),y.jsx(zI,{value:a,onChange:o,placeholder:"/path/to/folder",hint:"The session keeps its transcript. A folder that doesn't exist yet will be created.",autoFocus:!0}),f&&y.jsx("div",{className:"sheet-error",children:f}),y.jsxs("div",{className:"sheet-actions",children:[y.jsx("button",{className:"btn-ghost",onClick:s,disabled:l,children:"Cancel"}),y.jsx("button",{className:"btn-primary",onClick:E,disabled:l||!a.trim(),children:l?"Saving…":"Change folder"})]})]})})}function WI(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function YI({name:e}){var n;switch((n=e.split(".").pop())==null?void 0:n.toLowerCase()){case"ts":case"tsx":case"js":case"jsx":case"mjs":case"py":case"rb":case"go":case"rs":case"java":case"c":case"cpp":case"h":case"hpp":case"vue":case"svelte":return y.jsx(Rp,{size:15,className:"ftree-icon-svg ftree-icon-code"});case"json":case"yaml":case"yml":case"toml":case"ini":case"env":case"lock":return y.jsx(G2,{size:15,className:"ftree-icon-svg ftree-icon-config"});case"md":case"txt":case"rst":case"log":case"csv":return y.jsx(K2,{size:15,className:"ftree-icon-svg ftree-icon-text"});case"css":case"scss":case"less":case"sass":return y.jsx(J2,{size:15,className:"ftree-icon-svg ftree-icon-style"});case"html":case"svg":case"xml":return y.jsx(Rp,{size:15,className:"ftree-icon-svg ftree-icon-markup"});case"png":case"jpg":case"jpeg":case"gif":case"webp":case"bmp":case"ico":case"avif":return y.jsx(X2,{size:15,className:"ftree-icon-svg ftree-icon-image"});case"sh":case"bash":case"zsh":case"fish":case"bat":case"ps1":return y.jsx(Z2,{size:15,className:"ftree-icon-svg ftree-icon-terminal"});default:return y.jsx(Q2,{size:15,className:"ftree-icon-svg"})}}function Bg({entry:e,sessionId:t,depth:n,onPreview:s,onExpanded:a}){const o=be(g=>g.fsVersion[e.path]??0),[l,d]=L.useState({expanded:!1,children:null,loading:!1});L.useEffect(()=>{if(e.type==="directory")return a(e.path,l.expanded),()=>a(e.path,!1)},[e.path,e.type,l.expanded,a]),L.useEffect(()=>{if(!o||!l.expanded)return;let g=!0;return dt.tree(t,e.path).then(x=>{g&&d(b=>({...b,children:x.entries}))}).catch(()=>{}),()=>{g=!1}},[o]);const f=L.useCallback(async()=>{if(e.type==="directory"&&!l.loading){if(l.expanded){d(g=>({...g,expanded:!1}));return}if(l.children===null){d(g=>({...g,loading:!0}));try{const g=await dt.tree(t,e.path);d({expanded:!0,children:g.entries,loading:!1})}catch{d(g=>({...g,loading:!1}))}}else d(g=>({...g,expanded:!0}))}},[e,t,l.expanded,l.children,l.loading]),h=L.useCallback(()=>{e.type==="file"&&s(e)},[e,s]),E=n*16;return e.type==="directory"?y.jsxs(y.Fragment,{children:[y.jsxs("button",{className:"ftree-row ftree-dir",onClick:f,style:{paddingLeft:`${E+8}px`},children:[y.jsx("span",{className:`ftree-chevron ${l.expanded?"is-open":""}`,children:l.loading?y.jsx(Wr,{size:12}):y.jsx(D0,{size:12,className:"ftree-chevron-icon"})}),y.jsx("span",{className:"ftree-icon",children:l.expanded?y.jsx(q2,{size:15,className:"ftree-icon-svg ftree-icon-folder"}):y.jsx(B0,{size:15,className:"ftree-icon-svg ftree-icon-folder"})}),y.jsx("span",{className:"ftree-name",children:e.name})]}),l.expanded&&l.children&&y.jsxs("div",{className:"ftree-children",children:[l.children.map(g=>y.jsx(Bg,{entry:g,sessionId:t,depth:n+1,onPreview:s,onExpanded:a},g.path)),l.children.length===0&&y.jsx("div",{className:"ftree-empty",style:{paddingLeft:`${E+24}px`},children:"Empty"})]})]}):y.jsxs("div",{className:"ftree-row ftree-file",style:{paddingLeft:`${E+8}px`},onClick:h,children:[y.jsx("span",{className:"ftree-chevron ftree-chevron-spacer","aria-hidden":"true"}),y.jsx("span",{className:"ftree-icon",children:y.jsx(YI,{name:e.name})}),y.jsx("span",{className:"ftree-name",children:e.name}),e.size!=null&&y.jsx("span",{className:"ftree-size",children:WI(e.size)})]})}function VI({sessionId:e,onClose:t}){var D;const[n,s]=L.useState([]),[a,o]=L.useState(""),[l,d]=L.useState(!0),[f,h]=L.useState(null),[E,g]=L.useState(!1),x=be(q=>q.sessions),b=be(q=>q.setWatchedPaths),N=be(q=>q.fsVersion[""]??0),w=L.useRef(new Set),O=be(q=>q.setSessions),A=be(q=>q.openFilePreview),F=(D=x.find(q=>q.sessionId===e))==null?void 0:D.cwd,z=L.useCallback(()=>{b(["",...w.current])},[b]),G=L.useCallback((q,Z)=>{const oe=w.current;Z!==oe.has(q)&&(Z?oe.add(q):oe.delete(q),z())},[z]);L.useEffect(()=>(z(),()=>b([])),[z,b]);const ne=L.useCallback(async(q=!1)=>{q||d(!0),h(null);try{const Z=await dt.tree(e);s(Z.entries),o(Z.cwd)}catch(Z){h(Z.message)}finally{q||d(!1)}},[e]);return L.useEffect(()=>{ne()},[ne]),L.useEffect(()=>{N&&ne(!0)},[N]),y.jsxs("div",{className:"ftree-panel",children:[y.jsxs("div",{className:"ftree-header",children:[y.jsx("span",{className:"ftree-title",title:a,children:"Files"}),y.jsx("button",{className:"ftree-refresh",onClick:()=>g(!0),title:"Change working directory","aria-label":"Change working directory",children:y.jsx(B0,{size:14})}),t&&y.jsx("button",{className:"ftree-close",onClick:t,title:"Close file tree","aria-label":"Close file tree",children:y.jsx(P0,{size:15})})]}),a&&y.jsx("div",{className:"ftree-cwd",title:a,children:a}),y.jsxs("div",{className:"ftree-list",children:[l&&n.length===0&&y.jsx("div",{className:"ftree-loading",children:"Loading…"}),f&&y.jsxs("div",{className:"ftree-error",children:[f,y.jsx("button",{className:"ftree-repoint",onClick:()=>g(!0),children:"Change folder…"})]}),!l&&!f&&n.length===0&&y.jsx("div",{className:"ftree-empty",children:"No files"}),!f&&n.map(q=>y.jsx(Bg,{entry:q,sessionId:e,depth:0,onPreview:Z=>A(Z.path),onExpanded:G},q.path))]}),E&&y.jsx($I,{sessionId:e,currentCwd:a||F,onChanged:q=>{O(x.map(Z=>Z.sessionId===e?{...Z,cwd:q}:Z)),ne()},onClose:()=>g(!1)})]})}const qI=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif"]);function QI(e){const t=e.toLowerCase(),n=t.lastIndexOf("."),s=n>0?t.slice(n+1):"";return qI.has(s)?"image":s==="pdf"?"pdf":s==="html"||s==="htm"?"html":s==="md"||s==="markdown"?"markdown":"text"}const GI={ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",mjs:"javascript",cjs:"javascript",json:"json",jsonl:"json",yaml:"yaml",yml:"yaml",md:"markdown",markdown:"markdown",html:"html",htm:"html",xml:"xml",css:"css",scss:"css",less:"css",py:"python",rs:"rust",go:"go",java:"java",c:"c",h:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",cs:"csharp",rb:"ruby",php:"php",kt:"kotlin",kts:"kotlin",swift:"swift",zig:"zig",lua:"lua",tex:"latex",toml:"toml",ini:"ini",cfg:"ini",conf:"ini",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",dockerfile:"dockerfile",sql:"sql",diff:"diff",patch:"diff"};function KI(e){const t=e.toLowerCase();if(t==="dockerfile")return"dockerfile";if(t==="makefile")return"make";const n=t.split(".").pop()??"";return GI[n]??""}const xc=e=>e.split("/").pop()||e;function XI({preview:e,sessionId:t,onClose:n}){const[s,a]=L.useState(!1),[o,l]=L.useState({}),d=()=>{window.open(dt.downloadUrl(t,e.path),"_blank")},f=b=>{b.target===b.currentTarget&&n()};L.useEffect(()=>{const b=N=>{N.key==="Escape"&&n()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[n]);const h=o[e.path]??!1,E=e.kind==="html"||e.kind==="markdown",g=E&&!h,x=e.kind!=="image"&&e.kind!=="pdf"&&!g;return y.jsx("div",{className:"fpreview-backdrop",onClick:f,children:y.jsxs("div",{className:`fpreview-modal${s?" fpreview-full":""}`,children:[y.jsxs("div",{className:"fpreview-header",children:[E&&!e.error&&y.jsxs("div",{className:"fpreview-seg",role:"group","aria-label":"Preview mode",children:[y.jsx("button",{className:`fpreview-seg-btn${h?"":" is-active"}`,onClick:()=>l(b=>({...b,[e.path]:!1})),title:"Rendered","aria-label":"Rendered","aria-pressed":!h,children:y.jsx(rx,{size:17})}),y.jsx("button",{className:`fpreview-seg-btn${h?" is-active":""}`,onClick:()=>l(b=>({...b,[e.path]:!0})),title:"Source","aria-label":"Source","aria-pressed":h,children:y.jsx(ix,{size:17})})]}),y.jsx("span",{className:"fpreview-name",title:e.path,children:e.name}),y.jsx("button",{className:"fpreview-dl",onClick:d,title:"Download file","aria-label":"Download file",children:y.jsx(ex,{size:18})}),y.jsx("button",{className:"fpreview-full-btn",onClick:()=>a(b=>!b),title:s?"Exit fullscreen":"Fullscreen","aria-label":s?"Exit fullscreen":"Fullscreen",children:s?y.jsx(ax,{size:18}):y.jsx(sx,{size:18})}),y.jsx("button",{className:"fpreview-close",onClick:n,"aria-label":"Close preview",children:y.jsx(P0,{size:18})})]}),y.jsxs("div",{className:"fpreview-body",children:[e.loading&&y.jsx("div",{className:"fpreview-loading",children:y.jsx(Wr,{size:48})}),e.error&&y.jsx("div",{className:"ftree-error",children:e.error}),!e.loading&&!e.error&&e.kind==="image"&&y.jsx("img",{src:dt.previewUrl(t,e.path),alt:e.name,className:"fpreview-image"}),!e.error&&e.kind==="pdf"&&y.jsx("iframe",{src:dt.previewUrl(t,e.path),title:e.name,className:"fpreview-pdf"}),!e.error&&e.kind==="html"&&g&&y.jsx("iframe",{src:`${dt.previewUrl(t,e.path)}&raw=1`,title:e.name,className:"fpreview-html",sandbox:"allow-scripts allow-forms"}),!e.loading&&!e.error&&e.kind==="markdown"&&g&&e.content!==null&&y.jsx("div",{className:"fpreview-md",children:y.jsx(Gs,{text:e.content,html:!0})}),!e.loading&&!e.error&&x&&e.highlightedHtml&&y.jsx("div",{className:"fpreview-highlighted",dangerouslySetInnerHTML:{__html:e.highlightedHtml}}),!e.loading&&!e.error&&x&&!e.highlightedHtml&&e.content!==null&&y.jsx("pre",{className:"fpreview-code",children:e.content})]})]})})}function JI(){const e=be(l=>l.previewPath),t=be(l=>l.activeId),n=be(l=>l.closeFilePreview),[s,a]=L.useState(null),o=L.useCallback(()=>n(),[n]);return L.useEffect(()=>{if(!e||!t){a(null);return}let l=!1;const d=QI(xc(e)),f=d!=="image"&&d!=="pdf";if(a({path:e,name:xc(e),content:null,highlightedHtml:null,kind:d,loading:f,error:null}),!!f)return(async()=>{try{const h=await fetch(dt.previewUrl(t,e),{credentials:"same-origin"});if(!h.ok)throw new Error(await h.text()||`HTTP ${h.status}`);const E=await h.text();if(l)return;a(b=>b&&b.path===e?{...b,content:E,loading:!1}:b);const g=KI(xc(e));if(!g)return;const x=await _d(E,g);if(l||!x)return;a(b=>b&&b.path===e?{...b,highlightedHtml:x}:b)}catch(h){if(l)return;a(E=>E&&E.path===e?{...E,loading:!1,error:h instanceof Error?h.message:"Could not read the file"}:E)}})(),()=>{l=!0}},[e,t]),!s||!t?null:$u.createPortal(y.jsx(XI,{preview:s,sessionId:t,onClose:o}),document.body)}function Ug({ariaLabel:e,value:t,options:n,onChange:s}){const[a,o]=L.useState(!1),[l,d]=L.useState(0),f=L.useRef(null),h=n.find(x=>x.value===t);L.useEffect(()=>{if(!a)return;const x=b=>{f.current&&!f.current.contains(b.target)&&o(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[a]),L.useEffect(()=>{if(a){const x=n.findIndex(b=>b.value===t);d(x>=0?x:0)}},[a,n,t]);const E=x=>{s(x),o(!1)},g=x=>{if(!a){(x.key==="Enter"||x.key===" "||x.key==="ArrowDown")&&(x.preventDefault(),o(!0));return}if(x.key==="Escape")o(!1);else if(x.key==="ArrowDown")x.preventDefault(),d(b=>Math.min(b+1,n.length-1));else if(x.key==="ArrowUp")x.preventDefault(),d(b=>Math.max(b-1,0));else if(x.key==="Enter"){x.preventDefault();const b=n[l];b&&E(b.value)}};return y.jsxs("div",{className:"dd",ref:f,children:[y.jsxs("button",{type:"button",className:`dd-trigger ${a?"is-open":""}`,"aria-haspopup":"listbox","aria-expanded":a,onClick:()=>o(x=>!x),onKeyDown:g,"aria-label":e,children:[y.jsx("span",{className:"dd-value",children:(h==null?void 0:h.label)??t??"Select…"}),y.jsx(D0,{size:13,className:"dd-chevron"})]}),a&&y.jsx("div",{className:"dd-panel",role:"listbox",children:n.map((x,b)=>y.jsxs("button",{type:"button",role:"option","aria-selected":x.value===t,className:`dd-option ${b===l?"is-active":""} ${x.value===t?"is-selected":""}`,onMouseEnter:()=>d(b),onClick:()=>E(x.value),children:[y.jsx("span",{className:"dd-check",children:x.value===t&&y.jsx(W2,{size:15})}),y.jsx("span",{className:"dd-option-label",children:x.label}),x.hint&&y.jsx("span",{className:"dd-option-hint",children:x.hint})]},x.value))})]})}function ZI({value:e,onChange:t}){var a;const n=be(o=>o.models),s=e??((a=n.find(o=>o.isDefault))==null?void 0:a.modelId);return y.jsx(Ug,{ariaLabel:"Model",value:s,onChange:t,options:n.map(o=>({value:o.modelId,label:o.modelName,hint:`${o.rateMultiplier}x`}))})}function e6({value:e,onChange:t}){const n=be(d=>d.modes),s=be(d=>d.agents),a=be(d=>d.defaultAgentId),o=n.length>0?n:s,l=e??a;return y.jsx(Ug,{ariaLabel:"Agent",value:l,onChange:t,options:o.map(d=>({value:d.id,label:d.name}))})}const pn=18,jc=2.5,zc=(pn-jc)/2,r0=2*Math.PI*zc;function t6(e){return e>85?"var(--aurora-red)":e>60?"var(--aurora-orange)":"var(--frost)"}const i0=new Intl.NumberFormat;function n6({onCompact:e}){var w;const t=be(O=>O.observability.contextUsagePercentage),n=be(O=>O.observability.compacting),s=be(O=>O.observability.turnStatus),a=be(O=>O.activeId),o=be(O=>O.currentModelId),l=be(O=>O.models),[d,f]=L.useState(!1),h=L.useRef(null);L.useEffect(()=>{if(!d)return;const O=F=>{h.current&&!h.current.contains(F.target)&&f(!1)},A=F=>{F.key==="Escape"&&f(!1)};return document.addEventListener("mousedown",O),document.addEventListener("keydown",A),()=>{document.removeEventListener("mousedown",O),document.removeEventListener("keydown",A)}},[d]);const E=Math.max(0,Math.min(100,t)),g=t6(E),x=E/100*r0,b=(w=l.find(O=>O.modelId===o))==null?void 0:w.contextWindowTokens,N=b?Math.round(E/100*b):void 0;return a?y.jsxs("div",{className:"ctx",ref:h,children:[y.jsx("button",{type:"button",className:"ctx-btn",onClick:()=>f(O=>!O),"aria-haspopup":"dialog","aria-expanded":d,"aria-label":`Context ${E.toFixed(0)}% used`,title:`Context ${E.toFixed(0)}% used`,children:y.jsx("svg",{width:pn,height:pn,viewBox:`0 0 ${pn} ${pn}`,"aria-hidden":!0,children:y.jsxs("g",{transform:`rotate(-90 ${pn/2} ${pn/2})`,children:[y.jsx("circle",{cx:pn/2,cy:pn/2,r:zc,fill:"none",stroke:"var(--n2)",strokeWidth:jc}),y.jsx("circle",{cx:pn/2,cy:pn/2,r:zc,fill:"none",stroke:g,strokeWidth:jc,strokeLinecap:"round",strokeDasharray:`${x} ${r0-x}`})]})})}),d&&y.jsxs("div",{className:"ctx-pop",role:"dialog","aria-label":"Context usage",children:[y.jsxs("div",{className:"ctx-pop-head",children:[y.jsx("span",{className:"ctx-pop-title",children:"Context used"}),y.jsxs("span",{className:"ctx-pop-pct",style:{color:g},children:[E.toFixed(1),"%"]})]}),y.jsx("div",{className:"ctx-pop-bar",children:y.jsx("span",{className:"ctx-pop-bar-fill",style:{width:`${E}%`,background:g}})}),b?y.jsxs("dl",{className:"ctx-pop-rows",children:[y.jsxs("div",{className:"ctx-pop-row",children:[y.jsx("dt",{children:"Used"}),y.jsxs("dd",{children:[i0.format(N??0)," tokens"]})]}),y.jsxs("div",{className:"ctx-pop-row",children:[y.jsx("dt",{children:"Window"}),y.jsxs("dd",{children:[i0.format(b)," tokens"]})]})]}):y.jsx("p",{className:"ctx-pop-note",children:"Token counts need a selected model’s window size."}),y.jsx("button",{type:"button",className:"ctx-pop-compact",disabled:!a||n||s!=="idle",onClick:()=>{f(!1),e()},children:n?"Compacting…":"Compact conversation"})]})]}):null}const r6={closed:"Offline - reconnecting when possible",reconnecting:"Reconnecting…",resyncing:"Resyncing…"};function i6(e){return e.live?e.uploading?"Uploading…":e.cancelling?"Stopping…":e.compacting?"Compacting conversation…":e.running?"Casper is working…":"Ask Casper to build something…":r6[e.connStatus]??"Connecting…"}const s0=new Set(["image/png","image/jpeg","image/gif","image/webp","image/svg+xml"]);function s6({sessionId:e,onSend:t,onCancel:n,onCompact:s,onChangeModel:a,onChangeAgent:o,connStatus:l,draft:d}){const[f,h]=L.useState(""),[E,g]=L.useState([]),[x,b]=L.useState(!1),[N,w]=L.useState(null),O=be(S=>S.observability.turnStatus),A=be(S=>S.observability.compacting),F=be(S=>S.currentModeId),z=be(S=>S.currentModelId),G=O==="running",ne=O==="cancelling",D=d||l==="connected",q=L.useRef(null),Z=L.useRef(null),oe=S=>new Promise((M,Y)=>{const v=new FileReader;v.onload=()=>M(v.result.split(",")[1]??""),v.onerror=()=>Y(new Error("Failed to read file")),v.readAsDataURL(S)}),$=L.useCallback(()=>{const S=Z.current;S&&(S.style.height="auto",S.style.height=`${Math.min(S.scrollHeight,200)}px`)},[]);L.useEffect(()=>{$()},[f,$]);const le=L.useCallback(S=>{const M=S.map(Y=>{const v=s0.has(Y.type);return{id:`att-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,file:Y,isImage:v,previewUrl:v?URL.createObjectURL(Y):void 0}});g(Y=>[...Y,...M])},[]),ce=async(S,M,Y)=>{const v=[];S.length>0&&v.push({type:"text",text:Lu+S.map(he=>he.path).join(", ")+`
249
+ `)})]},l)})});const a=Kr(t);return a.trim()?y.jsx(an,{code:a,lang:"text"}):br(e)}function CI(e){const t=Jw(xr(e));return!t||t.length===0?br(e):y.jsx("div",{className:"todo",children:t.map((n,s)=>y.jsxs("div",{className:`todo-item ${n.done?"is-done":""}`,children:[y.jsx("span",{className:"todo-check","aria-hidden":!0,children:n.done?"☑":"☐"}),y.jsx("span",{className:"todo-text",children:n.desc})]},s))})}function NI(e){const t=bt(e.input),n=$e(t==null?void 0:t.query)??$e(t==null?void 0:t.doc_path),s=xr(e),a=Xr(s),o=(a?$e(a.documentation)??Nd(a):null)??Kr(s);return y.jsxs(y.Fragment,{children:[n&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"query"}),y.jsx(an,{code:n,lang:"text"})]}),o.trim()?y.jsx("div",{className:"toolcall-doc",children:y.jsx(Gs,{text:o})}):br(e)]})}function AI(e){const t=bt(e.input),n=$e(t==null?void 0:t.url),s=$e(t==null?void 0:t.mode),a=$e(t==null?void 0:t.search_terms),o=xr(e),l=Xr(o),d=l?Nd(l)??$e(l.content)??JSON.stringify(l,null,2):Kr(o);return y.jsxs(y.Fragment,{children:[n&&y.jsxs("div",{className:"toolcall-meta",children:[y.jsx("a",{className:"toolcall-link",href:n,target:"_blank",rel:"noopener noreferrer",children:n}),s&&y.jsx("span",{className:"toolcall-tag",children:s})]}),a&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"search terms"}),y.jsx(an,{code:a,lang:"text"})]}),d.trim()?y.jsx(an,{code:d,lang:"markdown"}):br(e)]})}function vI(e){if(!e)return null;const t=Array.isArray(e.results)?e.results:Array.isArray(e.items)?e.items:Array.isArray(e.data)?e.data:null;if(!t)return null;const n=[];for(const s of t){const a=bt(s);a&&n.push({title:$e(a.title)??$e(a.name),url:$e(a.url)??$e(a.link)??$e(a.href),snippet:$e(a.snippet)??$e(a.description)??$e(a.content)??$e(a.text)})}return n.length?n:null}function wI(e){var a;const t=xr(e),n=vI(Xr(t));if(!n)return br(e);const s=$e((a=bt(e.input))==null?void 0:a.query);return y.jsxs(y.Fragment,{children:[s&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"query"}),y.jsx(an,{code:s,lang:"text"})]}),y.jsx("ol",{className:"websearch",children:n.map((o,l)=>y.jsxs("li",{className:"websearch-item",children:[o.url?y.jsx("a",{className:"websearch-title",href:o.url,target:"_blank",rel:"noopener noreferrer",children:o.title??o.url}):y.jsx("span",{className:"websearch-title",children:o.title??"(untitled)"}),o.url&&y.jsx("div",{className:"websearch-url",children:o.url}),o.snippet&&y.jsx("p",{className:"websearch-snippet",children:o.snippet})]},l))})]})}function br(e){const t=e.input;let n="";if(typeof t=="string")n=t;else if(bt(t)){const{__tool_use_purpose:f,...h}=bt(t);n=JSON.stringify(h,null,2)}const s=xr(e),a=Xr(s),o=a?Nd(a):null,l=o??(a?JSON.stringify(a,null,2):Kr(s)),d=o?"text":/^\s*[[{]/.test(l)?"json":"text";return y.jsxs(y.Fragment,{children:[n&&n!=="{}"&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"input"}),y.jsx(an,{code:n,lang:bt(t)?"json":"text"})]}),l.trim()&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"output"}),y.jsx(an,{code:l,lang:d})]})]})}function an({code:e,lang:t}){const[n,s]=L.useState(null);return L.useEffect(()=>{let a=!1;return _d(e,t).then(o=>!a&&s(o)).catch(()=>!a&&s(null)),()=>{a=!0}},[e,t]),n?y.jsx("div",{className:"toolcode",dangerouslySetInnerHTML:{__html:n}}):y.jsx("pre",{className:"toolcode toolcode-plain",children:e})}function t0({diff:e}){return y.jsx("div",{className:"diff-body",children:e.map((t,n)=>y.jsxs("div",{className:`diff-line diff-${t.type}`,children:[y.jsx("span",{className:"diff-sign","aria-hidden":!0,children:t.type==="add"?"+":t.type==="del"?"-":" "}),y.jsx("span",{className:"diff-code",children:t.text||" "})]},n))})}const II=L.memo(TI),LI=4,RI=300,OI=240,DI=80;function PI(e,t){if(e<=0)return{offset:0,limit:0};const n=Math.max(0,e-t);return{offset:n,limit:e-n}}function MI(e,t,n,s){const a=t-e,o=Math.max(0,s-n);return a>o+LI}class FI{constructor(t){Le(this,"ports");Le(this,"frames");Le(this,"follow",!1);Le(this,"lastScrollTop",0);Le(this,"lastMaxTop",0);Le(this,"anchor",null);Le(this,"loadingOlder",!1);Le(this,"showButton",!1);Le(this,"initializedFor",null);Le(this,"prevPendingCount",0);Le(this,"raf",0);Le(this,"content",{sessionId:null,itemCount:0,pendingCount:0,remainingOlder:0});Le(this,"followTick",()=>{var a,o;this.raf=0;const t=this.ports.element();if(!t||!this.follow)return;const n=this.bottomOf(t),s=n-t.scrollTop;if(s<=1||(o=(a=this.ports).reducedMotion)!=null&&o.call(a)){t.scrollTop=n,this.lastScrollTop=t.scrollTop,this.lastMaxTop=n;return}t.scrollTop+=Math.max(10,Math.ceil(s*.3)),this.lastScrollTop=t.scrollTop,this.lastMaxTop=n,this.raf=this.frames.request(this.followTick)});this.ports=t,this.frames=t.frames??{request:n=>requestAnimationFrame(n),cancel:n=>cancelAnimationFrame(n)}}reset(){this.follow=!1,this.prevPendingCount=0,this.anchor=null,this.cancelFollow(),this.setFlags({loadingOlder:!1,showScrollButton:!1})}dispose(){this.cancelFollow()}onContent(t){this.content=t;const n=this.ports.element();if(n){if(this.initializedFor!==t.sessionId&&t.itemCount>0){this.initializedFor=t.sessionId,this.follow=!1,n.scrollTop=this.bottomOf(n),this.lastScrollTop=n.scrollTop,this.lastMaxTop=this.bottomOf(n),this.prevPendingCount=t.pendingCount,this.setFlags({showScrollButton:!1});return}t.pendingCount>this.prevPendingCount&&(this.follow=!0),this.prevPendingCount=t.pendingCount,this.follow?this.scheduleFollow():this.updateButton(n)}}onScroll(){const t=this.ports.element();if(!t)return;const n=this.bottomOf(t);MI(t.scrollTop,this.lastScrollTop,n,this.lastMaxTop)&&(this.follow=!1),this.lastScrollTop=t.scrollTop,this.lastMaxTop=n,this.updateButton(t),t.scrollTop<RI&&this.loadOlder()}jumpToLatest(){this.follow=!0,this.setFlags({showScrollButton:!1}),this.scheduleFollow()}restoreAnchor(){if(this.anchor==null)return;const t=this.ports.element();t&&(t.scrollTop=t.scrollHeight-this.anchor),this.anchor=null,this.setFlags({loadingOlder:!1})}loadOlder(){const t=this.ports.element(),n=this.content.sessionId;if(!t||!n||this.loadingOlder||this.content.remainingOlder<=0)return;this.setFlags({loadingOlder:!0});const{offset:s,limit:a}=PI(this.content.remainingOlder,DI);this.anchor=t.scrollHeight-t.scrollTop,this.ports.fetchPage(n,s,a).then(o=>{if(this.content.sessionId!==n)return this.abandonPage();if(o.length===0)return this.abandonPage();this.ports.prepend(o)}).catch(()=>{this.abandonPage(),console.error("could not load earlier transcript page")})}abandonPage(){this.anchor=null,this.setFlags({loadingOlder:!1})}scheduleFollow(){this.raf||(this.raf=this.frames.request(this.followTick))}cancelFollow(){this.raf&&this.frames.cancel(this.raf),this.raf=0}bottomOf(t){return t.scrollHeight-t.clientHeight}updateButton(t){const n=this.bottomOf(t)-t.scrollTop;this.setFlags({showScrollButton:n>OI})}setFlags(t){const n=t.loadingOlder??this.loadingOlder,s=t.showScrollButton??this.showButton;n===this.loadingOlder&&s===this.showButton||(this.loadingOlder=n,this.showButton=s,this.ports.onFlags({loadingOlder:n,showScrollButton:s}))}}const BI=700,yc=typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,UI=L.memo(function({onRetry:t,onRetryTurn:n}){const s=be(D=>D.items),a=be(D=>D.streamingText),o=be(D=>D.streamingThought),l=be(D=>D.pending),d=l.some(D=>D.status==="sending"),f=be(D=>D.observability.turnStatus),h=be(D=>D.observability.compacting),E=be(D=>D.activeId),g=be(D=>D.remainingOlder),x=L.useRef({session:null,ids:new Set});x.current.session!==E&&(x.current={session:E,ids:new Set(s.filter(D=>D.type==="tool_call").map(D=>D.tool.id))});const b=D=>!x.current.ids.has(D),[N,w]=L.useState(!1);L.useEffect(()=>{if(w(!1),f!=="running")return;const D=setTimeout(()=>w(!0),BI);return()=>clearTimeout(D)},[f,a,o,s.length]);const O=L.useRef(null),[A,F]=L.useState({loadingOlder:!1,showScrollButton:!1}),z=L.useRef(null);z.current||(z.current=new FI({element:()=>O.current,fetchPage:(D,q,Z)=>dt.transcriptPage(D,q,Z).then(oe=>oe.items),prepend:D=>be.getState().prependItems(D),onFlags:F,reducedMotion:()=>(yc==null?void 0:yc.matches)??!1}));const G=z.current;L.useEffect(()=>(G.reset(),()=>G.dispose()),[E,G]),L.useEffect(()=>{G.onContent({sessionId:E,itemCount:s.length,pendingCount:l.length,remainingOlder:g})},[s,a,o,l,E,h,g,G]),L.useLayoutEffect(()=>{G.restoreAnchor()},[s,G]);const ne=s.length===0&&!a&&!o&&l.length===0;return y.jsxs("div",{className:"transcript-wrap",children:[A.loadingOlder&&y.jsxs("div",{className:"loading-older",role:"status",children:[y.jsx(Wr,{size:14}),y.jsx("span",{children:"Loading earlier messages…"})]}),y.jsxs("div",{className:"transcript",ref:O,onScroll:()=>G.onScroll(),children:[ne&&y.jsxs("div",{className:"transcript-empty",children:[y.jsx("p",{className:"empty-title",children:"Casper is here."}),y.jsx("p",{className:"empty-sub",children:"Hand off a task. Casper keeps working server-side and has it ready when you get back."})]}),s.map(D=>D.type==="message"?D.message.role==="thinking"?y.jsx(n0,{text:D.message.text},D.message.id):y.jsx("div",{className:`msg msg-${D.message.role}`,children:D.message.role==="assistant"?y.jsx(Gs,{text:D.message.text}):y.jsxs(y.Fragment,{children:[E&&D.message.imagePaths&&D.message.imagePaths.length>0&&y.jsx("div",{className:"msg-images",children:D.message.imagePaths.map(q=>y.jsx("a",{href:dt.attachmentUrl(E,q),target:"_blank",rel:"noopener noreferrer",className:"msg-image-link",children:y.jsx("img",{src:dt.attachmentUrl(E,q),alt:q.split("/").pop()??"image",className:"msg-image",...Og})},q))}),D.message.text&&y.jsx("div",{className:"msg-user-text",children:D.message.text})]})},D.message.id):D.type==="tool_call"?y.jsx(II,{tool:D.tool,arriving:b(D.tool.id)},D.tool.id):D.type==="turn_error"?y.jsx(HI,{message:D.message,onRetry:n},D.id):y.jsx(jI,{summary:D.summary},D.id)),l.map(D=>y.jsxs("div",{className:`msg msg-user msg-pending ${D.status==="failed"?"is-failed":""}`,children:[y.jsx("div",{className:"msg-user-text",children:D.text}),D.status==="failed"&&y.jsxs("div",{className:"msg-failed",children:[y.jsx("span",{className:"msg-failed-why",children:D.error??"Failed to send."}),y.jsx("button",{className:"msg-retry",onClick:()=>t(D.id,D.text),children:"Retry"})]})]},D.id)),o&&y.jsx(n0,{text:o,live:!0}),a&&y.jsx("div",{className:"msg msg-assistant",children:y.jsx(Gs,{text:a,streaming:!0})}),(f==="running"||d)&&(N||!a&&!o)&&y.jsxs("div",{className:"thinking",children:[y.jsx("span",{className:"thinking-dot"}),y.jsx("span",{className:"thinking-dot"}),y.jsx("span",{className:"thinking-dot"})]}),h&&y.jsx("div",{className:"compaction compaction-live",children:y.jsx("div",{className:"compaction-rule",children:y.jsxs("span",{className:"compaction-head",children:[y.jsx(Wr,{size:13,className:"compaction-icon"}),y.jsx("span",{className:"compaction-label",children:"Compacting conversation…"})]})})})]}),A.showScrollButton&&y.jsx("button",{className:"scroll-to-bottom",onClick:()=>G.jumpToLatest(),"aria-label":"Scroll to latest",title:"Scroll to latest",children:y.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:y.jsx("polyline",{points:"6 9 12 15 18 9"})})})]})});function n0({text:e,live:t=!1}){const[n,s]=L.useState(!1);return y.jsxs("div",{className:`thought ${t?"is-live":""}`,children:[y.jsxs("button",{className:"thought-head",onClick:()=>s(a=>!a),children:[y.jsx("span",{className:"thought-chevron",children:n?"▾":"▸"}),y.jsx("span",{className:`thought-label ${t?"is-live":""}`,children:"Thinking"})]}),n&&y.jsx("div",{className:"thought-body",children:y.jsx("div",{className:"thought-text",children:e})})]})}function HI({message:e,onRetry:t}){const[n,s]=L.useState(!1),[a,o]=L.useState(!1),l=I0(e),d=be(h=>{for(let E=h.items.length-1;E>=0;E--){const g=h.items[E];if(g.type==="message"&&g.message.role==="user")return g.message.text}return""}),f=()=>{var h;(h=navigator.clipboard)==null||h.writeText(e).then(()=>{o(!0),setTimeout(()=>o(!1),1500)},()=>{})};return y.jsxs("div",{className:"sysnote",children:[y.jsx("div",{className:"sysnote-rule",children:y.jsxs("button",{className:"sysnote-head",onClick:()=>s(h=>!h),"aria-expanded":n,children:[y.jsx("span",{"aria-hidden":!0,children:"⚠"}),y.jsx("span",{className:"sysnote-label",children:l.title}),y.jsx("span",{className:"sysnote-toggle",children:n?"Hide details":"Show details"})]})}),n&&y.jsxs("div",{className:"sysnote-body",children:[l.fix&&y.jsx("p",{className:"sysnote-fix",children:l.fix}),y.jsx("pre",{className:"sysnote-raw",children:e}),y.jsxs("div",{className:"sysnote-actions",children:[t&&d&&y.jsx("button",{className:"btn-sm is-danger",onClick:()=>t(d),children:"Retry turn"}),y.jsx("button",{className:"btn-sm",onClick:f,children:a?"Copied":"Copy details"})]})]})]})}function jI({summary:e}){const[t,n]=L.useState(!1);return y.jsxs("div",{className:"compaction",children:[y.jsx("div",{className:"compaction-rule",children:y.jsxs("button",{className:"compaction-head",onClick:()=>n(s=>!s),"aria-expanded":t,children:[y.jsx(nx,{size:14,className:"compaction-icon"}),y.jsx("span",{className:"compaction-label",children:"Conversation compacted"}),y.jsx("span",{className:"compaction-toggle",children:t?"Hide summary":"Show summary"})]})}),t&&y.jsx("div",{className:"compaction-body",children:y.jsx(Gs,{text:e})})]})}function zI({value:e,onChange:t,label:n="Working directory",placeholder:s="leave blank for server default",hint:a="A folder that doesn't exist yet will be created.",autoFocus:o=!1}){const[l,d]=L.useState([]),[f,h]=L.useState(!1),[E,g]=L.useState(null),x=L.useRef("");L.useEffect(()=>{const O=e;x.current=O;const A=setTimeout(()=>{dt.listDirs(O).then(F=>{x.current===O&&(d(F.entries),g({path:F.target,kind:F.targetKind}))}).catch(()=>{x.current===O&&(d([]),g(null))})},150);return()=>clearTimeout(A)},[e]);const b=e.trim()!=="",N=b&&(E==null?void 0:E.kind)==="missing",w=b&&(E==null?void 0:E.kind)==="file";return y.jsxs("label",{className:"picker cwd-field",children:[y.jsx("span",{className:"picker-label",children:n}),y.jsx("input",{className:"picker-input",value:e,placeholder:s,autoComplete:"off",spellCheck:!1,autoFocus:o,onFocus:()=>h(!0),onChange:O=>{t(O.target.value),h(!0)},onBlur:()=>setTimeout(()=>h(!1),120)}),f&&l.length>0&&y.jsx("div",{className:"cwd-suggestions",children:l.map(O=>y.jsx("button",{type:"button",className:"cwd-suggestion",onMouseDown:A=>A.preventDefault(),onClick:()=>{t(O),d([])},children:O},O))}),N&&y.jsxs("span",{className:"picker-hint cwd-will-create",children:["Doesn't exist yet - this folder will be created: ",y.jsx("code",{children:E.path})]}),w&&y.jsxs("span",{className:"picker-hint cwd-is-file",children:["That path is a file, not a folder: ",y.jsx("code",{children:E.path})]}),!N&&!w&&y.jsx("span",{className:"picker-hint",children:a})]})}function $I({sessionId:e,currentCwd:t,onChanged:n,onClose:s}){const[a,o]=L.useState(t??""),[l,d]=L.useState(!1),[f,h]=L.useState(null),E=async()=>{const g=a.trim();if(!(!g||l)){d(!0),h(null);try{const x=await dt.setSessionCwd(e,g);n(x.cwd),s()}catch(x){h(x.message)}finally{d(!1)}}};return y.jsx("div",{className:"sheet-backdrop",onClick:s,children:y.jsxs("div",{className:"sheet",onClick:g=>g.stopPropagation(),children:[y.jsx("h2",{className:"sheet-title",children:"Change working directory"}),y.jsx(zI,{value:a,onChange:o,placeholder:"/path/to/folder",hint:"The session keeps its transcript. A folder that doesn't exist yet will be created.",autoFocus:!0}),f&&y.jsx("div",{className:"sheet-error",children:f}),y.jsxs("div",{className:"sheet-actions",children:[y.jsx("button",{className:"btn-ghost",onClick:s,disabled:l,children:"Cancel"}),y.jsx("button",{className:"btn-primary",onClick:E,disabled:l||!a.trim(),children:l?"Saving…":"Change folder"})]})]})})}function WI(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function YI({name:e}){var n;switch((n=e.split(".").pop())==null?void 0:n.toLowerCase()){case"ts":case"tsx":case"js":case"jsx":case"mjs":case"py":case"rb":case"go":case"rs":case"java":case"c":case"cpp":case"h":case"hpp":case"vue":case"svelte":return y.jsx(Rp,{size:15,className:"ftree-icon-svg ftree-icon-code"});case"json":case"yaml":case"yml":case"toml":case"ini":case"env":case"lock":return y.jsx(G2,{size:15,className:"ftree-icon-svg ftree-icon-config"});case"md":case"txt":case"rst":case"log":case"csv":return y.jsx(K2,{size:15,className:"ftree-icon-svg ftree-icon-text"});case"css":case"scss":case"less":case"sass":return y.jsx(J2,{size:15,className:"ftree-icon-svg ftree-icon-style"});case"html":case"svg":case"xml":return y.jsx(Rp,{size:15,className:"ftree-icon-svg ftree-icon-markup"});case"png":case"jpg":case"jpeg":case"gif":case"webp":case"bmp":case"ico":case"avif":return y.jsx(X2,{size:15,className:"ftree-icon-svg ftree-icon-image"});case"sh":case"bash":case"zsh":case"fish":case"bat":case"ps1":return y.jsx(Z2,{size:15,className:"ftree-icon-svg ftree-icon-terminal"});default:return y.jsx(Q2,{size:15,className:"ftree-icon-svg"})}}function Bg({entry:e,sessionId:t,depth:n,onPreview:s,onExpanded:a}){const o=be(g=>g.fsVersion[e.path]??0),[l,d]=L.useState({expanded:!1,children:null,loading:!1});L.useEffect(()=>{if(e.type==="directory")return a(e.path,l.expanded),()=>a(e.path,!1)},[e.path,e.type,l.expanded,a]),L.useEffect(()=>{if(!o||!l.expanded)return;let g=!0;return dt.tree(t,e.path).then(x=>{g&&d(b=>({...b,children:x.entries}))}).catch(()=>{}),()=>{g=!1}},[o]);const f=L.useCallback(async()=>{if(e.type==="directory"&&!l.loading){if(l.expanded){d(g=>({...g,expanded:!1}));return}if(l.children===null){d(g=>({...g,loading:!0}));try{const g=await dt.tree(t,e.path);d({expanded:!0,children:g.entries,loading:!1})}catch{d(g=>({...g,loading:!1}))}}else d(g=>({...g,expanded:!0}))}},[e,t,l.expanded,l.children,l.loading]),h=L.useCallback(()=>{e.type==="file"&&s(e)},[e,s]),E=n*16;return e.type==="directory"?y.jsxs(y.Fragment,{children:[y.jsxs("button",{className:"ftree-row ftree-dir",onClick:f,style:{paddingLeft:`${E+8}px`},children:[y.jsx("span",{className:`ftree-chevron ${l.expanded?"is-open":""}`,children:l.loading?y.jsx(Wr,{size:12}):y.jsx(D0,{size:12,className:"ftree-chevron-icon"})}),y.jsx("span",{className:"ftree-icon",children:l.expanded?y.jsx(q2,{size:15,className:"ftree-icon-svg ftree-icon-folder"}):y.jsx(B0,{size:15,className:"ftree-icon-svg ftree-icon-folder"})}),y.jsx("span",{className:"ftree-name",children:e.name})]}),l.expanded&&l.children&&y.jsxs("div",{className:"ftree-children",children:[l.children.map(g=>y.jsx(Bg,{entry:g,sessionId:t,depth:n+1,onPreview:s,onExpanded:a},g.path)),l.children.length===0&&y.jsx("div",{className:"ftree-empty",style:{paddingLeft:`${E+24}px`},children:"Empty"})]})]}):y.jsxs("div",{className:"ftree-row ftree-file",style:{paddingLeft:`${E+8}px`},onClick:h,children:[y.jsx("span",{className:"ftree-chevron ftree-chevron-spacer","aria-hidden":"true"}),y.jsx("span",{className:"ftree-icon",children:y.jsx(YI,{name:e.name})}),y.jsx("span",{className:"ftree-name",children:e.name}),e.size!=null&&y.jsx("span",{className:"ftree-size",children:WI(e.size)})]})}function VI({sessionId:e,onClose:t}){var D;const[n,s]=L.useState([]),[a,o]=L.useState(""),[l,d]=L.useState(!0),[f,h]=L.useState(null),[E,g]=L.useState(!1),x=be(q=>q.sessions),b=be(q=>q.setWatchedPaths),N=be(q=>q.fsVersion[""]??0),w=L.useRef(new Set),O=be(q=>q.setSessions),A=be(q=>q.openFilePreview),F=(D=x.find(q=>q.sessionId===e))==null?void 0:D.cwd,z=L.useCallback(()=>{b(["",...w.current])},[b]),G=L.useCallback((q,Z)=>{const oe=w.current;Z!==oe.has(q)&&(Z?oe.add(q):oe.delete(q),z())},[z]);L.useEffect(()=>(z(),()=>b([])),[z,b]);const ne=L.useCallback(async(q=!1)=>{q||d(!0),h(null);try{const Z=await dt.tree(e);s(Z.entries),o(Z.cwd)}catch(Z){h(Z.message)}finally{q||d(!1)}},[e]);return L.useEffect(()=>{ne()},[ne]),L.useEffect(()=>{N&&ne(!0)},[N]),y.jsxs("div",{className:"ftree-panel",children:[y.jsxs("div",{className:"ftree-header",children:[y.jsx("span",{className:"ftree-title",title:a,children:"Files"}),y.jsx("button",{className:"ftree-refresh",onClick:()=>g(!0),title:"Change working directory","aria-label":"Change working directory",children:y.jsx(B0,{size:14})}),t&&y.jsx("button",{className:"ftree-close",onClick:t,title:"Close file tree","aria-label":"Close file tree",children:y.jsx(P0,{size:15})})]}),a&&y.jsx("div",{className:"ftree-cwd",title:a,children:a}),y.jsxs("div",{className:"ftree-list",children:[l&&n.length===0&&y.jsx("div",{className:"ftree-loading",children:"Loading…"}),f&&y.jsxs("div",{className:"ftree-error",children:[f,y.jsx("button",{className:"ftree-repoint",onClick:()=>g(!0),children:"Change folder…"})]}),!l&&!f&&n.length===0&&y.jsx("div",{className:"ftree-empty",children:"No files"}),!f&&n.map(q=>y.jsx(Bg,{entry:q,sessionId:e,depth:0,onPreview:Z=>A(Z.path),onExpanded:G},q.path))]}),E&&y.jsx($I,{sessionId:e,currentCwd:a||F,onChanged:q=>{O(x.map(Z=>Z.sessionId===e?{...Z,cwd:q}:Z)),ne()},onClose:()=>g(!1)})]})}const qI=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif"]);function QI(e){const t=e.toLowerCase(),n=t.lastIndexOf("."),s=n>0?t.slice(n+1):"";return qI.has(s)?"image":s==="pdf"?"pdf":s==="html"||s==="htm"?"html":s==="md"||s==="markdown"?"markdown":"text"}const GI={ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",mjs:"javascript",cjs:"javascript",json:"json",jsonl:"json",yaml:"yaml",yml:"yaml",md:"markdown",markdown:"markdown",html:"html",htm:"html",xml:"xml",css:"css",scss:"css",less:"css",py:"python",rs:"rust",go:"go",java:"java",c:"c",h:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",cs:"csharp",rb:"ruby",php:"php",kt:"kotlin",kts:"kotlin",swift:"swift",zig:"zig",lua:"lua",tex:"latex",toml:"toml",ini:"ini",cfg:"ini",conf:"ini",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",dockerfile:"dockerfile",sql:"sql",diff:"diff",patch:"diff"};function KI(e){const t=e.toLowerCase();if(t==="dockerfile")return"dockerfile";if(t==="makefile")return"make";const n=t.split(".").pop()??"";return GI[n]??""}const xc=e=>e.split("/").pop()||e;function XI({preview:e,sessionId:t,onClose:n}){const[s,a]=L.useState(!1),[o,l]=L.useState({}),d=()=>{window.open(dt.downloadUrl(t,e.path),"_blank")},f=b=>{b.target===b.currentTarget&&n()};L.useEffect(()=>{const b=N=>{N.key==="Escape"&&n()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[n]);const h=o[e.path]??!1,E=e.kind==="html"||e.kind==="markdown",g=E&&!h,x=e.kind!=="image"&&e.kind!=="pdf"&&!g;return y.jsx("div",{className:"fpreview-backdrop",onClick:f,children:y.jsxs("div",{className:`fpreview-modal${s?" fpreview-full":""}`,children:[y.jsxs("div",{className:"fpreview-header",children:[E&&!e.error&&y.jsxs("div",{className:"fpreview-seg",role:"group","aria-label":"Preview mode",children:[y.jsx("button",{className:`fpreview-seg-btn${h?"":" is-active"}`,onClick:()=>l(b=>({...b,[e.path]:!1})),title:"Rendered","aria-label":"Rendered","aria-pressed":!h,children:y.jsx(rx,{size:17})}),y.jsx("button",{className:`fpreview-seg-btn${h?" is-active":""}`,onClick:()=>l(b=>({...b,[e.path]:!0})),title:"Source","aria-label":"Source","aria-pressed":h,children:y.jsx(ix,{size:17})})]}),y.jsx("span",{className:"fpreview-name",title:e.path,children:e.name}),y.jsx("button",{className:"fpreview-dl",onClick:d,title:"Download file","aria-label":"Download file",children:y.jsx(ex,{size:18})}),y.jsx("button",{className:"fpreview-full-btn",onClick:()=>a(b=>!b),title:s?"Exit fullscreen":"Fullscreen","aria-label":s?"Exit fullscreen":"Fullscreen",children:s?y.jsx(ax,{size:18}):y.jsx(sx,{size:18})}),y.jsx("button",{className:"fpreview-close",onClick:n,"aria-label":"Close preview",children:y.jsx(P0,{size:18})})]}),y.jsxs("div",{className:"fpreview-body",children:[e.loading&&y.jsx("div",{className:"fpreview-loading",children:y.jsx(Wr,{size:48})}),e.error&&y.jsx("div",{className:"ftree-error",children:e.error}),!e.loading&&!e.error&&e.kind==="image"&&y.jsx("img",{src:dt.previewUrl(t,e.path),alt:e.name,className:"fpreview-image"}),!e.error&&e.kind==="pdf"&&y.jsx("iframe",{src:dt.previewUrl(t,e.path),title:e.name,className:"fpreview-pdf"}),!e.error&&e.kind==="html"&&g&&y.jsx("iframe",{src:`${dt.previewUrl(t,e.path)}&raw=1`,title:e.name,className:"fpreview-html",sandbox:"allow-scripts allow-forms"}),!e.loading&&!e.error&&e.kind==="markdown"&&g&&e.content!==null&&y.jsx("div",{className:"fpreview-md",children:y.jsx(Gs,{text:e.content,html:!0})}),!e.loading&&!e.error&&x&&e.highlightedHtml&&y.jsx("div",{className:"fpreview-highlighted",dangerouslySetInnerHTML:{__html:e.highlightedHtml}}),!e.loading&&!e.error&&x&&!e.highlightedHtml&&e.content!==null&&y.jsx("pre",{className:"fpreview-code",children:e.content})]})]})})}function JI(){const e=be(l=>l.previewPath),t=be(l=>l.activeId),n=be(l=>l.closeFilePreview),[s,a]=L.useState(null),o=L.useCallback(()=>n(),[n]);return L.useEffect(()=>{if(!e||!t){a(null);return}let l=!1;const d=QI(xc(e)),f=d!=="image"&&d!=="pdf";if(a({path:e,name:xc(e),content:null,highlightedHtml:null,kind:d,loading:f,error:null}),!!f)return(async()=>{try{const h=await fetch(dt.previewUrl(t,e),{credentials:"same-origin"});if(!h.ok)throw new Error(await h.text()||`HTTP ${h.status}`);const E=await h.text();if(l)return;a(b=>b&&b.path===e?{...b,content:E,loading:!1}:b);const g=KI(xc(e));if(!g)return;const x=await _d(E,g);if(l||!x)return;a(b=>b&&b.path===e?{...b,highlightedHtml:x}:b)}catch(h){if(l)return;a(E=>E&&E.path===e?{...E,loading:!1,error:h instanceof Error?h.message:"Could not read the file"}:E)}})(),()=>{l=!0}},[e,t]),!s||!t?null:$u.createPortal(y.jsx(XI,{preview:s,sessionId:t,onClose:o}),document.body)}function Ug({ariaLabel:e,value:t,options:n,onChange:s}){const[a,o]=L.useState(!1),[l,d]=L.useState(0),f=L.useRef(null),h=n.find(x=>x.value===t);L.useEffect(()=>{if(!a)return;const x=b=>{f.current&&!f.current.contains(b.target)&&o(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[a]),L.useEffect(()=>{if(a){const x=n.findIndex(b=>b.value===t);d(x>=0?x:0)}},[a,n,t]);const E=x=>{s(x),o(!1)},g=x=>{if(!a){(x.key==="Enter"||x.key===" "||x.key==="ArrowDown")&&(x.preventDefault(),o(!0));return}if(x.key==="Escape")o(!1);else if(x.key==="ArrowDown")x.preventDefault(),d(b=>Math.min(b+1,n.length-1));else if(x.key==="ArrowUp")x.preventDefault(),d(b=>Math.max(b-1,0));else if(x.key==="Enter"){x.preventDefault();const b=n[l];b&&E(b.value)}};return y.jsxs("div",{className:"dd",ref:f,children:[y.jsxs("button",{type:"button",className:`dd-trigger ${a?"is-open":""}`,"aria-haspopup":"listbox","aria-expanded":a,onClick:()=>o(x=>!x),onKeyDown:g,"aria-label":e,children:[y.jsx("span",{className:"dd-value",children:(h==null?void 0:h.label)??t??"Select…"}),y.jsx(D0,{size:13,className:"dd-chevron"})]}),a&&y.jsx("div",{className:"dd-panel",role:"listbox",children:n.map((x,b)=>y.jsxs("button",{type:"button",role:"option","aria-selected":x.value===t,className:`dd-option ${b===l?"is-active":""} ${x.value===t?"is-selected":""}`,onMouseEnter:()=>d(b),onClick:()=>E(x.value),children:[y.jsx("span",{className:"dd-check",children:x.value===t&&y.jsx(W2,{size:15})}),y.jsx("span",{className:"dd-option-label",children:x.label}),x.hint&&y.jsx("span",{className:"dd-option-hint",children:x.hint})]},x.value))})]})}function ZI({value:e,onChange:t}){var a;const n=be(o=>o.models),s=e??((a=n.find(o=>o.isDefault))==null?void 0:a.modelId);return y.jsx(Ug,{ariaLabel:"Model",value:s,onChange:t,options:n.map(o=>({value:o.modelId,label:o.modelName,hint:`${o.rateMultiplier}x`}))})}function e6({value:e,onChange:t}){const n=be(d=>d.modes),s=be(d=>d.agents),a=be(d=>d.defaultAgentId),o=n.length>0?n:s,l=e??a;return y.jsx(Ug,{ariaLabel:"Agent",value:l,onChange:t,options:o.map(d=>({value:d.id,label:d.name}))})}const pn=18,jc=2.5,zc=(pn-jc)/2,r0=2*Math.PI*zc;function t6(e){return e>85?"var(--aurora-red)":e>60?"var(--aurora-orange)":"var(--frost)"}const i0=new Intl.NumberFormat;function n6({onCompact:e}){var w;const t=be(O=>O.observability.contextUsagePercentage),n=be(O=>O.observability.compacting),s=be(O=>O.observability.turnStatus),a=be(O=>O.activeId),o=be(O=>O.currentModelId),l=be(O=>O.models),[d,f]=L.useState(!1),h=L.useRef(null);L.useEffect(()=>{if(!d)return;const O=F=>{h.current&&!h.current.contains(F.target)&&f(!1)},A=F=>{F.key==="Escape"&&f(!1)};return document.addEventListener("mousedown",O),document.addEventListener("keydown",A),()=>{document.removeEventListener("mousedown",O),document.removeEventListener("keydown",A)}},[d]);const E=Math.max(0,Math.min(100,t)),g=t6(E),x=E/100*r0,b=(w=l.find(O=>O.modelId===o))==null?void 0:w.contextWindowTokens,N=b?Math.round(E/100*b):void 0;return a?y.jsxs("div",{className:"ctx",ref:h,children:[y.jsx("button",{type:"button",className:"ctx-btn",onClick:()=>f(O=>!O),"aria-haspopup":"dialog","aria-expanded":d,"aria-label":`Context ${E.toFixed(0)}% used`,title:`Context ${E.toFixed(0)}% used`,children:y.jsx("svg",{width:pn,height:pn,viewBox:`0 0 ${pn} ${pn}`,"aria-hidden":!0,children:y.jsxs("g",{transform:`rotate(-90 ${pn/2} ${pn/2})`,children:[y.jsx("circle",{cx:pn/2,cy:pn/2,r:zc,fill:"none",stroke:"var(--n2)",strokeWidth:jc}),y.jsx("circle",{cx:pn/2,cy:pn/2,r:zc,fill:"none",stroke:g,strokeWidth:jc,strokeLinecap:"round",strokeDasharray:`${x} ${r0-x}`})]})})}),d&&y.jsxs("div",{className:"ctx-pop",role:"dialog","aria-label":"Context usage",children:[y.jsxs("div",{className:"ctx-pop-head",children:[y.jsx("span",{className:"ctx-pop-title",children:"Context used"}),y.jsxs("span",{className:"ctx-pop-pct",style:{color:g},children:[E.toFixed(1),"%"]})]}),y.jsx("div",{className:"ctx-pop-bar",children:y.jsx("span",{className:"ctx-pop-bar-fill",style:{width:`${E}%`,background:g}})}),b?y.jsxs("dl",{className:"ctx-pop-rows",children:[y.jsxs("div",{className:"ctx-pop-row",children:[y.jsx("dt",{children:"Used"}),y.jsxs("dd",{children:[i0.format(N??0)," tokens"]})]}),y.jsxs("div",{className:"ctx-pop-row",children:[y.jsx("dt",{children:"Window"}),y.jsxs("dd",{children:[i0.format(b)," tokens"]})]})]}):y.jsx("p",{className:"ctx-pop-note",children:"Token counts need a selected model’s window size."}),y.jsx("button",{type:"button",className:"ctx-pop-compact",disabled:!a||n||s!=="idle",onClick:()=>{f(!1),e()},children:n?"Compacting…":"Compact conversation"})]})]}):null}const r6={closed:"Offline - reconnecting when possible",reconnecting:"Reconnecting…",resyncing:"Resyncing…"};function i6(e){return e.live?e.uploading?"Uploading…":e.cancelling?"Stopping…":e.compacting?"Compacting conversation…":e.running?"Casper is working…":"Ask Casper to build something…":r6[e.connStatus]??"Connecting…"}const s0=new Set(["image/png","image/jpeg","image/gif","image/webp","image/svg+xml"]);function s6({sessionId:e,onSend:t,onCancel:n,onCompact:s,onChangeModel:a,onChangeAgent:o,connStatus:l,draft:d}){const[f,h]=L.useState(""),[E,g]=L.useState([]),[x,b]=L.useState(!1),[N,w]=L.useState(null),O=be(S=>S.observability.turnStatus),A=be(S=>S.observability.compacting),F=be(S=>S.currentModeId),z=be(S=>S.currentModelId),G=O==="running",ne=O==="cancelling",D=d||l==="connected",q=L.useRef(null),Z=L.useRef(null),oe=S=>new Promise((M,Y)=>{const v=new FileReader;v.onload=()=>M(v.result.split(",")[1]??""),v.onerror=()=>Y(new Error("Failed to read file")),v.readAsDataURL(S)}),$=L.useCallback(()=>{const S=Z.current;S&&(S.style.height="auto",S.style.height=`${Math.min(S.scrollHeight,200)}px`)},[]);L.useEffect(()=>{$()},[f,$]);const le=L.useCallback(S=>{const M=S.map(Y=>{const v=s0.has(Y.type);return{id:`att-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,file:Y,isImage:v,previewUrl:v?URL.createObjectURL(Y):void 0}});g(Y=>[...Y,...M])},[]),ce=async(S,M,Y)=>{const v=[];S.length>0&&v.push({type:"text",text:Lu+S.map(he=>he.path).join(", ")+`
250
250
  `});for(let he=0;he<S.length;he++){const _e=S[he],xe=M[he];if(_e){if(_e.kind==="image"&&xe)try{const Be=await oe(xe.file);v.push({type:"image",data:Be,mimeType:xe.file.type})}catch{}else if(_e.kind==="text"&&xe)try{const Be=await xe.file.text();v.push({type:"text",text:`[File: ${_e.path}]
251
251
  \`\`\`
252
252
  ${Be}