@freeday-ai/webchat 2025.12.0-8.12.48.11696 → 2025.12.0-9.6.7.11560
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/webchat.iife.js +2 -2
- package/dist/webchat.mjs +17 -23
- package/package.json +2 -2
package/dist/webchat.iife.js
CHANGED
|
@@ -235,7 +235,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
235
235
|
`});++l<a.length;)l&&n.push({type:"text",value:`
|
|
236
236
|
`}),n.push(a[l]);return t&&a.length>0&&n.push({type:"text",value:`
|
|
237
237
|
`}),n}function B01(a){let t=0,n=a.charCodeAt(t);for(;n===9||n===32;)t++,n=a.charCodeAt(t);return a.slice(t)}function U01(a,t){const n=$c2(a,t),l=n.one(a,void 0),o=yc2(n),i=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return o&&i.children.push({type:"text",value:`
|
|
238
|
-
`},o),i}function _c2(a,t){return a&&"run"in a?async function(n,l){const o=U01(n,{file:l,...t});await a.run(o,l)}:function(n,l){return U01(n,{file:l,...a||t})}}function z01(a){if(a)throw a}var Rh0,j01;function Bc2(){if(j01)return Rh0;j01=1;var a=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,l=Object.getOwnPropertyDescriptor,o=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},i=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var g=a.call(p,"constructor"),E=p.constructor&&p.constructor.prototype&&a.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!g&&!E)return!1;var v;for(v in p);return typeof v>"u"||a.call(p,v)},s=function(p,g){n&&g.name==="__proto__"?n(p,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):p[g.name]=g.newValue},u=function(p,g){if(g==="__proto__")if(a.call(p,g)){if(l)return l(p,g).value}else return;return p[g]};return Rh0=function A(){var p,g,E,v,w,b,S=arguments[0],N=1,T=arguments.length,_=!1;for(typeof S=="boolean"&&(_=S,S=arguments[1]||{},N=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});N<T;++N)if(p=arguments[N],p!=null)for(g in p)E=u(S,g),v=u(p,g),S!==v&&(_&&v&&(i(v)||(w=o(v)))?(w?(w=!1,b=E&&o(E)?E:[]):b=E&&i(E)?E:{},s(S,{name:g,newValue:A(_,b,v)})):typeof v<"u"&&s(S,{name:g,newValue:v}));return S},Rh0}var Uc2=Bc2();const xh0=Mr(Uc2);function Th0(a){if(typeof a!="object"||a===null)return!1;const t=Object.getPrototypeOf(a);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in a)&&!(Symbol.iterator in a)}function zc2(){const a=[],t={run:n,use:l};return t;function n(...o){let i=-1;const s=o.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);u(null,...o);function u(A,...p){const g=a[++i];let E=-1;if(A){s(A);return}for(;++E<o.length;)(p[E]===null||p[E]===void 0)&&(p[E]=o[E]);o=p,g?jc2(g,u)(...p):s(null,...p)}}function l(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return a.push(o),t}}function jc2(a,t){let n;return l;function l(...s){const u=a.length>s.length;let A;u&&s.push(o);try{A=a.apply(this,s)}catch(p){const g=p;if(u&&n)throw g;return o(g)}u||(A&&A.then&&typeof A.then=="function"?A.then(i,o):A instanceof Error?o(A):i(A))}function o(s,...u){n||(n=!0,t(s,...u))}function i(s){o(null,s)}}const qt={basename:qc2,dirname:Wc2,extname:Gc2,join:Yc2,sep:"/"};function qc2(a,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ki(a);let n=0,l=-1,o=a.length,i;if(t===void 0||t.length===0||t.length>a.length){for(;o--;)if(a.codePointAt(o)===47){if(i){n=o+1;break}}else l<0&&(i=!0,l=o+1);return l<0?"":a.slice(n,l)}if(t===a)return"";let s=-1,u=t.length-1;for(;o--;)if(a.codePointAt(o)===47){if(i){n=o+1;break}}else s<0&&(i=!0,s=o+1),u>-1&&(a.codePointAt(o)===t.codePointAt(u--)?u<0&&(l=o):(u=-1,l=s));return n===l?l=s:l<0&&(l=a.length),a.slice(n,l)}function Wc2(a){if(ki(a),a.length===0)return".";let t=-1,n=a.length,l;for(;--n;)if(a.codePointAt(n)===47){if(l){t=n;break}}else l||(l=!0);return t<0?a.codePointAt(0)===47?"/":".":t===1&&a.codePointAt(0)===47?"//":a.slice(0,t)}function Gc2(a){ki(a);let t=a.length,n=-1,l=0,o=-1,i=0,s;for(;t--;){const u=a.codePointAt(t);if(u===47){if(s){l=t+1;break}continue}n<0&&(s=!0,n=t+1),u===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===l+1?"":a.slice(o,n)}function Yc2(...a){let t=-1,n;for(;++t<a.length;)ki(a[t]),a[t]&&(n=n===void 0?a[t]:n+"/"+a[t]);return n===void 0?".":Kc2(n)}function Kc2(a){ki(a);const t=a.codePointAt(0)===47;let n=Xc2(a,!t);return n.length===0&&!t&&(n="."),n.length>0&&a.codePointAt(a.length-1)===47&&(n+="/"),t?"/"+n:n}function Xc2(a,t){let n="",l=0,o=-1,i=0,s=-1,u,A;for(;++s<=a.length;){if(s<a.length)u=a.codePointAt(s);else{if(u===47)break;u=47}if(u===47){if(!(o===s-1||i===1))if(o!==s-1&&i===2){if(n.length<2||l!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(A=n.lastIndexOf("/"),A!==n.length-1){A<0?(n="",l=0):(n=n.slice(0,A),l=n.length-1-n.lastIndexOf("/")),o=s,i=0;continue}}else if(n.length>0){n="",l=0,o=s,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",l=2)}else n.length>0?n+="/"+a.slice(o+1,s):n=a.slice(o+1,s),l=s-o-1;o=s,i=0}else u===46&&i>-1?i++:i=-1}return n}function ki(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}const Qc2={cwd:Jc2};function Jc2(){return"/"}function Nh0(a){return!!(a!==null&&typeof a=="object"&&"href"in a&&a.href&&"protocol"in a&&a.protocol&&a.auth===void 0)}function ei2(a){if(typeof a=="string")a=new URL(a);else if(!Nh0(a)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+a+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(a.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return ai2(a)}function ai2(a){if(a.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const t=a.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const l=t.codePointAt(n+2);if(l===70||l===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const $h0=["history","path","basename","stem","extname","dirname"];class q01{constructor(t){let n;t?Nh0(t)?n={path:t}:typeof t=="string"||ti2(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Qc2.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<$h0.length;){const i=$h0[l];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)$h0.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?qt.basename(this.path):void 0}set basename(t){Dh0(t,"basename"),kh0(t,"basename"),this.path=qt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?qt.dirname(this.path):void 0}set dirname(t){W01(this.basename,"dirname"),this.path=qt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?qt.extname(this.path):void 0}set extname(t){if(kh0(t,"extname"),W01(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=qt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Nh0(t)&&(t=ei2(t)),Dh0(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?qt.basename(this.path,this.extname):void 0}set stem(t){Dh0(t,"stem"),kh0(t,"stem"),this.path=qt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,l){const o=this.message(t,n,l);throw o.fatal=!0,o}info(t,n,l){const o=this.message(t,n,l);return o.fatal=void 0,o}message(t,n,l){const o=new x6(t,n,l);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function kh0(a,t){if(a&&a.includes(qt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+qt.sep+"`")}function Dh0(a,t){if(!a)throw new Error("`"+t+"` cannot be empty")}function W01(a,t){if(!a)throw new Error("Setting `"+t+"` requires `path` to be set too")}function ti2(a){return!!(a&&typeof a=="object"&&"byteLength"in a&&"byteOffset"in a)}const ni2=(function(a){const l=this.constructor.prototype,o=l[a],i=function(){return o.apply(i,arguments)};return Object.setPrototypeOf(i,l),i}),li2={}.hasOwnProperty;class Ph0 extends ni2{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=zc2()}copy(){const t=new Ph0;let n=-1;for(;++n<this.attachers.length;){const l=this.attachers[n];t.use(...l)}return t.data(xh0(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Bh0("data",this.frozen),this.namespace[t]=n,this):li2.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Bh0("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const o=n.call(t,...l);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=eA(t),l=this.parser||this.Parser;return Oh0("parse",l),l(String(n),n)}process(t,n){const l=this;return this.freeze(),Oh0("process",this.parser||this.Parser),_h0("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,s){const u=eA(t),A=l.parse(u);l.run(A,u,function(g,E,v){if(g||!E||!v)return p(g);const w=E,b=l.stringify(w,v);ci2(b)?v.value=b:v.result=b,p(g,v)});function p(g,E){g||!E?s(g):i?i(E):n(void 0,E)}}}processSync(t){let n=!1,l;return this.freeze(),Oh0("processSync",this.parser||this.Parser),_h0("processSync",this.compiler||this.Compiler),this.process(t,o),Y01("processSync","process",n),l;function o(i,s){n=!0,z01(i),l=s}}run(t,n,l){G01(t),this.freeze();const o=this.transformers;return!l&&typeof n=="function"&&(l=n,n=void 0),l?i(void 0,l):new Promise(i);function i(s,u){const A=eA(n);o.run(t,A,p);function p(g,E,v){const w=E||t;g?u(g):s?s(w):l(void 0,w,v)}}}runSync(t,n){let l=!1,o;return this.run(t,n,i),Y01("runSync","run",l),o;function i(s,u){z01(s),o=u,l=!0}}stringify(t,n){this.freeze();const l=eA(n),o=this.compiler||this.Compiler;return _h0("stringify",o),G01(t),o(t,l)}use(t,...n){const l=this.attachers,o=this.namespace;if(Bh0("use",this.frozen),t!=null)if(typeof t=="function")A(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(p){if(typeof p=="function")A(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[g,...E]=p;A(g,E)}else s(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function s(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(p.plugins),p.settings&&(o.settings=xh0(!0,o.settings,p.settings))}function u(p){let g=-1;if(p!=null)if(Array.isArray(p))for(;++g<p.length;){const E=p[g];i(E)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function A(p,g){let E=-1,v=-1;for(;++E<l.length;)if(l[E][0]===p){v=E;break}if(v===-1)l.push([p,...g]);else if(g.length>0){let[w,...b]=g;const S=l[v][1];Th0(S)&&Th0(w)&&(w=xh0(!0,S,w)),l[v]=[p,w,...b]}}}}const ri2=new Ph0().freeze();function Oh0(a,t){if(typeof t!="function")throw new TypeError("Cannot `"+a+"` without `parser`")}function _h0(a,t){if(typeof t!="function")throw new TypeError("Cannot `"+a+"` without `compiler`")}function Bh0(a,t){if(t)throw new Error("Cannot call `"+a+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function G01(a){if(!Th0(a)||typeof a.type!="string")throw new TypeError("Expected node, got `"+a+"`")}function Y01(a,t,n){if(!n)throw new Error("`"+a+"` finished async. Use `"+t+"` instead")}function eA(a){return oi2(a)?a:new q01(a)}function oi2(a){return!!(a&&typeof a=="object"&&"message"in a&&"messages"in a)}function ci2(a){return typeof a=="string"||ii2(a)}function ii2(a){return!!(a&&typeof a=="object"&&"byteLength"in a&&"byteOffset"in a)}const si2="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",K01=[],X01={allowDangerousHtml:!0},mi2=/^(https?|ircs?|mailto|xmpp)$/i,ui2=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Q01(a){const t=hi2(a),n=di2(a);return Ai2(t.runSync(t.parse(n),n),a)}function hi2(a){const t=a.rehypePlugins||K01,n=a.remarkPlugins||K01,l=a.remarkRehypeOptions?{...a.remarkRehypeOptions,...X01}:X01;return ri2().use(Wo2).use(n).use(_c2,l).use(t)}function di2(a){const t=a.children||"",n=new q01;return typeof t=="string"&&(n.value=t),n}function Ai2(a,t){const n=t.allowedElements,l=t.allowElement,o=t.components,i=t.disallowedElements,s=t.skipHtml,u=t.unwrapDisallowed,A=t.urlTransform||pi2;for(const g of ui2)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+si2+g.id,void 0);return t.className&&(a={type:"element",tagName:"div",properties:{className:t.className},children:a.type==="root"?a.children:[a]}),Jd(a,p),P72(a,{Fragment:k.Fragment,components:o,ignoreInvalidStyle:!0,jsx:k.jsx,jsxs:k.jsxs,passKeys:!0,passNode:!0});function p(g,E,v){if(g.type==="raw"&&v&&typeof E=="number")return s?v.children.splice(E,1):v.children[E]={type:"text",value:g.value},E;if(g.type==="element"){let w;for(w in Hh0)if(Object.hasOwn(Hh0,w)&&Object.hasOwn(g.properties,w)){const b=g.properties[w],S=Hh0[w];(S===null||S.includes(g.tagName))&&(g.properties[w]=A(String(b||""),w,g))}}if(g.type==="element"){let w=n?!n.includes(g.tagName):i?i.includes(g.tagName):!1;if(!w&&l&&typeof E=="number"&&(w=!l(g,E,v)),w&&v&&typeof E=="number")return u&&g.children?v.children.splice(E,1,...g.children):v.children.splice(E,1),E}}}function pi2(a){const t=a.indexOf(":"),n=a.indexOf("?"),l=a.indexOf("#"),o=a.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||l!==-1&&t>l||mi2.test(a.slice(0,t))?a:""}const J01=/[#.]/g;function fi2(a,t){const n=a||"",l={};let o=0,i,s;for(;o<n.length;){J01.lastIndex=o;const u=J01.exec(n),A=n.slice(o,u?u.index:n.length);A&&(i?i==="#"?l.id=A:Array.isArray(l.className)?l.className.push(A):l.className=[A]:s=A,o+=A.length),u&&(i=u[0],o++)}return{type:"element",tagName:s||t||"div",properties:l,children:[]}}function e11(a,t,n){const l=n?Ei2(n):void 0;function o(i,s,...u){let A;if(i==null){A={type:"root",children:[]};const p=s;u.unshift(p)}else{A=fi2(i,t);const p=A.tagName.toLowerCase(),g=l?l.get(p):void 0;if(A.tagName=g||p,Zi2(s))u.unshift(s);else for(const[E,v]of Object.entries(s))Hi2(a,A.properties,E,v)}for(const p of u)Uh0(A.children,p);return A.type==="element"&&A.tagName==="template"&&(A.content={type:"root",children:A.children},A.children=[]),A}return o}function Zi2(a){if(a===null||typeof a!="object"||Array.isArray(a))return!0;if(typeof a.type!="string")return!1;const t=a,n=Object.keys(a);for(const l of n){const o=t[l];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const i=o;for(const s of i)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in a&&Array.isArray(a.children))}function Hi2(a,t,n,l){const o=hh0(a,n);let i;if(l!=null){if(typeof l=="number"){if(Number.isNaN(l))return;i=l}else typeof l=="boolean"?i=l:typeof l=="string"?o.spaceSeparated?i=jJ0(l):o.commaSeparated?i=SJ0(l):o.commaOrSpaceSeparated?i=jJ0(SJ0(l).join(" ")):i=a11(o,o.property,l):Array.isArray(l)?i=[...l]:i=o.property==="style"?gi2(l):String(l);if(Array.isArray(i)){const s=[];for(const u of i)s.push(a11(o,o.property,u));i=s}o.property==="className"&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[o.property]=i}}function Uh0(a,t){if(t!=null)if(typeof t=="number"||typeof t=="string")a.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Uh0(a,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Uh0(a,t.children):a.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function a11(a,t,n){if(typeof n=="string"){if(a.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((a.boolean||a.overloadedBoolean)&&(n===""||Fi(n)===Fi(t)))return!0}return n}function gi2(a){const t=[];for(const[n,l]of Object.entries(a))t.push([n,l].join(": "));return t.join("; ")}function Ei2(a){const t=new Map;for(const n of a)t.set(n.toLowerCase(),n);return t}const Vi2=["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"],Mi2=e11(_d,"div"),vi2=e11(c9,"g",Vi2);function Li2(a){const t=String(a),n=[];return{toOffset:o,toPoint:l};function l(i){if(typeof i=="number"&&i>-1&&i<=t.length){let s=0;for(;;){let u=n[s];if(u===void 0){const A=t11(t,n[s-1]);u=A===-1?t.length+1:A+1,n[s]=u}if(u>i)return{line:s+1,column:i-(s>0?n[s-1]:0)+1,offset:i};s++}}}function o(i){if(i&&typeof i.line=="number"&&typeof i.column=="number"&&!Number.isNaN(i.line)&&!Number.isNaN(i.column)){for(;n.length<i.line;){const u=n[n.length-1],A=t11(t,u),p=A===-1?t.length+1:A+1;if(u===p)break;n.push(p)}const s=(i.line>1?n[i.line-2]:0)+i.column-1;if(s<n[i.line-1])return s}}}function t11(a,t){const n=a.indexOf("\r",t),l=a.indexOf(`
|
|
238
|
+
`},o),i}function _c2(a,t){return a&&"run"in a?async function(n,l){const o=U01(n,{file:l,...t});await a.run(o,l)}:function(n,l){return U01(n,{file:l,...a||t})}}function z01(a){if(a)throw a}var Rh0,j01;function Bc2(){if(j01)return Rh0;j01=1;var a=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,l=Object.getOwnPropertyDescriptor,o=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},i=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var g=a.call(p,"constructor"),E=p.constructor&&p.constructor.prototype&&a.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!g&&!E)return!1;var v;for(v in p);return typeof v>"u"||a.call(p,v)},s=function(p,g){n&&g.name==="__proto__"?n(p,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):p[g.name]=g.newValue},u=function(p,g){if(g==="__proto__")if(a.call(p,g)){if(l)return l(p,g).value}else return;return p[g]};return Rh0=function A(){var p,g,E,v,w,b,S=arguments[0],N=1,T=arguments.length,_=!1;for(typeof S=="boolean"&&(_=S,S=arguments[1]||{},N=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});N<T;++N)if(p=arguments[N],p!=null)for(g in p)E=u(S,g),v=u(p,g),S!==v&&(_&&v&&(i(v)||(w=o(v)))?(w?(w=!1,b=E&&o(E)?E:[]):b=E&&i(E)?E:{},s(S,{name:g,newValue:A(_,b,v)})):typeof v<"u"&&s(S,{name:g,newValue:v}));return S},Rh0}var Uc2=Bc2();const xh0=Mr(Uc2);function Th0(a){if(typeof a!="object"||a===null)return!1;const t=Object.getPrototypeOf(a);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in a)&&!(Symbol.iterator in a)}function zc2(){const a=[],t={run:n,use:l};return t;function n(...o){let i=-1;const s=o.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);u(null,...o);function u(A,...p){const g=a[++i];let E=-1;if(A){s(A);return}for(;++E<o.length;)(p[E]===null||p[E]===void 0)&&(p[E]=o[E]);o=p,g?jc2(g,u)(...p):s(null,...p)}}function l(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return a.push(o),t}}function jc2(a,t){let n;return l;function l(...s){const u=a.length>s.length;let A;u&&s.push(o);try{A=a.apply(this,s)}catch(p){const g=p;if(u&&n)throw g;return o(g)}u||(A&&A.then&&typeof A.then=="function"?A.then(i,o):A instanceof Error?o(A):i(A))}function o(s,...u){n||(n=!0,t(s,...u))}function i(s){o(null,s)}}const qt={basename:qc2,dirname:Wc2,extname:Gc2,join:Yc2,sep:"/"};function qc2(a,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ki(a);let n=0,l=-1,o=a.length,i;if(t===void 0||t.length===0||t.length>a.length){for(;o--;)if(a.codePointAt(o)===47){if(i){n=o+1;break}}else l<0&&(i=!0,l=o+1);return l<0?"":a.slice(n,l)}if(t===a)return"";let s=-1,u=t.length-1;for(;o--;)if(a.codePointAt(o)===47){if(i){n=o+1;break}}else s<0&&(i=!0,s=o+1),u>-1&&(a.codePointAt(o)===t.codePointAt(u--)?u<0&&(l=o):(u=-1,l=s));return n===l?l=s:l<0&&(l=a.length),a.slice(n,l)}function Wc2(a){if(ki(a),a.length===0)return".";let t=-1,n=a.length,l;for(;--n;)if(a.codePointAt(n)===47){if(l){t=n;break}}else l||(l=!0);return t<0?a.codePointAt(0)===47?"/":".":t===1&&a.codePointAt(0)===47?"//":a.slice(0,t)}function Gc2(a){ki(a);let t=a.length,n=-1,l=0,o=-1,i=0,s;for(;t--;){const u=a.codePointAt(t);if(u===47){if(s){l=t+1;break}continue}n<0&&(s=!0,n=t+1),u===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===l+1?"":a.slice(o,n)}function Yc2(...a){let t=-1,n;for(;++t<a.length;)ki(a[t]),a[t]&&(n=n===void 0?a[t]:n+"/"+a[t]);return n===void 0?".":Kc2(n)}function Kc2(a){ki(a);const t=a.codePointAt(0)===47;let n=Xc2(a,!t);return n.length===0&&!t&&(n="."),n.length>0&&a.codePointAt(a.length-1)===47&&(n+="/"),t?"/"+n:n}function Xc2(a,t){let n="",l=0,o=-1,i=0,s=-1,u,A;for(;++s<=a.length;){if(s<a.length)u=a.codePointAt(s);else{if(u===47)break;u=47}if(u===47){if(!(o===s-1||i===1))if(o!==s-1&&i===2){if(n.length<2||l!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(A=n.lastIndexOf("/"),A!==n.length-1){A<0?(n="",l=0):(n=n.slice(0,A),l=n.length-1-n.lastIndexOf("/")),o=s,i=0;continue}}else if(n.length>0){n="",l=0,o=s,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",l=2)}else n.length>0?n+="/"+a.slice(o+1,s):n=a.slice(o+1,s),l=s-o-1;o=s,i=0}else u===46&&i>-1?i++:i=-1}return n}function ki(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}const Qc2={cwd:Jc2};function Jc2(){return"/"}function Nh0(a){return!!(a!==null&&typeof a=="object"&&"href"in a&&a.href&&"protocol"in a&&a.protocol&&a.auth===void 0)}function ei2(a){if(typeof a=="string")a=new URL(a);else if(!Nh0(a)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+a+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(a.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return ai2(a)}function ai2(a){if(a.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const t=a.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const l=t.codePointAt(n+2);if(l===70||l===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const $h0=["history","path","basename","stem","extname","dirname"];class q01{constructor(t){let n;t?Nh0(t)?n={path:t}:typeof t=="string"||ti2(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Qc2.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<$h0.length;){const i=$h0[l];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)$h0.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?qt.basename(this.path):void 0}set basename(t){Dh0(t,"basename"),kh0(t,"basename"),this.path=qt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?qt.dirname(this.path):void 0}set dirname(t){W01(this.basename,"dirname"),this.path=qt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?qt.extname(this.path):void 0}set extname(t){if(kh0(t,"extname"),W01(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=qt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Nh0(t)&&(t=ei2(t)),Dh0(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?qt.basename(this.path,this.extname):void 0}set stem(t){Dh0(t,"stem"),kh0(t,"stem"),this.path=qt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,l){const o=this.message(t,n,l);throw o.fatal=!0,o}info(t,n,l){const o=this.message(t,n,l);return o.fatal=void 0,o}message(t,n,l){const o=new x6(t,n,l);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function kh0(a,t){if(a&&a.includes(qt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+qt.sep+"`")}function Dh0(a,t){if(!a)throw new Error("`"+t+"` cannot be empty")}function W01(a,t){if(!a)throw new Error("Setting `"+t+"` requires `path` to be set too")}function ti2(a){return!!(a&&typeof a=="object"&&"byteLength"in a&&"byteOffset"in a)}const ni2=(function(a){const l=this.constructor.prototype,o=l[a],i=function(){return o.apply(i,arguments)};return Object.setPrototypeOf(i,l),i}),li2={}.hasOwnProperty;class Ph0 extends ni2{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=zc2()}copy(){const t=new Ph0;let n=-1;for(;++n<this.attachers.length;){const l=this.attachers[n];t.use(...l)}return t.data(xh0(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Bh0("data",this.frozen),this.namespace[t]=n,this):li2.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Bh0("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const o=n.call(t,...l);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=eA(t),l=this.parser||this.Parser;return Oh0("parse",l),l(String(n),n)}process(t,n){const l=this;return this.freeze(),Oh0("process",this.parser||this.Parser),_h0("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,s){const u=eA(t),A=l.parse(u);l.run(A,u,function(g,E,v){if(g||!E||!v)return p(g);const w=E,b=l.stringify(w,v);ci2(b)?v.value=b:v.result=b,p(g,v)});function p(g,E){g||!E?s(g):i?i(E):n(void 0,E)}}}processSync(t){let n=!1,l;return this.freeze(),Oh0("processSync",this.parser||this.Parser),_h0("processSync",this.compiler||this.Compiler),this.process(t,o),Y01("processSync","process",n),l;function o(i,s){n=!0,z01(i),l=s}}run(t,n,l){G01(t),this.freeze();const o=this.transformers;return!l&&typeof n=="function"&&(l=n,n=void 0),l?i(void 0,l):new Promise(i);function i(s,u){const A=eA(n);o.run(t,A,p);function p(g,E,v){const w=E||t;g?u(g):s?s(w):l(void 0,w,v)}}}runSync(t,n){let l=!1,o;return this.run(t,n,i),Y01("runSync","run",l),o;function i(s,u){z01(s),o=u,l=!0}}stringify(t,n){this.freeze();const l=eA(n),o=this.compiler||this.Compiler;return _h0("stringify",o),G01(t),o(t,l)}use(t,...n){const l=this.attachers,o=this.namespace;if(Bh0("use",this.frozen),t!=null)if(typeof t=="function")A(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(p){if(typeof p=="function")A(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[g,...E]=p;A(g,E)}else s(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function s(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(p.plugins),p.settings&&(o.settings=xh0(!0,o.settings,p.settings))}function u(p){let g=-1;if(p!=null)if(Array.isArray(p))for(;++g<p.length;){const E=p[g];i(E)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function A(p,g){let E=-1,v=-1;for(;++E<l.length;)if(l[E][0]===p){v=E;break}if(v===-1)l.push([p,...g]);else if(g.length>0){let[w,...b]=g;const S=l[v][1];Th0(S)&&Th0(w)&&(w=xh0(!0,S,w)),l[v]=[p,w,...b]}}}}const ri2=new Ph0().freeze();function Oh0(a,t){if(typeof t!="function")throw new TypeError("Cannot `"+a+"` without `parser`")}function _h0(a,t){if(typeof t!="function")throw new TypeError("Cannot `"+a+"` without `compiler`")}function Bh0(a,t){if(t)throw new Error("Cannot call `"+a+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function G01(a){if(!Th0(a)||typeof a.type!="string")throw new TypeError("Expected node, got `"+a+"`")}function Y01(a,t,n){if(!n)throw new Error("`"+a+"` finished async. Use `"+t+"` instead")}function eA(a){return oi2(a)?a:new q01(a)}function oi2(a){return!!(a&&typeof a=="object"&&"message"in a&&"messages"in a)}function ci2(a){return typeof a=="string"||ii2(a)}function ii2(a){return!!(a&&typeof a=="object"&&"byteLength"in a&&"byteOffset"in a)}const si2="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",K01=[],X01={allowDangerousHtml:!0},mi2=/^(https?|ircs?|mailto|xmpp)$/i,ui2=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Q01(a){const t=hi2(a),n=di2(a);return Ai2(t.runSync(t.parse(n),n),a)}function hi2(a){const t=a.rehypePlugins||K01,n=a.remarkPlugins||K01,l=a.remarkRehypeOptions?{...a.remarkRehypeOptions,...X01}:X01;return ri2().use(Wo2).use(n).use(_c2,l).use(t)}function di2(a){const t=a.children||"",n=new q01;return typeof t=="string"&&(n.value=t),n}function Ai2(a,t){const n=t.allowedElements,l=t.allowElement,o=t.components,i=t.disallowedElements,s=t.skipHtml,u=t.unwrapDisallowed,A=t.urlTransform||pi2;for(const g of ui2)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+si2+g.id,void 0);return Jd(a,p),P72(a,{Fragment:k.Fragment,components:o,ignoreInvalidStyle:!0,jsx:k.jsx,jsxs:k.jsxs,passKeys:!0,passNode:!0});function p(g,E,v){if(g.type==="raw"&&v&&typeof E=="number")return s?v.children.splice(E,1):v.children[E]={type:"text",value:g.value},E;if(g.type==="element"){let w;for(w in Hh0)if(Object.hasOwn(Hh0,w)&&Object.hasOwn(g.properties,w)){const b=g.properties[w],S=Hh0[w];(S===null||S.includes(g.tagName))&&(g.properties[w]=A(String(b||""),w,g))}}if(g.type==="element"){let w=n?!n.includes(g.tagName):i?i.includes(g.tagName):!1;if(!w&&l&&typeof E=="number"&&(w=!l(g,E,v)),w&&v&&typeof E=="number")return u&&g.children?v.children.splice(E,1,...g.children):v.children.splice(E,1),E}}}function pi2(a){const t=a.indexOf(":"),n=a.indexOf("?"),l=a.indexOf("#"),o=a.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||l!==-1&&t>l||mi2.test(a.slice(0,t))?a:""}const J01=/[#.]/g;function fi2(a,t){const n=a||"",l={};let o=0,i,s;for(;o<n.length;){J01.lastIndex=o;const u=J01.exec(n),A=n.slice(o,u?u.index:n.length);A&&(i?i==="#"?l.id=A:Array.isArray(l.className)?l.className.push(A):l.className=[A]:s=A,o+=A.length),u&&(i=u[0],o++)}return{type:"element",tagName:s||t||"div",properties:l,children:[]}}function e11(a,t,n){const l=n?Ei2(n):void 0;function o(i,s,...u){let A;if(i==null){A={type:"root",children:[]};const p=s;u.unshift(p)}else{A=fi2(i,t);const p=A.tagName.toLowerCase(),g=l?l.get(p):void 0;if(A.tagName=g||p,Zi2(s))u.unshift(s);else for(const[E,v]of Object.entries(s))Hi2(a,A.properties,E,v)}for(const p of u)Uh0(A.children,p);return A.type==="element"&&A.tagName==="template"&&(A.content={type:"root",children:A.children},A.children=[]),A}return o}function Zi2(a){if(a===null||typeof a!="object"||Array.isArray(a))return!0;if(typeof a.type!="string")return!1;const t=a,n=Object.keys(a);for(const l of n){const o=t[l];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const i=o;for(const s of i)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in a&&Array.isArray(a.children))}function Hi2(a,t,n,l){const o=hh0(a,n);let i;if(l!=null){if(typeof l=="number"){if(Number.isNaN(l))return;i=l}else typeof l=="boolean"?i=l:typeof l=="string"?o.spaceSeparated?i=jJ0(l):o.commaSeparated?i=SJ0(l):o.commaOrSpaceSeparated?i=jJ0(SJ0(l).join(" ")):i=a11(o,o.property,l):Array.isArray(l)?i=[...l]:i=o.property==="style"?gi2(l):String(l);if(Array.isArray(i)){const s=[];for(const u of i)s.push(a11(o,o.property,u));i=s}o.property==="className"&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[o.property]=i}}function Uh0(a,t){if(t!=null)if(typeof t=="number"||typeof t=="string")a.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Uh0(a,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Uh0(a,t.children):a.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function a11(a,t,n){if(typeof n=="string"){if(a.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((a.boolean||a.overloadedBoolean)&&(n===""||Fi(n)===Fi(t)))return!0}return n}function gi2(a){const t=[];for(const[n,l]of Object.entries(a))t.push([n,l].join(": "));return t.join("; ")}function Ei2(a){const t=new Map;for(const n of a)t.set(n.toLowerCase(),n);return t}const Vi2=["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"],Mi2=e11(_d,"div"),vi2=e11(c9,"g",Vi2);function Li2(a){const t=String(a),n=[];return{toOffset:o,toPoint:l};function l(i){if(typeof i=="number"&&i>-1&&i<=t.length){let s=0;for(;;){let u=n[s];if(u===void 0){const A=t11(t,n[s-1]);u=A===-1?t.length+1:A+1,n[s]=u}if(u>i)return{line:s+1,column:i-(s>0?n[s-1]:0)+1,offset:i};s++}}}function o(i){if(i&&typeof i.line=="number"&&typeof i.column=="number"&&!Number.isNaN(i.line)&&!Number.isNaN(i.column)){for(;n.length<i.line;){const u=n[n.length-1],A=t11(t,u),p=A===-1?t.length+1:A+1;if(u===p)break;n.push(p)}const s=(i.line>1?n[i.line-2]:0)+i.column-1;if(s<n[i.line-1])return s}}}function t11(a,t){const n=a.indexOf("\r",t),l=a.indexOf(`
|
|
239
239
|
`,t);return l===-1?n:n===-1||n+1===l?l:n<l?n:l}const zr={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/"},n11={}.hasOwnProperty,wi2=Object.prototype;function yi2(a,t){const n=t||{};return zh0({file:n.file||void 0,location:!1,schema:n.space==="svg"?c9:_d,verbose:n.verbose||!1},a)}function zh0(a,t){let n;switch(t.nodeName){case"#comment":{const l=t;return n={type:"comment",value:l.data},aA(a,l,n),n}case"#document":case"#document-fragment":{const l=t,o="mode"in l?l.mode==="quirks"||l.mode==="limited-quirks":!1;if(n={type:"root",children:l11(a,t.childNodes),data:{quirksMode:o}},a.file&&a.location){const i=String(a.file),s=Li2(i),u=s.toPoint(0),A=s.toPoint(i.length);n.position={start:u,end:A}}return n}case"#documentType":{const l=t;return n={type:"doctype"},aA(a,l,n),n}case"#text":{const l=t;return n={type:"text",value:l.value},aA(a,l,n),n}default:return n=Fi2(a,t),n}}function l11(a,t){let n=-1;const l=[];for(;++n<t.length;){const o=zh0(a,t[n]);l.push(o)}return l}function Fi2(a,t){const n=a.schema;a.schema=t.namespaceURI===zr.svg?c9:_d;let l=-1;const o={};for(;++l<t.attrs.length;){const u=t.attrs[l],A=(u.prefix?u.prefix+":":"")+u.name;n11.call(wi2,A)||(o[A]=u.value)}const s=(a.schema.space==="svg"?vi2:Mi2)(t.tagName,o,l11(a,t.childNodes));if(aA(a,t,s),s.tagName==="template"){const u=t,A=u.sourceCodeLocation,p=A&&A.startTag&&d9(A.startTag),g=A&&A.endTag&&d9(A.endTag),E=zh0(a,u.content);p&&g&&a.file&&(E.position={start:p.end,end:g.start}),s.content=E}return a.schema=n,s}function aA(a,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&a.file){const l=bi2(a,n,t.sourceCodeLocation);l&&(a.location=!0,n.position=l)}}function bi2(a,t,n){const l=d9(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(l&&!n.endTag&&o&&o.position&&o.position.end&&(l.end=Object.assign({},o.position.end)),a.verbose){const i={};let s;if(n.attrs)for(s in n.attrs)n11.call(n.attrs,s)&&(i[hh0(a.schema,s).property]=d9(n.attrs[s]));n.startTag;const u=d9(n.startTag),A=n.endTag?d9(n.endTag):void 0,p={opening:u};A&&(p.closing=A),p.properties=i,t.data={position:p}}}return l}function d9(a){const t=r11({line:a.startLine,column:a.startCol,offset:a.startOffset}),n=r11({line:a.endLine,column:a.endCol,offset:a.endOffset});return t||n?{start:t,end:n}:void 0}function r11(a){return a.line&&a.column?a:void 0}class Di{constructor(t,n,l){this.property=t,this.normal=n,l&&(this.space=l)}}Di.prototype.property={},Di.prototype.normal={},Di.prototype.space=null;function o11(a,t){const n={},l={};let o=-1;for(;++o<a.length;)Object.assign(n,a[o].property),Object.assign(l,a[o].normal);return new Di(n,l,t)}function jh0(a){return a.toLowerCase()}class Ma{constructor(t,n){this.property=t,this.attribute=n}}Ma.prototype.space=null,Ma.prototype.boolean=!1,Ma.prototype.booleanish=!1,Ma.prototype.overloadedBoolean=!1,Ma.prototype.number=!1,Ma.prototype.commaSeparated=!1,Ma.prototype.spaceSeparated=!1,Ma.prototype.commaOrSpaceSeparated=!1,Ma.prototype.mustUseProperty=!1,Ma.prototype.defined=!1;let Ci2=0;const M2=jr(),ye=jr(),c11=jr(),c1=jr(),C8=jr(),A9=jr(),Q4=jr();function jr(){return 2**++Ci2}const qh0=Object.freeze(Object.defineProperty({__proto__:null,boolean:M2,booleanish:ye,commaOrSpaceSeparated:Q4,commaSeparated:A9,number:c1,overloadedBoolean:c11,spaceSeparated:C8},Symbol.toStringTag,{value:"Module"})),Wh0=Object.keys(qh0);class Gh0 extends Ma{constructor(t,n,l,o){let i=-1;if(super(t,n),i11(this,"space",o),typeof l=="number")for(;++i<Wh0.length;){const s=Wh0[i];i11(this,Wh0[i],(l&qh0[s])===qh0[s])}}}Gh0.prototype.defined=!0;function i11(a,t,n){n&&(a[t]=n)}const Ii2={}.hasOwnProperty;function p9(a){const t={},n={};let l;for(l in a.properties)if(Ii2.call(a.properties,l)){const o=a.properties[l],i=new Gh0(l,a.transform(a.attributes||{},l),o,a.space);a.mustUseProperty&&a.mustUseProperty.includes(l)&&(i.mustUseProperty=!0),t[l]=i,n[jh0(l)]=l,n[jh0(i.attribute)]=l}return new Di(t,n,a.space)}const s11=p9({space:"xlink",transform(a,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),m11=p9({space:"xml",transform(a,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function u11(a,t){return t in a?a[t]:t}function h11(a,t){return u11(a,t.toLowerCase())}const d11=p9({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:h11,properties:{xmlns:null,xmlnsXLink:null}}),A11=p9({transform(a,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:ye,ariaAutoComplete:null,ariaBusy:ye,ariaChecked:ye,ariaColCount:c1,ariaColIndex:c1,ariaColSpan:c1,ariaControls:C8,ariaCurrent:null,ariaDescribedBy:C8,ariaDetails:null,ariaDisabled:ye,ariaDropEffect:C8,ariaErrorMessage:null,ariaExpanded:ye,ariaFlowTo:C8,ariaGrabbed:ye,ariaHasPopup:null,ariaHidden:ye,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:C8,ariaLevel:c1,ariaLive:null,ariaModal:ye,ariaMultiLine:ye,ariaMultiSelectable:ye,ariaOrientation:null,ariaOwns:C8,ariaPlaceholder:null,ariaPosInSet:c1,ariaPressed:ye,ariaReadOnly:ye,ariaRelevant:null,ariaRequired:ye,ariaRoleDescription:C8,ariaRowCount:c1,ariaRowIndex:c1,ariaRowSpan:c1,ariaSelected:ye,ariaSetSize:c1,ariaSort:null,ariaValueMax:c1,ariaValueMin:c1,ariaValueNow:c1,ariaValueText:null,role:null}}),Si2=p9({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:h11,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:A9,acceptCharset:C8,accessKey:C8,action:null,allow:null,allowFullScreen:M2,allowPaymentRequest:M2,allowUserMedia:M2,alt:null,as:null,async:M2,autoCapitalize:null,autoComplete:C8,autoFocus:M2,autoPlay:M2,blocking:C8,capture:null,charSet:null,checked:M2,cite:null,className:C8,cols:c1,colSpan:null,content:null,contentEditable:ye,controls:M2,controlsList:C8,coords:c1|A9,crossOrigin:null,data:null,dateTime:null,decoding:null,default:M2,defer:M2,dir:null,dirName:null,disabled:M2,download:c11,draggable:ye,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:M2,formTarget:null,headers:C8,height:c1,hidden:M2,high:c1,href:null,hrefLang:null,htmlFor:C8,httpEquiv:C8,id:null,imageSizes:null,imageSrcSet:null,inert:M2,inputMode:null,integrity:null,is:null,isMap:M2,itemId:null,itemProp:C8,itemRef:C8,itemScope:M2,itemType:C8,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:M2,low:c1,manifest:null,max:null,maxLength:c1,media:null,method:null,min:null,minLength:c1,multiple:M2,muted:M2,name:null,nonce:null,noModule:M2,noValidate:M2,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:M2,optimum:c1,pattern:null,ping:C8,placeholder:null,playsInline:M2,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:M2,referrerPolicy:null,rel:C8,required:M2,reversed:M2,rows:c1,rowSpan:c1,sandbox:C8,scope:null,scoped:M2,seamless:M2,selected:M2,shadowRootClonable:M2,shadowRootDelegatesFocus:M2,shadowRootMode:null,shape:null,size:c1,sizes:null,slot:null,span:c1,spellCheck:ye,src:null,srcDoc:null,srcLang:null,srcSet:null,start:c1,step:null,style:null,tabIndex:c1,target:null,title:null,translate:null,type:null,typeMustMatch:M2,useMap:null,value:ye,width:c1,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:C8,axis:null,background:null,bgColor:null,border:c1,borderColor:null,bottomMargin:c1,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:M2,declare:M2,event:null,face:null,frame:null,frameBorder:null,hSpace:c1,leftMargin:c1,link:null,longDesc:null,lowSrc:null,marginHeight:c1,marginWidth:c1,noResize:M2,noHref:M2,noShade:M2,noWrap:M2,object:null,profile:null,prompt:null,rev:null,rightMargin:c1,rules:null,scheme:null,scrolling:ye,standby:null,summary:null,text:null,topMargin:c1,valueType:null,version:null,vAlign:null,vLink:null,vSpace:c1,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:M2,disableRemotePlayback:M2,prefix:null,property:null,results:c1,security:null,unselectable:null}}),Ri2=p9({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:u11,properties:{about:Q4,accentHeight:c1,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:c1,amplitude:c1,arabicForm:null,ascent:c1,attributeName:null,attributeType:null,azimuth:c1,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:c1,by:null,calcMode:null,capHeight:c1,className:C8,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:c1,diffuseConstant:c1,direction:null,display:null,dur:null,divisor:c1,dominantBaseline:null,download:M2,dx:null,dy:null,edgeMode:null,editable:null,elevation:c1,enableBackground:null,end:null,event:null,exponent:c1,externalResourcesRequired:null,fill:null,fillOpacity:c1,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:A9,g2:A9,glyphName:A9,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:c1,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:c1,horizOriginX:c1,horizOriginY:c1,id:null,ideographic:c1,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:c1,k:c1,k1:c1,k2:c1,k3:c1,k4:c1,kernelMatrix:Q4,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:c1,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:c1,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:c1,overlineThickness:c1,paintOrder:null,panose1:null,path:null,pathLength:c1,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:C8,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:c1,pointsAtY:c1,pointsAtZ:c1,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Q4,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Q4,rev:Q4,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Q4,requiredFeatures:Q4,requiredFonts:Q4,requiredFormats:Q4,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:c1,specularExponent:c1,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:c1,strikethroughThickness:c1,string:null,stroke:null,strokeDashArray:Q4,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:c1,strokeOpacity:c1,strokeWidth:null,style:null,surfaceScale:c1,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Q4,tabIndex:c1,tableValues:null,target:null,targetX:c1,targetY:c1,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Q4,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:c1,underlineThickness:c1,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:c1,values:null,vAlphabetic:c1,vMathematical:c1,vectorEffect:null,vHanging:c1,vIdeographic:c1,version:null,vertAdvY:c1,vertOriginX:c1,vertOriginY:c1,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:c1,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),xi2=/^data[-\w.:]+$/i,p11=/-[a-z]/g,Ti2=/[A-Z]/g;function Ni2(a,t){const n=jh0(t);let l=t,o=Ma;if(n in a.normal)return a.property[a.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&xi2.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(p11,ki2);l="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!p11.test(i)){let s=i.replace(Ti2,$i2);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}o=Gh0}return new o(l,t)}function $i2(a){return"-"+a.toLowerCase()}function ki2(a){return a.charAt(1).toUpperCase()}const Di2=o11([m11,s11,d11,A11,Si2],"html"),f11=o11([m11,s11,d11,A11,Ri2],"svg"),Z11={}.hasOwnProperty;function H11(a,t){const n=t||{};function l(o,...i){let s=l.invalid;const u=l.handlers;if(o&&Z11.call(o,a)){const A=String(o[a]);s=Z11.call(u,A)?u[A]:l.unknown}if(s)return s.call(this,o,...i)}return l.handlers=n.handlers||{},l.invalid=n.invalid,l.unknown=n.unknown,l}const Pi2={},Oi2={}.hasOwnProperty,g11=H11("type",{handlers:{root:Bi2,element:Wi2,text:ji2,comment:qi2,doctype:zi2}});function _i2(a,t){const l=(t||Pi2).space;return g11(a,l==="svg"?f11:Di2)}function Bi2(a,t){const n={nodeName:"#document",mode:(a.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Yh0(a.children,n,t),f9(a,n),n}function Ui2(a,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Yh0(a.children,n,t),f9(a,n),n}function zi2(a){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return f9(a,t),t}function ji2(a){const t={nodeName:"#text",value:a.value,parentNode:null};return f9(a,t),t}function qi2(a){const t={nodeName:"#comment",data:a.value,parentNode:null};return f9(a,t),t}function Wi2(a,t){const n=t;let l=n;a.type==="element"&&a.tagName.toLowerCase()==="svg"&&n.space==="html"&&(l=f11);const o=[];let i;if(a.properties){for(i in a.properties)if(i!=="children"&&Oi2.call(a.properties,i)){const A=Gi2(l,i,a.properties[i]);A&&o.push(A)}}const s=l.space,u={nodeName:a.tagName,tagName:a.tagName,attrs:o,namespaceURI:zr[s],childNodes:[],parentNode:null};return u.childNodes=Yh0(a.children,u,l),f9(a,u),a.tagName==="template"&&a.content&&(u.content=Ui2(a.content,l)),u}function Gi2(a,t,n){const l=Ni2(a,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&l.boolean)return;Array.isArray(n)&&(n=l.commaSeparated?RJ0(n):qJ0(n));const o={name:l.attribute,value:n===!0?"":String(n)};if(l.space&&l.space!=="html"&&l.space!=="svg"){const i=o.name.indexOf(":");i<0?o.prefix="":(o.name=o.name.slice(i+1),o.prefix=l.attribute.slice(0,i)),o.namespace=zr[l.space]}return o}function Yh0(a,t,n){let l=-1;const o=[];if(a)for(;++l<a.length;){const i=g11(a[l],n);i.parentNode=t,o.push(i)}return o}function f9(a,t){const n=a.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 Yi2=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Ki2=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]),_8="�";var Y;(function(a){a[a.EOF=-1]="EOF",a[a.NULL=0]="NULL",a[a.TABULATION=9]="TABULATION",a[a.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",a[a.LINE_FEED=10]="LINE_FEED",a[a.FORM_FEED=12]="FORM_FEED",a[a.SPACE=32]="SPACE",a[a.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",a[a.QUOTATION_MARK=34]="QUOTATION_MARK",a[a.AMPERSAND=38]="AMPERSAND",a[a.APOSTROPHE=39]="APOSTROPHE",a[a.HYPHEN_MINUS=45]="HYPHEN_MINUS",a[a.SOLIDUS=47]="SOLIDUS",a[a.DIGIT_0=48]="DIGIT_0",a[a.DIGIT_9=57]="DIGIT_9",a[a.SEMICOLON=59]="SEMICOLON",a[a.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",a[a.EQUALS_SIGN=61]="EQUALS_SIGN",a[a.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",a[a.QUESTION_MARK=63]="QUESTION_MARK",a[a.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",a[a.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",a[a.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",a[a.GRAVE_ACCENT=96]="GRAVE_ACCENT",a[a.LATIN_SMALL_A=97]="LATIN_SMALL_A",a[a.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(Y||(Y={}));const b4={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function E11(a){return a>=55296&&a<=57343}function Xi2(a){return a>=56320&&a<=57343}function Qi2(a,t){return(a-55296)*1024+9216+t}function V11(a){return a!==32&&a!==10&&a!==13&&a!==9&&a!==12&&a>=1&&a<=31||a>=127&&a<=159}function M11(a){return a>=64976&&a<=65007||Ki2.has(a)}var k0;(function(a){a.controlCharacterInInputStream="control-character-in-input-stream",a.noncharacterInInputStream="noncharacter-in-input-stream",a.surrogateInInputStream="surrogate-in-input-stream",a.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",a.endTagWithAttributes="end-tag-with-attributes",a.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",a.unexpectedSolidusInTag="unexpected-solidus-in-tag",a.unexpectedNullCharacter="unexpected-null-character",a.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",a.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",a.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",a.missingEndTagName="missing-end-tag-name",a.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",a.unknownNamedCharacterReference="unknown-named-character-reference",a.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",a.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",a.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",a.eofBeforeTagName="eof-before-tag-name",a.eofInTag="eof-in-tag",a.missingAttributeValue="missing-attribute-value",a.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",a.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",a.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",a.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",a.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",a.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",a.missingDoctypePublicIdentifier="missing-doctype-public-identifier",a.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",a.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",a.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",a.cdataInHtmlContent="cdata-in-html-content",a.incorrectlyOpenedComment="incorrectly-opened-comment",a.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",a.eofInDoctype="eof-in-doctype",a.nestedComment="nested-comment",a.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",a.eofInComment="eof-in-comment",a.incorrectlyClosedComment="incorrectly-closed-comment",a.eofInCdata="eof-in-cdata",a.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",a.nullCharacterReference="null-character-reference",a.surrogateCharacterReference="surrogate-character-reference",a.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",a.controlCharacterReference="control-character-reference",a.noncharacterCharacterReference="noncharacter-character-reference",a.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",a.missingDoctypeName="missing-doctype-name",a.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",a.duplicateAttribute="duplicate-attribute",a.nonConformingDoctype="non-conforming-doctype",a.missingDoctype="missing-doctype",a.misplacedDoctype="misplaced-doctype",a.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",a.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",a.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",a.openElementsLeftAfterEof="open-elements-left-after-eof",a.abandonedHeadElementChild="abandoned-head-element-child",a.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",a.nestedNoscriptInHead="nested-noscript-in-head",a.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(k0||(k0={}));const Ji2=65536;class es2{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=Ji2,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:l,col:o,offset:i}=this,s=o+n,u=i+n;return{code:t,startLine:l,endLine:l,startCol:s,endCol:s,startOffset:u,endOffset:u}}_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(Xi2(n))return this.pos++,this._addGap(),Qi2(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Y.EOF;return this._err(k0.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 l=0;l<t.length;l++)if((this.html.charCodeAt(this.pos+l)|32)!==t.charCodeAt(l))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Y.EOF;const l=this.html.charCodeAt(n);return l===Y.CARRIAGE_RETURN?Y.LINE_FEED:l}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,Y.EOF;let t=this.html.charCodeAt(this.pos);return t===Y.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,Y.LINE_FEED):t===Y.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,E11(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===Y.LINE_FEED||t===Y.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){V11(t)?this._err(k0.controlCharacterInInputStream):M11(t)&&this._err(k0.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var k2;(function(a){a[a.CHARACTER=0]="CHARACTER",a[a.NULL_CHARACTER=1]="NULL_CHARACTER",a[a.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",a[a.START_TAG=3]="START_TAG",a[a.END_TAG=4]="END_TAG",a[a.COMMENT=5]="COMMENT",a[a.DOCTYPE=6]="DOCTYPE",a[a.EOF=7]="EOF",a[a.HIBERNATION=8]="HIBERNATION"})(k2||(k2={}));function v11(a,t){for(let n=a.attrs.length-1;n>=0;n--)if(a.attrs[n].name===t)return a.attrs[n].value;return null}const L11=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୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢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;怳Ādpuct;戏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ǣጓ\0y;䐎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Ā;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀ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Ā;elƀ;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\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»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ↄⅪ←ٖ↛ǰ↉\0proø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;䅓Ācrir;榿;쀀𝔬ͯ\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\0m;櫳;櫽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(a=>a.charCodeAt(0))),as2=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(a=>a.charCodeAt(0)));var Kh0;const ts2=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]]),ns2=(Kh0=String.fromCodePoint)!==null&&Kh0!==void 0?Kh0:function(a){let t="";return a>65535&&(a-=65536,t+=String.fromCharCode(a>>>10&1023|55296),a=56320|a&1023),t+=String.fromCharCode(a),t};function ls2(a){var t;return a>=55296&&a<=57343||a>1114111?65533:(t=ts2.get(a))!==null&&t!==void 0?t:a}var a6;(function(a){a[a.NUM=35]="NUM",a[a.SEMI=59]="SEMI",a[a.EQUALS=61]="EQUALS",a[a.ZERO=48]="ZERO",a[a.NINE=57]="NINE",a[a.LOWER_A=97]="LOWER_A",a[a.LOWER_F=102]="LOWER_F",a[a.LOWER_X=120]="LOWER_X",a[a.LOWER_Z=122]="LOWER_Z",a[a.UPPER_A=65]="UPPER_A",a[a.UPPER_F=70]="UPPER_F",a[a.UPPER_Z=90]="UPPER_Z"})(a6||(a6={}));const rs2=32;var pl;(function(a){a[a.VALUE_LENGTH=49152]="VALUE_LENGTH",a[a.BRANCH_LENGTH=16256]="BRANCH_LENGTH",a[a.JUMP_TABLE=127]="JUMP_TABLE"})(pl||(pl={}));function Xh0(a){return a>=a6.ZERO&&a<=a6.NINE}function os2(a){return a>=a6.UPPER_A&&a<=a6.UPPER_F||a>=a6.LOWER_A&&a<=a6.LOWER_F}function cs2(a){return a>=a6.UPPER_A&&a<=a6.UPPER_Z||a>=a6.LOWER_A&&a<=a6.LOWER_Z||Xh0(a)}function is2(a){return a===a6.EQUALS||cs2(a)}var t6;(function(a){a[a.EntityStart=0]="EntityStart",a[a.NumericStart=1]="NumericStart",a[a.NumericDecimal=2]="NumericDecimal",a[a.NumericHex=3]="NumericHex",a[a.NamedEntity=4]="NamedEntity"})(t6||(t6={}));var Y3;(function(a){a[a.Legacy=0]="Legacy",a[a.Strict=1]="Strict",a[a.Attribute=2]="Attribute"})(Y3||(Y3={}));class w11{constructor(t,n,l){this.decodeTree=t,this.emitCodePoint=n,this.errors=l,this.state=t6.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Y3.Strict}startEntity(t){this.decodeMode=t,this.state=t6.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case t6.EntityStart:return t.charCodeAt(n)===a6.NUM?(this.state=t6.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=t6.NamedEntity,this.stateNamedEntity(t,n));case t6.NumericStart:return this.stateNumericStart(t,n);case t6.NumericDecimal:return this.stateNumericDecimal(t,n);case t6.NumericHex:return this.stateNumericHex(t,n);case t6.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|rs2)===a6.LOWER_X?(this.state=t6.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=t6.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,l,o){if(n!==l){const i=l-n;this.result=this.result*Math.pow(o,i)+parseInt(t.substr(n,i),o),this.consumed+=i}}stateNumericHex(t,n){const l=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Xh0(o)||os2(o))n+=1;else return this.addToNumericResult(t,l,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,l,n,16),-1}stateNumericDecimal(t,n){const l=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Xh0(o))n+=1;else return this.addToNumericResult(t,l,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,l,n,10),-1}emitNumericEntity(t,n){var l;if(this.consumed<=n)return(l=this.errors)===null||l===void 0||l.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===a6.SEMI)this.consumed+=1;else if(this.decodeMode===Y3.Strict)return 0;return this.emitCodePoint(ls2(this.result),this.consumed),this.errors&&(t!==a6.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:l}=this;let o=l[this.treeIndex],i=(o&pl.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=ss2(l,o,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===Y3.Attribute&&(i===0||is2(s))?0:this.emitNotTerminatedNamedEntity();if(o=l[this.treeIndex],i=(o&pl.VALUE_LENGTH)>>14,i!==0){if(s===a6.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Y3.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:l}=this,o=(l[n]&pl.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,l){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~pl.VALUE_LENGTH:o[t+1],l),n===3&&this.emitCodePoint(o[t+2],l),l}end(){var t;switch(this.state){case t6.NamedEntity:return this.result!==0&&(this.decodeMode!==Y3.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case t6.NumericDecimal:return this.emitNumericEntity(0,2);case t6.NumericHex:return this.emitNumericEntity(0,3);case t6.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case t6.EntityStart:return 0}}}function y11(a){let t="";const n=new w11(a,l=>t+=ns2(l));return function(o,i){let s=0,u=0;for(;(u=o.indexOf("&",u))>=0;){t+=o.slice(s,u),n.startEntity(i);const p=n.write(o,u+1);if(p<0){s=u+n.end();break}s=u+p,u=p===0?s+1:s}const A=t+o.slice(s);return t="",A}}function ss2(a,t,n,l){const o=(t&pl.BRANCH_LENGTH)>>7,i=t&pl.JUMP_TABLE;if(o===0)return i!==0&&l===i?n:-1;if(i){const A=l-i;return A<0||A>=o?-1:a[n+A]-1}let s=n,u=s+o-1;for(;s<=u;){const A=s+u>>>1,p=a[A];if(p<l)s=A+1;else if(p>l)u=A-1;else return a[A+o]}return-1}y11(L11),y11(as2);var a1;(function(a){a.HTML="http://www.w3.org/1999/xhtml",a.MATHML="http://www.w3.org/1998/Math/MathML",a.SVG="http://www.w3.org/2000/svg",a.XLINK="http://www.w3.org/1999/xlink",a.XML="http://www.w3.org/XML/1998/namespace",a.XMLNS="http://www.w3.org/2000/xmlns/"})(a1||(a1={}));var qr;(function(a){a.TYPE="type",a.ACTION="action",a.ENCODING="encoding",a.PROMPT="prompt",a.NAME="name",a.COLOR="color",a.FACE="face",a.SIZE="size"})(qr||(qr={}));var va;(function(a){a.NO_QUIRKS="no-quirks",a.QUIRKS="quirks",a.LIMITED_QUIRKS="limited-quirks"})(va||(va={}));var w0;(function(a){a.A="a",a.ADDRESS="address",a.ANNOTATION_XML="annotation-xml",a.APPLET="applet",a.AREA="area",a.ARTICLE="article",a.ASIDE="aside",a.B="b",a.BASE="base",a.BASEFONT="basefont",a.BGSOUND="bgsound",a.BIG="big",a.BLOCKQUOTE="blockquote",a.BODY="body",a.BR="br",a.BUTTON="button",a.CAPTION="caption",a.CENTER="center",a.CODE="code",a.COL="col",a.COLGROUP="colgroup",a.DD="dd",a.DESC="desc",a.DETAILS="details",a.DIALOG="dialog",a.DIR="dir",a.DIV="div",a.DL="dl",a.DT="dt",a.EM="em",a.EMBED="embed",a.FIELDSET="fieldset",a.FIGCAPTION="figcaption",a.FIGURE="figure",a.FONT="font",a.FOOTER="footer",a.FOREIGN_OBJECT="foreignObject",a.FORM="form",a.FRAME="frame",a.FRAMESET="frameset",a.H1="h1",a.H2="h2",a.H3="h3",a.H4="h4",a.H5="h5",a.H6="h6",a.HEAD="head",a.HEADER="header",a.HGROUP="hgroup",a.HR="hr",a.HTML="html",a.I="i",a.IMG="img",a.IMAGE="image",a.INPUT="input",a.IFRAME="iframe",a.KEYGEN="keygen",a.LABEL="label",a.LI="li",a.LINK="link",a.LISTING="listing",a.MAIN="main",a.MALIGNMARK="malignmark",a.MARQUEE="marquee",a.MATH="math",a.MENU="menu",a.META="meta",a.MGLYPH="mglyph",a.MI="mi",a.MO="mo",a.MN="mn",a.MS="ms",a.MTEXT="mtext",a.NAV="nav",a.NOBR="nobr",a.NOFRAMES="noframes",a.NOEMBED="noembed",a.NOSCRIPT="noscript",a.OBJECT="object",a.OL="ol",a.OPTGROUP="optgroup",a.OPTION="option",a.P="p",a.PARAM="param",a.PLAINTEXT="plaintext",a.PRE="pre",a.RB="rb",a.RP="rp",a.RT="rt",a.RTC="rtc",a.RUBY="ruby",a.S="s",a.SCRIPT="script",a.SEARCH="search",a.SECTION="section",a.SELECT="select",a.SOURCE="source",a.SMALL="small",a.SPAN="span",a.STRIKE="strike",a.STRONG="strong",a.STYLE="style",a.SUB="sub",a.SUMMARY="summary",a.SUP="sup",a.TABLE="table",a.TBODY="tbody",a.TEMPLATE="template",a.TEXTAREA="textarea",a.TFOOT="tfoot",a.TD="td",a.TH="th",a.THEAD="thead",a.TITLE="title",a.TR="tr",a.TRACK="track",a.TT="tt",a.U="u",a.UL="ul",a.SVG="svg",a.VAR="var",a.WBR="wbr",a.XMP="xmp"})(w0||(w0={}));var F;(function(a){a[a.UNKNOWN=0]="UNKNOWN",a[a.A=1]="A",a[a.ADDRESS=2]="ADDRESS",a[a.ANNOTATION_XML=3]="ANNOTATION_XML",a[a.APPLET=4]="APPLET",a[a.AREA=5]="AREA",a[a.ARTICLE=6]="ARTICLE",a[a.ASIDE=7]="ASIDE",a[a.B=8]="B",a[a.BASE=9]="BASE",a[a.BASEFONT=10]="BASEFONT",a[a.BGSOUND=11]="BGSOUND",a[a.BIG=12]="BIG",a[a.BLOCKQUOTE=13]="BLOCKQUOTE",a[a.BODY=14]="BODY",a[a.BR=15]="BR",a[a.BUTTON=16]="BUTTON",a[a.CAPTION=17]="CAPTION",a[a.CENTER=18]="CENTER",a[a.CODE=19]="CODE",a[a.COL=20]="COL",a[a.COLGROUP=21]="COLGROUP",a[a.DD=22]="DD",a[a.DESC=23]="DESC",a[a.DETAILS=24]="DETAILS",a[a.DIALOG=25]="DIALOG",a[a.DIR=26]="DIR",a[a.DIV=27]="DIV",a[a.DL=28]="DL",a[a.DT=29]="DT",a[a.EM=30]="EM",a[a.EMBED=31]="EMBED",a[a.FIELDSET=32]="FIELDSET",a[a.FIGCAPTION=33]="FIGCAPTION",a[a.FIGURE=34]="FIGURE",a[a.FONT=35]="FONT",a[a.FOOTER=36]="FOOTER",a[a.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",a[a.FORM=38]="FORM",a[a.FRAME=39]="FRAME",a[a.FRAMESET=40]="FRAMESET",a[a.H1=41]="H1",a[a.H2=42]="H2",a[a.H3=43]="H3",a[a.H4=44]="H4",a[a.H5=45]="H5",a[a.H6=46]="H6",a[a.HEAD=47]="HEAD",a[a.HEADER=48]="HEADER",a[a.HGROUP=49]="HGROUP",a[a.HR=50]="HR",a[a.HTML=51]="HTML",a[a.I=52]="I",a[a.IMG=53]="IMG",a[a.IMAGE=54]="IMAGE",a[a.INPUT=55]="INPUT",a[a.IFRAME=56]="IFRAME",a[a.KEYGEN=57]="KEYGEN",a[a.LABEL=58]="LABEL",a[a.LI=59]="LI",a[a.LINK=60]="LINK",a[a.LISTING=61]="LISTING",a[a.MAIN=62]="MAIN",a[a.MALIGNMARK=63]="MALIGNMARK",a[a.MARQUEE=64]="MARQUEE",a[a.MATH=65]="MATH",a[a.MENU=66]="MENU",a[a.META=67]="META",a[a.MGLYPH=68]="MGLYPH",a[a.MI=69]="MI",a[a.MO=70]="MO",a[a.MN=71]="MN",a[a.MS=72]="MS",a[a.MTEXT=73]="MTEXT",a[a.NAV=74]="NAV",a[a.NOBR=75]="NOBR",a[a.NOFRAMES=76]="NOFRAMES",a[a.NOEMBED=77]="NOEMBED",a[a.NOSCRIPT=78]="NOSCRIPT",a[a.OBJECT=79]="OBJECT",a[a.OL=80]="OL",a[a.OPTGROUP=81]="OPTGROUP",a[a.OPTION=82]="OPTION",a[a.P=83]="P",a[a.PARAM=84]="PARAM",a[a.PLAINTEXT=85]="PLAINTEXT",a[a.PRE=86]="PRE",a[a.RB=87]="RB",a[a.RP=88]="RP",a[a.RT=89]="RT",a[a.RTC=90]="RTC",a[a.RUBY=91]="RUBY",a[a.S=92]="S",a[a.SCRIPT=93]="SCRIPT",a[a.SEARCH=94]="SEARCH",a[a.SECTION=95]="SECTION",a[a.SELECT=96]="SELECT",a[a.SOURCE=97]="SOURCE",a[a.SMALL=98]="SMALL",a[a.SPAN=99]="SPAN",a[a.STRIKE=100]="STRIKE",a[a.STRONG=101]="STRONG",a[a.STYLE=102]="STYLE",a[a.SUB=103]="SUB",a[a.SUMMARY=104]="SUMMARY",a[a.SUP=105]="SUP",a[a.TABLE=106]="TABLE",a[a.TBODY=107]="TBODY",a[a.TEMPLATE=108]="TEMPLATE",a[a.TEXTAREA=109]="TEXTAREA",a[a.TFOOT=110]="TFOOT",a[a.TD=111]="TD",a[a.TH=112]="TH",a[a.THEAD=113]="THEAD",a[a.TITLE=114]="TITLE",a[a.TR=115]="TR",a[a.TRACK=116]="TRACK",a[a.TT=117]="TT",a[a.U=118]="U",a[a.UL=119]="UL",a[a.SVG=120]="SVG",a[a.VAR=121]="VAR",a[a.WBR=122]="WBR",a[a.XMP=123]="XMP"})(F||(F={}));const ms2=new Map([[w0.A,F.A],[w0.ADDRESS,F.ADDRESS],[w0.ANNOTATION_XML,F.ANNOTATION_XML],[w0.APPLET,F.APPLET],[w0.AREA,F.AREA],[w0.ARTICLE,F.ARTICLE],[w0.ASIDE,F.ASIDE],[w0.B,F.B],[w0.BASE,F.BASE],[w0.BASEFONT,F.BASEFONT],[w0.BGSOUND,F.BGSOUND],[w0.BIG,F.BIG],[w0.BLOCKQUOTE,F.BLOCKQUOTE],[w0.BODY,F.BODY],[w0.BR,F.BR],[w0.BUTTON,F.BUTTON],[w0.CAPTION,F.CAPTION],[w0.CENTER,F.CENTER],[w0.CODE,F.CODE],[w0.COL,F.COL],[w0.COLGROUP,F.COLGROUP],[w0.DD,F.DD],[w0.DESC,F.DESC],[w0.DETAILS,F.DETAILS],[w0.DIALOG,F.DIALOG],[w0.DIR,F.DIR],[w0.DIV,F.DIV],[w0.DL,F.DL],[w0.DT,F.DT],[w0.EM,F.EM],[w0.EMBED,F.EMBED],[w0.FIELDSET,F.FIELDSET],[w0.FIGCAPTION,F.FIGCAPTION],[w0.FIGURE,F.FIGURE],[w0.FONT,F.FONT],[w0.FOOTER,F.FOOTER],[w0.FOREIGN_OBJECT,F.FOREIGN_OBJECT],[w0.FORM,F.FORM],[w0.FRAME,F.FRAME],[w0.FRAMESET,F.FRAMESET],[w0.H1,F.H1],[w0.H2,F.H2],[w0.H3,F.H3],[w0.H4,F.H4],[w0.H5,F.H5],[w0.H6,F.H6],[w0.HEAD,F.HEAD],[w0.HEADER,F.HEADER],[w0.HGROUP,F.HGROUP],[w0.HR,F.HR],[w0.HTML,F.HTML],[w0.I,F.I],[w0.IMG,F.IMG],[w0.IMAGE,F.IMAGE],[w0.INPUT,F.INPUT],[w0.IFRAME,F.IFRAME],[w0.KEYGEN,F.KEYGEN],[w0.LABEL,F.LABEL],[w0.LI,F.LI],[w0.LINK,F.LINK],[w0.LISTING,F.LISTING],[w0.MAIN,F.MAIN],[w0.MALIGNMARK,F.MALIGNMARK],[w0.MARQUEE,F.MARQUEE],[w0.MATH,F.MATH],[w0.MENU,F.MENU],[w0.META,F.META],[w0.MGLYPH,F.MGLYPH],[w0.MI,F.MI],[w0.MO,F.MO],[w0.MN,F.MN],[w0.MS,F.MS],[w0.MTEXT,F.MTEXT],[w0.NAV,F.NAV],[w0.NOBR,F.NOBR],[w0.NOFRAMES,F.NOFRAMES],[w0.NOEMBED,F.NOEMBED],[w0.NOSCRIPT,F.NOSCRIPT],[w0.OBJECT,F.OBJECT],[w0.OL,F.OL],[w0.OPTGROUP,F.OPTGROUP],[w0.OPTION,F.OPTION],[w0.P,F.P],[w0.PARAM,F.PARAM],[w0.PLAINTEXT,F.PLAINTEXT],[w0.PRE,F.PRE],[w0.RB,F.RB],[w0.RP,F.RP],[w0.RT,F.RT],[w0.RTC,F.RTC],[w0.RUBY,F.RUBY],[w0.S,F.S],[w0.SCRIPT,F.SCRIPT],[w0.SEARCH,F.SEARCH],[w0.SECTION,F.SECTION],[w0.SELECT,F.SELECT],[w0.SOURCE,F.SOURCE],[w0.SMALL,F.SMALL],[w0.SPAN,F.SPAN],[w0.STRIKE,F.STRIKE],[w0.STRONG,F.STRONG],[w0.STYLE,F.STYLE],[w0.SUB,F.SUB],[w0.SUMMARY,F.SUMMARY],[w0.SUP,F.SUP],[w0.TABLE,F.TABLE],[w0.TBODY,F.TBODY],[w0.TEMPLATE,F.TEMPLATE],[w0.TEXTAREA,F.TEXTAREA],[w0.TFOOT,F.TFOOT],[w0.TD,F.TD],[w0.TH,F.TH],[w0.THEAD,F.THEAD],[w0.TITLE,F.TITLE],[w0.TR,F.TR],[w0.TRACK,F.TRACK],[w0.TT,F.TT],[w0.U,F.U],[w0.UL,F.UL],[w0.SVG,F.SVG],[w0.VAR,F.VAR],[w0.WBR,F.WBR],[w0.XMP,F.XMP]]);function Z9(a){var t;return(t=ms2.get(a))!==null&&t!==void 0?t:F.UNKNOWN}const r1=F,us2={[a1.HTML]:new Set([r1.ADDRESS,r1.APPLET,r1.AREA,r1.ARTICLE,r1.ASIDE,r1.BASE,r1.BASEFONT,r1.BGSOUND,r1.BLOCKQUOTE,r1.BODY,r1.BR,r1.BUTTON,r1.CAPTION,r1.CENTER,r1.COL,r1.COLGROUP,r1.DD,r1.DETAILS,r1.DIR,r1.DIV,r1.DL,r1.DT,r1.EMBED,r1.FIELDSET,r1.FIGCAPTION,r1.FIGURE,r1.FOOTER,r1.FORM,r1.FRAME,r1.FRAMESET,r1.H1,r1.H2,r1.H3,r1.H4,r1.H5,r1.H6,r1.HEAD,r1.HEADER,r1.HGROUP,r1.HR,r1.HTML,r1.IFRAME,r1.IMG,r1.INPUT,r1.LI,r1.LINK,r1.LISTING,r1.MAIN,r1.MARQUEE,r1.MENU,r1.META,r1.NAV,r1.NOEMBED,r1.NOFRAMES,r1.NOSCRIPT,r1.OBJECT,r1.OL,r1.P,r1.PARAM,r1.PLAINTEXT,r1.PRE,r1.SCRIPT,r1.SECTION,r1.SELECT,r1.SOURCE,r1.STYLE,r1.SUMMARY,r1.TABLE,r1.TBODY,r1.TD,r1.TEMPLATE,r1.TEXTAREA,r1.TFOOT,r1.TH,r1.THEAD,r1.TITLE,r1.TR,r1.TRACK,r1.UL,r1.WBR,r1.XMP]),[a1.MATHML]:new Set([r1.MI,r1.MO,r1.MN,r1.MS,r1.MTEXT,r1.ANNOTATION_XML]),[a1.SVG]:new Set([r1.TITLE,r1.FOREIGN_OBJECT,r1.DESC]),[a1.XLINK]:new Set,[a1.XML]:new Set,[a1.XMLNS]:new Set},Qh0=new Set([r1.H1,r1.H2,r1.H3,r1.H4,r1.H5,r1.H6]);w0.STYLE,w0.SCRIPT,w0.XMP,w0.IFRAME,w0.NOEMBED,w0.NOFRAMES,w0.PLAINTEXT;var a0;(function(a){a[a.DATA=0]="DATA",a[a.RCDATA=1]="RCDATA",a[a.RAWTEXT=2]="RAWTEXT",a[a.SCRIPT_DATA=3]="SCRIPT_DATA",a[a.PLAINTEXT=4]="PLAINTEXT",a[a.TAG_OPEN=5]="TAG_OPEN",a[a.END_TAG_OPEN=6]="END_TAG_OPEN",a[a.TAG_NAME=7]="TAG_NAME",a[a.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",a[a.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",a[a.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",a[a.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",a[a.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",a[a.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",a[a.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",a[a.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",a[a.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",a[a.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",a[a.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",a[a.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",a[a.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",a[a.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",a[a.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",a[a.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",a[a.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",a[a.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",a[a.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",a[a.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",a[a.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",a[a.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",a[a.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",a[a.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",a[a.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",a[a.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",a[a.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",a[a.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",a[a.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",a[a.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",a[a.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",a[a.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",a[a.BOGUS_COMMENT=40]="BOGUS_COMMENT",a[a.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",a[a.COMMENT_START=42]="COMMENT_START",a[a.COMMENT_START_DASH=43]="COMMENT_START_DASH",a[a.COMMENT=44]="COMMENT",a[a.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",a[a.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",a[a.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",a[a.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",a[a.COMMENT_END_DASH=49]="COMMENT_END_DASH",a[a.COMMENT_END=50]="COMMENT_END",a[a.COMMENT_END_BANG=51]="COMMENT_END_BANG",a[a.DOCTYPE=52]="DOCTYPE",a[a.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",a[a.DOCTYPE_NAME=54]="DOCTYPE_NAME",a[a.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",a[a.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",a[a.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",a[a.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",a[a.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",a[a.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",a[a.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",a[a.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",a[a.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",a[a.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",a[a.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",a[a.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",a[a.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",a[a.CDATA_SECTION=68]="CDATA_SECTION",a[a.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",a[a.CDATA_SECTION_END=70]="CDATA_SECTION_END",a[a.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",a[a.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(a0||(a0={}));const Ae={DATA:a0.DATA,RCDATA:a0.RCDATA,RAWTEXT:a0.RAWTEXT,SCRIPT_DATA:a0.SCRIPT_DATA,PLAINTEXT:a0.PLAINTEXT,CDATA_SECTION:a0.CDATA_SECTION};function hs2(a){return a>=Y.DIGIT_0&&a<=Y.DIGIT_9}function Pi(a){return a>=Y.LATIN_CAPITAL_A&&a<=Y.LATIN_CAPITAL_Z}function ds2(a){return a>=Y.LATIN_SMALL_A&&a<=Y.LATIN_SMALL_Z}function fl(a){return ds2(a)||Pi(a)}function F11(a){return fl(a)||hs2(a)}function tA(a){return a+32}function b11(a){return a===Y.SPACE||a===Y.LINE_FEED||a===Y.TABULATION||a===Y.FORM_FEED}function C11(a){return b11(a)||a===Y.SOLIDUS||a===Y.GREATER_THAN_SIGN}function As2(a){return a===Y.NULL?k0.nullCharacterReference:a>1114111?k0.characterReferenceOutsideUnicodeRange:E11(a)?k0.surrogateCharacterReference:M11(a)?k0.noncharacterCharacterReference:V11(a)||a===Y.CARRIAGE_RETURN?k0.controlCharacterReference:null}class ps2{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=a0.DATA,this.returnState=a0.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new es2(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new w11(L11,(l,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(l)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(k0.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:l=>{this._err(k0.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+l)},validateNumericCharacterReference:l=>{const o=As2(l);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var l,o;(o=(l=this.handler).onParseError)===null||o===void 0||o.call(l,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?.())}write(t,n,l){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||l?.()}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:k2.START_TAG,tagName:"",tagID:F.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:k2.END_TAG,tagName:"",tagID:F.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:k2.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:k2.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 l=this.currentToken;if(v11(l,this.currentAttr.name)===null){if(l.attrs.push(this.currentAttr),l.location&&this.currentLocation){const o=(t=(n=l.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(k0.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=Z9(t.tagName),t.type===k2.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(k0.endTagWithAttributes),t.selfClosing&&this._err(k0.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 k2.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case k2.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case k2.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:k2.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=b11(t)?k2.WHITESPACE_CHARACTER:t===Y.NULL?k2.NULL_CHARACTER:k2.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(k2.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=a0.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Y3.Attribute:Y3.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===a0.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===a0.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===a0.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case a0.DATA:{this._stateData(t);break}case a0.RCDATA:{this._stateRcdata(t);break}case a0.RAWTEXT:{this._stateRawtext(t);break}case a0.SCRIPT_DATA:{this._stateScriptData(t);break}case a0.PLAINTEXT:{this._statePlaintext(t);break}case a0.TAG_OPEN:{this._stateTagOpen(t);break}case a0.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case a0.TAG_NAME:{this._stateTagName(t);break}case a0.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case a0.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case a0.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case a0.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case a0.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case a0.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case a0.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case a0.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case a0.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case a0.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case a0.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case a0.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case a0.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case a0.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case a0.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case a0.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case a0.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case a0.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case a0.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case a0.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case a0.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case a0.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case a0.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case a0.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case a0.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case a0.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case a0.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case a0.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case a0.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case a0.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case a0.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case a0.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case a0.BOGUS_COMMENT:{this._stateBogusComment(t);break}case a0.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case a0.COMMENT_START:{this._stateCommentStart(t);break}case a0.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case a0.COMMENT:{this._stateComment(t);break}case a0.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case a0.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case a0.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case a0.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case a0.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case a0.COMMENT_END:{this._stateCommentEnd(t);break}case a0.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case a0.DOCTYPE:{this._stateDoctype(t);break}case a0.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case a0.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case a0.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case a0.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case a0.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case a0.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case a0.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case a0.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case a0.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case a0.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case a0.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case a0.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case a0.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case a0.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case a0.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case a0.CDATA_SECTION:{this._stateCdataSection(t);break}case a0.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case a0.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case a0.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case a0.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case Y.LESS_THAN_SIGN:{this.state=a0.TAG_OPEN;break}case Y.AMPERSAND:{this._startCharacterReference();break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),this._emitCodePoint(t);break}case Y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case Y.AMPERSAND:{this._startCharacterReference();break}case Y.LESS_THAN_SIGN:{this.state=a0.RCDATA_LESS_THAN_SIGN;break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),this._emitChars(_8);break}case Y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case Y.LESS_THAN_SIGN:{this.state=a0.RAWTEXT_LESS_THAN_SIGN;break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),this._emitChars(_8);break}case Y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case Y.LESS_THAN_SIGN:{this.state=a0.SCRIPT_DATA_LESS_THAN_SIGN;break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),this._emitChars(_8);break}case Y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case Y.NULL:{this._err(k0.unexpectedNullCharacter),this._emitChars(_8);break}case Y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(fl(t))this._createStartTagToken(),this.state=a0.TAG_NAME,this._stateTagName(t);else switch(t){case Y.EXCLAMATION_MARK:{this.state=a0.MARKUP_DECLARATION_OPEN;break}case Y.SOLIDUS:{this.state=a0.END_TAG_OPEN;break}case Y.QUESTION_MARK:{this._err(k0.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=a0.BOGUS_COMMENT,this._stateBogusComment(t);break}case Y.EOF:{this._err(k0.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(k0.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=a0.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(fl(t))this._createEndTagToken(),this.state=a0.TAG_NAME,this._stateTagName(t);else switch(t){case Y.GREATER_THAN_SIGN:{this._err(k0.missingEndTagName),this.state=a0.DATA;break}case Y.EOF:{this._err(k0.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(k0.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=a0.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=a0.BEFORE_ATTRIBUTE_NAME;break}case Y.SOLIDUS:{this.state=a0.SELF_CLOSING_START_TAG;break}case Y.GREATER_THAN_SIGN:{this.state=a0.DATA,this.emitCurrentTagToken();break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),n.tagName+=_8;break}case Y.EOF:{this._err(k0.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Pi(t)?tA(t):t)}}_stateRcdataLessThanSign(t){t===Y.SOLIDUS?this.state=a0.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=a0.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){fl(t)?(this.state=a0.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=a0.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 Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=a0.BEFORE_ATTRIBUTE_NAME,!1;case Y.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=a0.SELF_CLOSING_START_TAG,!1;case Y.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=a0.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=a0.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===Y.SOLIDUS?this.state=a0.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=a0.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){fl(t)?(this.state=a0.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=a0.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=a0.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case Y.SOLIDUS:{this.state=a0.SCRIPT_DATA_END_TAG_OPEN;break}case Y.EXCLAMATION_MARK:{this.state=a0.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=a0.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){fl(t)?(this.state=a0.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=a0.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=a0.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===Y.HYPHEN_MINUS?(this.state=a0.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=a0.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===Y.HYPHEN_MINUS?(this.state=a0.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=a0.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case Y.HYPHEN_MINUS:{this.state=a0.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=a0.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),this._emitChars(_8);break}case Y.EOF:{this._err(k0.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case Y.HYPHEN_MINUS:{this.state=a0.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=a0.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),this.state=a0.SCRIPT_DATA_ESCAPED,this._emitChars(_8);break}case Y.EOF:{this._err(k0.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=a0.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case Y.HYPHEN_MINUS:{this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=a0.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case Y.GREATER_THAN_SIGN:{this.state=a0.SCRIPT_DATA,this._emitChars(">");break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),this.state=a0.SCRIPT_DATA_ESCAPED,this._emitChars(_8);break}case Y.EOF:{this._err(k0.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=a0.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===Y.SOLIDUS?this.state=a0.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:fl(t)?(this._emitChars("<"),this.state=a0.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=a0.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){fl(t)?(this.state=a0.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=a0.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=a0.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(b4.SCRIPT,!1)&&C11(this.preprocessor.peek(b4.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<b4.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=a0.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=a0.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case Y.HYPHEN_MINUS:{this.state=a0.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=a0.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),this._emitChars(_8);break}case Y.EOF:{this._err(k0.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case Y.HYPHEN_MINUS:{this.state=a0.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=a0.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),this.state=a0.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_8);break}case Y.EOF:{this._err(k0.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=a0.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case Y.HYPHEN_MINUS:{this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=a0.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case Y.GREATER_THAN_SIGN:{this.state=a0.SCRIPT_DATA,this._emitChars(">");break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),this.state=a0.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_8);break}case Y.EOF:{this._err(k0.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=a0.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===Y.SOLIDUS?(this.state=a0.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=a0.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(b4.SCRIPT,!1)&&C11(this.preprocessor.peek(b4.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<b4.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=a0.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=a0.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.SOLIDUS:case Y.GREATER_THAN_SIGN:case Y.EOF:{this.state=a0.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case Y.EQUALS_SIGN:{this._err(k0.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=a0.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=a0.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:case Y.SOLIDUS:case Y.GREATER_THAN_SIGN:case Y.EOF:{this._leaveAttrName(),this.state=a0.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case Y.EQUALS_SIGN:{this._leaveAttrName(),this.state=a0.BEFORE_ATTRIBUTE_VALUE;break}case Y.QUOTATION_MARK:case Y.APOSTROPHE:case Y.LESS_THAN_SIGN:{this._err(k0.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),this.currentAttr.name+=_8;break}default:this.currentAttr.name+=String.fromCodePoint(Pi(t)?tA(t):t)}}_stateAfterAttributeName(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.SOLIDUS:{this.state=a0.SELF_CLOSING_START_TAG;break}case Y.EQUALS_SIGN:{this.state=a0.BEFORE_ATTRIBUTE_VALUE;break}case Y.GREATER_THAN_SIGN:{this.state=a0.DATA,this.emitCurrentTagToken();break}case Y.EOF:{this._err(k0.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=a0.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.QUOTATION_MARK:{this.state=a0.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{this.state=a0.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case Y.GREATER_THAN_SIGN:{this._err(k0.missingAttributeValue),this.state=a0.DATA,this.emitCurrentTagToken();break}default:this.state=a0.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case Y.QUOTATION_MARK:{this.state=a0.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case Y.AMPERSAND:{this._startCharacterReference();break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),this.currentAttr.value+=_8;break}case Y.EOF:{this._err(k0.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case Y.APOSTROPHE:{this.state=a0.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case Y.AMPERSAND:{this._startCharacterReference();break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),this.currentAttr.value+=_8;break}case Y.EOF:{this._err(k0.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this._leaveAttrValue(),this.state=a0.BEFORE_ATTRIBUTE_NAME;break}case Y.AMPERSAND:{this._startCharacterReference();break}case Y.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=a0.DATA,this.emitCurrentTagToken();break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),this.currentAttr.value+=_8;break}case Y.QUOTATION_MARK:case Y.APOSTROPHE:case Y.LESS_THAN_SIGN:case Y.EQUALS_SIGN:case Y.GRAVE_ACCENT:{this._err(k0.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case Y.EOF:{this._err(k0.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this._leaveAttrValue(),this.state=a0.BEFORE_ATTRIBUTE_NAME;break}case Y.SOLIDUS:{this._leaveAttrValue(),this.state=a0.SELF_CLOSING_START_TAG;break}case Y.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=a0.DATA,this.emitCurrentTagToken();break}case Y.EOF:{this._err(k0.eofInTag),this._emitEOFToken();break}default:this._err(k0.missingWhitespaceBetweenAttributes),this.state=a0.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case Y.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=a0.DATA,this.emitCurrentTagToken();break}case Y.EOF:{this._err(k0.eofInTag),this._emitEOFToken();break}default:this._err(k0.unexpectedSolidusInTag),this.state=a0.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case Y.GREATER_THAN_SIGN:{this.state=a0.DATA,this.emitCurrentComment(n);break}case Y.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),n.data+=_8;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(b4.DASH_DASH,!0)?(this._createCommentToken(b4.DASH_DASH.length+1),this.state=a0.COMMENT_START):this._consumeSequenceIfMatch(b4.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(b4.DOCTYPE.length+1),this.state=a0.DOCTYPE):this._consumeSequenceIfMatch(b4.CDATA_START,!0)?this.inForeignNode?this.state=a0.CDATA_SECTION:(this._err(k0.cdataInHtmlContent),this._createCommentToken(b4.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=a0.BOGUS_COMMENT):this._ensureHibernation()||(this._err(k0.incorrectlyOpenedComment),this._createCommentToken(2),this.state=a0.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case Y.HYPHEN_MINUS:{this.state=a0.COMMENT_START_DASH;break}case Y.GREATER_THAN_SIGN:{this._err(k0.abruptClosingOfEmptyComment),this.state=a0.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=a0.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case Y.HYPHEN_MINUS:{this.state=a0.COMMENT_END;break}case Y.GREATER_THAN_SIGN:{this._err(k0.abruptClosingOfEmptyComment),this.state=a0.DATA,this.emitCurrentComment(n);break}case Y.EOF:{this._err(k0.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=a0.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case Y.HYPHEN_MINUS:{this.state=a0.COMMENT_END_DASH;break}case Y.LESS_THAN_SIGN:{n.data+="<",this.state=a0.COMMENT_LESS_THAN_SIGN;break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),n.data+=_8;break}case Y.EOF:{this._err(k0.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case Y.EXCLAMATION_MARK:{n.data+="!",this.state=a0.COMMENT_LESS_THAN_SIGN_BANG;break}case Y.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=a0.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===Y.HYPHEN_MINUS?this.state=a0.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=a0.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===Y.HYPHEN_MINUS?this.state=a0.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=a0.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==Y.GREATER_THAN_SIGN&&t!==Y.EOF&&this._err(k0.nestedComment),this.state=a0.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case Y.HYPHEN_MINUS:{this.state=a0.COMMENT_END;break}case Y.EOF:{this._err(k0.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=a0.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case Y.GREATER_THAN_SIGN:{this.state=a0.DATA,this.emitCurrentComment(n);break}case Y.EXCLAMATION_MARK:{this.state=a0.COMMENT_END_BANG;break}case Y.HYPHEN_MINUS:{n.data+="-";break}case Y.EOF:{this._err(k0.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=a0.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case Y.HYPHEN_MINUS:{n.data+="--!",this.state=a0.COMMENT_END_DASH;break}case Y.GREATER_THAN_SIGN:{this._err(k0.incorrectlyClosedComment),this.state=a0.DATA,this.emitCurrentComment(n);break}case Y.EOF:{this._err(k0.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=a0.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=a0.BEFORE_DOCTYPE_NAME;break}case Y.GREATER_THAN_SIGN:{this.state=a0.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case Y.EOF:{this._err(k0.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(k0.missingWhitespaceBeforeDoctypeName),this.state=a0.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Pi(t))this._createDoctypeToken(String.fromCharCode(tA(t))),this.state=a0.DOCTYPE_NAME;else switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.NULL:{this._err(k0.unexpectedNullCharacter),this._createDoctypeToken(_8),this.state=a0.DOCTYPE_NAME;break}case Y.GREATER_THAN_SIGN:{this._err(k0.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=a0.DATA;break}case Y.EOF:{this._err(k0.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=a0.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=a0.AFTER_DOCTYPE_NAME;break}case Y.GREATER_THAN_SIGN:{this.state=a0.DATA,this.emitCurrentDoctype(n);break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),n.name+=_8;break}case Y.EOF:{this._err(k0.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Pi(t)?tA(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.GREATER_THAN_SIGN:{this.state=a0.DATA,this.emitCurrentDoctype(n);break}case Y.EOF:{this._err(k0.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(b4.PUBLIC,!1)?this.state=a0.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(b4.SYSTEM,!1)?this.state=a0.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(k0.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=a0.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=a0.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case Y.QUOTATION_MARK:{this._err(k0.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=a0.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{this._err(k0.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=a0.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case Y.GREATER_THAN_SIGN:{this._err(k0.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=a0.DATA,this.emitCurrentDoctype(n);break}case Y.EOF:{this._err(k0.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(k0.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=a0.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.QUOTATION_MARK:{n.publicId="",this.state=a0.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{n.publicId="",this.state=a0.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case Y.GREATER_THAN_SIGN:{this._err(k0.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=a0.DATA,this.emitCurrentDoctype(n);break}case Y.EOF:{this._err(k0.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(k0.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=a0.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case Y.QUOTATION_MARK:{this.state=a0.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),n.publicId+=_8;break}case Y.GREATER_THAN_SIGN:{this._err(k0.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=a0.DATA;break}case Y.EOF:{this._err(k0.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 Y.APOSTROPHE:{this.state=a0.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),n.publicId+=_8;break}case Y.GREATER_THAN_SIGN:{this._err(k0.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=a0.DATA;break}case Y.EOF:{this._err(k0.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 Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=a0.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case Y.GREATER_THAN_SIGN:{this.state=a0.DATA,this.emitCurrentDoctype(n);break}case Y.QUOTATION_MARK:{this._err(k0.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=a0.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{this._err(k0.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=a0.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Y.EOF:{this._err(k0.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(k0.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=a0.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=a0.DATA;break}case Y.QUOTATION_MARK:{n.systemId="",this.state=a0.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{n.systemId="",this.state=a0.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Y.EOF:{this._err(k0.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(k0.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=a0.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=a0.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case Y.QUOTATION_MARK:{this._err(k0.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=a0.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{this._err(k0.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=a0.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Y.GREATER_THAN_SIGN:{this._err(k0.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=a0.DATA,this.emitCurrentDoctype(n);break}case Y.EOF:{this._err(k0.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(k0.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=a0.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.QUOTATION_MARK:{n.systemId="",this.state=a0.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{n.systemId="",this.state=a0.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Y.GREATER_THAN_SIGN:{this._err(k0.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=a0.DATA,this.emitCurrentDoctype(n);break}case Y.EOF:{this._err(k0.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(k0.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=a0.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case Y.QUOTATION_MARK:{this.state=a0.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),n.systemId+=_8;break}case Y.GREATER_THAN_SIGN:{this._err(k0.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=a0.DATA;break}case Y.EOF:{this._err(k0.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 Y.APOSTROPHE:{this.state=a0.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case Y.NULL:{this._err(k0.unexpectedNullCharacter),n.systemId+=_8;break}case Y.GREATER_THAN_SIGN:{this._err(k0.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=a0.DATA;break}case Y.EOF:{this._err(k0.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 Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=a0.DATA;break}case Y.EOF:{this._err(k0.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(k0.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=a0.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case Y.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=a0.DATA;break}case Y.NULL:{this._err(k0.unexpectedNullCharacter);break}case Y.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case Y.RIGHT_SQUARE_BRACKET:{this.state=a0.CDATA_SECTION_BRACKET;break}case Y.EOF:{this._err(k0.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===Y.RIGHT_SQUARE_BRACKET?this.state=a0.CDATA_SECTION_END:(this._emitChars("]"),this.state=a0.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case Y.GREATER_THAN_SIGN:{this.state=a0.DATA;break}case Y.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=a0.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(Y.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&F11(this.preprocessor.peek(1))?a0.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){F11(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===Y.SEMICOLON&&this._err(k0.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const I11=new Set([F.DD,F.DT,F.LI,F.OPTGROUP,F.OPTION,F.P,F.RB,F.RP,F.RT,F.RTC]),S11=new Set([...I11,F.CAPTION,F.COLGROUP,F.TBODY,F.TD,F.TFOOT,F.TH,F.THEAD,F.TR]),nA=new Set([F.APPLET,F.CAPTION,F.HTML,F.MARQUEE,F.OBJECT,F.TABLE,F.TD,F.TEMPLATE,F.TH]),fs2=new Set([...nA,F.OL,F.UL]),Zs2=new Set([...nA,F.BUTTON]),R11=new Set([F.ANNOTATION_XML,F.MI,F.MN,F.MO,F.MS,F.MTEXT]),x11=new Set([F.DESC,F.FOREIGN_OBJECT,F.TITLE]),Hs2=new Set([F.TR,F.TEMPLATE,F.HTML]),gs2=new Set([F.TBODY,F.TFOOT,F.THEAD,F.TEMPLATE,F.HTML]),Es2=new Set([F.TABLE,F.TEMPLATE,F.HTML]),Vs2=new Set([F.TD,F.TH]);class Ms2{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,l){this.treeAdapter=n,this.handler=l,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=F.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===F.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===a1.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 l=this._indexOf(t);this.items[l]=n,l===this.stackTop&&(this.current=n)}insertAfter(t,n,l){const o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,l),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,o===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])!==a1.HTML);this.shortenToLength(n<0?0:n)}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(n<0?0:n)}popUntilPopped(t,n){const l=this._indexOfTagNames(t,n);this.shortenToLength(l<0?0:l)}popUntilNumberedHeaderPopped(){this.popUntilPopped(Qh0,a1.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Vs2,a1.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let l=this.stackTop;l>=0;l--)if(t.has(this.tagIDs[l])&&this.treeAdapter.getNamespaceURI(this.items[l])===n)return l;return-1}clearBackTo(t,n){const l=this._indexOfTagNames(t,n);this.shortenToLength(l+1)}clearBackToTableContext(){this.clearBackTo(Es2,a1.HTML)}clearBackToTableBodyContext(){this.clearBackTo(gs2,a1.HTML)}clearBackToTableRowContext(){this.clearBackTo(Hs2,a1.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]===F.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]===F.HTML}hasInDynamicScope(t,n){for(let l=this.stackTop;l>=0;l--){const o=this.tagIDs[l];switch(this.treeAdapter.getNamespaceURI(this.items[l])){case a1.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case a1.SVG:{if(x11.has(o))return!1;break}case a1.MATHML:{if(R11.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,nA)}hasInListItemScope(t){return this.hasInDynamicScope(t,fs2)}hasInButtonScope(t){return this.hasInDynamicScope(t,Zs2)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case a1.HTML:{if(Qh0.has(n))return!0;if(nA.has(n))return!1;break}case a1.SVG:{if(x11.has(n))return!1;break}case a1.MATHML:{if(R11.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===a1.HTML)switch(this.tagIDs[n]){case t:return!0;case F.TABLE:case F.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===a1.HTML)switch(this.tagIDs[t]){case F.TBODY:case F.THEAD:case F.TFOOT:return!0;case F.TABLE:case F.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===a1.HTML)switch(this.tagIDs[n]){case t:return!0;case F.OPTION:case F.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;I11.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;S11.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&S11.has(this.currentTagId);)this.pop()}}const Jh0=3;var Wt;(function(a){a[a.Marker=0]="Marker",a[a.Element=1]="Element"})(Wt||(Wt={}));const T11={type:Wt.Marker};class vs2{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const l=[],o=n.length,i=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){const A=this.entries[u];if(A.type===Wt.Marker)break;const{element:p}=A;if(this.treeAdapter.getTagName(p)===i&&this.treeAdapter.getNamespaceURI(p)===s){const g=this.treeAdapter.getAttrList(p);g.length===o&&l.push({idx:u,attrs:g})}}return l}_ensureNoahArkCondition(t){if(this.entries.length<Jh0)return;const n=this.treeAdapter.getAttrList(t),l=this._getNoahArkConditionCandidates(t,n);if(l.length<Jh0)return;const o=new Map(n.map(s=>[s.name,s.value]));let i=0;for(let s=0;s<l.length;s++){const u=l[s];u.attrs.every(A=>o.get(A.name)===A.value)&&(i+=1,i>=Jh0&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(T11)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Wt.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const l=this.entries.indexOf(this.bookmark);this.entries.splice(l,0,{type:Wt.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(T11);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const n=this.entries.find(l=>l.type===Wt.Marker||this.treeAdapter.getTagName(l.element)===t);return n&&n.type===Wt.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Wt.Element&&n.element===t)}}const Zl={createDocument(){return{nodeName:"#document",mode:va.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(a,t,n){return{nodeName:a,tagName:a,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(a){return{nodeName:"#comment",data:a,parentNode:null}},createTextNode(a){return{nodeName:"#text",value:a,parentNode:null}},appendChild(a,t){a.childNodes.push(t),t.parentNode=a},insertBefore(a,t,n){const l=a.childNodes.indexOf(n);a.childNodes.splice(l,0,t),t.parentNode=a},setTemplateContent(a,t){a.content=t},getTemplateContent(a){return a.content},setDocumentType(a,t,n,l){const o=a.childNodes.find(i=>i.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=l;else{const i={nodeName:"#documentType",name:t,publicId:n,systemId:l,parentNode:null};Zl.appendChild(a,i)}},setDocumentMode(a,t){a.mode=t},getDocumentMode(a){return a.mode},detachNode(a){if(a.parentNode){const t=a.parentNode.childNodes.indexOf(a);a.parentNode.childNodes.splice(t,1),a.parentNode=null}},insertText(a,t){if(a.childNodes.length>0){const n=a.childNodes[a.childNodes.length-1];if(Zl.isTextNode(n)){n.value+=t;return}}Zl.appendChild(a,Zl.createTextNode(t))},insertTextBefore(a,t,n){const l=a.childNodes[a.childNodes.indexOf(n)-1];l&&Zl.isTextNode(l)?l.value+=t:Zl.insertBefore(a,Zl.createTextNode(t),n)},adoptAttributes(a,t){const n=new Set(a.attrs.map(l=>l.name));for(let l=0;l<t.length;l++)n.has(t[l].name)||a.attrs.push(t[l])},getFirstChild(a){return a.childNodes[0]},getChildNodes(a){return a.childNodes},getParentNode(a){return a.parentNode},getAttrList(a){return a.attrs},getTagName(a){return a.tagName},getNamespaceURI(a){return a.namespaceURI},getTextNodeContent(a){return a.value},getCommentNodeContent(a){return a.data},getDocumentTypeNodeName(a){return a.name},getDocumentTypeNodePublicId(a){return a.publicId},getDocumentTypeNodeSystemId(a){return a.systemId},isTextNode(a){return a.nodeName==="#text"},isCommentNode(a){return a.nodeName==="#comment"},isDocumentTypeNode(a){return a.nodeName==="#documentType"},isElementNode(a){return Object.prototype.hasOwnProperty.call(a,"tagName")},setNodeSourceCodeLocation(a,t){a.sourceCodeLocation=t},getNodeSourceCodeLocation(a){return a.sourceCodeLocation},updateNodeSourceCodeLocation(a,t){a.sourceCodeLocation={...a.sourceCodeLocation,...t}}},N11="html",Ls2="about:legacy-compat",ws2="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",$11=["+//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//"],ys2=[...$11,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Fs2=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),k11=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],bs2=[...k11,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function D11(a,t){return t.some(n=>a.startsWith(n))}function Cs2(a){return a.name===N11&&a.publicId===null&&(a.systemId===null||a.systemId===Ls2)}function Is2(a){if(a.name!==N11)return va.QUIRKS;const{systemId:t}=a;if(t&&t.toLowerCase()===ws2)return va.QUIRKS;let{publicId:n}=a;if(n!==null){if(n=n.toLowerCase(),Fs2.has(n))return va.QUIRKS;let l=t===null?ys2:$11;if(D11(n,l))return va.QUIRKS;if(l=t===null?k11:bs2,D11(n,l))return va.LIMITED_QUIRKS}return va.NO_QUIRKS}const P11={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Ss2="definitionurl",Rs2="definitionURL",xs2=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(a=>[a.toLowerCase(),a])),Ts2=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:a1.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:a1.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:a1.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:a1.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:a1.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:a1.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:a1.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:a1.XML}],["xml:space",{prefix:"xml",name:"space",namespace:a1.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:a1.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:a1.XMLNS}]]),Ns2=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(a=>[a.toLowerCase(),a])),$s2=new Set([F.B,F.BIG,F.BLOCKQUOTE,F.BODY,F.BR,F.CENTER,F.CODE,F.DD,F.DIV,F.DL,F.DT,F.EM,F.EMBED,F.H1,F.H2,F.H3,F.H4,F.H5,F.H6,F.HEAD,F.HR,F.I,F.IMG,F.LI,F.LISTING,F.MENU,F.META,F.NOBR,F.OL,F.P,F.PRE,F.RUBY,F.S,F.SMALL,F.SPAN,F.STRONG,F.STRIKE,F.SUB,F.SUP,F.TABLE,F.TT,F.U,F.UL,F.VAR]);function ks2(a){const t=a.tagID;return t===F.FONT&&a.attrs.some(({name:l})=>l===qr.COLOR||l===qr.SIZE||l===qr.FACE)||$s2.has(t)}function O11(a){for(let t=0;t<a.attrs.length;t++)if(a.attrs[t].name===Ss2){a.attrs[t].name=Rs2;break}}function _11(a){for(let t=0;t<a.attrs.length;t++){const n=xs2.get(a.attrs[t].name);n!=null&&(a.attrs[t].name=n)}}function ed0(a){for(let t=0;t<a.attrs.length;t++){const n=Ts2.get(a.attrs[t].name);n&&(a.attrs[t].prefix=n.prefix,a.attrs[t].name=n.name,a.attrs[t].namespace=n.namespace)}}function Ds2(a){const t=Ns2.get(a.tagName);t!=null&&(a.tagName=t,a.tagID=Z9(a.tagName))}function Ps2(a,t){return t===a1.MATHML&&(a===F.MI||a===F.MO||a===F.MN||a===F.MS||a===F.MTEXT)}function Os2(a,t,n){if(t===a1.MATHML&&a===F.ANNOTATION_XML){for(let l=0;l<n.length;l++)if(n[l].name===qr.ENCODING){const o=n[l].value.toLowerCase();return o===P11.TEXT_HTML||o===P11.APPLICATION_XML}}return t===a1.SVG&&(a===F.FOREIGN_OBJECT||a===F.DESC||a===F.TITLE)}function _s2(a,t,n,l){return(!l||l===a1.HTML)&&Os2(a,t,n)||(!l||l===a1.MATHML)&&Ps2(a,t)}const Bs2="hidden",Us2=8,zs2=3;var o0;(function(a){a[a.INITIAL=0]="INITIAL",a[a.BEFORE_HTML=1]="BEFORE_HTML",a[a.BEFORE_HEAD=2]="BEFORE_HEAD",a[a.IN_HEAD=3]="IN_HEAD",a[a.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",a[a.AFTER_HEAD=5]="AFTER_HEAD",a[a.IN_BODY=6]="IN_BODY",a[a.TEXT=7]="TEXT",a[a.IN_TABLE=8]="IN_TABLE",a[a.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",a[a.IN_CAPTION=10]="IN_CAPTION",a[a.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",a[a.IN_TABLE_BODY=12]="IN_TABLE_BODY",a[a.IN_ROW=13]="IN_ROW",a[a.IN_CELL=14]="IN_CELL",a[a.IN_SELECT=15]="IN_SELECT",a[a.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",a[a.IN_TEMPLATE=17]="IN_TEMPLATE",a[a.AFTER_BODY=18]="AFTER_BODY",a[a.IN_FRAMESET=19]="IN_FRAMESET",a[a.AFTER_FRAMESET=20]="AFTER_FRAMESET",a[a.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",a[a.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(o0||(o0={}));const js2={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},B11=new Set([F.TABLE,F.TBODY,F.TFOOT,F.THEAD,F.TR]),U11={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Zl,onParseError:null};class z11{constructor(t,n,l=null,o=null){this.fragmentContext=l,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=o0.INITIAL,this.originalInsertionMode=o0.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={...U11,...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 ps2(this.options,this),this.activeFormattingElements=new vs2(this.treeAdapter),this.fragmentContextID=l?Z9(this.treeAdapter.getTagName(l)):F.UNKNOWN,this._setContextModes(l??this.document,this.fragmentContextID),this.openElements=new Ms2(this.document,this.treeAdapter,this)}static parse(t,n){const l=new this(n);return l.tokenizer.write(t,!0),l.document}static getFragmentParser(t,n){const l={...U11,...n};t??(t=l.treeAdapter.createElement(w0.TEMPLATE,a1.HTML,[]));const o=l.treeAdapter.createElement("documentmock",a1.HTML,[]),i=new this(l,o,t);return i.fragmentContextID===F.TEMPLATE&&i.tmplInsertionModeStack.unshift(o0.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,l){var o;if(!this.onParseError)return;const i=(o=t.location)!==null&&o!==void 0?o:js2,s={code:n,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:l?i.startLine:i.endLine,endCol:l?i.startCol:i.endCol,endOffset:l?i.startOffset:i.endOffset};this.onParseError(s)}onItemPush(t,n,l){var o,i;(i=(o=this.treeAdapter).onItemPush)===null||i===void 0||i.call(o,t),l&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var l,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(l=this.treeAdapter).onItemPop)===null||o===void 0||o.call(l,t,this.openElements.current),n){let i,s;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,s=this.fragmentContextID):{current:i,currentTagId:s}=this.openElements,this._setContextModes(i,s)}}_setContextModes(t,n){const l=t===this.document||this.treeAdapter.getNamespaceURI(t)===a1.HTML;this.currentNotInHTML=!l,this.tokenizer.inForeignNode=!l&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,a1.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=o0.TEXT}switchToPlaintextParsing(){this.insertionMode=o0.TEXT,this.originalInsertionMode=o0.IN_BODY,this.tokenizer.state=Ae.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)===w0.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==a1.HTML))switch(this.fragmentContextID){case F.TITLE:case F.TEXTAREA:{this.tokenizer.state=Ae.RCDATA;break}case F.STYLE:case F.XMP:case F.IFRAME:case F.NOEMBED:case F.NOFRAMES:case F.NOSCRIPT:{this.tokenizer.state=Ae.RAWTEXT;break}case F.SCRIPT:{this.tokenizer.state=Ae.SCRIPT_DATA;break}case F.PLAINTEXT:{this.tokenizer.state=Ae.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",l=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,l,o),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const l=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,l)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const l=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(l,t)}}_appendElement(t,n){const l=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(l,t.location)}_insertElement(t,n){const l=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(l,t.location),this.openElements.push(l,t.tagID)}_insertFakeElement(t,n){const l=this.treeAdapter.createElement(t,a1.HTML,[]);this._attachElementToTree(l,null),this.openElements.push(l,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,a1.HTML,t.attrs),l=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,l),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(l,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(w0.HTML,a1.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,F.HTML)}_appendCommentNode(t,n){const l=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,l),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}_insertCharacters(t){let n,l;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:l}=this._findFosterParentingLocation(),l?this.treeAdapter.insertTextBefore(n,t.chars,l):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const o=this.treeAdapter.getChildNodes(n),i=l?o.lastIndexOf(l):o.length,s=o[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:A,endCol:p,endOffset:g}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:A,endCol:p,endOffset:g})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let l=this.treeAdapter.getFirstChild(t);l;l=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(l),this.treeAdapter.appendChild(n,l)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const l=n.location,o=this.treeAdapter.getTagName(t),i=n.type===k2.END_TAG&&o===n.tagName?{endTag:{...l},endLine:l.endLine,endCol:l.endCol,endOffset:l.endOffset}:{endLine:l.startLine,endCol:l.startCol,endOffset:l.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,i)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,l;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,l=this.fragmentContextID):{current:n,currentTagId:l}=this.openElements,t.tagID===F.SVG&&this.treeAdapter.getTagName(n)===w0.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===a1.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===F.MGLYPH||t.tagID===F.MALIGNMARK)&&!this._isIntegrationPoint(l,n,a1.HTML)}_processToken(t){switch(t.type){case k2.CHARACTER:{this.onCharacter(t);break}case k2.NULL_CHARACTER:{this.onNullCharacter(t);break}case k2.COMMENT:{this.onComment(t);break}case k2.DOCTYPE:{this.onDoctype(t);break}case k2.START_TAG:{this._processStartTag(t);break}case k2.END_TAG:{this.onEndTag(t);break}case k2.EOF:{this.onEof(t);break}case k2.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,l){const o=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return _s2(t,o,i,l)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Wt.Marker||this.openElements.contains(o.element)),l=n<0?t-1:n-1;for(let o=l;o>=0;o--){const i=this.activeFormattingElements.entries[o];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=o0.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(F.P),this.openElements.popUntilTagNamePopped(F.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case F.TR:{this.insertionMode=o0.IN_ROW;return}case F.TBODY:case F.THEAD:case F.TFOOT:{this.insertionMode=o0.IN_TABLE_BODY;return}case F.CAPTION:{this.insertionMode=o0.IN_CAPTION;return}case F.COLGROUP:{this.insertionMode=o0.IN_COLUMN_GROUP;return}case F.TABLE:{this.insertionMode=o0.IN_TABLE;return}case F.BODY:{this.insertionMode=o0.IN_BODY;return}case F.FRAMESET:{this.insertionMode=o0.IN_FRAMESET;return}case F.SELECT:{this._resetInsertionModeForSelect(t);return}case F.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case F.HTML:{this.insertionMode=this.headElement?o0.AFTER_HEAD:o0.BEFORE_HEAD;return}case F.TD:case F.TH:{if(t>0){this.insertionMode=o0.IN_CELL;return}break}case F.HEAD:{if(t>0){this.insertionMode=o0.IN_HEAD;return}break}}this.insertionMode=o0.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const l=this.openElements.tagIDs[n];if(l===F.TEMPLATE)break;if(l===F.TABLE){this.insertionMode=o0.IN_SELECT_IN_TABLE;return}}this.insertionMode=o0.IN_SELECT}_isElementCausesFosterParenting(t){return B11.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&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 F.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===a1.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case F.TABLE:{const l=this.treeAdapter.getParentNode(n);return l?{parent:l,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 l=this.treeAdapter.getNamespaceURI(t);return us2[l].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Vu2(this,t);return}switch(this.insertionMode){case o0.INITIAL:{Oi(this,t);break}case o0.BEFORE_HTML:{_i(this,t);break}case o0.BEFORE_HEAD:{Bi(this,t);break}case o0.IN_HEAD:{Ui(this,t);break}case o0.IN_HEAD_NO_SCRIPT:{zi(this,t);break}case o0.AFTER_HEAD:{ji(this,t);break}case o0.IN_BODY:case o0.IN_CAPTION:case o0.IN_CELL:case o0.IN_TEMPLATE:{q11(this,t);break}case o0.TEXT:case o0.IN_SELECT:case o0.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case o0.IN_TABLE:case o0.IN_TABLE_BODY:case o0.IN_ROW:{ld0(this,t);break}case o0.IN_TABLE_TEXT:{e21(this,t);break}case o0.IN_COLUMN_GROUP:{oA(this,t);break}case o0.AFTER_BODY:{sA(this,t);break}case o0.AFTER_AFTER_BODY:{mA(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Eu2(this,t);return}switch(this.insertionMode){case o0.INITIAL:{Oi(this,t);break}case o0.BEFORE_HTML:{_i(this,t);break}case o0.BEFORE_HEAD:{Bi(this,t);break}case o0.IN_HEAD:{Ui(this,t);break}case o0.IN_HEAD_NO_SCRIPT:{zi(this,t);break}case o0.AFTER_HEAD:{ji(this,t);break}case o0.TEXT:{this._insertCharacters(t);break}case o0.IN_TABLE:case o0.IN_TABLE_BODY:case o0.IN_ROW:{ld0(this,t);break}case o0.IN_COLUMN_GROUP:{oA(this,t);break}case o0.AFTER_BODY:{sA(this,t);break}case o0.AFTER_AFTER_BODY:{mA(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){td0(this,t);return}switch(this.insertionMode){case o0.INITIAL:case o0.BEFORE_HTML:case o0.BEFORE_HEAD:case o0.IN_HEAD:case o0.IN_HEAD_NO_SCRIPT:case o0.AFTER_HEAD:case o0.IN_BODY:case o0.IN_TABLE:case o0.IN_CAPTION:case o0.IN_COLUMN_GROUP:case o0.IN_TABLE_BODY:case o0.IN_ROW:case o0.IN_CELL:case o0.IN_SELECT:case o0.IN_SELECT_IN_TABLE:case o0.IN_TEMPLATE:case o0.IN_FRAMESET:case o0.AFTER_FRAMESET:{td0(this,t);break}case o0.IN_TABLE_TEXT:{Gi(this,t);break}case o0.AFTER_BODY:{Qs2(this,t);break}case o0.AFTER_AFTER_BODY:case o0.AFTER_AFTER_FRAMESET:{Js2(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case o0.INITIAL:{em2(this,t);break}case o0.BEFORE_HEAD:case o0.IN_HEAD:case o0.IN_HEAD_NO_SCRIPT:case o0.AFTER_HEAD:{this._err(t,k0.misplacedDoctype);break}case o0.IN_TABLE_TEXT:{Gi(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,k0.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Mu2(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case o0.INITIAL:{Oi(this,t);break}case o0.BEFORE_HTML:{am2(this,t);break}case o0.BEFORE_HEAD:{nm2(this,t);break}case o0.IN_HEAD:{at(this,t);break}case o0.IN_HEAD_NO_SCRIPT:{om2(this,t);break}case o0.AFTER_HEAD:{im2(this,t);break}case o0.IN_BODY:{N6(this,t);break}case o0.IN_TABLE:{H9(this,t);break}case o0.IN_TABLE_TEXT:{Gi(this,t);break}case o0.IN_CAPTION:{lu2(this,t);break}case o0.IN_COLUMN_GROUP:{rd0(this,t);break}case o0.IN_TABLE_BODY:{cA(this,t);break}case o0.IN_ROW:{iA(this,t);break}case o0.IN_CELL:{cu2(this,t);break}case o0.IN_SELECT:{n21(this,t);break}case o0.IN_SELECT_IN_TABLE:{su2(this,t);break}case o0.IN_TEMPLATE:{uu2(this,t);break}case o0.AFTER_BODY:{du2(this,t);break}case o0.IN_FRAMESET:{Au2(this,t);break}case o0.AFTER_FRAMESET:{fu2(this,t);break}case o0.AFTER_AFTER_BODY:{Hu2(this,t);break}case o0.AFTER_AFTER_FRAMESET:{gu2(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?vu2(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case o0.INITIAL:{Oi(this,t);break}case o0.BEFORE_HTML:{tm2(this,t);break}case o0.BEFORE_HEAD:{lm2(this,t);break}case o0.IN_HEAD:{rm2(this,t);break}case o0.IN_HEAD_NO_SCRIPT:{cm2(this,t);break}case o0.AFTER_HEAD:{sm2(this,t);break}case o0.IN_BODY:{rA(this,t);break}case o0.TEXT:{Gm2(this,t);break}case o0.IN_TABLE:{qi(this,t);break}case o0.IN_TABLE_TEXT:{Gi(this,t);break}case o0.IN_CAPTION:{ru2(this,t);break}case o0.IN_COLUMN_GROUP:{ou2(this,t);break}case o0.IN_TABLE_BODY:{od0(this,t);break}case o0.IN_ROW:{t21(this,t);break}case o0.IN_CELL:{iu2(this,t);break}case o0.IN_SELECT:{l21(this,t);break}case o0.IN_SELECT_IN_TABLE:{mu2(this,t);break}case o0.IN_TEMPLATE:{hu2(this,t);break}case o0.AFTER_BODY:{o21(this,t);break}case o0.IN_FRAMESET:{pu2(this,t);break}case o0.AFTER_FRAMESET:{Zu2(this,t);break}case o0.AFTER_AFTER_BODY:{mA(this,t);break}}}onEof(t){switch(this.insertionMode){case o0.INITIAL:{Oi(this,t);break}case o0.BEFORE_HTML:{_i(this,t);break}case o0.BEFORE_HEAD:{Bi(this,t);break}case o0.IN_HEAD:{Ui(this,t);break}case o0.IN_HEAD_NO_SCRIPT:{zi(this,t);break}case o0.AFTER_HEAD:{ji(this,t);break}case o0.IN_BODY:case o0.IN_TABLE:case o0.IN_CAPTION:case o0.IN_COLUMN_GROUP:case o0.IN_TABLE_BODY:case o0.IN_ROW:case o0.IN_CELL:case o0.IN_SELECT:case o0.IN_SELECT_IN_TABLE:{Q11(this,t);break}case o0.TEXT:{Ym2(this,t);break}case o0.IN_TABLE_TEXT:{Gi(this,t);break}case o0.IN_TEMPLATE:{r21(this,t);break}case o0.AFTER_BODY:case o0.IN_FRAMESET:case o0.AFTER_FRAMESET:case o0.AFTER_AFTER_BODY:case o0.AFTER_AFTER_FRAMESET:{nd0(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===Y.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 o0.IN_HEAD:case o0.IN_HEAD_NO_SCRIPT:case o0.AFTER_HEAD:case o0.TEXT:case o0.IN_COLUMN_GROUP:case o0.IN_SELECT:case o0.IN_SELECT_IN_TABLE:case o0.IN_FRAMESET:case o0.AFTER_FRAMESET:{this._insertCharacters(t);break}case o0.IN_BODY:case o0.IN_CAPTION:case o0.IN_CELL:case o0.IN_TEMPLATE:case o0.AFTER_BODY:case o0.AFTER_AFTER_BODY:case o0.AFTER_AFTER_FRAMESET:{j11(this,t);break}case o0.IN_TABLE:case o0.IN_TABLE_BODY:case o0.IN_ROW:{ld0(this,t);break}case o0.IN_TABLE_TEXT:{J11(this,t);break}}}}function qs2(a,t){let n=a.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?a.openElements.contains(n.element)?a.openElements.hasInScope(t.tagID)||(n=null):(a.activeFormattingElements.removeEntry(n),n=null):X11(a,t),n}function Ws2(a,t){let n=null,l=a.openElements.stackTop;for(;l>=0;l--){const o=a.openElements.items[l];if(o===t.element)break;a._isSpecialElement(o,a.openElements.tagIDs[l])&&(n=o)}return n||(a.openElements.shortenToLength(l<0?0:l),a.activeFormattingElements.removeEntry(t)),n}function Gs2(a,t,n){let l=t,o=a.openElements.getCommonAncestor(t);for(let i=0,s=o;s!==n;i++,s=o){o=a.openElements.getCommonAncestor(s);const u=a.activeFormattingElements.getElementEntry(s),A=u&&i>=zs2;!u||A?(A&&a.activeFormattingElements.removeEntry(u),a.openElements.remove(s)):(s=Ys2(a,u),l===t&&(a.activeFormattingElements.bookmark=u),a.treeAdapter.detachNode(l),a.treeAdapter.appendChild(s,l),l=s)}return l}function Ys2(a,t){const n=a.treeAdapter.getNamespaceURI(t.element),l=a.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return a.openElements.replace(t.element,l),t.element=l,l}function Ks2(a,t,n){const l=a.treeAdapter.getTagName(t),o=Z9(l);if(a._isElementCausesFosterParenting(o))a._fosterParentElement(n);else{const i=a.treeAdapter.getNamespaceURI(t);o===F.TEMPLATE&&i===a1.HTML&&(t=a.treeAdapter.getTemplateContent(t)),a.treeAdapter.appendChild(t,n)}}function Xs2(a,t,n){const l=a.treeAdapter.getNamespaceURI(n.element),{token:o}=n,i=a.treeAdapter.createElement(o.tagName,l,o.attrs);a._adoptNodes(t,i),a.treeAdapter.appendChild(t,i),a.activeFormattingElements.insertElementAfterBookmark(i,o),a.activeFormattingElements.removeEntry(n),a.openElements.remove(n.element),a.openElements.insertAfter(t,i,o.tagID)}function ad0(a,t){for(let n=0;n<Us2;n++){const l=qs2(a,t);if(!l)break;const o=Ws2(a,l);if(!o)break;a.activeFormattingElements.bookmark=l;const i=Gs2(a,o,l.element),s=a.openElements.getCommonAncestor(l.element);a.treeAdapter.detachNode(i),s&&Ks2(a,s,i),Xs2(a,o,l)}}function td0(a,t){a._appendCommentNode(t,a.openElements.currentTmplContentOrNode)}function Qs2(a,t){a._appendCommentNode(t,a.openElements.items[0])}function Js2(a,t){a._appendCommentNode(t,a.document)}function nd0(a,t){if(a.stopped=!0,t.location){const n=a.fragmentContext?0:2;for(let l=a.openElements.stackTop;l>=n;l--)a._setEndLocation(a.openElements.items[l],t);if(!a.fragmentContext&&a.openElements.stackTop>=0){const l=a.openElements.items[0],o=a.treeAdapter.getNodeSourceCodeLocation(l);if(o&&!o.endTag&&(a._setEndLocation(l,t),a.openElements.stackTop>=1)){const i=a.openElements.items[1],s=a.treeAdapter.getNodeSourceCodeLocation(i);s&&!s.endTag&&a._setEndLocation(i,t)}}}}function em2(a,t){a._setDocumentType(t);const n=t.forceQuirks?va.QUIRKS:Is2(t);Cs2(t)||a._err(t,k0.nonConformingDoctype),a.treeAdapter.setDocumentMode(a.document,n),a.insertionMode=o0.BEFORE_HTML}function Oi(a,t){a._err(t,k0.missingDoctype,!0),a.treeAdapter.setDocumentMode(a.document,va.QUIRKS),a.insertionMode=o0.BEFORE_HTML,a._processToken(t)}function am2(a,t){t.tagID===F.HTML?(a._insertElement(t,a1.HTML),a.insertionMode=o0.BEFORE_HEAD):_i(a,t)}function tm2(a,t){const n=t.tagID;(n===F.HTML||n===F.HEAD||n===F.BODY||n===F.BR)&&_i(a,t)}function _i(a,t){a._insertFakeRootElement(),a.insertionMode=o0.BEFORE_HEAD,a._processToken(t)}function nm2(a,t){switch(t.tagID){case F.HTML:{N6(a,t);break}case F.HEAD:{a._insertElement(t,a1.HTML),a.headElement=a.openElements.current,a.insertionMode=o0.IN_HEAD;break}default:Bi(a,t)}}function lm2(a,t){const n=t.tagID;n===F.HEAD||n===F.BODY||n===F.HTML||n===F.BR?Bi(a,t):a._err(t,k0.endTagWithoutMatchingOpenElement)}function Bi(a,t){a._insertFakeElement(w0.HEAD,F.HEAD),a.headElement=a.openElements.current,a.insertionMode=o0.IN_HEAD,a._processToken(t)}function at(a,t){switch(t.tagID){case F.HTML:{N6(a,t);break}case F.BASE:case F.BASEFONT:case F.BGSOUND:case F.LINK:case F.META:{a._appendElement(t,a1.HTML),t.ackSelfClosing=!0;break}case F.TITLE:{a._switchToTextParsing(t,Ae.RCDATA);break}case F.NOSCRIPT:{a.options.scriptingEnabled?a._switchToTextParsing(t,Ae.RAWTEXT):(a._insertElement(t,a1.HTML),a.insertionMode=o0.IN_HEAD_NO_SCRIPT);break}case F.NOFRAMES:case F.STYLE:{a._switchToTextParsing(t,Ae.RAWTEXT);break}case F.SCRIPT:{a._switchToTextParsing(t,Ae.SCRIPT_DATA);break}case F.TEMPLATE:{a._insertTemplate(t),a.activeFormattingElements.insertMarker(),a.framesetOk=!1,a.insertionMode=o0.IN_TEMPLATE,a.tmplInsertionModeStack.unshift(o0.IN_TEMPLATE);break}case F.HEAD:{a._err(t,k0.misplacedStartTagForHeadElement);break}default:Ui(a,t)}}function rm2(a,t){switch(t.tagID){case F.HEAD:{a.openElements.pop(),a.insertionMode=o0.AFTER_HEAD;break}case F.BODY:case F.BR:case F.HTML:{Ui(a,t);break}case F.TEMPLATE:{Wr(a,t);break}default:a._err(t,k0.endTagWithoutMatchingOpenElement)}}function Wr(a,t){a.openElements.tmplCount>0?(a.openElements.generateImpliedEndTagsThoroughly(),a.openElements.currentTagId!==F.TEMPLATE&&a._err(t,k0.closingOfElementWithOpenChildElements),a.openElements.popUntilTagNamePopped(F.TEMPLATE),a.activeFormattingElements.clearToLastMarker(),a.tmplInsertionModeStack.shift(),a._resetInsertionMode()):a._err(t,k0.endTagWithoutMatchingOpenElement)}function Ui(a,t){a.openElements.pop(),a.insertionMode=o0.AFTER_HEAD,a._processToken(t)}function om2(a,t){switch(t.tagID){case F.HTML:{N6(a,t);break}case F.BASEFONT:case F.BGSOUND:case F.HEAD:case F.LINK:case F.META:case F.NOFRAMES:case F.STYLE:{at(a,t);break}case F.NOSCRIPT:{a._err(t,k0.nestedNoscriptInHead);break}default:zi(a,t)}}function cm2(a,t){switch(t.tagID){case F.NOSCRIPT:{a.openElements.pop(),a.insertionMode=o0.IN_HEAD;break}case F.BR:{zi(a,t);break}default:a._err(t,k0.endTagWithoutMatchingOpenElement)}}function zi(a,t){const n=t.type===k2.EOF?k0.openElementsLeftAfterEof:k0.disallowedContentInNoscriptInHead;a._err(t,n),a.openElements.pop(),a.insertionMode=o0.IN_HEAD,a._processToken(t)}function im2(a,t){switch(t.tagID){case F.HTML:{N6(a,t);break}case F.BODY:{a._insertElement(t,a1.HTML),a.framesetOk=!1,a.insertionMode=o0.IN_BODY;break}case F.FRAMESET:{a._insertElement(t,a1.HTML),a.insertionMode=o0.IN_FRAMESET;break}case F.BASE:case F.BASEFONT:case F.BGSOUND:case F.LINK:case F.META:case F.NOFRAMES:case F.SCRIPT:case F.STYLE:case F.TEMPLATE:case F.TITLE:{a._err(t,k0.abandonedHeadElementChild),a.openElements.push(a.headElement,F.HEAD),at(a,t),a.openElements.remove(a.headElement);break}case F.HEAD:{a._err(t,k0.misplacedStartTagForHeadElement);break}default:ji(a,t)}}function sm2(a,t){switch(t.tagID){case F.BODY:case F.HTML:case F.BR:{ji(a,t);break}case F.TEMPLATE:{Wr(a,t);break}default:a._err(t,k0.endTagWithoutMatchingOpenElement)}}function ji(a,t){a._insertFakeElement(w0.BODY,F.BODY),a.insertionMode=o0.IN_BODY,lA(a,t)}function lA(a,t){switch(t.type){case k2.CHARACTER:{q11(a,t);break}case k2.WHITESPACE_CHARACTER:{j11(a,t);break}case k2.COMMENT:{td0(a,t);break}case k2.START_TAG:{N6(a,t);break}case k2.END_TAG:{rA(a,t);break}case k2.EOF:{Q11(a,t);break}}}function j11(a,t){a._reconstructActiveFormattingElements(),a._insertCharacters(t)}function q11(a,t){a._reconstructActiveFormattingElements(),a._insertCharacters(t),a.framesetOk=!1}function mm2(a,t){a.openElements.tmplCount===0&&a.treeAdapter.adoptAttributes(a.openElements.items[0],t.attrs)}function um2(a,t){const n=a.openElements.tryPeekProperlyNestedBodyElement();n&&a.openElements.tmplCount===0&&(a.framesetOk=!1,a.treeAdapter.adoptAttributes(n,t.attrs))}function hm2(a,t){const n=a.openElements.tryPeekProperlyNestedBodyElement();a.framesetOk&&n&&(a.treeAdapter.detachNode(n),a.openElements.popAllUpToHtmlElement(),a._insertElement(t,a1.HTML),a.insertionMode=o0.IN_FRAMESET)}function dm2(a,t){a.openElements.hasInButtonScope(F.P)&&a._closePElement(),a._insertElement(t,a1.HTML)}function Am2(a,t){a.openElements.hasInButtonScope(F.P)&&a._closePElement(),Qh0.has(a.openElements.currentTagId)&&a.openElements.pop(),a._insertElement(t,a1.HTML)}function pm2(a,t){a.openElements.hasInButtonScope(F.P)&&a._closePElement(),a._insertElement(t,a1.HTML),a.skipNextNewLine=!0,a.framesetOk=!1}function fm2(a,t){const n=a.openElements.tmplCount>0;(!a.formElement||n)&&(a.openElements.hasInButtonScope(F.P)&&a._closePElement(),a._insertElement(t,a1.HTML),n||(a.formElement=a.openElements.current))}function Zm2(a,t){a.framesetOk=!1;const n=t.tagID;for(let l=a.openElements.stackTop;l>=0;l--){const o=a.openElements.tagIDs[l];if(n===F.LI&&o===F.LI||(n===F.DD||n===F.DT)&&(o===F.DD||o===F.DT)){a.openElements.generateImpliedEndTagsWithExclusion(o),a.openElements.popUntilTagNamePopped(o);break}if(o!==F.ADDRESS&&o!==F.DIV&&o!==F.P&&a._isSpecialElement(a.openElements.items[l],o))break}a.openElements.hasInButtonScope(F.P)&&a._closePElement(),a._insertElement(t,a1.HTML)}function Hm2(a,t){a.openElements.hasInButtonScope(F.P)&&a._closePElement(),a._insertElement(t,a1.HTML),a.tokenizer.state=Ae.PLAINTEXT}function gm2(a,t){a.openElements.hasInScope(F.BUTTON)&&(a.openElements.generateImpliedEndTags(),a.openElements.popUntilTagNamePopped(F.BUTTON)),a._reconstructActiveFormattingElements(),a._insertElement(t,a1.HTML),a.framesetOk=!1}function Em2(a,t){const n=a.activeFormattingElements.getElementEntryInScopeWithTagName(w0.A);n&&(ad0(a,t),a.openElements.remove(n.element),a.activeFormattingElements.removeEntry(n)),a._reconstructActiveFormattingElements(),a._insertElement(t,a1.HTML),a.activeFormattingElements.pushElement(a.openElements.current,t)}function Vm2(a,t){a._reconstructActiveFormattingElements(),a._insertElement(t,a1.HTML),a.activeFormattingElements.pushElement(a.openElements.current,t)}function Mm2(a,t){a._reconstructActiveFormattingElements(),a.openElements.hasInScope(F.NOBR)&&(ad0(a,t),a._reconstructActiveFormattingElements()),a._insertElement(t,a1.HTML),a.activeFormattingElements.pushElement(a.openElements.current,t)}function vm2(a,t){a._reconstructActiveFormattingElements(),a._insertElement(t,a1.HTML),a.activeFormattingElements.insertMarker(),a.framesetOk=!1}function Lm2(a,t){a.treeAdapter.getDocumentMode(a.document)!==va.QUIRKS&&a.openElements.hasInButtonScope(F.P)&&a._closePElement(),a._insertElement(t,a1.HTML),a.framesetOk=!1,a.insertionMode=o0.IN_TABLE}function W11(a,t){a._reconstructActiveFormattingElements(),a._appendElement(t,a1.HTML),a.framesetOk=!1,t.ackSelfClosing=!0}function G11(a){const t=v11(a,qr.TYPE);return t!=null&&t.toLowerCase()===Bs2}function wm2(a,t){a._reconstructActiveFormattingElements(),a._appendElement(t,a1.HTML),G11(t)||(a.framesetOk=!1),t.ackSelfClosing=!0}function ym2(a,t){a._appendElement(t,a1.HTML),t.ackSelfClosing=!0}function Fm2(a,t){a.openElements.hasInButtonScope(F.P)&&a._closePElement(),a._appendElement(t,a1.HTML),a.framesetOk=!1,t.ackSelfClosing=!0}function bm2(a,t){t.tagName=w0.IMG,t.tagID=F.IMG,W11(a,t)}function Cm2(a,t){a._insertElement(t,a1.HTML),a.skipNextNewLine=!0,a.tokenizer.state=Ae.RCDATA,a.originalInsertionMode=a.insertionMode,a.framesetOk=!1,a.insertionMode=o0.TEXT}function Im2(a,t){a.openElements.hasInButtonScope(F.P)&&a._closePElement(),a._reconstructActiveFormattingElements(),a.framesetOk=!1,a._switchToTextParsing(t,Ae.RAWTEXT)}function Sm2(a,t){a.framesetOk=!1,a._switchToTextParsing(t,Ae.RAWTEXT)}function Y11(a,t){a._switchToTextParsing(t,Ae.RAWTEXT)}function Rm2(a,t){a._reconstructActiveFormattingElements(),a._insertElement(t,a1.HTML),a.framesetOk=!1,a.insertionMode=a.insertionMode===o0.IN_TABLE||a.insertionMode===o0.IN_CAPTION||a.insertionMode===o0.IN_TABLE_BODY||a.insertionMode===o0.IN_ROW||a.insertionMode===o0.IN_CELL?o0.IN_SELECT_IN_TABLE:o0.IN_SELECT}function xm2(a,t){a.openElements.currentTagId===F.OPTION&&a.openElements.pop(),a._reconstructActiveFormattingElements(),a._insertElement(t,a1.HTML)}function Tm2(a,t){a.openElements.hasInScope(F.RUBY)&&a.openElements.generateImpliedEndTags(),a._insertElement(t,a1.HTML)}function Nm2(a,t){a.openElements.hasInScope(F.RUBY)&&a.openElements.generateImpliedEndTagsWithExclusion(F.RTC),a._insertElement(t,a1.HTML)}function $m2(a,t){a._reconstructActiveFormattingElements(),O11(t),ed0(t),t.selfClosing?a._appendElement(t,a1.MATHML):a._insertElement(t,a1.MATHML),t.ackSelfClosing=!0}function km2(a,t){a._reconstructActiveFormattingElements(),_11(t),ed0(t),t.selfClosing?a._appendElement(t,a1.SVG):a._insertElement(t,a1.SVG),t.ackSelfClosing=!0}function K11(a,t){a._reconstructActiveFormattingElements(),a._insertElement(t,a1.HTML)}function N6(a,t){switch(t.tagID){case F.I:case F.S:case F.B:case F.U:case F.EM:case F.TT:case F.BIG:case F.CODE:case F.FONT:case F.SMALL:case F.STRIKE:case F.STRONG:{Vm2(a,t);break}case F.A:{Em2(a,t);break}case F.H1:case F.H2:case F.H3:case F.H4:case F.H5:case F.H6:{Am2(a,t);break}case F.P:case F.DL:case F.OL:case F.UL:case F.DIV:case F.DIR:case F.NAV:case F.MAIN:case F.MENU:case F.ASIDE:case F.CENTER:case F.FIGURE:case F.FOOTER:case F.HEADER:case F.HGROUP:case F.DIALOG:case F.DETAILS:case F.ADDRESS:case F.ARTICLE:case F.SEARCH:case F.SECTION:case F.SUMMARY:case F.FIELDSET:case F.BLOCKQUOTE:case F.FIGCAPTION:{dm2(a,t);break}case F.LI:case F.DD:case F.DT:{Zm2(a,t);break}case F.BR:case F.IMG:case F.WBR:case F.AREA:case F.EMBED:case F.KEYGEN:{W11(a,t);break}case F.HR:{Fm2(a,t);break}case F.RB:case F.RTC:{Tm2(a,t);break}case F.RT:case F.RP:{Nm2(a,t);break}case F.PRE:case F.LISTING:{pm2(a,t);break}case F.XMP:{Im2(a,t);break}case F.SVG:{km2(a,t);break}case F.HTML:{mm2(a,t);break}case F.BASE:case F.LINK:case F.META:case F.STYLE:case F.TITLE:case F.SCRIPT:case F.BGSOUND:case F.BASEFONT:case F.TEMPLATE:{at(a,t);break}case F.BODY:{um2(a,t);break}case F.FORM:{fm2(a,t);break}case F.NOBR:{Mm2(a,t);break}case F.MATH:{$m2(a,t);break}case F.TABLE:{Lm2(a,t);break}case F.INPUT:{wm2(a,t);break}case F.PARAM:case F.TRACK:case F.SOURCE:{ym2(a,t);break}case F.IMAGE:{bm2(a,t);break}case F.BUTTON:{gm2(a,t);break}case F.APPLET:case F.OBJECT:case F.MARQUEE:{vm2(a,t);break}case F.IFRAME:{Sm2(a,t);break}case F.SELECT:{Rm2(a,t);break}case F.OPTION:case F.OPTGROUP:{xm2(a,t);break}case F.NOEMBED:case F.NOFRAMES:{Y11(a,t);break}case F.FRAMESET:{hm2(a,t);break}case F.TEXTAREA:{Cm2(a,t);break}case F.NOSCRIPT:{a.options.scriptingEnabled?Y11(a,t):K11(a,t);break}case F.PLAINTEXT:{Hm2(a,t);break}case F.COL:case F.TH:case F.TD:case F.TR:case F.HEAD:case F.FRAME:case F.TBODY:case F.TFOOT:case F.THEAD:case F.CAPTION:case F.COLGROUP:break;default:K11(a,t)}}function Dm2(a,t){if(a.openElements.hasInScope(F.BODY)&&(a.insertionMode=o0.AFTER_BODY,a.options.sourceCodeLocationInfo)){const n=a.openElements.tryPeekProperlyNestedBodyElement();n&&a._setEndLocation(n,t)}}function Pm2(a,t){a.openElements.hasInScope(F.BODY)&&(a.insertionMode=o0.AFTER_BODY,o21(a,t))}function Om2(a,t){const n=t.tagID;a.openElements.hasInScope(n)&&(a.openElements.generateImpliedEndTags(),a.openElements.popUntilTagNamePopped(n))}function _m2(a){const t=a.openElements.tmplCount>0,{formElement:n}=a;t||(a.formElement=null),(n||t)&&a.openElements.hasInScope(F.FORM)&&(a.openElements.generateImpliedEndTags(),t?a.openElements.popUntilTagNamePopped(F.FORM):n&&a.openElements.remove(n))}function Bm2(a){a.openElements.hasInButtonScope(F.P)||a._insertFakeElement(w0.P,F.P),a._closePElement()}function Um2(a){a.openElements.hasInListItemScope(F.LI)&&(a.openElements.generateImpliedEndTagsWithExclusion(F.LI),a.openElements.popUntilTagNamePopped(F.LI))}function zm2(a,t){const n=t.tagID;a.openElements.hasInScope(n)&&(a.openElements.generateImpliedEndTagsWithExclusion(n),a.openElements.popUntilTagNamePopped(n))}function jm2(a){a.openElements.hasNumberedHeaderInScope()&&(a.openElements.generateImpliedEndTags(),a.openElements.popUntilNumberedHeaderPopped())}function qm2(a,t){const n=t.tagID;a.openElements.hasInScope(n)&&(a.openElements.generateImpliedEndTags(),a.openElements.popUntilTagNamePopped(n),a.activeFormattingElements.clearToLastMarker())}function Wm2(a){a._reconstructActiveFormattingElements(),a._insertFakeElement(w0.BR,F.BR),a.openElements.pop(),a.framesetOk=!1}function X11(a,t){const n=t.tagName,l=t.tagID;for(let o=a.openElements.stackTop;o>0;o--){const i=a.openElements.items[o],s=a.openElements.tagIDs[o];if(l===s&&(l!==F.UNKNOWN||a.treeAdapter.getTagName(i)===n)){a.openElements.generateImpliedEndTagsWithExclusion(l),a.openElements.stackTop>=o&&a.openElements.shortenToLength(o);break}if(a._isSpecialElement(i,s))break}}function rA(a,t){switch(t.tagID){case F.A:case F.B:case F.I:case F.S:case F.U:case F.EM:case F.TT:case F.BIG:case F.CODE:case F.FONT:case F.NOBR:case F.SMALL:case F.STRIKE:case F.STRONG:{ad0(a,t);break}case F.P:{Bm2(a);break}case F.DL:case F.UL:case F.OL:case F.DIR:case F.DIV:case F.NAV:case F.PRE:case F.MAIN:case F.MENU:case F.ASIDE:case F.BUTTON:case F.CENTER:case F.FIGURE:case F.FOOTER:case F.HEADER:case F.HGROUP:case F.DIALOG:case F.ADDRESS:case F.ARTICLE:case F.DETAILS:case F.SEARCH:case F.SECTION:case F.SUMMARY:case F.LISTING:case F.FIELDSET:case F.BLOCKQUOTE:case F.FIGCAPTION:{Om2(a,t);break}case F.LI:{Um2(a);break}case F.DD:case F.DT:{zm2(a,t);break}case F.H1:case F.H2:case F.H3:case F.H4:case F.H5:case F.H6:{jm2(a);break}case F.BR:{Wm2(a);break}case F.BODY:{Dm2(a,t);break}case F.HTML:{Pm2(a,t);break}case F.FORM:{_m2(a);break}case F.APPLET:case F.OBJECT:case F.MARQUEE:{qm2(a,t);break}case F.TEMPLATE:{Wr(a,t);break}default:X11(a,t)}}function Q11(a,t){a.tmplInsertionModeStack.length>0?r21(a,t):nd0(a,t)}function Gm2(a,t){var n;t.tagID===F.SCRIPT&&((n=a.scriptHandler)===null||n===void 0||n.call(a,a.openElements.current)),a.openElements.pop(),a.insertionMode=a.originalInsertionMode}function Ym2(a,t){a._err(t,k0.eofInElementThatCanContainOnlyText),a.openElements.pop(),a.insertionMode=a.originalInsertionMode,a.onEof(t)}function ld0(a,t){if(B11.has(a.openElements.currentTagId))switch(a.pendingCharacterTokens.length=0,a.hasNonWhitespacePendingCharacterToken=!1,a.originalInsertionMode=a.insertionMode,a.insertionMode=o0.IN_TABLE_TEXT,t.type){case k2.CHARACTER:{e21(a,t);break}case k2.WHITESPACE_CHARACTER:{J11(a,t);break}}else Wi(a,t)}function Km2(a,t){a.openElements.clearBackToTableContext(),a.activeFormattingElements.insertMarker(),a._insertElement(t,a1.HTML),a.insertionMode=o0.IN_CAPTION}function Xm2(a,t){a.openElements.clearBackToTableContext(),a._insertElement(t,a1.HTML),a.insertionMode=o0.IN_COLUMN_GROUP}function Qm2(a,t){a.openElements.clearBackToTableContext(),a._insertFakeElement(w0.COLGROUP,F.COLGROUP),a.insertionMode=o0.IN_COLUMN_GROUP,rd0(a,t)}function Jm2(a,t){a.openElements.clearBackToTableContext(),a._insertElement(t,a1.HTML),a.insertionMode=o0.IN_TABLE_BODY}function eu2(a,t){a.openElements.clearBackToTableContext(),a._insertFakeElement(w0.TBODY,F.TBODY),a.insertionMode=o0.IN_TABLE_BODY,cA(a,t)}function au2(a,t){a.openElements.hasInTableScope(F.TABLE)&&(a.openElements.popUntilTagNamePopped(F.TABLE),a._resetInsertionMode(),a._processStartTag(t))}function tu2(a,t){G11(t)?a._appendElement(t,a1.HTML):Wi(a,t),t.ackSelfClosing=!0}function nu2(a,t){!a.formElement&&a.openElements.tmplCount===0&&(a._insertElement(t,a1.HTML),a.formElement=a.openElements.current,a.openElements.pop())}function H9(a,t){switch(t.tagID){case F.TD:case F.TH:case F.TR:{eu2(a,t);break}case F.STYLE:case F.SCRIPT:case F.TEMPLATE:{at(a,t);break}case F.COL:{Qm2(a,t);break}case F.FORM:{nu2(a,t);break}case F.TABLE:{au2(a,t);break}case F.TBODY:case F.TFOOT:case F.THEAD:{Jm2(a,t);break}case F.INPUT:{tu2(a,t);break}case F.CAPTION:{Km2(a,t);break}case F.COLGROUP:{Xm2(a,t);break}default:Wi(a,t)}}function qi(a,t){switch(t.tagID){case F.TABLE:{a.openElements.hasInTableScope(F.TABLE)&&(a.openElements.popUntilTagNamePopped(F.TABLE),a._resetInsertionMode());break}case F.TEMPLATE:{Wr(a,t);break}case F.BODY:case F.CAPTION:case F.COL:case F.COLGROUP:case F.HTML:case F.TBODY:case F.TD:case F.TFOOT:case F.TH:case F.THEAD:case F.TR:break;default:Wi(a,t)}}function Wi(a,t){const n=a.fosterParentingEnabled;a.fosterParentingEnabled=!0,lA(a,t),a.fosterParentingEnabled=n}function J11(a,t){a.pendingCharacterTokens.push(t)}function e21(a,t){a.pendingCharacterTokens.push(t),a.hasNonWhitespacePendingCharacterToken=!0}function Gi(a,t){let n=0;if(a.hasNonWhitespacePendingCharacterToken)for(;n<a.pendingCharacterTokens.length;n++)Wi(a,a.pendingCharacterTokens[n]);else for(;n<a.pendingCharacterTokens.length;n++)a._insertCharacters(a.pendingCharacterTokens[n]);a.insertionMode=a.originalInsertionMode,a._processToken(t)}const a21=new Set([F.CAPTION,F.COL,F.COLGROUP,F.TBODY,F.TD,F.TFOOT,F.TH,F.THEAD,F.TR]);function lu2(a,t){const n=t.tagID;a21.has(n)?a.openElements.hasInTableScope(F.CAPTION)&&(a.openElements.generateImpliedEndTags(),a.openElements.popUntilTagNamePopped(F.CAPTION),a.activeFormattingElements.clearToLastMarker(),a.insertionMode=o0.IN_TABLE,H9(a,t)):N6(a,t)}function ru2(a,t){const n=t.tagID;switch(n){case F.CAPTION:case F.TABLE:{a.openElements.hasInTableScope(F.CAPTION)&&(a.openElements.generateImpliedEndTags(),a.openElements.popUntilTagNamePopped(F.CAPTION),a.activeFormattingElements.clearToLastMarker(),a.insertionMode=o0.IN_TABLE,n===F.TABLE&&qi(a,t));break}case F.BODY:case F.COL:case F.COLGROUP:case F.HTML:case F.TBODY:case F.TD:case F.TFOOT:case F.TH:case F.THEAD:case F.TR:break;default:rA(a,t)}}function rd0(a,t){switch(t.tagID){case F.HTML:{N6(a,t);break}case F.COL:{a._appendElement(t,a1.HTML),t.ackSelfClosing=!0;break}case F.TEMPLATE:{at(a,t);break}default:oA(a,t)}}function ou2(a,t){switch(t.tagID){case F.COLGROUP:{a.openElements.currentTagId===F.COLGROUP&&(a.openElements.pop(),a.insertionMode=o0.IN_TABLE);break}case F.TEMPLATE:{Wr(a,t);break}case F.COL:break;default:oA(a,t)}}function oA(a,t){a.openElements.currentTagId===F.COLGROUP&&(a.openElements.pop(),a.insertionMode=o0.IN_TABLE,a._processToken(t))}function cA(a,t){switch(t.tagID){case F.TR:{a.openElements.clearBackToTableBodyContext(),a._insertElement(t,a1.HTML),a.insertionMode=o0.IN_ROW;break}case F.TH:case F.TD:{a.openElements.clearBackToTableBodyContext(),a._insertFakeElement(w0.TR,F.TR),a.insertionMode=o0.IN_ROW,iA(a,t);break}case F.CAPTION:case F.COL:case F.COLGROUP:case F.TBODY:case F.TFOOT:case F.THEAD:{a.openElements.hasTableBodyContextInTableScope()&&(a.openElements.clearBackToTableBodyContext(),a.openElements.pop(),a.insertionMode=o0.IN_TABLE,H9(a,t));break}default:H9(a,t)}}function od0(a,t){const n=t.tagID;switch(t.tagID){case F.TBODY:case F.TFOOT:case F.THEAD:{a.openElements.hasInTableScope(n)&&(a.openElements.clearBackToTableBodyContext(),a.openElements.pop(),a.insertionMode=o0.IN_TABLE);break}case F.TABLE:{a.openElements.hasTableBodyContextInTableScope()&&(a.openElements.clearBackToTableBodyContext(),a.openElements.pop(),a.insertionMode=o0.IN_TABLE,qi(a,t));break}case F.BODY:case F.CAPTION:case F.COL:case F.COLGROUP:case F.HTML:case F.TD:case F.TH:case F.TR:break;default:qi(a,t)}}function iA(a,t){switch(t.tagID){case F.TH:case F.TD:{a.openElements.clearBackToTableRowContext(),a._insertElement(t,a1.HTML),a.insertionMode=o0.IN_CELL,a.activeFormattingElements.insertMarker();break}case F.CAPTION:case F.COL:case F.COLGROUP:case F.TBODY:case F.TFOOT:case F.THEAD:case F.TR:{a.openElements.hasInTableScope(F.TR)&&(a.openElements.clearBackToTableRowContext(),a.openElements.pop(),a.insertionMode=o0.IN_TABLE_BODY,cA(a,t));break}default:H9(a,t)}}function t21(a,t){switch(t.tagID){case F.TR:{a.openElements.hasInTableScope(F.TR)&&(a.openElements.clearBackToTableRowContext(),a.openElements.pop(),a.insertionMode=o0.IN_TABLE_BODY);break}case F.TABLE:{a.openElements.hasInTableScope(F.TR)&&(a.openElements.clearBackToTableRowContext(),a.openElements.pop(),a.insertionMode=o0.IN_TABLE_BODY,od0(a,t));break}case F.TBODY:case F.TFOOT:case F.THEAD:{(a.openElements.hasInTableScope(t.tagID)||a.openElements.hasInTableScope(F.TR))&&(a.openElements.clearBackToTableRowContext(),a.openElements.pop(),a.insertionMode=o0.IN_TABLE_BODY,od0(a,t));break}case F.BODY:case F.CAPTION:case F.COL:case F.COLGROUP:case F.HTML:case F.TD:case F.TH:break;default:qi(a,t)}}function cu2(a,t){const n=t.tagID;a21.has(n)?(a.openElements.hasInTableScope(F.TD)||a.openElements.hasInTableScope(F.TH))&&(a._closeTableCell(),iA(a,t)):N6(a,t)}function iu2(a,t){const n=t.tagID;switch(n){case F.TD:case F.TH:{a.openElements.hasInTableScope(n)&&(a.openElements.generateImpliedEndTags(),a.openElements.popUntilTagNamePopped(n),a.activeFormattingElements.clearToLastMarker(),a.insertionMode=o0.IN_ROW);break}case F.TABLE:case F.TBODY:case F.TFOOT:case F.THEAD:case F.TR:{a.openElements.hasInTableScope(n)&&(a._closeTableCell(),t21(a,t));break}case F.BODY:case F.CAPTION:case F.COL:case F.COLGROUP:case F.HTML:break;default:rA(a,t)}}function n21(a,t){switch(t.tagID){case F.HTML:{N6(a,t);break}case F.OPTION:{a.openElements.currentTagId===F.OPTION&&a.openElements.pop(),a._insertElement(t,a1.HTML);break}case F.OPTGROUP:{a.openElements.currentTagId===F.OPTION&&a.openElements.pop(),a.openElements.currentTagId===F.OPTGROUP&&a.openElements.pop(),a._insertElement(t,a1.HTML);break}case F.HR:{a.openElements.currentTagId===F.OPTION&&a.openElements.pop(),a.openElements.currentTagId===F.OPTGROUP&&a.openElements.pop(),a._appendElement(t,a1.HTML),t.ackSelfClosing=!0;break}case F.INPUT:case F.KEYGEN:case F.TEXTAREA:case F.SELECT:{a.openElements.hasInSelectScope(F.SELECT)&&(a.openElements.popUntilTagNamePopped(F.SELECT),a._resetInsertionMode(),t.tagID!==F.SELECT&&a._processStartTag(t));break}case F.SCRIPT:case F.TEMPLATE:{at(a,t);break}}}function l21(a,t){switch(t.tagID){case F.OPTGROUP:{a.openElements.stackTop>0&&a.openElements.currentTagId===F.OPTION&&a.openElements.tagIDs[a.openElements.stackTop-1]===F.OPTGROUP&&a.openElements.pop(),a.openElements.currentTagId===F.OPTGROUP&&a.openElements.pop();break}case F.OPTION:{a.openElements.currentTagId===F.OPTION&&a.openElements.pop();break}case F.SELECT:{a.openElements.hasInSelectScope(F.SELECT)&&(a.openElements.popUntilTagNamePopped(F.SELECT),a._resetInsertionMode());break}case F.TEMPLATE:{Wr(a,t);break}}}function su2(a,t){const n=t.tagID;n===F.CAPTION||n===F.TABLE||n===F.TBODY||n===F.TFOOT||n===F.THEAD||n===F.TR||n===F.TD||n===F.TH?(a.openElements.popUntilTagNamePopped(F.SELECT),a._resetInsertionMode(),a._processStartTag(t)):n21(a,t)}function mu2(a,t){const n=t.tagID;n===F.CAPTION||n===F.TABLE||n===F.TBODY||n===F.TFOOT||n===F.THEAD||n===F.TR||n===F.TD||n===F.TH?a.openElements.hasInTableScope(n)&&(a.openElements.popUntilTagNamePopped(F.SELECT),a._resetInsertionMode(),a.onEndTag(t)):l21(a,t)}function uu2(a,t){switch(t.tagID){case F.BASE:case F.BASEFONT:case F.BGSOUND:case F.LINK:case F.META:case F.NOFRAMES:case F.SCRIPT:case F.STYLE:case F.TEMPLATE:case F.TITLE:{at(a,t);break}case F.CAPTION:case F.COLGROUP:case F.TBODY:case F.TFOOT:case F.THEAD:{a.tmplInsertionModeStack[0]=o0.IN_TABLE,a.insertionMode=o0.IN_TABLE,H9(a,t);break}case F.COL:{a.tmplInsertionModeStack[0]=o0.IN_COLUMN_GROUP,a.insertionMode=o0.IN_COLUMN_GROUP,rd0(a,t);break}case F.TR:{a.tmplInsertionModeStack[0]=o0.IN_TABLE_BODY,a.insertionMode=o0.IN_TABLE_BODY,cA(a,t);break}case F.TD:case F.TH:{a.tmplInsertionModeStack[0]=o0.IN_ROW,a.insertionMode=o0.IN_ROW,iA(a,t);break}default:a.tmplInsertionModeStack[0]=o0.IN_BODY,a.insertionMode=o0.IN_BODY,N6(a,t)}}function hu2(a,t){t.tagID===F.TEMPLATE&&Wr(a,t)}function r21(a,t){a.openElements.tmplCount>0?(a.openElements.popUntilTagNamePopped(F.TEMPLATE),a.activeFormattingElements.clearToLastMarker(),a.tmplInsertionModeStack.shift(),a._resetInsertionMode(),a.onEof(t)):nd0(a,t)}function du2(a,t){t.tagID===F.HTML?N6(a,t):sA(a,t)}function o21(a,t){var n;if(t.tagID===F.HTML){if(a.fragmentContext||(a.insertionMode=o0.AFTER_AFTER_BODY),a.options.sourceCodeLocationInfo&&a.openElements.tagIDs[0]===F.HTML){a._setEndLocation(a.openElements.items[0],t);const l=a.openElements.items[1];l&&!(!((n=a.treeAdapter.getNodeSourceCodeLocation(l))===null||n===void 0)&&n.endTag)&&a._setEndLocation(l,t)}}else sA(a,t)}function sA(a,t){a.insertionMode=o0.IN_BODY,lA(a,t)}function Au2(a,t){switch(t.tagID){case F.HTML:{N6(a,t);break}case F.FRAMESET:{a._insertElement(t,a1.HTML);break}case F.FRAME:{a._appendElement(t,a1.HTML),t.ackSelfClosing=!0;break}case F.NOFRAMES:{at(a,t);break}}}function pu2(a,t){t.tagID===F.FRAMESET&&!a.openElements.isRootHtmlElementCurrent()&&(a.openElements.pop(),!a.fragmentContext&&a.openElements.currentTagId!==F.FRAMESET&&(a.insertionMode=o0.AFTER_FRAMESET))}function fu2(a,t){switch(t.tagID){case F.HTML:{N6(a,t);break}case F.NOFRAMES:{at(a,t);break}}}function Zu2(a,t){t.tagID===F.HTML&&(a.insertionMode=o0.AFTER_AFTER_FRAMESET)}function Hu2(a,t){t.tagID===F.HTML?N6(a,t):mA(a,t)}function mA(a,t){a.insertionMode=o0.IN_BODY,lA(a,t)}function gu2(a,t){switch(t.tagID){case F.HTML:{N6(a,t);break}case F.NOFRAMES:{at(a,t);break}}}function Eu2(a,t){t.chars=_8,a._insertCharacters(t)}function Vu2(a,t){a._insertCharacters(t),a.framesetOk=!1}function c21(a){for(;a.treeAdapter.getNamespaceURI(a.openElements.current)!==a1.HTML&&!a._isIntegrationPoint(a.openElements.currentTagId,a.openElements.current);)a.openElements.pop()}function Mu2(a,t){if(ks2(t))c21(a),a._startTagOutsideForeignContent(t);else{const n=a._getAdjustedCurrentElement(),l=a.treeAdapter.getNamespaceURI(n);l===a1.MATHML?O11(t):l===a1.SVG&&(Ds2(t),_11(t)),ed0(t),t.selfClosing?a._appendElement(t,l):a._insertElement(t,l),t.ackSelfClosing=!0}}function vu2(a,t){if(t.tagID===F.P||t.tagID===F.BR){c21(a),a._endTagOutsideForeignContent(t);return}for(let n=a.openElements.stackTop;n>0;n--){const l=a.openElements.items[n];if(a.treeAdapter.getNamespaceURI(l)===a1.HTML){a._endTagOutsideForeignContent(t);break}const o=a.treeAdapter.getTagName(l);if(o.toLowerCase()===t.tagName){t.tagName=o,a.openElements.shortenToLength(n);break}}}w0.AREA,w0.BASE,w0.BASEFONT,w0.BGSOUND,w0.BR,w0.COL,w0.EMBED,w0.FRAME,w0.HR,w0.IMG,w0.INPUT,w0.KEYGEN,w0.LINK,w0.META,w0.PARAM,w0.SOURCE,w0.TRACK,w0.WBR;const Lu2=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,wu2=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),i21={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function s21(a,t){const n=Nu2(a),l=H11("type",{handlers:{root:yu2,element:Fu2,text:bu2,comment:u21,doctype:Cu2,raw:Su2},unknown:Ru2}),o={parser:n?new z11(i21):z11.getFragmentParser(void 0,i21),handle(u){l(u,o)},stitches:!1,options:t||{}};l(a,o),g9(o,jt());const i=n?o.parser.document:o.parser.getFragment(),s=yi2(i,{file:o.options.file});return o.stitches&&Jd(s,"comment",function(u,A,p){const g=u;if(g.value.stitch&&p&&A!==void 0){const E=p.children;return E[A]=g.value.stitch,A}}),s.type==="root"&&s.children.length===1&&s.children[0].type===a.type?s.children[0]:s}function m21(a,t){let n=-1;if(a)for(;++n<a.length;)t.handle(a[n])}function yu2(a,t){m21(a.children,t)}function Fu2(a,t){xu2(a,t),m21(a.children,t),Tu2(a,t)}function bu2(a,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:k2.CHARACTER,chars:a.value,location:Yi(a)};g9(t,jt(a)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Cu2(a,t){const n={type:k2.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Yi(a)};g9(t,jt(a)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Iu2(a,t){t.stitches=!0;const n=$u2(a);if("children"in a&&"children"in n){const l=s21({type:"root",children:a.children},t.options);n.children=l.children}u21({type:"comment",value:{stitch:n}},t)}function u21(a,t){const n=a.value,l={type:k2.COMMENT,data:n,location:Yi(a)};g9(t,jt(a)),t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken)}function Su2(a,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,h21(t,jt(a)),t.parser.tokenizer.write(t.options.tagfilter?a.value.replace(Lu2,"<$1$2"):a.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 Ru2(a,t){const n=a;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Iu2(n,t);else{let l="";throw wu2.has(n.type)&&(l=". 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"+l)}}function g9(a,t){h21(a,t);const n=a.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=a.parser.tokenizer.preprocessor.line,n.location.endCol=a.parser.tokenizer.preprocessor.col+1,n.location.endOffset=a.parser.tokenizer.preprocessor.offset+1,a.parser.currentToken=n,a.parser._processToken(a.parser.currentToken)),a.parser.tokenizer.paused=!1,a.parser.tokenizer.inLoop=!1,a.parser.tokenizer.active=!1,a.parser.tokenizer.returnState=Ae.DATA,a.parser.tokenizer.charRefCode=-1,a.parser.tokenizer.consumedAfterSnapshot=-1,a.parser.tokenizer.currentLocation=null,a.parser.tokenizer.currentCharacterToken=null,a.parser.tokenizer.currentToken=null,a.parser.tokenizer.currentAttr={name:"",value:""}}function h21(a,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};a.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,a.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,a.parser.tokenizer.preprocessor.line=t.line,a.parser.tokenizer.currentLocation=n}}function xu2(a,t){const n=a.tagName.toLowerCase();if(t.parser.tokenizer.state===Ae.PLAINTEXT)return;g9(t,jt(a));const l=t.parser.openElements.current;let o="namespaceURI"in l?l.namespaceURI:zr.html;o===zr.html&&n==="svg"&&(o=zr.svg);const i=_i2({...a,children:[]},{space:o===zr.svg?"svg":"html"}),s={type:k2.START_TAG,tagName:n,tagID:Z9(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in i?i.attrs:[],location:Yi(a)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Tu2(a,t){const n=a.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Yi2.includes(n)||t.parser.tokenizer.state===Ae.PLAINTEXT)return;g9(t,Bd(a));const l={type:k2.END_TAG,tagName:n,tagID:Z9(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Yi(a)};t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ae.RCDATA||t.parser.tokenizer.state===Ae.RAWTEXT||t.parser.tokenizer.state===Ae.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ae.DATA)}function Nu2(a){const t=a.type==="root"?a.children[0]:a;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Yi(a){const t=jt(a)||{line:void 0,column:void 0,offset:void 0},n=Bd(a)||{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 $u2(a){return"children"in a?h9({...a,children:[]}):h9(a)}function d21(a){return function(t,n){return s21(t,{...a,file:n})}}function ku2(a){if(typeof a!="string")throw new TypeError("Expected a string");return a.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function A21(a,t,n){const o=Xd((n||{}).ignore||[]),i=Du2(t);let s=-1;for(;++s<i.length;)_01(a,"text",u);function u(p,g){let E=-1,v;for(;++E<g.length;){const w=g[E],b=v?v.children:void 0;if(o(w,b?b.indexOf(w):void 0,v))return;v=w}if(v)return A(p,g)}function A(p,g){const E=g[g.length-1],v=i[s][0],w=i[s][1];let b=0;const N=E.children.indexOf(p);let T=!1,_=[];v.lastIndex=0;let B=v.exec(p.value);for(;B;){const j=B.index,X={index:B.index,input:B.input,stack:[...g,p]};let W=w(...B,X);if(typeof W=="string"&&(W=W.length>0?{type:"text",value:W}:void 0),W===!1?v.lastIndex=j+1:(b!==j&&_.push({type:"text",value:p.value.slice(b,j)}),Array.isArray(W)?_.push(...W):W&&_.push(W),b=j+B[0].length,T=!0),!v.global)break;B=v.exec(p.value)}return T?(b<p.value.length&&_.push({type:"text",value:p.value.slice(b)}),E.children.splice(N,1,..._)):_=[p],N+_.length}}function Du2(a){const t=[];if(!Array.isArray(a))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!a[0]||Array.isArray(a[0])?a:[a];let l=-1;for(;++l<n.length;){const o=n[l];t.push([Pu2(o[0]),Ou2(o[1])])}return t}function Pu2(a){return typeof a=="string"?new RegExp(ku2(a),"g"):a}function Ou2(a){return typeof a=="function"?a:function(){return a}}function _u2(a){A21(a,[/\r?\n|\r/g,Bu2])}function Bu2(){return{type:"break"}}function Uu2(){return function(a){_u2(a)}}function p21(a,t){const n=String(a);if(typeof t!="string")throw new TypeError("Expected character");let l=0,o=n.indexOf(t);for(;o!==-1;)l++,o=n.indexOf(t,o+t.length);return l}const cd0="phrasing",id0=["autolink","link","image","label"];function zu2(){return{transforms:[Xu2],enter:{literalAutolink:qu2,literalAutolinkEmail:sd0,literalAutolinkHttp:sd0,literalAutolinkWww:sd0},exit:{literalAutolink:Ku2,literalAutolinkEmail:Yu2,literalAutolinkHttp:Wu2,literalAutolinkWww:Gu2}}}function ju2(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:cd0,notInConstruct:id0},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:cd0,notInConstruct:id0},{character:":",before:"[ps]",after:"\\/",inConstruct:cd0,notInConstruct:id0}]}}function qu2(a){this.enter({type:"link",title:null,url:"",children:[]},a)}function sd0(a){this.config.enter.autolinkProtocol.call(this,a)}function Wu2(a){this.config.exit.autolinkProtocol.call(this,a)}function Gu2(a){this.config.exit.data.call(this,a);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(a)}function Yu2(a){this.config.exit.autolinkEmail.call(this,a)}function Ku2(a){this.exit(a)}function Xu2(a){A21(a,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Qu2],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Ju2]],{ignore:["link","linkReference"]})}function Qu2(a,t,n,l,o){let i="";if(!f21(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!eh2(n)))return!1;const s=ah2(n+l);if(!s[0])return!1;const u={type:"link",title:null,url:i+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[u,{type:"text",value:s[1]}]:u}function Ju2(a,t,n,l){return!f21(l,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function eh2(a){const t=a.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function ah2(a){const t=/[!"&'),.:;<>?\]}]+$/.exec(a);if(!t)return[a,void 0];a=a.slice(0,t.index);let n=t[0],l=n.indexOf(")");const o=p21(a,"(");let i=p21(a,")");for(;l!==-1&&o>i;)a+=n.slice(0,l+1),n=n.slice(l+1),l=n.indexOf(")"),i++;return[a,n]}function f21(a,t){const n=a.input.charCodeAt(a.index-1);return(a.index===0||Ur(n)||zd(n))&&(!t||n!==47)}Z21.peek=mh2;function th2(){this.buffer()}function nh2(a){this.enter({type:"footnoteReference",identifier:"",label:""},a)}function lh2(){this.buffer()}function rh2(a){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},a)}function oh2(a){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=et(this.sliceSerialize(a)).toLowerCase(),n.label=t}function ch2(a){this.exit(a)}function ih2(a){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=et(this.sliceSerialize(a)).toLowerCase(),n.label=t}function sh2(a){this.exit(a)}function mh2(){return"["}function Z21(a,t,n,l){const o=n.createTracker(l);let i=o.move("[^");const s=n.enter("footnoteReference"),u=n.enter("reference");return i+=o.move(n.safe(n.associationId(a),{after:"]",before:i})),u(),s(),i+=o.move("]"),i}function uh2(){return{enter:{gfmFootnoteCallString:th2,gfmFootnoteCall:nh2,gfmFootnoteDefinitionLabelString:lh2,gfmFootnoteDefinition:rh2},exit:{gfmFootnoteCallString:oh2,gfmFootnoteCall:ch2,gfmFootnoteDefinitionLabelString:ih2,gfmFootnoteDefinition:sh2}}}function hh2(a){let t=!1;return a&&a.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Z21},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(l,o,i,s){const u=i.createTracker(s);let A=u.move("[^");const p=i.enter("footnoteDefinition"),g=i.enter("label");return A+=u.move(i.safe(i.associationId(l),{before:A,after:"]"})),g(),A+=u.move("]:"),l.children&&l.children.length>0&&(u.shift(4),A+=u.move((t?`
|
|
240
240
|
`:" ")+i.indentLines(i.containerFlow(l,u.current()),t?H21:dh2))),p(),A}}function dh2(a,t,n){return t===0?a:H21(a,t,n)}function H21(a,t,n){return(n?"":" ")+a}const Ah2=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];g21.peek=gh2;function ph2(){return{canContainEols:["delete"],enter:{strikethrough:Zh2},exit:{strikethrough:Hh2}}}function fh2(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Ah2}],handlers:{delete:g21}}}function Zh2(a){this.enter({type:"delete",children:[]},a)}function Hh2(a){this.exit(a)}function g21(a,t,n,l){const o=n.createTracker(l),i=n.enter("strikethrough");let s=o.move("~~");return s+=n.containerPhrasing(a,{...o.current(),before:s,after:"~"}),s+=o.move("~~"),i(),s}function gh2(){return"~"}function Eh2(a){return a.length}function Vh2(a,t){const n=t||{},l=(n.align||[]).concat(),o=n.stringLength||Eh2,i=[],s=[],u=[],A=[];let p=0,g=-1;for(;++g<a.length;){const S=[],N=[];let T=-1;for(a[g].length>p&&(p=a[g].length);++T<a[g].length;){const _=Mh2(a[g][T]);if(n.alignDelimiters!==!1){const B=o(_);N[T]=B,(A[T]===void 0||B>A[T])&&(A[T]=B)}S.push(_)}s[g]=S,u[g]=N}let E=-1;if(typeof l=="object"&&"length"in l)for(;++E<p;)i[E]=E21(l[E]);else{const S=E21(l);for(;++E<p;)i[E]=S}E=-1;const v=[],w=[];for(;++E<p;){const S=i[E];let N="",T="";S===99?(N=":",T=":"):S===108?N=":":S===114&&(T=":");let _=n.alignDelimiters===!1?1:Math.max(1,A[E]-N.length-T.length);const B=N+"-".repeat(_)+T;n.alignDelimiters!==!1&&(_=N.length+_+T.length,_>A[E]&&(A[E]=_),w[E]=_),v[E]=B}s.splice(1,0,v),u.splice(1,0,w),g=-1;const b=[];for(;++g<s.length;){const S=s[g],N=u[g];E=-1;const T=[];for(;++E<p;){const _=S[E]||"";let B="",j="";if(n.alignDelimiters!==!1){const X=A[E]-(N[E]||0),W=i[E];W===114?B=" ".repeat(X):W===99?X%2?(B=" ".repeat(X/2+.5),j=" ".repeat(X/2-.5)):(B=" ".repeat(X/2),j=B):j=" ".repeat(X)}n.delimiterStart!==!1&&!E&&T.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||E)&&T.push(" "),n.alignDelimiters!==!1&&T.push(B),T.push(_),n.alignDelimiters!==!1&&T.push(j),n.padding!==!1&&T.push(" "),(n.delimiterEnd!==!1||E!==p-1)&&T.push("|")}b.push(n.delimiterEnd===!1?T.join("").replace(/ +$/,""):T.join(""))}return b.join(`
|
|
241
241
|
`)}function Mh2(a){return a==null?"":String(a)}function E21(a){const t=typeof a=="string"?a.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function vh2(a,t,n,l){const o=n.enter("blockquote"),i=n.createTracker(l);i.move("> "),i.shift(2);const s=n.indentLines(n.containerFlow(a,i.current()),Lh2);return o(),s}function Lh2(a,t,n){return">"+(n?"":" ")+a}function wh2(a,t){return V21(a,t.inConstruct,!0)&&!V21(a,t.notInConstruct,!1)}function V21(a,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let l=-1;for(;++l<t.length;)if(a.includes(t[l]))return!0;return!1}function M21(a,t,n,l){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
@@ -251,4 +251,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
251
251
|
`))+1))}const s="#".repeat(o),u=n.enter("headingAtx"),A=n.enter("phrasing");i.move(s+" ");let p=n.containerPhrasing(a,{before:"# ",after:`
|
|
252
252
|
`,...i.current()});return/^[\t ]/.test(p)&&(p=Ki(p.charCodeAt(0))+p.slice(1)),p=p?s+" "+p:s,n.options.closeAtx&&(p+=" "+s),A(),u(),p}L21.peek=$h2;function L21(a){return a.value||""}function $h2(){return"<"}w21.peek=kh2;function w21(a,t,n,l){const o=md0(n),i=o==='"'?"Quote":"Apostrophe",s=n.enter("image");let u=n.enter("label");const A=n.createTracker(l);let p=A.move("![");return p+=A.move(n.safe(a.alt,{before:p,after:"]",...A.current()})),p+=A.move("]("),u(),!a.url&&a.title||/[\0- \u007F]/.test(a.url)?(u=n.enter("destinationLiteral"),p+=A.move("<"),p+=A.move(n.safe(a.url,{before:p,after:">",...A.current()})),p+=A.move(">")):(u=n.enter("destinationRaw"),p+=A.move(n.safe(a.url,{before:p,after:a.title?" ":")",...A.current()}))),u(),a.title&&(u=n.enter(`title${i}`),p+=A.move(" "+o),p+=A.move(n.safe(a.title,{before:p,after:o,...A.current()})),p+=A.move(o),u()),p+=A.move(")"),s(),p}function kh2(){return"!"}y21.peek=Dh2;function y21(a,t,n,l){const o=a.referenceType,i=n.enter("imageReference");let s=n.enter("label");const u=n.createTracker(l);let A=u.move("![");const p=n.safe(a.alt,{before:A,after:"]",...u.current()});A+=u.move(p+"]["),s();const g=n.stack;n.stack=[],s=n.enter("reference");const E=n.safe(n.associationId(a),{before:A,after:"]",...u.current()});return s(),n.stack=g,i(),o==="full"||!p||p!==E?A+=u.move(E+"]"):o==="shortcut"?A=A.slice(0,-1):A+=u.move("]"),A}function Dh2(){return"!"}F21.peek=Ph2;function F21(a,t,n){let l=a.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(l);)o+="`";for(/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^`|`$/.test(l))&&(l=" "+l+" ");++i<n.unsafe.length;){const s=n.unsafe[i],u=n.compilePattern(s);let A;if(s.atBreak)for(;A=u.exec(l);){let p=A.index;l.charCodeAt(p)===10&&l.charCodeAt(p-1)===13&&p--,l=l.slice(0,p)+" "+l.slice(A.index+1)}}return o+l+o}function Ph2(){return"`"}function b21(a,t){const n=gh0(a);return!!(!t.options.resourceLink&&a.url&&!a.title&&a.children&&a.children.length===1&&a.children[0].type==="text"&&(n===a.url||"mailto:"+n===a.url)&&/^[a-z][a-z+.-]+:/i.test(a.url)&&!/[\0- <>\u007F]/.test(a.url))}C21.peek=Oh2;function C21(a,t,n,l){const o=md0(n),i=o==='"'?"Quote":"Apostrophe",s=n.createTracker(l);let u,A;if(b21(a,n)){const g=n.stack;n.stack=[],u=n.enter("autolink");let E=s.move("<");return E+=s.move(n.containerPhrasing(a,{before:E,after:">",...s.current()})),E+=s.move(">"),u(),n.stack=g,E}u=n.enter("link"),A=n.enter("label");let p=s.move("[");return p+=s.move(n.containerPhrasing(a,{before:p,after:"](",...s.current()})),p+=s.move("]("),A(),!a.url&&a.title||/[\0- \u007F]/.test(a.url)?(A=n.enter("destinationLiteral"),p+=s.move("<"),p+=s.move(n.safe(a.url,{before:p,after:">",...s.current()})),p+=s.move(">")):(A=n.enter("destinationRaw"),p+=s.move(n.safe(a.url,{before:p,after:a.title?" ":")",...s.current()}))),A(),a.title&&(A=n.enter(`title${i}`),p+=s.move(" "+o),p+=s.move(n.safe(a.title,{before:p,after:o,...s.current()})),p+=s.move(o),A()),p+=s.move(")"),u(),p}function Oh2(a,t,n){return b21(a,n)?"<":"["}I21.peek=_h2;function I21(a,t,n,l){const o=a.referenceType,i=n.enter("linkReference");let s=n.enter("label");const u=n.createTracker(l);let A=u.move("[");const p=n.containerPhrasing(a,{before:A,after:"]",...u.current()});A+=u.move(p+"]["),s();const g=n.stack;n.stack=[],s=n.enter("reference");const E=n.safe(n.associationId(a),{before:A,after:"]",...u.current()});return s(),n.stack=g,i(),o==="full"||!p||p!==E?A+=u.move(E+"]"):o==="shortcut"?A=A.slice(0,-1):A+=u.move("]"),A}function _h2(){return"["}function ud0(a){const t=a.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Bh2(a){const t=ud0(a),n=a.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Uh2(a){const t=a.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function S21(a){const t=a.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function zh2(a,t,n,l){const o=n.enter("list"),i=n.bulletCurrent;let s=a.ordered?Uh2(n):ud0(n);const u=a.ordered?s==="."?")":".":Bh2(n);let A=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!a.ordered){const g=a.children?a.children[0]:void 0;if((s==="*"||s==="-")&&g&&(!g.children||!g.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(A=!0),S21(n)===s&&g){let E=-1;for(;++E<a.children.length;){const v=a.children[E];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){A=!0;break}}}}A&&(s=u),n.bulletCurrent=s;const p=n.containerFlow(a,l);return n.bulletLastUsed=s,n.bulletCurrent=i,o(),p}function jh2(a){const t=a.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function qh2(a,t,n,l){const o=jh2(n);let i=n.bulletCurrent||ud0(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(a))+i);let s=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||a.spread))&&(s=Math.ceil(s/4)*4);const u=n.createTracker(l);u.move(i+" ".repeat(s-i.length)),u.shift(s);const A=n.enter("listItem"),p=n.indentLines(n.containerFlow(a,u.current()),g);return A(),p;function g(E,v,w){return v?(w?"":" ".repeat(s))+E:(w?i:i+" ".repeat(s-i.length))+E}}function Wh2(a,t,n,l){const o=n.enter("paragraph"),i=n.enter("phrasing"),s=n.containerPhrasing(a,l);return i(),o(),s}const Gh2=Xd(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Yh2(a,t,n,l){return(a.children.some(function(s){return Gh2(s)})?n.containerPhrasing:n.containerFlow).call(n,a,l)}function Kh2(a){const t=a.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}R21.peek=Xh2;function R21(a,t,n,l){const o=Kh2(n),i=n.enter("strong"),s=n.createTracker(l),u=s.move(o+o);let A=s.move(n.containerPhrasing(a,{after:o,before:u,...s.current()}));const p=A.charCodeAt(0),g=uA(l.before.charCodeAt(l.before.length-1),p,o);g.inside&&(A=Ki(p)+A.slice(1));const E=A.charCodeAt(A.length-1),v=uA(l.after.charCodeAt(0),E,o);v.inside&&(A=A.slice(0,-1)+Ki(E));const w=s.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:v.outside,before:g.outside},u+A+w}function Xh2(a,t,n){return n.options.strong||"*"}function Qh2(a,t,n,l){return n.safe(a.value,l)}function Jh2(a){const t=a.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ed2(a,t,n){const l=(S21(n)+(n.options.ruleSpaces?" ":"")).repeat(Jh2(n));return n.options.ruleSpaces?l.slice(0,-1):l}const x21={blockquote:vh2,break:M21,code:Ch2,definition:Sh2,emphasis:v21,hardBreak:M21,heading:Nh2,html:L21,image:w21,imageReference:y21,inlineCode:F21,link:C21,linkReference:I21,list:zh2,listItem:qh2,paragraph:Wh2,root:Yh2,strong:R21,text:Qh2,thematicBreak:ed2};function ad2(){return{enter:{table:td2,tableData:T21,tableHeader:T21,tableRow:ld2},exit:{codeText:rd2,table:nd2,tableData:hd0,tableHeader:hd0,tableRow:hd0}}}function td2(a){const t=a._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},a),this.data.inTable=!0}function nd2(a){this.exit(a),this.data.inTable=void 0}function ld2(a){this.enter({type:"tableRow",children:[]},a)}function hd0(a){this.exit(a)}function T21(a){this.enter({type:"tableCell",children:[]},a)}function rd2(a){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,od2));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(a)}function od2(a,t){return t==="|"?t:a}function cd2(a){const t=a||{},n=t.tableCellPadding,l=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
253
253
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:s,tableCell:A,tableRow:u}};function s(w,b,S,N){return p(g(w,S,N),w.align)}function u(w,b,S,N){const T=E(w,S,N),_=p([T]);return _.slice(0,_.indexOf(`
|
|
254
|
-
`))}function A(w,b,S,N){const T=S.enter("tableCell"),_=S.enter("phrasing"),B=S.containerPhrasing(w,{...N,before:i,after:i});return _(),T(),B}function p(w,b){return Vh2(w,{align:b,alignDelimiters:l,padding:n,stringLength:o})}function g(w,b,S){const N=w.children;let T=-1;const _=[],B=b.enter("table");for(;++T<N.length;)_[T]=E(N[T],b,S);return B(),_}function E(w,b,S){const N=w.children;let T=-1;const _=[],B=b.enter("tableRow");for(;++T<N.length;)_[T]=A(N[T],w,b,S);return B(),_}function v(w,b,S){let N=x21.inlineCode(w,b,S);return S.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function id2(){return{exit:{taskListCheckValueChecked:N21,taskListCheckValueUnchecked:N21,paragraph:md2}}}function sd2(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ud2}}}function N21(a){const t=this.stack[this.stack.length-2];t.type,t.checked=a.type==="taskListCheckValueChecked"}function md2(a){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const l=n.children[0];if(l&&l.type==="text"){const o=t.children;let i=-1,s;for(;++i<o.length;){const u=o[i];if(u.type==="paragraph"){s=u;break}}s===n&&(l.value=l.value.slice(1),l.value.length===0?n.children.shift():n.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,n.position.start=Object.assign({},l.position.start)))}}this.exit(a)}function ud2(a,t,n,l){const o=a.children[0],i=typeof a.checked=="boolean"&&o&&o.type==="paragraph",s="["+(a.checked?"x":" ")+"] ",u=n.createTracker(l);i&&u.move(s);let A=x21.listItem(a,t,n,{...l,...u.current()});return i&&(A=A.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),A;function p(g){return g+s}}function hd2(){return[zu2(),uh2(),ph2(),ad2(),id2()]}function dd2(a){return{extensions:[ju2(),hh2(a),fh2(),cd2(a),sd2()]}}const Ad2={tokenize:Ed2,partial:!0},$21={tokenize:Vd2,partial:!0},k21={tokenize:Md2,partial:!0},D21={tokenize:vd2,partial:!0},pd2={tokenize:Ld2,partial:!0},P21={name:"wwwAutolink",tokenize:Hd2,previous:_21},O21={name:"protocolAutolink",tokenize:gd2,previous:B21},K3={name:"emailAutolink",tokenize:Zd2,previous:U21},Gt={};function fd2(){return{text:Gt}}let Gr=48;for(;Gr<123;)Gt[Gr]=K3,Gr++,Gr===58?Gr=65:Gr===91&&(Gr=97);Gt[43]=K3,Gt[45]=K3,Gt[46]=K3,Gt[95]=K3,Gt[72]=[K3,O21],Gt[104]=[K3,O21],Gt[87]=[K3,P21],Gt[119]=[K3,P21];function Zd2(a,t,n){const l=this;let o,i;return s;function s(E){return!dd0(E)||!U21.call(l,l.previous)||Ad0(l.events)?n(E):(a.enter("literalAutolink"),a.enter("literalAutolinkEmail"),u(E))}function u(E){return dd0(E)?(a.consume(E),u):E===64?(a.consume(E),A):n(E)}function A(E){return E===46?a.check(pd2,g,p)(E):E===45||E===95||T6(E)?(i=!0,a.consume(E),A):g(E)}function p(E){return a.consume(E),o=!0,A}function g(E){return i&&o&&n4(l.previous)?(a.exit("literalAutolinkEmail"),a.exit("literalAutolink"),t(E)):n(E)}}function Hd2(a,t,n){const l=this;return o;function o(s){return s!==87&&s!==119||!_21.call(l,l.previous)||Ad0(l.events)?n(s):(a.enter("literalAutolink"),a.enter("literalAutolinkWww"),a.check(Ad2,a.attempt($21,a.attempt(k21,i),n),n)(s))}function i(s){return a.exit("literalAutolinkWww"),a.exit("literalAutolink"),t(s)}}function gd2(a,t,n){const l=this;let o="",i=!1;return s;function s(E){return(E===72||E===104)&&B21.call(l,l.previous)&&!Ad0(l.events)?(a.enter("literalAutolink"),a.enter("literalAutolinkHttp"),o+=String.fromCodePoint(E),a.consume(E),u):n(E)}function u(E){if(n4(E)&&o.length<5)return o+=String.fromCodePoint(E),a.consume(E),u;if(E===58){const v=o.toLowerCase();if(v==="http"||v==="https")return a.consume(E),A}return n(E)}function A(E){return E===47?(a.consume(E),i?p:(i=!0,A)):n(E)}function p(E){return E===null||Ud(E)||V8(E)||Ur(E)||zd(E)?n(E):a.attempt($21,a.attempt(k21,g),n)(E)}function g(E){return a.exit("literalAutolinkHttp"),a.exit("literalAutolink"),t(E)}}function Ed2(a,t,n){let l=0;return o;function o(s){return(s===87||s===119)&&l<3?(l++,a.consume(s),o):s===46&&l===3?(a.consume(s),i):n(s)}function i(s){return s===null?n(s):t(s)}}function Vd2(a,t,n){let l,o,i;return s;function s(p){return p===46||p===95?a.check(D21,A,u)(p):p===null||V8(p)||Ur(p)||p!==45&&zd(p)?A(p):(i=!0,a.consume(p),s)}function u(p){return p===95?l=!0:(o=l,l=void 0),a.consume(p),s}function A(p){return o||l||!i?n(p):t(p)}}function Md2(a,t){let n=0,l=0;return o;function o(s){return s===40?(n++,a.consume(s),o):s===41&&l<n?i(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?a.check(D21,t,i)(s):s===null||V8(s)||Ur(s)?t(s):(a.consume(s),o)}function i(s){return s===41&&l++,a.consume(s),o}}function vd2(a,t,n){return l;function l(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(a.consume(u),l):u===38?(a.consume(u),i):u===93?(a.consume(u),o):u===60||u===null||V8(u)||Ur(u)?t(u):n(u)}function o(u){return u===null||u===40||u===91||V8(u)||Ur(u)?t(u):l(u)}function i(u){return n4(u)?s(u):n(u)}function s(u){return u===59?(a.consume(u),l):n4(u)?(a.consume(u),s):n(u)}}function Ld2(a,t,n){return l;function l(i){return a.consume(i),o}function o(i){return T6(i)?n(i):t(i)}}function _21(a){return a===null||a===40||a===42||a===95||a===91||a===93||a===126||V8(a)}function B21(a){return!n4(a)}function U21(a){return!(a===47||dd0(a))}function dd0(a){return a===43||a===45||a===46||a===95||T6(a)}function Ad0(a){let t=a.length,n=!1;for(;t--;){const l=a[t][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){n=!0;break}if(l._gfmAutolinkLiteralWalkedInto){n=!1;break}}return a.length>0&&!n&&(a[a.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const wd2={tokenize:xd2,partial:!0};function yd2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Id2,continuation:{tokenize:Sd2},exit:Rd2}},text:{91:{name:"gfmFootnoteCall",tokenize:Cd2},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Fd2,resolveTo:bd2}}}}function Fd2(a,t,n){const l=this;let o=l.events.length;const i=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let s;for(;o--;){const A=l.events[o][1];if(A.type==="labelImage"){s=A;break}if(A.type==="gfmFootnoteCall"||A.type==="labelLink"||A.type==="label"||A.type==="image"||A.type==="link")break}return u;function u(A){if(!s||!s._balanced)return n(A);const p=et(l.sliceSerialize({start:s.end,end:l.now()}));return p.codePointAt(0)!==94||!i.includes(p.slice(1))?n(A):(a.enter("gfmFootnoteCallLabelMarker"),a.consume(A),a.exit("gfmFootnoteCallLabelMarker"),t(A))}}function bd2(a,t){let n=a.length;for(;n--;)if(a[n][1].type==="labelImage"&&a[n][0]==="enter"){a[n][1];break}a[n+1][1].type="data",a[n+3][1].type="gfmFootnoteCallLabelMarker";const l={type:"gfmFootnoteCall",start:Object.assign({},a[n+3][1].start),end:Object.assign({},a[a.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},a[n+3][1].end),end:Object.assign({},a[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},a[a.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},u=[a[n+1],a[n+2],["enter",l,t],a[n+3],a[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t],a[a.length-2],a[a.length-1],["exit",l,t]];return a.splice(n,a.length-n+1,...u),a}function Cd2(a,t,n){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let i=0,s;return u;function u(E){return a.enter("gfmFootnoteCall"),a.enter("gfmFootnoteCallLabelMarker"),a.consume(E),a.exit("gfmFootnoteCallLabelMarker"),A}function A(E){return E!==94?n(E):(a.enter("gfmFootnoteCallMarker"),a.consume(E),a.exit("gfmFootnoteCallMarker"),a.enter("gfmFootnoteCallString"),a.enter("chunkString").contentType="string",p)}function p(E){if(i>999||E===93&&!s||E===null||E===91||V8(E))return n(E);if(E===93){a.exit("chunkString");const v=a.exit("gfmFootnoteCallString");return o.includes(et(l.sliceSerialize(v)))?(a.enter("gfmFootnoteCallLabelMarker"),a.consume(E),a.exit("gfmFootnoteCallLabelMarker"),a.exit("gfmFootnoteCall"),t):n(E)}return V8(E)||(s=!0),i++,a.consume(E),E===92?g:p}function g(E){return E===91||E===92||E===93?(a.consume(E),i++,p):p(E)}}function Id2(a,t,n){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let i,s=0,u;return A;function A(b){return a.enter("gfmFootnoteDefinition")._container=!0,a.enter("gfmFootnoteDefinitionLabel"),a.enter("gfmFootnoteDefinitionLabelMarker"),a.consume(b),a.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(b){return b===94?(a.enter("gfmFootnoteDefinitionMarker"),a.consume(b),a.exit("gfmFootnoteDefinitionMarker"),a.enter("gfmFootnoteDefinitionLabelString"),a.enter("chunkString").contentType="string",g):n(b)}function g(b){if(s>999||b===93&&!u||b===null||b===91||V8(b))return n(b);if(b===93){a.exit("chunkString");const S=a.exit("gfmFootnoteDefinitionLabelString");return i=et(l.sliceSerialize(S)),a.enter("gfmFootnoteDefinitionLabelMarker"),a.consume(b),a.exit("gfmFootnoteDefinitionLabelMarker"),a.exit("gfmFootnoteDefinitionLabel"),v}return V8(b)||(u=!0),s++,a.consume(b),b===92?E:g}function E(b){return b===91||b===92||b===93?(a.consume(b),s++,g):g(b)}function v(b){return b===58?(a.enter("definitionMarker"),a.consume(b),a.exit("definitionMarker"),o.includes(i)||o.push(i),K2(a,w,"gfmFootnoteDefinitionWhitespace")):n(b)}function w(b){return t(b)}}function Sd2(a,t,n){return a.check(Ri,t,a.attempt(wd2,t,n))}function Rd2(a){a.exit("gfmFootnoteDefinition")}function xd2(a,t,n){const l=this;return K2(a,o,"gfmFootnoteDefinitionIndent",5);function o(i){const s=l.events[l.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(i):n(i)}}function Td2(a){let n=(a||{}).singleTilde;const l={name:"strikethrough",tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function o(s,u){let A=-1;for(;++A<s.length;)if(s[A][0]==="enter"&&s[A][1].type==="strikethroughSequenceTemporary"&&s[A][1]._close){let p=A;for(;p--;)if(s[p][0]==="exit"&&s[p][1].type==="strikethroughSequenceTemporary"&&s[p][1]._open&&s[A][1].end.offset-s[A][1].start.offset===s[p][1].end.offset-s[p][1].start.offset){s[A][1].type="strikethroughSequence",s[p][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},s[p][1].start),end:Object.assign({},s[A][1].end)},E={type:"strikethroughText",start:Object.assign({},s[p][1].end),end:Object.assign({},s[A][1].start)},v=[["enter",g,u],["enter",s[p][1],u],["exit",s[p][1],u],["enter",E,u]],w=u.parser.constructs.insideSpan.null;w&&X4(v,v.length,0,jd(w,s.slice(p+1,A),u)),X4(v,v.length,0,[["exit",E,u],["enter",s[A][1],u],["exit",s[A][1],u],["exit",g,u]]),X4(s,p-1,A-p+3,v),A=p+v.length-2;break}}for(A=-1;++A<s.length;)s[A][1].type==="strikethroughSequenceTemporary"&&(s[A][1].type="data");return s}function i(s,u,A){const p=this.previous,g=this.events;let E=0;return v;function v(b){return p===126&&g[g.length-1][1].type!=="characterEscape"?A(b):(s.enter("strikethroughSequenceTemporary"),w(b))}function w(b){const S=m9(p);if(b===126)return E>1?A(b):(s.consume(b),E++,w);if(E<2&&!n)return A(b);const N=s.exit("strikethroughSequenceTemporary"),T=m9(b);return N._open=!T||T===2&&!!S,N._close=!S||S===2&&!!T,u(b)}}}class Nd2{constructor(){this.map=[]}add(t,n,l){$d2(this,t,n,l)}consume(t){if(this.map.sort(function(i,s){return i[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const l=[];for(;n>0;)n-=1,l.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];l.push(t.slice()),t.length=0;let o=l.pop();for(;o;){for(const i of o)t.push(i);o=l.pop()}this.map.length=0}}function $d2(a,t,n,l){let o=0;if(!(n===0&&l.length===0)){for(;o<a.map.length;){if(a.map[o][0]===t){a.map[o][1]+=n,a.map[o][2].push(...l);return}o+=1}a.map.push([t,n,l])}}function kd2(a,t){let n=!1;const l=[];for(;t<a.length;){const o=a[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&l.push(a[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(a[t-1][1].type==="tableDelimiterMarker"){const i=l.length-1;l[i]=l[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return l}function Dd2(){return{flow:{null:{name:"table",tokenize:Pd2,resolveAll:Od2}}}}function Pd2(a,t,n){const l=this;let o=0,i=0,s;return u;function u(G){let A0=l.events.length-1;for(;A0>-1;){const r0=l.events[A0][1].type;if(r0==="lineEnding"||r0==="linePrefix")A0--;else break}const l0=A0>-1?l.events[A0][1].type:null,e0=l0==="tableHead"||l0==="tableRow"?W:A;return e0===W&&l.parser.lazy[l.now().line]?n(G):e0(G)}function A(G){return a.enter("tableHead"),a.enter("tableRow"),p(G)}function p(G){return G===124||(s=!0,i+=1),g(G)}function g(G){return G===null?n(G):X1(G)?i>1?(i=0,l.interrupt=!0,a.exit("tableRow"),a.enter("lineEnding"),a.consume(G),a.exit("lineEnding"),w):n(G):O2(G)?K2(a,g,"whitespace")(G):(i+=1,s&&(s=!1,o+=1),G===124?(a.enter("tableCellDivider"),a.consume(G),a.exit("tableCellDivider"),s=!0,g):(a.enter("data"),E(G)))}function E(G){return G===null||G===124||V8(G)?(a.exit("data"),g(G)):(a.consume(G),G===92?v:E)}function v(G){return G===92||G===124?(a.consume(G),E):E(G)}function w(G){return l.interrupt=!1,l.parser.lazy[l.now().line]?n(G):(a.enter("tableDelimiterRow"),s=!1,O2(G)?K2(a,b,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):b(G))}function b(G){return G===45||G===58?N(G):G===124?(s=!0,a.enter("tableCellDivider"),a.consume(G),a.exit("tableCellDivider"),S):X(G)}function S(G){return O2(G)?K2(a,N,"whitespace")(G):N(G)}function N(G){return G===58?(i+=1,s=!0,a.enter("tableDelimiterMarker"),a.consume(G),a.exit("tableDelimiterMarker"),T):G===45?(i+=1,T(G)):G===null||X1(G)?j(G):X(G)}function T(G){return G===45?(a.enter("tableDelimiterFiller"),_(G)):X(G)}function _(G){return G===45?(a.consume(G),_):G===58?(s=!0,a.exit("tableDelimiterFiller"),a.enter("tableDelimiterMarker"),a.consume(G),a.exit("tableDelimiterMarker"),B):(a.exit("tableDelimiterFiller"),B(G))}function B(G){return O2(G)?K2(a,j,"whitespace")(G):j(G)}function j(G){return G===124?b(G):G===null||X1(G)?!s||o!==i?X(G):(a.exit("tableDelimiterRow"),a.exit("tableHead"),t(G)):X(G)}function X(G){return n(G)}function W(G){return a.enter("tableRow"),Q(G)}function Q(G){return G===124?(a.enter("tableCellDivider"),a.consume(G),a.exit("tableCellDivider"),Q):G===null||X1(G)?(a.exit("tableRow"),t(G)):O2(G)?K2(a,Q,"whitespace")(G):(a.enter("data"),J(G))}function J(G){return G===null||G===124||V8(G)?(a.exit("data"),Q(G)):(a.consume(G),G===92?h0:J)}function h0(G){return G===92||G===124?(a.consume(G),J):J(G)}}function Od2(a,t){let n=-1,l=!0,o=0,i=[0,0,0,0],s=[0,0,0,0],u=!1,A=0,p,g,E;const v=new Nd2;for(;++n<a.length;){const w=a[n],b=w[1];w[0]==="enter"?b.type==="tableHead"?(u=!1,A!==0&&(z21(v,t,A,p,g),g=void 0,A=0),p={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},v.add(n,0,[["enter",p,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(l=!0,E=void 0,i=[0,0,0,0],s=[0,n+1,0,0],u&&(u=!1,g={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},v.add(n,0,[["enter",g,t]])),o=b.type==="tableDelimiterRow"?2:g?3:1):o&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(l=!1,s[2]===0&&(i[1]!==0&&(s[0]=s[1],E=hA(v,t,i,o,void 0,E),i=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(l?l=!1:(i[1]!==0&&(s[0]=s[1],E=hA(v,t,i,o,void 0,E)),i=s,s=[i[1],n,0,0])):b.type==="tableHead"?(u=!0,A=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(A=n,i[1]!==0?(s[0]=s[1],E=hA(v,t,i,o,n,E)):s[1]!==0&&(E=hA(v,t,s,o,n,E)),o=0):o&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(A!==0&&z21(v,t,A,p,g),v.consume(t.events),n=-1;++n<t.events.length;){const w=t.events[n];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=kd2(t.events,n))}return a}function hA(a,t,n,l,o,i){const s=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(i.end=Object.assign({},E9(t.events,n[0])),a.add(n[0],0,[["exit",i,t]]));const A=E9(t.events,n[1]);if(i={type:s,start:Object.assign({},A),end:Object.assign({},A)},a.add(n[1],0,[["enter",i,t]]),n[2]!==0){const p=E9(t.events,n[2]),g=E9(t.events,n[3]),E={type:u,start:Object.assign({},p),end:Object.assign({},g)};if(a.add(n[2],0,[["enter",E,t]]),l!==2){const v=t.events[n[2]],w=t.events[n[3]];if(v[1].end=Object.assign({},w[1].end),v[1].type="chunkText",v[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,S=n[3]-n[2]-1;a.add(b,S,[])}}a.add(n[3]+1,0,[["exit",E,t]])}return o!==void 0&&(i.end=Object.assign({},E9(t.events,o)),a.add(o,0,[["exit",i,t]]),i=void 0),i}function z21(a,t,n,l,o){const i=[],s=E9(t.events,n);o&&(o.end=Object.assign({},s),i.push(["exit",o,t])),l.end=Object.assign({},s),i.push(["exit",l,t]),a.add(n+1,0,i)}function E9(a,t){const n=a[t],l=n[0]==="enter"?"start":"end";return n[1][l]}const _d2={name:"tasklistCheck",tokenize:Ud2};function Bd2(){return{text:{91:_d2}}}function Ud2(a,t,n){const l=this;return o;function o(A){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?n(A):(a.enter("taskListCheck"),a.enter("taskListCheckMarker"),a.consume(A),a.exit("taskListCheckMarker"),i)}function i(A){return V8(A)?(a.enter("taskListCheckValueUnchecked"),a.consume(A),a.exit("taskListCheckValueUnchecked"),s):A===88||A===120?(a.enter("taskListCheckValueChecked"),a.consume(A),a.exit("taskListCheckValueChecked"),s):n(A)}function s(A){return A===93?(a.enter("taskListCheckMarker"),a.consume(A),a.exit("taskListCheckMarker"),a.exit("taskListCheck"),u):n(A)}function u(A){return X1(A)?t(A):O2(A)?a.check({tokenize:zd2},t,n)(A):n(A)}}function zd2(a,t,n){return K2(a,l,"whitespace");function l(o){return o===null?n(o):t(o)}}function jd2(a){return i01([fd2(),yd2(),Td2(a),Dd2(),Bd2()])}const qd2={};function Wd2(a){const t=this,n=a||qd2,l=t.data(),o=l.micromarkExtensions||(l.micromarkExtensions=[]),i=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),s=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);o.push(jd2(n)),i.push(hd2()),s.push(dd2(n))}const Gd2=Xu0("relative flex w-full flex-col gap-3",{variants:{variant:{received:"items-start",sent:"items-end"},layout:{user:"",ai:"w-full max-w-full items-center"},isLastInGroup:{true:"",false:""}},defaultVariants:{variant:"received",layout:"user"}}),pd0=e.forwardRef(({settings:a,className:t,variant:n,isLastInGroup:l,isFirstInGroup:o,sentAt:i,layout:s,children:u,testId:A="",userName:p,...g},E)=>k.jsxs("div",{"data-testid":n=="received"?`chat-message-${A} incoming-message-${A}`:`chat-message-${A} outgoing-message-${A}`,children:[n&&o&&Kd2({variant:n,settings:a,userName:p}),k.jsx("div",{className:W2(Gd2({variant:n,layout:s,isLastInGroup:l,className:t}),a?.avatar?"pl-6":""),ref:E,...g,children:u})]}));pd0.displayName="Message";const Yd2=Xu0("p-4",{variants:{variant:{received:"message-received",sent:"message-send"},layout:{default:"",ai:"message-ai"},isLoading:{true:"animate-pulse bg-gray-200",false:""}},defaultVariants:{variant:"received",layout:"default"}}),Xi=e.forwardRef(({className:a,variant:t,layout:n,isLoading:l=!1,children:o,...i},s)=>k.jsx("div",{className:W2(Yd2({variant:t,layout:n,isLoading:l,className:a}),"overflow-x-auto break-words"),ref:s,...i,children:o}));Xi.displayName="MessageBubble";const Kd2=({variant:a,settings:t,userName:n})=>a!=="received"?null:k.jsxs("div",{className:"mb-1 flex items-center justify-start space-x-1",children:[t?.avatar&&k.jsx("img",{width:48,height:48,className:"mt-1 h-5 w-5 rounded-full",src:t.avatar,alt:"Avatar"}),n&&k.jsx("span",{className:"font-brand text-[11.2px] font-bold leading-[16.8px] text-primary",children:n})]}),Xd2=({block:a,variant:t,layout:n,isLoading:l})=>k.jsx(Xi,{variant:t,layout:n,isLoading:l,className:"prose max-w-[95%] break-words prose-a:text-blue-600",children:k.jsx(Q01,{rehypePlugins:[d21],remarkPlugins:[Uu2,Wd2],components:{a:Qd2},className:"",skipHtml:!0,children:a.content})});function Qd2(a){return k.jsx("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",children:a.children})}const j21=e.forwardRef(({className:a,...t},n)=>k.jsx("div",{ref:n,className:W2("rounded-lg border bg-card text-card-foreground shadow-sm",a),...t}));j21.displayName="Card";const q21=e.forwardRef(({className:a,...t},n)=>k.jsx("div",{ref:n,className:W2("flex flex-col space-y-1.5 p-6",a),...t}));q21.displayName="CardHeader";const W21=e.forwardRef(({className:a,...t},n)=>k.jsx("h3",{ref:n,className:W2("text-2xl font-semibold leading-none tracking-tight",a),...t}));W21.displayName="CardTitle";const G21=e.forwardRef(({className:a,...t},n)=>k.jsx("p",{ref:n,className:W2("text-sm text-muted-foreground",a),...t}));G21.displayName="CardDescription";const Y21=e.forwardRef(({className:a,...t},n)=>k.jsx("div",{ref:n,className:W2("p-6 pt-0",a),...t}));Y21.displayName="CardContent";const K21=e.forwardRef(({className:a,...t},n)=>k.jsx("div",{ref:n,className:W2("flex items-center p-6 pt-0",a),...t}));K21.displayName="CardFooter";const Jd2=({block:a})=>{const{t}=re("common");return a.sources.some(l=>l.document_metadata&&l.document_metadata.card)?k.jsx("div",{className:"flex w-full max-w-full gap-5 overflow-x-auto",children:a.sources.map(l=>k.jsxs(j21,{"data-url":l.source_link,className:"min-w-[200px] max-w-72 overflow-hidden",children:[k.jsx(q21,{className:"h-full max-h-[120px] p-0",children:k.jsx("img",{className:"h-full w-full object-cover transition duration-300 ease-in-out group-hover:scale-105",src:l.document_metadata.card.image,alt:l.document_metadata.card.title})}),k.jsxs(Y21,{className:"p-4",children:[k.jsx(W21,{className:"text-md line-clamp-1 font-bold",children:l.document_metadata.card.title}),l.document_metadata.card.description&&k.jsx(G21,{className:"line-clamp-2 text-sm",children:l.document_metadata.card.description})]}),k.jsx(K21,{children:k.jsx("a",{href:l.document_metadata.card.url,target:"_blank",children:k.jsx(R6,{variant:"outline",children:l.document_metadata.card.call_to_action_text??t("sourceCallToActionLabel")})})})]},l.id))}):k.jsx(k.Fragment,{})},Qi={container:"_container_61f61_1",image:"_image_61f61_2",fallback:"_fallback_61f61_3",fallbackIcon:"_fallbackIcon_61f61_29",fallbackText:"_fallbackText_61f61_33"},eA2=({block:a})=>{const{t}=re(),[n,l]=e.useState(!1),o=()=>{l(!0)};return k.jsx("div",{className:Qi.container,children:n?k.jsxs("div",{className:Qi.fallback,"data-testid":"image-fallback",children:[k.jsx(Ph,{size:32,className:Qi.fallbackIcon}),k.jsx("span",{className:Qi.fallbackText,"data-testid":"fallback-text",children:t("upload:imageLoadError")})]}):k.jsx("img",{src:a.url,alt:a.filename,className:Qi.image,onError:o,"data-testid":"image-element"})})},X21={markdown:Xd2,text:({block:a,variant:t,layout:n,isLoading:l})=>k.jsx(Xi,{variant:t,layout:n,isLoading:l,className:"prose max-w-[60%]",children:k.jsx("p",{children:a.text})}),button:E0.Fragment,button_group:A72,source_group:Jd2,image_reference:eA2},aA2=a=>a in X21,Q21=(a,t,n)=>{const l=X21[a.type];return l!==void 0?E0.createElement(l,{key:`block-${a.id}`,variant:t,layout:n,block:a}):(console.warn(`No component found for block type: ${a.type}`),null)},tA2=150,nA2=a=>{const[t,n]=e.useState(!1),l=e.useCallback(()=>{if(!a)return;const{scrollTop:i,scrollHeight:s,clientHeight:u}=a,A=s-i-u;n(A>tA2)},[a]);return e.useEffect(()=>{if(a)return l(),a.addEventListener("scroll",l),()=>{a.removeEventListener("scroll",l)}},[a,l]),{scrollToBottom:()=>{a?.scrollTo({top:a.scrollHeight,behavior:"smooth"})},isScrolledUp:t}},lA2=()=>{const{t:a}=re(),{state:t}=G8(),n=e.useMemo(()=>{const o=s=>s.type==="text"||s.type==="markdown";return t.messages.filter(s=>!vr(s,t.userId)&&s.type==="message"&&s.blocks.some(o)).slice(-1)[0]?.blocks.filter(o)??[]},[t.messages,t.userId]),l=`${t.settings?.title??a("common:bot")} ${a("header:typing")}`;return k.jsx("div",{className:"sr-only","aria-live":"polite",children:t.isTyping?l:n.map(o=>Q21(o,"sent","default"))})},rA2=({messages:a})=>{const{state:t}=G8(),{userId:n,isTyping:l,hasSentMessageThisSession:o}=t,{hasUploadState:i}=ei(),s=e.useMemo(()=>{const A=[...oA2(a)],p=a.at(-1);return(p?vr(p,n):!1)&&l&&A.push({id:"typing-indicator",type:"typing-indicator"}),i&&A.push({id:"upload-bubble",type:"upload-bubble"}),iA2(A,n,o||i)},[a,n,l,o,i]),u=e.useMemo(()=>s.length,[s.length]);return{chatGroups:s,groupCount:u}},oA2=a=>a.map((t,n)=>{const l=a[n+1],o=a[n-1];return{id:`message-${t.id}-${n}`,type:"message",message:t,index:n,isFirstInGroup:o?t.sender_id!==o.sender_id:!0,isLastInGroup:l?t.sender_id!==l.sender_id:!0}}),cA2=(a,t)=>a.type==="message"&&vr(a.message,t)||a.type==="upload-bubble",iA2=(a,t,n)=>{const l=[];let o=[];for(const i of a)cA2(i,t)&&o.length>0?(l.push({id:`group-${l.length}`,items:o,showPlaceholder:!1}),o=[i]):o.push(i);return o.length>0&&l.push({id:`group-${l.length}`,items:o,showPlaceholder:n}),l};function sA2({message:a,handleActionEvent:t,close:n}){return k.jsxs(bd,{className:"sm:max-w-[425px]",children:[k.jsxs(_u0,{children:[k.jsx(Bu0,{children:"Thank you for your response!"}),k.jsx(xQ0,{children:"Can you tell us what went wrong?"})]}),k.jsx(hA2,{message:a,handleActionEvent:t,close:n})]})}function mA2({message:a,handleActionEvent:t,close:n}){const{t:l}=re(["common","feedback"]),[o,i]=e.useState(""),[s,u]=e.useState(!1),[A,p]=e.useState(!1),g=E=>{E.preventDefault(),u(!0),t("user-feedback-message",{id:a.id,value:o},"input"),i(""),p(!0),setTimeout(()=>{u(!1),setTimeout(n,1500)},1500)};return k.jsxs(a9,{className:"min-h-40 overflow-hidden rounded-t-[20px] border-primary bg-primary text-primary-foreground",children:[k.jsx(z7,{children:k.jsx(cl.div,{layoutId:"underline",children:k.jsx(Sd,{className:"",children:A?k.jsx(MJ0,{title:l("feedback:modalSubmittedTitle"),description:l("feedback:modalSubmittedDescription")}):k.jsxs("div",{className:"flex items-center justify-between",children:[k.jsx("div",{className:"relative w-12"}),k.jsxs("div",{className:"text-center",children:[k.jsx(Or,{className:"text-center",children:l("feedback:modalTitle")}),k.jsx(Rd,{className:"text-primary-foreground/80",children:l("feedback:modalDescription")})]}),k.jsx(Ku0,{className:"w-12",asChild:!0,children:k.jsx(R6,{variant:"link",onClick:n,className:"text-right text-primary-foreground",children:k.jsx(tl,{weight:"regular",size:20})})})]})})})}),A?k.jsx(k.Fragment,{}):k.jsxs(cl.form,{onSubmit:g,className:"mt-auto flex flex-col gap-2 p-4 pt-2",children:[k.jsx(kd,{className:"border border-white text-base text-white shadow-none ring-0 placeholder:text-white focus-visible:ring-0 widget:text-sm",placeholder:l("feedback:modalPlaceholder"),"data-testid":"feedback-form-textarea",value:o,rows:4,disabled:s,onChange:E=>i(E.target.value)}),k.jsx(R6,{disabled:s||!o,type:"submit",variant:"secondary","data-testid":"feedback-form-button",children:l(s?"sending":"send")})]})]})}const uA2=({message:a,handleActionEvent:t})=>{const{t:n}=re("common"),{openModal:l,closeModal:o}=t9(),i=Hd("(min-width: 768px)"),{state:s}=G8(),u=A=>{A.preventDefault(),t("feedback-pressed",{id:a.id,value:"negative"}),i&&!s.inShadowDom?l(sl.Dialog,k.jsx(sA2,{message:a,handleActionEvent:t,close:o})):l(sl.Drawer,k.jsx(mA2,{message:a,handleActionEvent:t,close:o}))};return k.jsxs("div",{className:"flex justify-start space-x-3",children:[k.jsxs("button",{className:`flex h-auto items-center space-x-1 p-0 text-xs underline-offset-4 hover:underline disabled:pointer-events-none disabled:opacity-50 ${a.user_feedback_value==="positive"?"text-green-500":"text-primary"}`,"data-testid":`thumbs-up thumbs-feedback-sentiment-${a.user_feedback_value==="positive"?a.user_feedback_value:"none"}`,onClick:A=>{A.preventDefault(),t("feedback-pressed",{id:a.id,value:"positive"})},children:[k.jsx(KG0,{"aria-hidden":!0,focusable:"false",weight:a.user_feedback_value==="positive"?"fill":"regular",size:20})," ",k.jsx("span",{children:n("feedback:thumbsUp")})]}),k.jsxs("button",{className:`flex h-auto items-center space-x-1 p-0 text-xs underline-offset-4 hover:underline disabled:pointer-events-none disabled:opacity-50 ${a.user_feedback_value==="negative"?"text-red-500":"text-primary"}`,"data-testid":`thumbs-down thumbs-feedback-sentiment-${a.user_feedback_value==="negative"?a.user_feedback_value:"none"}`,onClick:u,children:[k.jsx(YG0,{"aria-hidden":!0,focusable:"false",weight:a.user_feedback_value==="negative"?"fill":"regular",size:20})," ",k.jsx("span",{children:n("feedback:thumbsDown")})]})]})},hA2=({message:a,handleActionEvent:t,close:n,className:l})=>{const[o,i]=e.useState(""),[s,u]=e.useState(!1),A=p=>{p.preventDefault(),u(!0),t("user-feedback-message",{id:a.id,value:o},"input"),i(""),setTimeout(()=>{u(!1),n()},500)};return k.jsxs("form",{"data-testid":"feedback-form",onSubmit:A,className:W2("mt-auto flex flex-col gap-2",l),children:[k.jsx(kd,{className:"border-0 bg-white text-base text-black shadow-none ring-0 focus-visible:ring-0 widget:text-sm",placeholder:"Share your thoughts here..",value:o,disabled:s,"data-testid":"feedback-form-textarea",onChange:p=>i(p.target.value)}),k.jsx(R6,{disabled:s||!o,type:"submit",variant:"secondary","data-testid":"feedback-form-button",children:"Send"})]})},dA2=({message:a,index:t,isLastInGroup:n,isFirstInGroup:l,...o})=>{const{state:i,handleActionEvent:s}=G8(),{messages:u,userId:A}=i,p=t===u.length-1,g=A?vr(a,A):!1,E=g?"sent":"received",v=g?"default":"ai";return k.jsx("div",{...o,children:k.jsxs(pd0,{settings:i.settings,testId:t.toString(),variant:E,isFirstInGroup:l,isLastInGroup:n,sentAt:p?a.sent_at:null,userName:a.sender_name?a.sender_name:i.settings?.digitalEmployeeName,className:"",children:[a.blocks.map(w=>Q21(w,E,v)),a.request_user_feedback&&!g&&k.jsx(uA2,{message:a,handleActionEvent:s})]})})},AA2=()=>k.jsxs("div",{className:"flex items-center gap-1",children:[k.jsx("div",{className:"bubble1 h-2 w-2 rounded-full"}),k.jsx("div",{className:"bubble2 h-2 w-2 rounded-full"}),k.jsx("div",{className:"bubble3 h-2 w-2 rounded-full"})]}),pA2=()=>{const{state:a}=G8();return k.jsx(pd0,{settings:a.settings,userName:a.settings?.digitalEmployeeName,testId:"loading",variant:"received",isFirstInGroup:!0,isLastInGroup:!1,sentAt:null,className:"",children:k.jsx(Xi,{variant:"received",layout:"ai",className:"prose max-w-[60%]",children:k.jsx(AA2,{})})},"message-loading")},fA2={spinner:"_spinner_mxybw_1"},J21=({size:a=20,className:t=""})=>k.jsx("div",{className:`${fA2.spinner} ${t}`,style:{width:a,height:a},"aria-hidden":"true"}),Yt={container:"_container_11d3g_1",bubble:"_bubble_11d3g_7",error:"_error_11d3g_11",uploadingPlaceholder:"_uploadingPlaceholder_11d3g_15",spinner:"_spinner_11d3g_22",uploadingText:"_uploadingText_11d3g_26",content:"_content_11d3g_30",errorContainer:"_errorContainer_11d3g_36",errorIcon:"_errorIcon_11d3g_42",errorText:"_errorText_11d3g_46"},ZA2=()=>{const{t:a}=re(),{error:t}=ei();return k.jsx("div",{className:Yt.container,children:k.jsx(Xi,{variant:"sent",layout:"default",className:uH(Yt.bubble,{[Yt.error]:!!t}),children:k.jsx("div",{className:Yt.content,children:t?k.jsxs("div",{className:Yt.errorContainer,"data-testid":"upload-error",children:[k.jsx(Jh,{size:20,className:Yt.errorIcon}),k.jsx("span",{className:Yt.errorText,children:t})]}):k.jsxs("div",{className:Yt.uploadingPlaceholder,"data-testid":"upload-loading",children:[k.jsx(J21,{size:18,className:Yt.spinner}),k.jsx("span",{className:Yt.uploadingText,children:a("upload:uploadingText")})]})})})})},HA2=({item:a})=>{switch(a.type){case"message":return k.jsx(dA2,{message:a.message,index:a.index,isLastInGroup:a.isLastInGroup,isFirstInGroup:a.isFirstInGroup});case"typing-indicator":return k.jsx(pA2,{});case"upload-bubble":return k.jsx(ZA2,{});default:return null}},gA2=({group:a,placeholderMinHeight:t})=>k.jsx("div",{className:"flex flex-col gap-3",style:{minHeight:a.showPlaceholder?t:void 0},children:a.items.map(n=>k.jsx(HA2,{item:n},n.id))},a.id),EA2=({disclaimer:a})=>k.jsx("div",{"data-testid":"chat-list-disclaimer",children:k.jsx(Q01,{rehypePlugins:[d21],className:"!m-0 max-w-none text-center text-[10px] leading-[14px] text-gray-500",skipHtml:!0,components:{a:VA2},children:a})}),VA2=({href:a="",children:t,...n})=>k.jsx("a",{href:a,className:"underline hover:no-underline",target:"_blank",rel:"noopener noreferrer",...n,children:t});function MA2(a){return a?a.map(t=>({...t,blocks:t.blocks?t.blocks.filter(n=>aA2(n.type)):[]})):[]}function vA2(a){return a?a.filter(t=>t.blocks&&t.blocks.length>0):[]}const LA2=16;function wA2(){const a=e.useRef(null),{state:t,endDivRef:n,scrollableDivRef:l}=G8(),{scrollToBottom:o,isScrolledUp:i}=nA2(l.current),[s,u]=e.useState(!1),A=e.useMemo(()=>{const b=MA2(t.messages);return vA2(b)},[t.messages]),{chatGroups:p,groupCount:g}=rA2({messages:A});e.useEffect(()=>{p.some(S=>S.showPlaceholder)&&l.current&&setTimeout(()=>{l.current?.scrollTo({top:l.current.scrollHeight,behavior:"smooth"})},100)},[g,l]),e.useEffect(()=>{!s&&t.messages.length>0&&(u(!0),setTimeout(()=>{l.current?.scrollTo({top:l.current?.scrollHeight})},0))},[t.messages,s]);const E=l.current?.clientHeight||0,v=LA2+(a.current?.clientHeight||0),w=`${E-v}px`;return k.jsxs("div",{className:"relative h-full w-full",children:[k.jsx(lA2,{}),k.jsx("div",{className:"h-full w-full overflow-y-auto overscroll-contain",ref:l,children:k.jsxs("div",{className:"flex h-[calc(100%+1px)] flex-col",children:[k.jsxs("div",{className:"flex grow flex-col gap-3 px-4 py-2",children:[t.settings?.disclaimer&&k.jsx(EA2,{disclaimer:t.settings.disclaimer}),p.map(b=>k.jsx(gA2,{group:b,placeholderMinHeight:w},b.id))]}),t.settings?.showFreedayBranding&&k.jsx(Qu0,{ref:a,name:"Freeday",site:"https://freeday.ai",className:"shrink-0 pb-4 pt-8"})]})}),k.jsx("div",{ref:n}),i&&k.jsx(R6,{variant:"outline",size:"icon",onClick:o,className:"absolute bottom-2 left-1/2 -translate-x-1/2 border border-border p-1",children:k.jsx(yh,{size:18})})]})}const yA2=()=>{const{state:a}=G8(),{t}=re(),[n,l]=e.useState(!0),[o,i]=e.useState(!1);e.useEffect(()=>{const u=setTimeout(()=>{i(!0)},300);return()=>clearTimeout(u)},[]),e.useEffect(()=>{if(!n)return;const u=A=>{!o||A.target.closest('[data-testid="chat-button"]')||l(!1)};return window.addEventListener("click",u),window.addEventListener("touchstart",u),()=>{window.removeEventListener("click",u),window.removeEventListener("touchstart",u)}},[o,n]);const s=()=>{l(!1)};return a.settings?.bannerTitle&&n?k.jsx("div",{className:"pb-7.5 absolute left-0 right-0 top-0 max-h-[500px] -translate-y-full gap-4 overflow-hidden rounded-t-[30px] bg-white transition-all duration-300 ease-in-out","data-testid":"banner",children:k.jsxs("div",{className:"flex h-full w-full flex-col justify-center rounded-t-[30px] bg-primary/10 p-6",children:[k.jsx("button",{onClick:s,className:"absolute right-8 top-8 flex -translate-y-1/2 translate-x-1/2 cursor-pointer rounded p-1 hover:bg-primary/10 focus:outline-none focus:ring-2 focus:ring-primary","aria-label":t("common:closeNotification"),"data-testid":"close-button",children:k.jsx(tl,{weight:"regular",size:20,className:"text-primary"})}),k.jsx("p",{className:"text-sm font-semibold text-primary",children:a.settings?.bannerTitle}),a.settings?.bannerMessage&&k.jsx("p",{className:"whitespace-pre-line text-sm",children:a.settings?.bannerMessage})]})}):null},e81=["image/jpeg","image/jpg","image/png","image/webp"],FA2=async(a,t=100)=>{const n=t*1024;if(a.size<=n)return a;let l=.9,o=a;for(;o.size>n&&l>.1;)o=await RA2(a,l),l-=.1;return o},bA2=(a,t,n=2048)=>a<=n&&t<=n?{width:a,height:t}:a>t?{width:n,height:t/a*n}:{width:a/t*n,height:n},CA2=a=>new Promise((t,n)=>{const l=new Image;l.onload=()=>t(l),l.onerror=()=>n(new Error("Failed to load image")),l.src=a}),IA2=a=>new Promise((t,n)=>{const l=new FileReader;l.onload=o=>t(o.target?.result),l.onerror=()=>n(new Error("Failed to read file")),l.readAsDataURL(a)}),SA2=(a,t,n,l)=>new Promise((o,i)=>{a.toBlob(s=>{if(!s){i(new Error("Failed to compress image"));return}const u=new File([s],t,{type:n,lastModified:Date.now()});o(u)},n,l)}),RA2=async(a,t)=>{const n=await IA2(a),l=await CA2(n),o=document.createElement("canvas"),i=bA2(l.width,l.height);o.width=i.width,o.height=i.height;const s=o.getContext("2d");if(!s)throw new Error("Failed to get canvas context");return s.drawImage(l,0,0,i.width,i.height),SA2(o,a.name,a.type,t)},a81=50,xA2=()=>{const{t:a}=re(),{setError:t,setIsLoading:n,clearUploadedFile:l}=ei(),{state:o,sendNewMessage:i}=G8(),s=async p=>{if(!o.settings?.channelId){u(a("upload:processingError"));return}t(null);const g=A(p);if(g){u(g),l();return}try{n(!0);const E=await FA2(p,100),w=await new mH(o.settings.channelId,new Ru(fH())).uploadAttachment(E);i({text:"",image:{url:w.url,filename:w.filename}})}catch(E){console.error("Error processing image:",E),u(a("upload:processingError"))}finally{n(!1)}},u=p=>{t(p),l()},A=p=>{if(!e81.includes(p.type))return a("upload:invalidFileType");const g=a81*1024*1024;if(p.size>g)return a("upload:fileSizeExceeded",{maxSize:a81})};return{uploadFile:s}},TA2=()=>{const{t:a}=re(),{fileInputRef:t,isLoading:n}=ei(),{uploadFile:l}=xA2(),o=()=>{t.current?.click()},i=s=>{const u=s.target.files?.[0];u&&l(u)};return k.jsxs(k.Fragment,{children:[k.jsx("input",{ref:t,type:"file",accept:e81.join(","),style:{display:"none"},onChange:i,"aria-label":a("upload:uploadImageButton"),"data-testid":"upload-file-input"}),k.jsx(Vi,{tooltipText:a("upload:uploadImageButton"),rounded:!0,size:"icon",onClick:o,disabled:n,"data-testid":"upload-attachment-button",children:n?k.jsx(J21,{size:18}):k.jsx(Bh,{size:20})})]})},NA2=({placeholder:a,isTyping:t,onSendMessage:n})=>{const{t:l}=re(),{isLoading:o}=ei(),{state:i}=G8(),[s,u]=e.useState(""),A=e.useRef(null),p=s.trim().length===0||t||o,g=b=>{u(b.target.value)},E=b=>{b?.preventDefault(),!p&&(n(s),u(""))},v=b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),E(b))},w=()=>W2("absolute right-2 top-1/2 flex h-9 w-9 -translate-y-1/2 transform items-center justify-center rounded p-0 transition-all duration-0 ease-in-out",p?"text-gray-300":"text-primary");return k.jsx("footer",{className:"relative bottom-0 left-0 right-0 border-t border-gray-200 bg-white",children:k.jsxs("div",{className:"p-4",children:[k.jsx(yA2,{}),k.jsx("form",{onSubmit:E,children:k.jsxs("div",{className:"flex w-full max-w-full items-center space-x-2",children:[i.settings?.enableAttachments&&k.jsx(TA2,{}),k.jsxs("div",{className:"relative w-full flex-1",ref:A,children:[k.jsxs("div",{className:"invisible max-h-[164px] min-h-[44px] overflow-y-hidden whitespace-pre-wrap break-words px-4 py-2",children:[s||a,"|"]}),k.jsx("label",{htmlFor:"chat-input-textarea",className:"sr-only",children:a}),k.jsx("textarea",{id:"chat-input-textarea",className:"absolute inset-0 touch-none resize-none rounded-3xl border border-gray-300 pb-[0px] pl-[16px] pr-[48px] pt-[10px] text-[16px] leading-[20px] placeholder:text-gray-500 focus:outline-none focus:ring-1 focus:ring-primary",placeholder:a,wrap:"hard","data-testid":"text-input-field",value:s,onKeyDown:v,onChange:g,rows:1}),t?k.jsx("div",{"data-testid":"stop-button",className:w(),children:k.jsx(Kh,{weight:"bold",className:"h-6 w-6"})}):k.jsx("button",{"data-testid":"send-button",className:w(),"aria-label":l("common:send"),disabled:p,children:k.jsx(ti,{weight:"fill",className:"h-6 w-6"})})]})]})})]})})},V9={drawerContent:"_drawerContent_ndll7_1",container:"_container_ndll7_9",title:"_title_ndll7_18",buttonContainer:"_buttonContainer_ndll7_27",button:"_button_ndll7_27"},$A2=()=>{const{t:a}=re("resumeChat"),{closeModal:t}=t9(),{handleRestart:n,state:l}=G8(),o=()=>{t(),s("continue")},i=()=>{n(),t(),s("start_new")},s=u=>{Jc("conversation_resume",{action:u,conversation_id:l.conversationId??"",last_message_at:l.messages.at(-1)?.sent_at})};return k.jsx(a9,{className:V9.drawerContent,children:k.jsxs("div",{className:V9.container,children:[k.jsxs(Or,{className:V9.title,children:[a("title"),k.jsx("br",{})," ",a("subtitle")]}),k.jsxs("div",{className:V9.buttonContainer,children:[k.jsx(R6,{onClick:o,variant:"secondary",className:V9.button,"data-testid":"continue-button",children:a("continueButton")}),k.jsx(R6,{onClick:i,variant:"secondary",className:V9.button,"data-testid":"start-new-button",children:a("startNewButton")})]})]})})},kA2=()=>{const{state:a}=G8(),{openModal:t}=t9();e.useEffect(()=>{!a.hasResumedConversation&&DA2(a.messages)&&(a.hasResumedConversation=!0,setTimeout(()=>{t(sl.Drawer,k.jsx($A2,{}))},500))},[a.messages,a.hasResumedConversation,t])},DA2=a=>a.some(t=>t.blocks.some(n=>n.type==="ended")),PA2=()=>{const{t:a}=re(["common","footer"]),{sendNewMessage:t,state:n}=G8();return kA2(),k.jsxs(k.Fragment,{children:[n.settings?.theme!=="slim"&&k.jsx(N52,{}),k.jsx(d72,{position:"top-center",expand:!0,pauseWhenPageIsHidden:!0,richColors:!0}),k.jsx("main",{className:"flex-1 space-y-2 overflow-hidden bg-white",children:k.jsx(z7,{initial:!0,children:k.jsx(cl.div,{className:"h-full w-full",initial:{opacity:0,y:5},animate:{opacity:1,y:0},exit:{opacity:0,y:5},transition:{duration:.3,ease:[.42,0,0,1],delay:.4},children:k.jsx(wA2,{})})})}),k.jsx(NA2,{placeholder:a(n.settings?.newMessagePlaceholder??a("footer:newMessagePlaceholder")),isTyping:n.isTyping,onSendMessage:l=>t({text:l})})]})},OA2=a=>{const[t,n]=e.useState(null);return e.useEffect(()=>{if(!a)return;(async()=>{try{const i=await new mH(a,new Ru(fH())).fetchWidgetSettings();n(i)}catch(o){Qe(o)}})()},[a]),{widgetSettings:t}},_A2=(a=!1)=>{const[t,n]=e.useState(a),[l,o]=e.useState(!1);return e.useEffect(()=>{const i=s=>{s.type===E8.CLOSE?(n(!1),o(!0)):s.type===E8.OPEN&&(n(!0),o(!1))};return globalThis.addEventListener(E8.CLOSE,i),globalThis.addEventListener(E8.OPEN,i),()=>{globalThis.removeEventListener(E8.CLOSE,i),globalThis.removeEventListener(E8.OPEN,i)}},[]),{isWidgetOpen:t,setIsWidgetOpen:n,hideChatBarInput:l}},BA2=a=>({handleOpen:()=>{Jc("widget:opened",{start_view:a?.startView}),globalThis.dispatchEvent(new Event(E8.OPEN)),globalThis.postMessage({event:E8.START,payload:a},globalThis.location.origin)},handleOpenAndSendMessage:l=>{setTimeout(()=>{globalThis.postMessage({event:E8.START,payload:{suggestionMessage:l}},globalThis.location.origin),globalThis.dispatchEvent(new Event(E8.OPEN))},400)}}),UA2="https://cdn.jsdelivr.net/npm/@freeday-ai/webchat",zA2=()=>{e.useEffect(()=>{const a=n=>{t81(n.error)},t=n=>{t81(n.reason)};return globalThis.addEventListener("error",a),globalThis.addEventListener("unhandledrejection",t),()=>{globalThis.removeEventListener("error",a),globalThis.removeEventListener("unhandledrejection",t)}},[])},t81=a=>{a?.stack?.includes(UA2)&&Qe(a)};class jA2 extends e.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){Qe(t,"Uncaught rendering error",{componentStack:n.componentStack})}render(){return this.props.children}}function qA2(a){e.useEffect(()=>{if(!a)return;const t=document.body,n=window.scrollY,l=t.style.position,o=t.style.top,i=t.style.touchAction;return t.style.position="fixed",t.style.top=`-${n}px`,t.style.width="100%",t.style.touchAction="none",()=>{t.style.position=l,t.style.top=o,t.style.touchAction=i,window.scrollTo(0,n)}},[a])}const dA={chatWindowRenderer:"_chatWindowRenderer_shws1_1",fullScreen:"_fullScreen_shws1_23",widgetChatContainer:"_widgetChatContainer_shws1_38",buttonContainer:"_buttonContainer_shws1_44"},WA2=({threshold:a=100,enabled:t=!0})=>{const n=e.useMemo(()=>globalThis.visualViewport,[]),l=e.useMemo(()=>n?.height??0,[n]),o=e.useMemo(()=>()=>!t||!n?null:{width:n.width,height:n.height,offsetTop:n.offsetTop,offsetLeft:n.offsetLeft,scale:n.scale},[t,n]),[i,s]=e.useState(()=>o()),u=e.useMemo(()=>i&&l-i.height>a,[i,l,a]);return e.useEffect(()=>{if(!n)return;const A=()=>s(o());return n.addEventListener("resize",A),n.addEventListener("scroll",A),A(),()=>{n.removeEventListener("resize",A),n.removeEventListener("scroll",A)}},[n,o]),{viewport:i,keyboardOpen:u}},GA2=({channelId:a,metadata:t})=>{zA2();const{widgetSettings:n}=OA2(a);return!a||!n?null:k.jsx(jA2,{children:k.jsx(G51,{config:{...n,metadata:t?JSON.parse(t):void 0},inShadowDom:!0,children:k.jsx(YA2,{widgetSettings:{...n,metadata:t?JSON.parse(t):void 0}})})})},YA2=({widgetSettings:a})=>{const t=e.useRef(null),n=a.startView===_3.FULL_SCREEN,l=a.startView===_3.UNFOLDED_CHAT_VIEW,o=n||l,{isWidgetOpen:i,setIsWidgetOpen:s}=_A2(o),{handleOpen:u,handleOpenAndSendMessage:A}=BA2(a),p=Hd("(max-width: 640px)");qA2(i&&p);const{keyboardOpen:g}=WA2({enabled:i&&p});return e.useEffect(()=>{if(!o)return;s(!0);const E=requestAnimationFrame(u);return()=>cancelAnimationFrame(E)},[]),e.useEffect(()=>{g&&t.current&&t.current.scrollTo({top:t.current.scrollHeight})},[g]),k.jsxs(k.Fragment,{children:[k.jsx(z7,{children:i&&k.jsx(cl.div,{className:W2(dA.chatWindowRenderer,{[dA.fullScreen]:n}),"data-testid":"chat-window-renderer",initial:{opacity:0,y:30},animate:{opacity:1,y:0,transition:{delay:.2}},exit:{opacity:0,y:30},transition:{duration:.35,ease:[.42,0,0,1]},transformTemplate:n?(E,v)=>`translateX(-50%) ${v}`:void 0,children:k.jsx(Sr2,{children:k.jsx("div",{ref:t,className:dA.widgetChatContainer,children:k.jsx(PA2,{})})})})}),!n&&k.jsx(z7,{children:!i&&k.jsx(cl.div,{className:dA.buttonContainer,"data-testid":"button-container",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1,transition:{delay:.3}},exit:{opacity:0,scale:0},transition:{duration:.3,ease:[.42,0,0,1]},children:k.jsx(qn2,{onOpen:u,onSendMessage:A})})})]})},n81=a=>{const{channelId:t,metadata:n}=a;document.body?l81(t,n):globalThis.addEventListener("DOMContentLoaded",()=>{l81(t,n)})},l81=(a,t)=>{const n=document.createElement("div"),l=document.createElement("freeday-widget");l.setAttribute("channelId",a),t&&l.setAttribute("metadata",JSON.stringify(t)),n.appendChild(l),document.body.appendChild(n),An1("freeday-widget",GA2,["channelId","metadata"])};return window.FreedayWidget={bootstrap:n81},oZ.bootstrap=n81,Object.defineProperty(oZ,Symbol.toStringTag,{value:"Module"}),oZ})({});
|
|
254
|
+
`))}function A(w,b,S,N){const T=S.enter("tableCell"),_=S.enter("phrasing"),B=S.containerPhrasing(w,{...N,before:i,after:i});return _(),T(),B}function p(w,b){return Vh2(w,{align:b,alignDelimiters:l,padding:n,stringLength:o})}function g(w,b,S){const N=w.children;let T=-1;const _=[],B=b.enter("table");for(;++T<N.length;)_[T]=E(N[T],b,S);return B(),_}function E(w,b,S){const N=w.children;let T=-1;const _=[],B=b.enter("tableRow");for(;++T<N.length;)_[T]=A(N[T],w,b,S);return B(),_}function v(w,b,S){let N=x21.inlineCode(w,b,S);return S.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function id2(){return{exit:{taskListCheckValueChecked:N21,taskListCheckValueUnchecked:N21,paragraph:md2}}}function sd2(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ud2}}}function N21(a){const t=this.stack[this.stack.length-2];t.type,t.checked=a.type==="taskListCheckValueChecked"}function md2(a){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const l=n.children[0];if(l&&l.type==="text"){const o=t.children;let i=-1,s;for(;++i<o.length;){const u=o[i];if(u.type==="paragraph"){s=u;break}}s===n&&(l.value=l.value.slice(1),l.value.length===0?n.children.shift():n.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,n.position.start=Object.assign({},l.position.start)))}}this.exit(a)}function ud2(a,t,n,l){const o=a.children[0],i=typeof a.checked=="boolean"&&o&&o.type==="paragraph",s="["+(a.checked?"x":" ")+"] ",u=n.createTracker(l);i&&u.move(s);let A=x21.listItem(a,t,n,{...l,...u.current()});return i&&(A=A.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),A;function p(g){return g+s}}function hd2(){return[zu2(),uh2(),ph2(),ad2(),id2()]}function dd2(a){return{extensions:[ju2(),hh2(a),fh2(),cd2(a),sd2()]}}const Ad2={tokenize:Ed2,partial:!0},$21={tokenize:Vd2,partial:!0},k21={tokenize:Md2,partial:!0},D21={tokenize:vd2,partial:!0},pd2={tokenize:Ld2,partial:!0},P21={name:"wwwAutolink",tokenize:Hd2,previous:_21},O21={name:"protocolAutolink",tokenize:gd2,previous:B21},K3={name:"emailAutolink",tokenize:Zd2,previous:U21},Gt={};function fd2(){return{text:Gt}}let Gr=48;for(;Gr<123;)Gt[Gr]=K3,Gr++,Gr===58?Gr=65:Gr===91&&(Gr=97);Gt[43]=K3,Gt[45]=K3,Gt[46]=K3,Gt[95]=K3,Gt[72]=[K3,O21],Gt[104]=[K3,O21],Gt[87]=[K3,P21],Gt[119]=[K3,P21];function Zd2(a,t,n){const l=this;let o,i;return s;function s(E){return!dd0(E)||!U21.call(l,l.previous)||Ad0(l.events)?n(E):(a.enter("literalAutolink"),a.enter("literalAutolinkEmail"),u(E))}function u(E){return dd0(E)?(a.consume(E),u):E===64?(a.consume(E),A):n(E)}function A(E){return E===46?a.check(pd2,g,p)(E):E===45||E===95||T6(E)?(i=!0,a.consume(E),A):g(E)}function p(E){return a.consume(E),o=!0,A}function g(E){return i&&o&&n4(l.previous)?(a.exit("literalAutolinkEmail"),a.exit("literalAutolink"),t(E)):n(E)}}function Hd2(a,t,n){const l=this;return o;function o(s){return s!==87&&s!==119||!_21.call(l,l.previous)||Ad0(l.events)?n(s):(a.enter("literalAutolink"),a.enter("literalAutolinkWww"),a.check(Ad2,a.attempt($21,a.attempt(k21,i),n),n)(s))}function i(s){return a.exit("literalAutolinkWww"),a.exit("literalAutolink"),t(s)}}function gd2(a,t,n){const l=this;let o="",i=!1;return s;function s(E){return(E===72||E===104)&&B21.call(l,l.previous)&&!Ad0(l.events)?(a.enter("literalAutolink"),a.enter("literalAutolinkHttp"),o+=String.fromCodePoint(E),a.consume(E),u):n(E)}function u(E){if(n4(E)&&o.length<5)return o+=String.fromCodePoint(E),a.consume(E),u;if(E===58){const v=o.toLowerCase();if(v==="http"||v==="https")return a.consume(E),A}return n(E)}function A(E){return E===47?(a.consume(E),i?p:(i=!0,A)):n(E)}function p(E){return E===null||Ud(E)||V8(E)||Ur(E)||zd(E)?n(E):a.attempt($21,a.attempt(k21,g),n)(E)}function g(E){return a.exit("literalAutolinkHttp"),a.exit("literalAutolink"),t(E)}}function Ed2(a,t,n){let l=0;return o;function o(s){return(s===87||s===119)&&l<3?(l++,a.consume(s),o):s===46&&l===3?(a.consume(s),i):n(s)}function i(s){return s===null?n(s):t(s)}}function Vd2(a,t,n){let l,o,i;return s;function s(p){return p===46||p===95?a.check(D21,A,u)(p):p===null||V8(p)||Ur(p)||p!==45&&zd(p)?A(p):(i=!0,a.consume(p),s)}function u(p){return p===95?l=!0:(o=l,l=void 0),a.consume(p),s}function A(p){return o||l||!i?n(p):t(p)}}function Md2(a,t){let n=0,l=0;return o;function o(s){return s===40?(n++,a.consume(s),o):s===41&&l<n?i(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?a.check(D21,t,i)(s):s===null||V8(s)||Ur(s)?t(s):(a.consume(s),o)}function i(s){return s===41&&l++,a.consume(s),o}}function vd2(a,t,n){return l;function l(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(a.consume(u),l):u===38?(a.consume(u),i):u===93?(a.consume(u),o):u===60||u===null||V8(u)||Ur(u)?t(u):n(u)}function o(u){return u===null||u===40||u===91||V8(u)||Ur(u)?t(u):l(u)}function i(u){return n4(u)?s(u):n(u)}function s(u){return u===59?(a.consume(u),l):n4(u)?(a.consume(u),s):n(u)}}function Ld2(a,t,n){return l;function l(i){return a.consume(i),o}function o(i){return T6(i)?n(i):t(i)}}function _21(a){return a===null||a===40||a===42||a===95||a===91||a===93||a===126||V8(a)}function B21(a){return!n4(a)}function U21(a){return!(a===47||dd0(a))}function dd0(a){return a===43||a===45||a===46||a===95||T6(a)}function Ad0(a){let t=a.length,n=!1;for(;t--;){const l=a[t][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){n=!0;break}if(l._gfmAutolinkLiteralWalkedInto){n=!1;break}}return a.length>0&&!n&&(a[a.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const wd2={tokenize:xd2,partial:!0};function yd2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Id2,continuation:{tokenize:Sd2},exit:Rd2}},text:{91:{name:"gfmFootnoteCall",tokenize:Cd2},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Fd2,resolveTo:bd2}}}}function Fd2(a,t,n){const l=this;let o=l.events.length;const i=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let s;for(;o--;){const A=l.events[o][1];if(A.type==="labelImage"){s=A;break}if(A.type==="gfmFootnoteCall"||A.type==="labelLink"||A.type==="label"||A.type==="image"||A.type==="link")break}return u;function u(A){if(!s||!s._balanced)return n(A);const p=et(l.sliceSerialize({start:s.end,end:l.now()}));return p.codePointAt(0)!==94||!i.includes(p.slice(1))?n(A):(a.enter("gfmFootnoteCallLabelMarker"),a.consume(A),a.exit("gfmFootnoteCallLabelMarker"),t(A))}}function bd2(a,t){let n=a.length;for(;n--;)if(a[n][1].type==="labelImage"&&a[n][0]==="enter"){a[n][1];break}a[n+1][1].type="data",a[n+3][1].type="gfmFootnoteCallLabelMarker";const l={type:"gfmFootnoteCall",start:Object.assign({},a[n+3][1].start),end:Object.assign({},a[a.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},a[n+3][1].end),end:Object.assign({},a[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},a[a.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},u=[a[n+1],a[n+2],["enter",l,t],a[n+3],a[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t],a[a.length-2],a[a.length-1],["exit",l,t]];return a.splice(n,a.length-n+1,...u),a}function Cd2(a,t,n){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let i=0,s;return u;function u(E){return a.enter("gfmFootnoteCall"),a.enter("gfmFootnoteCallLabelMarker"),a.consume(E),a.exit("gfmFootnoteCallLabelMarker"),A}function A(E){return E!==94?n(E):(a.enter("gfmFootnoteCallMarker"),a.consume(E),a.exit("gfmFootnoteCallMarker"),a.enter("gfmFootnoteCallString"),a.enter("chunkString").contentType="string",p)}function p(E){if(i>999||E===93&&!s||E===null||E===91||V8(E))return n(E);if(E===93){a.exit("chunkString");const v=a.exit("gfmFootnoteCallString");return o.includes(et(l.sliceSerialize(v)))?(a.enter("gfmFootnoteCallLabelMarker"),a.consume(E),a.exit("gfmFootnoteCallLabelMarker"),a.exit("gfmFootnoteCall"),t):n(E)}return V8(E)||(s=!0),i++,a.consume(E),E===92?g:p}function g(E){return E===91||E===92||E===93?(a.consume(E),i++,p):p(E)}}function Id2(a,t,n){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let i,s=0,u;return A;function A(b){return a.enter("gfmFootnoteDefinition")._container=!0,a.enter("gfmFootnoteDefinitionLabel"),a.enter("gfmFootnoteDefinitionLabelMarker"),a.consume(b),a.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(b){return b===94?(a.enter("gfmFootnoteDefinitionMarker"),a.consume(b),a.exit("gfmFootnoteDefinitionMarker"),a.enter("gfmFootnoteDefinitionLabelString"),a.enter("chunkString").contentType="string",g):n(b)}function g(b){if(s>999||b===93&&!u||b===null||b===91||V8(b))return n(b);if(b===93){a.exit("chunkString");const S=a.exit("gfmFootnoteDefinitionLabelString");return i=et(l.sliceSerialize(S)),a.enter("gfmFootnoteDefinitionLabelMarker"),a.consume(b),a.exit("gfmFootnoteDefinitionLabelMarker"),a.exit("gfmFootnoteDefinitionLabel"),v}return V8(b)||(u=!0),s++,a.consume(b),b===92?E:g}function E(b){return b===91||b===92||b===93?(a.consume(b),s++,g):g(b)}function v(b){return b===58?(a.enter("definitionMarker"),a.consume(b),a.exit("definitionMarker"),o.includes(i)||o.push(i),K2(a,w,"gfmFootnoteDefinitionWhitespace")):n(b)}function w(b){return t(b)}}function Sd2(a,t,n){return a.check(Ri,t,a.attempt(wd2,t,n))}function Rd2(a){a.exit("gfmFootnoteDefinition")}function xd2(a,t,n){const l=this;return K2(a,o,"gfmFootnoteDefinitionIndent",5);function o(i){const s=l.events[l.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(i):n(i)}}function Td2(a){let n=(a||{}).singleTilde;const l={name:"strikethrough",tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function o(s,u){let A=-1;for(;++A<s.length;)if(s[A][0]==="enter"&&s[A][1].type==="strikethroughSequenceTemporary"&&s[A][1]._close){let p=A;for(;p--;)if(s[p][0]==="exit"&&s[p][1].type==="strikethroughSequenceTemporary"&&s[p][1]._open&&s[A][1].end.offset-s[A][1].start.offset===s[p][1].end.offset-s[p][1].start.offset){s[A][1].type="strikethroughSequence",s[p][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},s[p][1].start),end:Object.assign({},s[A][1].end)},E={type:"strikethroughText",start:Object.assign({},s[p][1].end),end:Object.assign({},s[A][1].start)},v=[["enter",g,u],["enter",s[p][1],u],["exit",s[p][1],u],["enter",E,u]],w=u.parser.constructs.insideSpan.null;w&&X4(v,v.length,0,jd(w,s.slice(p+1,A),u)),X4(v,v.length,0,[["exit",E,u],["enter",s[A][1],u],["exit",s[A][1],u],["exit",g,u]]),X4(s,p-1,A-p+3,v),A=p+v.length-2;break}}for(A=-1;++A<s.length;)s[A][1].type==="strikethroughSequenceTemporary"&&(s[A][1].type="data");return s}function i(s,u,A){const p=this.previous,g=this.events;let E=0;return v;function v(b){return p===126&&g[g.length-1][1].type!=="characterEscape"?A(b):(s.enter("strikethroughSequenceTemporary"),w(b))}function w(b){const S=m9(p);if(b===126)return E>1?A(b):(s.consume(b),E++,w);if(E<2&&!n)return A(b);const N=s.exit("strikethroughSequenceTemporary"),T=m9(b);return N._open=!T||T===2&&!!S,N._close=!S||S===2&&!!T,u(b)}}}class Nd2{constructor(){this.map=[]}add(t,n,l){$d2(this,t,n,l)}consume(t){if(this.map.sort(function(i,s){return i[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const l=[];for(;n>0;)n-=1,l.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];l.push(t.slice()),t.length=0;let o=l.pop();for(;o;){for(const i of o)t.push(i);o=l.pop()}this.map.length=0}}function $d2(a,t,n,l){let o=0;if(!(n===0&&l.length===0)){for(;o<a.map.length;){if(a.map[o][0]===t){a.map[o][1]+=n,a.map[o][2].push(...l);return}o+=1}a.map.push([t,n,l])}}function kd2(a,t){let n=!1;const l=[];for(;t<a.length;){const o=a[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&l.push(a[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(a[t-1][1].type==="tableDelimiterMarker"){const i=l.length-1;l[i]=l[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return l}function Dd2(){return{flow:{null:{name:"table",tokenize:Pd2,resolveAll:Od2}}}}function Pd2(a,t,n){const l=this;let o=0,i=0,s;return u;function u(G){let A0=l.events.length-1;for(;A0>-1;){const r0=l.events[A0][1].type;if(r0==="lineEnding"||r0==="linePrefix")A0--;else break}const l0=A0>-1?l.events[A0][1].type:null,e0=l0==="tableHead"||l0==="tableRow"?W:A;return e0===W&&l.parser.lazy[l.now().line]?n(G):e0(G)}function A(G){return a.enter("tableHead"),a.enter("tableRow"),p(G)}function p(G){return G===124||(s=!0,i+=1),g(G)}function g(G){return G===null?n(G):X1(G)?i>1?(i=0,l.interrupt=!0,a.exit("tableRow"),a.enter("lineEnding"),a.consume(G),a.exit("lineEnding"),w):n(G):O2(G)?K2(a,g,"whitespace")(G):(i+=1,s&&(s=!1,o+=1),G===124?(a.enter("tableCellDivider"),a.consume(G),a.exit("tableCellDivider"),s=!0,g):(a.enter("data"),E(G)))}function E(G){return G===null||G===124||V8(G)?(a.exit("data"),g(G)):(a.consume(G),G===92?v:E)}function v(G){return G===92||G===124?(a.consume(G),E):E(G)}function w(G){return l.interrupt=!1,l.parser.lazy[l.now().line]?n(G):(a.enter("tableDelimiterRow"),s=!1,O2(G)?K2(a,b,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):b(G))}function b(G){return G===45||G===58?N(G):G===124?(s=!0,a.enter("tableCellDivider"),a.consume(G),a.exit("tableCellDivider"),S):X(G)}function S(G){return O2(G)?K2(a,N,"whitespace")(G):N(G)}function N(G){return G===58?(i+=1,s=!0,a.enter("tableDelimiterMarker"),a.consume(G),a.exit("tableDelimiterMarker"),T):G===45?(i+=1,T(G)):G===null||X1(G)?j(G):X(G)}function T(G){return G===45?(a.enter("tableDelimiterFiller"),_(G)):X(G)}function _(G){return G===45?(a.consume(G),_):G===58?(s=!0,a.exit("tableDelimiterFiller"),a.enter("tableDelimiterMarker"),a.consume(G),a.exit("tableDelimiterMarker"),B):(a.exit("tableDelimiterFiller"),B(G))}function B(G){return O2(G)?K2(a,j,"whitespace")(G):j(G)}function j(G){return G===124?b(G):G===null||X1(G)?!s||o!==i?X(G):(a.exit("tableDelimiterRow"),a.exit("tableHead"),t(G)):X(G)}function X(G){return n(G)}function W(G){return a.enter("tableRow"),Q(G)}function Q(G){return G===124?(a.enter("tableCellDivider"),a.consume(G),a.exit("tableCellDivider"),Q):G===null||X1(G)?(a.exit("tableRow"),t(G)):O2(G)?K2(a,Q,"whitespace")(G):(a.enter("data"),J(G))}function J(G){return G===null||G===124||V8(G)?(a.exit("data"),Q(G)):(a.consume(G),G===92?h0:J)}function h0(G){return G===92||G===124?(a.consume(G),J):J(G)}}function Od2(a,t){let n=-1,l=!0,o=0,i=[0,0,0,0],s=[0,0,0,0],u=!1,A=0,p,g,E;const v=new Nd2;for(;++n<a.length;){const w=a[n],b=w[1];w[0]==="enter"?b.type==="tableHead"?(u=!1,A!==0&&(z21(v,t,A,p,g),g=void 0,A=0),p={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},v.add(n,0,[["enter",p,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(l=!0,E=void 0,i=[0,0,0,0],s=[0,n+1,0,0],u&&(u=!1,g={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},v.add(n,0,[["enter",g,t]])),o=b.type==="tableDelimiterRow"?2:g?3:1):o&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(l=!1,s[2]===0&&(i[1]!==0&&(s[0]=s[1],E=hA(v,t,i,o,void 0,E),i=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(l?l=!1:(i[1]!==0&&(s[0]=s[1],E=hA(v,t,i,o,void 0,E)),i=s,s=[i[1],n,0,0])):b.type==="tableHead"?(u=!0,A=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(A=n,i[1]!==0?(s[0]=s[1],E=hA(v,t,i,o,n,E)):s[1]!==0&&(E=hA(v,t,s,o,n,E)),o=0):o&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(A!==0&&z21(v,t,A,p,g),v.consume(t.events),n=-1;++n<t.events.length;){const w=t.events[n];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=kd2(t.events,n))}return a}function hA(a,t,n,l,o,i){const s=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(i.end=Object.assign({},E9(t.events,n[0])),a.add(n[0],0,[["exit",i,t]]));const A=E9(t.events,n[1]);if(i={type:s,start:Object.assign({},A),end:Object.assign({},A)},a.add(n[1],0,[["enter",i,t]]),n[2]!==0){const p=E9(t.events,n[2]),g=E9(t.events,n[3]),E={type:u,start:Object.assign({},p),end:Object.assign({},g)};if(a.add(n[2],0,[["enter",E,t]]),l!==2){const v=t.events[n[2]],w=t.events[n[3]];if(v[1].end=Object.assign({},w[1].end),v[1].type="chunkText",v[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,S=n[3]-n[2]-1;a.add(b,S,[])}}a.add(n[3]+1,0,[["exit",E,t]])}return o!==void 0&&(i.end=Object.assign({},E9(t.events,o)),a.add(o,0,[["exit",i,t]]),i=void 0),i}function z21(a,t,n,l,o){const i=[],s=E9(t.events,n);o&&(o.end=Object.assign({},s),i.push(["exit",o,t])),l.end=Object.assign({},s),i.push(["exit",l,t]),a.add(n+1,0,i)}function E9(a,t){const n=a[t],l=n[0]==="enter"?"start":"end";return n[1][l]}const _d2={name:"tasklistCheck",tokenize:Ud2};function Bd2(){return{text:{91:_d2}}}function Ud2(a,t,n){const l=this;return o;function o(A){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?n(A):(a.enter("taskListCheck"),a.enter("taskListCheckMarker"),a.consume(A),a.exit("taskListCheckMarker"),i)}function i(A){return V8(A)?(a.enter("taskListCheckValueUnchecked"),a.consume(A),a.exit("taskListCheckValueUnchecked"),s):A===88||A===120?(a.enter("taskListCheckValueChecked"),a.consume(A),a.exit("taskListCheckValueChecked"),s):n(A)}function s(A){return A===93?(a.enter("taskListCheckMarker"),a.consume(A),a.exit("taskListCheckMarker"),a.exit("taskListCheck"),u):n(A)}function u(A){return X1(A)?t(A):O2(A)?a.check({tokenize:zd2},t,n)(A):n(A)}}function zd2(a,t,n){return K2(a,l,"whitespace");function l(o){return o===null?n(o):t(o)}}function jd2(a){return i01([fd2(),yd2(),Td2(a),Dd2(),Bd2()])}const qd2={};function Wd2(a){const t=this,n=a||qd2,l=t.data(),o=l.micromarkExtensions||(l.micromarkExtensions=[]),i=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),s=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);o.push(jd2(n)),i.push(hd2()),s.push(dd2(n))}const Gd2=Xu0("relative flex w-full flex-col gap-3",{variants:{variant:{received:"items-start",sent:"items-end"},layout:{user:"",ai:"w-full max-w-full items-center"},isLastInGroup:{true:"",false:""}},defaultVariants:{variant:"received",layout:"user"}}),pd0=e.forwardRef(({settings:a,className:t,variant:n,isLastInGroup:l,isFirstInGroup:o,sentAt:i,layout:s,children:u,testId:A="",userName:p,...g},E)=>k.jsxs("div",{"data-testid":n=="received"?`chat-message-${A} incoming-message-${A}`:`chat-message-${A} outgoing-message-${A}`,children:[n&&o&&Kd2({variant:n,settings:a,userName:p}),k.jsx("div",{className:W2(Gd2({variant:n,layout:s,isLastInGroup:l,className:t}),a?.avatar?"pl-6":""),ref:E,...g,children:u})]}));pd0.displayName="Message";const Yd2=Xu0("p-4",{variants:{variant:{received:"message-received",sent:"message-send"},layout:{default:"",ai:"message-ai"},isLoading:{true:"animate-pulse bg-gray-200",false:""}},defaultVariants:{variant:"received",layout:"default"}}),Xi=e.forwardRef(({className:a,variant:t,layout:n,isLoading:l=!1,children:o,...i},s)=>k.jsx("div",{className:W2(Yd2({variant:t,layout:n,isLoading:l,className:a}),"overflow-x-auto break-words"),ref:s,...i,children:o}));Xi.displayName="MessageBubble";const Kd2=({variant:a,settings:t,userName:n})=>a!=="received"?null:k.jsxs("div",{className:"mb-1 flex items-center justify-start space-x-1",children:[t?.avatar&&k.jsx("img",{width:48,height:48,className:"mt-1 h-5 w-5 rounded-full",src:t.avatar,alt:"Avatar"}),n&&k.jsx("span",{className:"font-brand text-[11.2px] font-bold leading-[16.8px] text-primary",children:n})]}),Xd2=({block:a,variant:t,layout:n,isLoading:l})=>k.jsx(Xi,{variant:t,layout:n,isLoading:l,className:"prose max-w-[95%] break-words prose-a:text-blue-600",children:k.jsx(Q01,{rehypePlugins:[d21],remarkPlugins:[Uu2,Wd2],components:{a:Qd2},skipHtml:!0,children:a.content})});function Qd2(a){return k.jsx("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",children:a.children})}const j21=e.forwardRef(({className:a,...t},n)=>k.jsx("div",{ref:n,className:W2("rounded-lg border bg-card text-card-foreground shadow-sm",a),...t}));j21.displayName="Card";const q21=e.forwardRef(({className:a,...t},n)=>k.jsx("div",{ref:n,className:W2("flex flex-col space-y-1.5 p-6",a),...t}));q21.displayName="CardHeader";const W21=e.forwardRef(({className:a,...t},n)=>k.jsx("h3",{ref:n,className:W2("text-2xl font-semibold leading-none tracking-tight",a),...t}));W21.displayName="CardTitle";const G21=e.forwardRef(({className:a,...t},n)=>k.jsx("p",{ref:n,className:W2("text-sm text-muted-foreground",a),...t}));G21.displayName="CardDescription";const Y21=e.forwardRef(({className:a,...t},n)=>k.jsx("div",{ref:n,className:W2("p-6 pt-0",a),...t}));Y21.displayName="CardContent";const K21=e.forwardRef(({className:a,...t},n)=>k.jsx("div",{ref:n,className:W2("flex items-center p-6 pt-0",a),...t}));K21.displayName="CardFooter";const Jd2=({block:a})=>{const{t}=re("common");return a.sources.some(l=>l.document_metadata&&l.document_metadata.card)?k.jsx("div",{className:"flex w-full max-w-full gap-5 overflow-x-auto",children:a.sources.map(l=>k.jsxs(j21,{"data-url":l.source_link,className:"min-w-[200px] max-w-72 overflow-hidden",children:[k.jsx(q21,{className:"h-full max-h-[120px] p-0",children:k.jsx("img",{className:"h-full w-full object-cover transition duration-300 ease-in-out group-hover:scale-105",src:l.document_metadata.card.image,alt:l.document_metadata.card.title})}),k.jsxs(Y21,{className:"p-4",children:[k.jsx(W21,{className:"text-md line-clamp-1 font-bold",children:l.document_metadata.card.title}),l.document_metadata.card.description&&k.jsx(G21,{className:"line-clamp-2 text-sm",children:l.document_metadata.card.description})]}),k.jsx(K21,{children:k.jsx("a",{href:l.document_metadata.card.url,target:"_blank",children:k.jsx(R6,{variant:"outline",children:l.document_metadata.card.call_to_action_text??t("sourceCallToActionLabel")})})})]},l.id))}):k.jsx(k.Fragment,{})},Qi={container:"_container_61f61_1",image:"_image_61f61_2",fallback:"_fallback_61f61_3",fallbackIcon:"_fallbackIcon_61f61_29",fallbackText:"_fallbackText_61f61_33"},eA2=({block:a})=>{const{t}=re(),[n,l]=e.useState(!1),o=()=>{l(!0)};return k.jsx("div",{className:Qi.container,children:n?k.jsxs("div",{className:Qi.fallback,"data-testid":"image-fallback",children:[k.jsx(Ph,{size:32,className:Qi.fallbackIcon}),k.jsx("span",{className:Qi.fallbackText,"data-testid":"fallback-text",children:t("upload:imageLoadError")})]}):k.jsx("img",{src:a.url,alt:a.filename,className:Qi.image,onError:o,"data-testid":"image-element"})})},X21={markdown:Xd2,text:({block:a,variant:t,layout:n,isLoading:l})=>k.jsx(Xi,{variant:t,layout:n,isLoading:l,className:"prose max-w-[60%]",children:k.jsx("p",{children:a.text})}),button:E0.Fragment,button_group:A72,source_group:Jd2,image_reference:eA2},aA2=a=>a in X21,Q21=(a,t,n)=>{const l=X21[a.type];return l!==void 0?E0.createElement(l,{key:`block-${a.id}`,variant:t,layout:n,block:a}):(console.warn(`No component found for block type: ${a.type}`),null)},tA2=150,nA2=a=>{const[t,n]=e.useState(!1),l=e.useCallback(()=>{if(!a)return;const{scrollTop:i,scrollHeight:s,clientHeight:u}=a,A=s-i-u;n(A>tA2)},[a]);return e.useEffect(()=>{if(a)return l(),a.addEventListener("scroll",l),()=>{a.removeEventListener("scroll",l)}},[a,l]),{scrollToBottom:()=>{a?.scrollTo({top:a.scrollHeight,behavior:"smooth"})},isScrolledUp:t}},lA2=()=>{const{t:a}=re(),{state:t}=G8(),n=e.useMemo(()=>{const o=s=>s.type==="text"||s.type==="markdown";return t.messages.filter(s=>!vr(s,t.userId)&&s.type==="message"&&s.blocks.some(o)).slice(-1)[0]?.blocks.filter(o)??[]},[t.messages,t.userId]),l=`${t.settings?.title??a("common:bot")} ${a("header:typing")}`;return k.jsx("div",{className:"sr-only","aria-live":"polite",children:t.isTyping?l:n.map(o=>Q21(o,"sent","default"))})},rA2=({messages:a})=>{const{state:t}=G8(),{userId:n,isTyping:l,hasSentMessageThisSession:o}=t,{hasUploadState:i}=ei(),s=e.useMemo(()=>{const A=[...oA2(a)],p=a.at(-1);return(p?vr(p,n):!1)&&l&&A.push({id:"typing-indicator",type:"typing-indicator"}),i&&A.push({id:"upload-bubble",type:"upload-bubble"}),iA2(A,n,o||i)},[a,n,l,o,i]),u=e.useMemo(()=>s.length,[s.length]);return{chatGroups:s,groupCount:u}},oA2=a=>a.map((t,n)=>{const l=a[n+1],o=a[n-1];return{id:`message-${t.id}-${n}`,type:"message",message:t,index:n,isFirstInGroup:o?t.sender_id!==o.sender_id:!0,isLastInGroup:l?t.sender_id!==l.sender_id:!0}}),cA2=(a,t)=>a.type==="message"&&vr(a.message,t)||a.type==="upload-bubble",iA2=(a,t,n)=>{const l=[];let o=[];for(const i of a)cA2(i,t)&&o.length>0?(l.push({id:`group-${l.length}`,items:o,showPlaceholder:!1}),o=[i]):o.push(i);return o.length>0&&l.push({id:`group-${l.length}`,items:o,showPlaceholder:n}),l};function sA2({message:a,handleActionEvent:t,close:n}){return k.jsxs(bd,{className:"sm:max-w-[425px]",children:[k.jsxs(_u0,{children:[k.jsx(Bu0,{children:"Thank you for your response!"}),k.jsx(xQ0,{children:"Can you tell us what went wrong?"})]}),k.jsx(hA2,{message:a,handleActionEvent:t,close:n})]})}function mA2({message:a,handleActionEvent:t,close:n}){const{t:l}=re(["common","feedback"]),[o,i]=e.useState(""),[s,u]=e.useState(!1),[A,p]=e.useState(!1),g=E=>{E.preventDefault(),u(!0),t("user-feedback-message",{id:a.id,value:o},"input"),i(""),p(!0),setTimeout(()=>{u(!1),setTimeout(n,1500)},1500)};return k.jsxs(a9,{className:"min-h-40 overflow-hidden rounded-t-[20px] border-primary bg-primary text-primary-foreground",children:[k.jsx(z7,{children:k.jsx(cl.div,{layoutId:"underline",children:k.jsx(Sd,{className:"",children:A?k.jsx(MJ0,{title:l("feedback:modalSubmittedTitle"),description:l("feedback:modalSubmittedDescription")}):k.jsxs("div",{className:"flex items-center justify-between",children:[k.jsx("div",{className:"relative w-12"}),k.jsxs("div",{className:"text-center",children:[k.jsx(Or,{className:"text-center",children:l("feedback:modalTitle")}),k.jsx(Rd,{className:"text-primary-foreground/80",children:l("feedback:modalDescription")})]}),k.jsx(Ku0,{className:"w-12",asChild:!0,children:k.jsx(R6,{variant:"link",onClick:n,className:"text-right text-primary-foreground",children:k.jsx(tl,{weight:"regular",size:20})})})]})})})}),A?k.jsx(k.Fragment,{}):k.jsxs(cl.form,{onSubmit:g,className:"mt-auto flex flex-col gap-2 p-4 pt-2",children:[k.jsx(kd,{className:"border border-white text-base text-white shadow-none ring-0 placeholder:text-white focus-visible:ring-0 widget:text-sm",placeholder:l("feedback:modalPlaceholder"),"data-testid":"feedback-form-textarea",value:o,rows:4,disabled:s,onChange:E=>i(E.target.value)}),k.jsx(R6,{disabled:s||!o,type:"submit",variant:"secondary","data-testid":"feedback-form-button",children:l(s?"sending":"send")})]})]})}const uA2=({message:a,handleActionEvent:t})=>{const{t:n}=re("common"),{openModal:l,closeModal:o}=t9(),i=Hd("(min-width: 768px)"),{state:s}=G8(),u=A=>{A.preventDefault(),t("feedback-pressed",{id:a.id,value:"negative"}),i&&!s.inShadowDom?l(sl.Dialog,k.jsx(sA2,{message:a,handleActionEvent:t,close:o})):l(sl.Drawer,k.jsx(mA2,{message:a,handleActionEvent:t,close:o}))};return k.jsxs("div",{className:"flex justify-start space-x-3",children:[k.jsxs("button",{className:`flex h-auto items-center space-x-1 p-0 text-xs underline-offset-4 hover:underline disabled:pointer-events-none disabled:opacity-50 ${a.user_feedback_value==="positive"?"text-green-500":"text-primary"}`,"data-testid":`thumbs-up thumbs-feedback-sentiment-${a.user_feedback_value==="positive"?a.user_feedback_value:"none"}`,onClick:A=>{A.preventDefault(),t("feedback-pressed",{id:a.id,value:"positive"})},children:[k.jsx(KG0,{"aria-hidden":!0,focusable:"false",weight:a.user_feedback_value==="positive"?"fill":"regular",size:20})," ",k.jsx("span",{children:n("feedback:thumbsUp")})]}),k.jsxs("button",{className:`flex h-auto items-center space-x-1 p-0 text-xs underline-offset-4 hover:underline disabled:pointer-events-none disabled:opacity-50 ${a.user_feedback_value==="negative"?"text-red-500":"text-primary"}`,"data-testid":`thumbs-down thumbs-feedback-sentiment-${a.user_feedback_value==="negative"?a.user_feedback_value:"none"}`,onClick:u,children:[k.jsx(YG0,{"aria-hidden":!0,focusable:"false",weight:a.user_feedback_value==="negative"?"fill":"regular",size:20})," ",k.jsx("span",{children:n("feedback:thumbsDown")})]})]})},hA2=({message:a,handleActionEvent:t,close:n,className:l})=>{const[o,i]=e.useState(""),[s,u]=e.useState(!1),A=p=>{p.preventDefault(),u(!0),t("user-feedback-message",{id:a.id,value:o},"input"),i(""),setTimeout(()=>{u(!1),n()},500)};return k.jsxs("form",{"data-testid":"feedback-form",onSubmit:A,className:W2("mt-auto flex flex-col gap-2",l),children:[k.jsx(kd,{className:"border-0 bg-white text-base text-black shadow-none ring-0 focus-visible:ring-0 widget:text-sm",placeholder:"Share your thoughts here..",value:o,disabled:s,"data-testid":"feedback-form-textarea",onChange:p=>i(p.target.value)}),k.jsx(R6,{disabled:s||!o,type:"submit",variant:"secondary","data-testid":"feedback-form-button",children:"Send"})]})},dA2=({message:a,index:t,isLastInGroup:n,isFirstInGroup:l,...o})=>{const{state:i,handleActionEvent:s}=G8(),{messages:u,userId:A}=i,p=t===u.length-1,g=A?vr(a,A):!1,E=g?"sent":"received",v=g?"default":"ai";return k.jsx("div",{...o,children:k.jsxs(pd0,{settings:i.settings,testId:t.toString(),variant:E,isFirstInGroup:l,isLastInGroup:n,sentAt:p?a.sent_at:null,userName:a.sender_name?a.sender_name:i.settings?.digitalEmployeeName,className:"",children:[a.blocks.map(w=>Q21(w,E,v)),a.request_user_feedback&&!g&&k.jsx(uA2,{message:a,handleActionEvent:s})]})})},AA2=()=>k.jsxs("div",{className:"flex items-center gap-1",children:[k.jsx("div",{className:"bubble1 h-2 w-2 rounded-full"}),k.jsx("div",{className:"bubble2 h-2 w-2 rounded-full"}),k.jsx("div",{className:"bubble3 h-2 w-2 rounded-full"})]}),pA2=()=>{const{state:a}=G8();return k.jsx(pd0,{settings:a.settings,userName:a.settings?.digitalEmployeeName,testId:"loading",variant:"received",isFirstInGroup:!0,isLastInGroup:!1,sentAt:null,className:"",children:k.jsx(Xi,{variant:"received",layout:"ai",className:"prose max-w-[60%]",children:k.jsx(AA2,{})})},"message-loading")},fA2={spinner:"_spinner_mxybw_1"},J21=({size:a=20,className:t=""})=>k.jsx("div",{className:`${fA2.spinner} ${t}`,style:{width:a,height:a},"aria-hidden":"true"}),Yt={container:"_container_11d3g_1",bubble:"_bubble_11d3g_7",error:"_error_11d3g_11",uploadingPlaceholder:"_uploadingPlaceholder_11d3g_15",spinner:"_spinner_11d3g_22",uploadingText:"_uploadingText_11d3g_26",content:"_content_11d3g_30",errorContainer:"_errorContainer_11d3g_36",errorIcon:"_errorIcon_11d3g_42",errorText:"_errorText_11d3g_46"},ZA2=()=>{const{t:a}=re(),{error:t}=ei();return k.jsx("div",{className:Yt.container,children:k.jsx(Xi,{variant:"sent",layout:"default",className:uH(Yt.bubble,{[Yt.error]:!!t}),children:k.jsx("div",{className:Yt.content,children:t?k.jsxs("div",{className:Yt.errorContainer,"data-testid":"upload-error",children:[k.jsx(Jh,{size:20,className:Yt.errorIcon}),k.jsx("span",{className:Yt.errorText,children:t})]}):k.jsxs("div",{className:Yt.uploadingPlaceholder,"data-testid":"upload-loading",children:[k.jsx(J21,{size:18,className:Yt.spinner}),k.jsx("span",{className:Yt.uploadingText,children:a("upload:uploadingText")})]})})})})},HA2=({item:a})=>{switch(a.type){case"message":return k.jsx(dA2,{message:a.message,index:a.index,isLastInGroup:a.isLastInGroup,isFirstInGroup:a.isFirstInGroup});case"typing-indicator":return k.jsx(pA2,{});case"upload-bubble":return k.jsx(ZA2,{});default:return null}},gA2=({group:a,placeholderMinHeight:t})=>k.jsx("div",{className:"flex flex-col gap-3",style:{minHeight:a.showPlaceholder?t:void 0},children:a.items.map(n=>k.jsx(HA2,{item:n},n.id))},a.id),EA2=({disclaimer:a})=>k.jsx("div",{"data-testid":"chat-list-disclaimer",className:"!m-0 max-w-none text-center text-[10px] leading-[14px] text-gray-500",children:k.jsx(Q01,{rehypePlugins:[d21],skipHtml:!0,components:{a:VA2},children:a})}),VA2=({href:a="",children:t,...n})=>k.jsx("a",{href:a,className:"underline hover:no-underline",target:"_blank",rel:"noopener noreferrer",...n,children:t});function MA2(a){return a?a.map(t=>({...t,blocks:t.blocks?t.blocks.filter(n=>aA2(n.type)):[]})):[]}function vA2(a){return a?a.filter(t=>t.blocks&&t.blocks.length>0):[]}const LA2=16;function wA2(){const a=e.useRef(null),{state:t,endDivRef:n,scrollableDivRef:l}=G8(),{scrollToBottom:o,isScrolledUp:i}=nA2(l.current),[s,u]=e.useState(!1),A=e.useMemo(()=>{const b=MA2(t.messages);return vA2(b)},[t.messages]),{chatGroups:p,groupCount:g}=rA2({messages:A});e.useEffect(()=>{p.some(S=>S.showPlaceholder)&&l.current&&setTimeout(()=>{l.current?.scrollTo({top:l.current.scrollHeight,behavior:"smooth"})},100)},[g,l]),e.useEffect(()=>{!s&&t.messages.length>0&&(u(!0),setTimeout(()=>{l.current?.scrollTo({top:l.current?.scrollHeight})},0))},[t.messages,s]);const E=l.current?.clientHeight||0,v=LA2+(a.current?.clientHeight||0),w=`${E-v}px`;return k.jsxs("div",{className:"relative h-full w-full",children:[k.jsx(lA2,{}),k.jsx("div",{className:"h-full w-full overflow-y-auto overscroll-contain",ref:l,children:k.jsxs("div",{className:"flex h-[calc(100%+1px)] flex-col",children:[k.jsxs("div",{className:"flex grow flex-col gap-3 px-4 py-2",children:[t.settings?.disclaimer&&k.jsx(EA2,{disclaimer:t.settings.disclaimer}),p.map(b=>k.jsx(gA2,{group:b,placeholderMinHeight:w},b.id))]}),t.settings?.showFreedayBranding&&k.jsx(Qu0,{ref:a,name:"Freeday",site:"https://freeday.ai",className:"shrink-0 pb-4 pt-8"})]})}),k.jsx("div",{ref:n}),i&&k.jsx(R6,{variant:"outline",size:"icon",onClick:o,className:"absolute bottom-2 left-1/2 -translate-x-1/2 border border-border p-1",children:k.jsx(yh,{size:18})})]})}const yA2=()=>{const{state:a}=G8(),{t}=re(),[n,l]=e.useState(!0),[o,i]=e.useState(!1);e.useEffect(()=>{const u=setTimeout(()=>{i(!0)},300);return()=>clearTimeout(u)},[]),e.useEffect(()=>{if(!n)return;const u=A=>{!o||A.target.closest('[data-testid="chat-button"]')||l(!1)};return window.addEventListener("click",u),window.addEventListener("touchstart",u),()=>{window.removeEventListener("click",u),window.removeEventListener("touchstart",u)}},[o,n]);const s=()=>{l(!1)};return a.settings?.bannerTitle&&n?k.jsx("div",{className:"pb-7.5 absolute left-0 right-0 top-0 max-h-[500px] -translate-y-full gap-4 overflow-hidden rounded-t-[30px] bg-white transition-all duration-300 ease-in-out","data-testid":"banner",children:k.jsxs("div",{className:"flex h-full w-full flex-col justify-center rounded-t-[30px] bg-primary/10 p-6",children:[k.jsx("button",{onClick:s,className:"absolute right-8 top-8 flex -translate-y-1/2 translate-x-1/2 cursor-pointer rounded p-1 hover:bg-primary/10 focus:outline-none focus:ring-2 focus:ring-primary","aria-label":t("common:closeNotification"),"data-testid":"close-button",children:k.jsx(tl,{weight:"regular",size:20,className:"text-primary"})}),k.jsx("p",{className:"text-sm font-semibold text-primary",children:a.settings?.bannerTitle}),a.settings?.bannerMessage&&k.jsx("p",{className:"whitespace-pre-line text-sm",children:a.settings?.bannerMessage})]})}):null},e81=["image/jpeg","image/jpg","image/png","image/webp"],FA2=async(a,t=100)=>{const n=t*1024;if(a.size<=n)return a;let l=.9,o=a;for(;o.size>n&&l>.1;)o=await RA2(a,l),l-=.1;return o},bA2=(a,t,n=2048)=>a<=n&&t<=n?{width:a,height:t}:a>t?{width:n,height:t/a*n}:{width:a/t*n,height:n},CA2=a=>new Promise((t,n)=>{const l=new Image;l.onload=()=>t(l),l.onerror=()=>n(new Error("Failed to load image")),l.src=a}),IA2=a=>new Promise((t,n)=>{const l=new FileReader;l.onload=o=>t(o.target?.result),l.onerror=()=>n(new Error("Failed to read file")),l.readAsDataURL(a)}),SA2=(a,t,n,l)=>new Promise((o,i)=>{a.toBlob(s=>{if(!s){i(new Error("Failed to compress image"));return}const u=new File([s],t,{type:n,lastModified:Date.now()});o(u)},n,l)}),RA2=async(a,t)=>{const n=await IA2(a),l=await CA2(n),o=document.createElement("canvas"),i=bA2(l.width,l.height);o.width=i.width,o.height=i.height;const s=o.getContext("2d");if(!s)throw new Error("Failed to get canvas context");return s.drawImage(l,0,0,i.width,i.height),SA2(o,a.name,a.type,t)},a81=50,xA2=()=>{const{t:a}=re(),{setError:t,setIsLoading:n,clearUploadedFile:l}=ei(),{state:o,sendNewMessage:i}=G8(),s=async p=>{if(!o.settings?.channelId){u(a("upload:processingError"));return}t(null);const g=A(p);if(g){u(g),l();return}try{n(!0);const E=await FA2(p,100),w=await new mH(o.settings.channelId,new Ru(fH())).uploadAttachment(E);i({text:"",image:{url:w.url,filename:w.filename}})}catch(E){console.error("Error processing image:",E),u(a("upload:processingError"))}finally{n(!1)}},u=p=>{t(p),l()},A=p=>{if(!e81.includes(p.type))return a("upload:invalidFileType");const g=a81*1024*1024;if(p.size>g)return a("upload:fileSizeExceeded",{maxSize:a81})};return{uploadFile:s}},TA2=()=>{const{t:a}=re(),{fileInputRef:t,isLoading:n}=ei(),{uploadFile:l}=xA2(),o=()=>{t.current?.click()},i=s=>{const u=s.target.files?.[0];u&&l(u)};return k.jsxs(k.Fragment,{children:[k.jsx("input",{ref:t,type:"file",accept:e81.join(","),style:{display:"none"},onChange:i,"aria-label":a("upload:uploadImageButton"),"data-testid":"upload-file-input"}),k.jsx(Vi,{tooltipText:a("upload:uploadImageButton"),rounded:!0,size:"icon",onClick:o,disabled:n,"data-testid":"upload-attachment-button",children:n?k.jsx(J21,{size:18}):k.jsx(Bh,{size:20})})]})},NA2=({placeholder:a,isTyping:t,onSendMessage:n})=>{const{t:l}=re(),{isLoading:o}=ei(),{state:i}=G8(),[s,u]=e.useState(""),A=e.useRef(null),p=s.trim().length===0||t||o,g=b=>{u(b.target.value)},E=b=>{b?.preventDefault(),!p&&(n(s),u(""))},v=b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),E(b))},w=()=>W2("absolute right-2 top-1/2 flex h-9 w-9 -translate-y-1/2 transform items-center justify-center rounded p-0 transition-all duration-0 ease-in-out",p?"text-gray-300":"text-primary");return k.jsx("footer",{className:"relative bottom-0 left-0 right-0 border-t border-gray-200 bg-white",children:k.jsxs("div",{className:"p-4",children:[k.jsx(yA2,{}),k.jsx("form",{onSubmit:E,children:k.jsxs("div",{className:"flex w-full max-w-full items-center space-x-2",children:[i.settings?.enableAttachments&&k.jsx(TA2,{}),k.jsxs("div",{className:"relative w-full flex-1",ref:A,children:[k.jsxs("div",{className:"invisible max-h-[164px] min-h-[44px] overflow-y-hidden whitespace-pre-wrap break-words px-4 py-2",children:[s||a,"|"]}),k.jsx("label",{htmlFor:"chat-input-textarea",className:"sr-only",children:a}),k.jsx("textarea",{id:"chat-input-textarea",className:"absolute inset-0 touch-none resize-none rounded-3xl border border-gray-300 pb-[0px] pl-[16px] pr-[48px] pt-[10px] text-[16px] leading-[20px] placeholder:text-gray-500 focus:outline-none focus:ring-1 focus:ring-primary",placeholder:a,wrap:"hard","data-testid":"text-input-field",value:s,onKeyDown:v,onChange:g,rows:1}),t?k.jsx("div",{"data-testid":"stop-button",className:w(),children:k.jsx(Kh,{weight:"bold",className:"h-6 w-6"})}):k.jsx("button",{"data-testid":"send-button",className:w(),"aria-label":l("common:send"),disabled:p,children:k.jsx(ti,{weight:"fill",className:"h-6 w-6"})})]})]})})]})})},V9={drawerContent:"_drawerContent_ndll7_1",container:"_container_ndll7_9",title:"_title_ndll7_18",buttonContainer:"_buttonContainer_ndll7_27",button:"_button_ndll7_27"},$A2=()=>{const{t:a}=re("resumeChat"),{closeModal:t}=t9(),{handleRestart:n,state:l}=G8(),o=()=>{t(),s("continue")},i=()=>{n(),t(),s("start_new")},s=u=>{Jc("conversation_resume",{action:u,conversation_id:l.conversationId??"",last_message_at:l.messages.at(-1)?.sent_at})};return k.jsx(a9,{className:V9.drawerContent,children:k.jsxs("div",{className:V9.container,children:[k.jsxs(Or,{className:V9.title,children:[a("title"),k.jsx("br",{})," ",a("subtitle")]}),k.jsxs("div",{className:V9.buttonContainer,children:[k.jsx(R6,{onClick:o,variant:"secondary",className:V9.button,"data-testid":"continue-button",children:a("continueButton")}),k.jsx(R6,{onClick:i,variant:"secondary",className:V9.button,"data-testid":"start-new-button",children:a("startNewButton")})]})]})})},kA2=()=>{const{state:a}=G8(),{openModal:t}=t9();e.useEffect(()=>{!a.hasResumedConversation&&DA2(a.messages)&&(a.hasResumedConversation=!0,setTimeout(()=>{t(sl.Drawer,k.jsx($A2,{}))},500))},[a.messages,a.hasResumedConversation,t])},DA2=a=>a.some(t=>t.blocks.some(n=>n.type==="ended")),PA2=()=>{const{t:a}=re(["common","footer"]),{sendNewMessage:t,state:n}=G8();return kA2(),k.jsxs(k.Fragment,{children:[n.settings?.theme!=="slim"&&k.jsx(N52,{}),k.jsx(d72,{position:"top-center",expand:!0,pauseWhenPageIsHidden:!0,richColors:!0}),k.jsx("main",{className:"flex-1 space-y-2 overflow-hidden bg-white",children:k.jsx(z7,{initial:!0,children:k.jsx(cl.div,{className:"h-full w-full",initial:{opacity:0,y:5},animate:{opacity:1,y:0},exit:{opacity:0,y:5},transition:{duration:.3,ease:[.42,0,0,1],delay:.4},children:k.jsx(wA2,{})})})}),k.jsx(NA2,{placeholder:a(n.settings?.newMessagePlaceholder??a("footer:newMessagePlaceholder")),isTyping:n.isTyping,onSendMessage:l=>t({text:l})})]})},OA2=a=>{const[t,n]=e.useState(null);return e.useEffect(()=>{if(!a)return;(async()=>{try{const i=await new mH(a,new Ru(fH())).fetchWidgetSettings();n(i)}catch(o){Qe(o)}})()},[a]),{widgetSettings:t}},_A2=(a=!1)=>{const[t,n]=e.useState(a),[l,o]=e.useState(!1);return e.useEffect(()=>{const i=s=>{s.type===E8.CLOSE?(n(!1),o(!0)):s.type===E8.OPEN&&(n(!0),o(!1))};return globalThis.addEventListener(E8.CLOSE,i),globalThis.addEventListener(E8.OPEN,i),()=>{globalThis.removeEventListener(E8.CLOSE,i),globalThis.removeEventListener(E8.OPEN,i)}},[]),{isWidgetOpen:t,setIsWidgetOpen:n,hideChatBarInput:l}},BA2=a=>({handleOpen:()=>{Jc("widget:opened",{start_view:a?.startView}),globalThis.dispatchEvent(new Event(E8.OPEN)),globalThis.postMessage({event:E8.START,payload:a},globalThis.location.origin)},handleOpenAndSendMessage:l=>{setTimeout(()=>{globalThis.postMessage({event:E8.START,payload:{suggestionMessage:l}},globalThis.location.origin),globalThis.dispatchEvent(new Event(E8.OPEN))},400)}}),UA2="https://cdn.jsdelivr.net/npm/@freeday-ai/webchat",zA2=()=>{e.useEffect(()=>{const a=n=>{t81(n.error)},t=n=>{t81(n.reason)};return globalThis.addEventListener("error",a),globalThis.addEventListener("unhandledrejection",t),()=>{globalThis.removeEventListener("error",a),globalThis.removeEventListener("unhandledrejection",t)}},[])},t81=a=>{a?.stack?.includes(UA2)&&Qe(a)};class jA2 extends e.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){Qe(t,"Uncaught rendering error",{componentStack:n.componentStack})}render(){return this.props.children}}function qA2(a){e.useEffect(()=>{if(!a)return;const t=document.body,n=window.scrollY,l=t.style.position,o=t.style.top,i=t.style.touchAction;return t.style.position="fixed",t.style.top=`-${n}px`,t.style.width="100%",t.style.touchAction="none",()=>{t.style.position=l,t.style.top=o,t.style.touchAction=i,window.scrollTo(0,n)}},[a])}const dA={chatWindowRenderer:"_chatWindowRenderer_shws1_1",fullScreen:"_fullScreen_shws1_23",widgetChatContainer:"_widgetChatContainer_shws1_38",buttonContainer:"_buttonContainer_shws1_44"},WA2=({threshold:a=100,enabled:t=!0})=>{const n=e.useMemo(()=>globalThis.visualViewport,[]),l=e.useMemo(()=>n?.height??0,[n]),o=e.useMemo(()=>()=>!t||!n?null:{width:n.width,height:n.height,offsetTop:n.offsetTop,offsetLeft:n.offsetLeft,scale:n.scale},[t,n]),[i,s]=e.useState(()=>o()),u=e.useMemo(()=>i&&l-i.height>a,[i,l,a]);return e.useEffect(()=>{if(!n)return;const A=()=>s(o());return n.addEventListener("resize",A),n.addEventListener("scroll",A),A(),()=>{n.removeEventListener("resize",A),n.removeEventListener("scroll",A)}},[n,o]),{viewport:i,keyboardOpen:u}},GA2=({channelId:a,metadata:t})=>{zA2();const{widgetSettings:n}=OA2(a);return!a||!n?null:k.jsx(jA2,{children:k.jsx(G51,{config:{...n,metadata:t?JSON.parse(t):void 0},inShadowDom:!0,children:k.jsx(YA2,{widgetSettings:{...n,metadata:t?JSON.parse(t):void 0}})})})},YA2=({widgetSettings:a})=>{const t=e.useRef(null),n=a.startView===_3.FULL_SCREEN,l=a.startView===_3.UNFOLDED_CHAT_VIEW,o=n||l,{isWidgetOpen:i,setIsWidgetOpen:s}=_A2(o),{handleOpen:u,handleOpenAndSendMessage:A}=BA2(a),p=Hd("(max-width: 640px)");qA2(i&&p);const{keyboardOpen:g}=WA2({enabled:i&&p});return e.useEffect(()=>{if(!o)return;s(!0);const E=requestAnimationFrame(u);return()=>cancelAnimationFrame(E)},[]),e.useEffect(()=>{g&&t.current&&t.current.scrollTo({top:t.current.scrollHeight})},[g]),k.jsxs(k.Fragment,{children:[k.jsx(z7,{children:i&&k.jsx(cl.div,{className:W2(dA.chatWindowRenderer,{[dA.fullScreen]:n}),"data-testid":"chat-window-renderer",initial:{opacity:0,y:30},animate:{opacity:1,y:0,transition:{delay:.2}},exit:{opacity:0,y:30},transition:{duration:.35,ease:[.42,0,0,1]},transformTemplate:n?(E,v)=>`translateX(-50%) ${v}`:void 0,children:k.jsx(Sr2,{children:k.jsx("div",{ref:t,className:dA.widgetChatContainer,children:k.jsx(PA2,{})})})})}),!n&&k.jsx(z7,{children:!i&&k.jsx(cl.div,{className:dA.buttonContainer,"data-testid":"button-container",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1,transition:{delay:.3}},exit:{opacity:0,scale:0},transition:{duration:.3,ease:[.42,0,0,1]},children:k.jsx(qn2,{onOpen:u,onSendMessage:A})})})]})},n81=a=>{const{channelId:t,metadata:n}=a;document.body?l81(t,n):globalThis.addEventListener("DOMContentLoaded",()=>{l81(t,n)})},l81=(a,t)=>{const n=document.createElement("div"),l=document.createElement("freeday-widget");l.setAttribute("channelId",a),t&&l.setAttribute("metadata",JSON.stringify(t)),n.appendChild(l),document.body.appendChild(n),An1("freeday-widget",GA2,["channelId","metadata"])};return window.FreedayWidget={bootstrap:n81},oZ.bootstrap=n81,Object.defineProperty(oZ,Symbol.toStringTag,{value:"Module"}),oZ})({});
|
package/dist/webchat.mjs
CHANGED
|
@@ -107426,6 +107426,7 @@ const yA2 = "https://github.com/remarkjs/react-markdown/blob/main/changelog.md",
|
|
|
107426
107426
|
id: "replace-allownode-allowedtypes-and-disallowedtypes",
|
|
107427
107427
|
to: "allowedElements"
|
|
107428
107428
|
},
|
|
107429
|
+
{ from: "className", id: "remove-classname" },
|
|
107429
107430
|
{
|
|
107430
107431
|
from: "disallowedTypes",
|
|
107431
107432
|
id: "replace-allownode-allowedtypes-and-disallowedtypes",
|
|
@@ -107462,20 +107463,8 @@ function SA2(a, t) {
|
|
|
107462
107463
|
const n = t.allowedElements, l = t.allowElement, o = t.components, i = t.disallowedElements, s = t.skipHtml, u = t.unwrapDisallowed, A = t.urlTransform || RA2;
|
|
107463
107464
|
for (const g of bA2)
|
|
107464
107465
|
Object.hasOwn(t, g.from) && ("" + g.from + (g.to ? "use `" + g.to + "` instead" : "remove it") + yA2 + g.id, void 0);
|
|
107465
|
-
return
|
|
107466
|
-
type: "element",
|
|
107467
|
-
tagName: "div",
|
|
107468
|
-
properties: { className: t.className },
|
|
107469
|
-
// Assume no doctypes.
|
|
107470
|
-
children: (
|
|
107471
|
-
/** @type {Array<ElementContent>} */
|
|
107472
|
-
a.type === "root" ? a.children : [a]
|
|
107473
|
-
)
|
|
107474
|
-
}), aZ(a, p), Wm2(a, {
|
|
107466
|
+
return aZ(a, p), Wm2(a, {
|
|
107475
107467
|
Fragment: k.Fragment,
|
|
107476
|
-
// @ts-expect-error
|
|
107477
|
-
// React components are allowed to return numbers,
|
|
107478
|
-
// but not according to the types in hast-util-to-jsx-runtime
|
|
107479
107468
|
components: o,
|
|
107480
107469
|
ignoreInvalidStyle: !0,
|
|
107481
107470
|
jsx: k.jsx,
|
|
@@ -117055,7 +117044,6 @@ const dE2 = ({
|
|
|
117055
117044
|
rehypePlugins: [n41],
|
|
117056
117045
|
remarkPlugins: [oH2, mE2],
|
|
117057
117046
|
components: { a: pE2 },
|
|
117058
|
-
className: "",
|
|
117059
117047
|
skipHtml: !0,
|
|
117060
117048
|
children: a.content
|
|
117061
117049
|
}
|
|
@@ -117623,18 +117611,24 @@ const TE2 = ({
|
|
|
117623
117611
|
a.id
|
|
117624
117612
|
), eV2 = ({
|
|
117625
117613
|
disclaimer: a
|
|
117626
|
-
}) => /* @__PURE__ */ k.jsx(
|
|
117627
|
-
|
|
117614
|
+
}) => /* @__PURE__ */ k.jsx(
|
|
117615
|
+
"div",
|
|
117628
117616
|
{
|
|
117629
|
-
|
|
117617
|
+
"data-testid": "chat-list-disclaimer",
|
|
117630
117618
|
className: "!m-0 max-w-none text-center text-[10px] leading-[14px] text-gray-500",
|
|
117631
|
-
|
|
117632
|
-
|
|
117633
|
-
|
|
117634
|
-
|
|
117635
|
-
|
|
117619
|
+
children: /* @__PURE__ */ k.jsx(
|
|
117620
|
+
i61,
|
|
117621
|
+
{
|
|
117622
|
+
rehypePlugins: [n41],
|
|
117623
|
+
skipHtml: !0,
|
|
117624
|
+
components: {
|
|
117625
|
+
a: aV2
|
|
117626
|
+
},
|
|
117627
|
+
children: a
|
|
117628
|
+
}
|
|
117629
|
+
)
|
|
117636
117630
|
}
|
|
117637
|
-
)
|
|
117631
|
+
), aV2 = ({
|
|
117638
117632
|
href: a = "",
|
|
117639
117633
|
children: t,
|
|
117640
117634
|
...n
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@freeday-ai/webchat",
|
|
3
|
-
"version": "2025.12.
|
|
3
|
+
"version": "2025.12.09.06.07.11560",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"react-dom": "^18",
|
|
28
28
|
"react-hook-form": "^7.54.2",
|
|
29
29
|
"react-i18next": "^16.0.0",
|
|
30
|
-
"react-markdown": "^
|
|
30
|
+
"react-markdown": "^10.0.0",
|
|
31
31
|
"rehype-raw": "^7.0.0",
|
|
32
32
|
"remark-breaks": "^4.0.0",
|
|
33
33
|
"remark-gfm": "^4.0.0",
|