agent-tower 0.4.8 → 0.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/git/git-cli.d.ts.map +1 -1
  2. package/dist/git/git-cli.js +7 -4
  3. package/dist/git/git-cli.js.map +1 -1
  4. package/dist/routes/git.d.ts.map +1 -1
  5. package/dist/routes/git.js +8 -2
  6. package/dist/routes/git.js.map +1 -1
  7. package/dist/routes/system.d.ts.map +1 -1
  8. package/dist/routes/system.js +2 -0
  9. package/dist/routes/system.js.map +1 -1
  10. package/dist/web/assets/{AgentDemoPage-B4p6JOaa.js → AgentDemoPage-CB48v8IV.js} +1 -1
  11. package/dist/web/assets/{DemoPage-a61F8WUp.js → DemoPage-_dT9rdpV.js} +1 -1
  12. package/dist/web/assets/{GeneralSettingsPage-CQmEjFi8.js → GeneralSettingsPage-DtD_oirE.js} +1 -1
  13. package/dist/web/assets/{NotificationSettingsPage-BRw2fFTj.js → NotificationSettingsPage-DQqz8xJs.js} +1 -1
  14. package/dist/web/assets/{ProfileSettingsPage-D-zyXwz1.js → ProfileSettingsPage-BaFNyfse.js} +1 -1
  15. package/dist/web/assets/{ProjectKanbanPage-DSO5OEi0.js → ProjectKanbanPage-DNCKy0g4.js} +22 -22
  16. package/dist/web/assets/{ProjectSettingsPage-CKb-5dhB.js → ProjectSettingsPage-Cv6VpL1g.js} +1 -1
  17. package/dist/web/assets/{ProviderSettingsPage-dGoaMV8Q.js → ProviderSettingsPage-BqmSJV2I.js} +1 -1
  18. package/dist/web/assets/{button-yc8E-9mL.js → button-Cg3N0RX4.js} +1 -1
  19. package/dist/web/assets/{chevron-down-CgN79gJE.js → chevron-down-BZ2n6wh3.js} +1 -1
  20. package/dist/web/assets/{chevron-right-DlWP8lVM.js → chevron-right-BrrhT2ph.js} +1 -1
  21. package/dist/web/assets/{circle-alert-CgMmay1J.js → circle-alert-a6g1jQyL.js} +1 -1
  22. package/dist/web/assets/{circle-check-CSmMKb6_.js → circle-check-CQEg-cq1.js} +1 -1
  23. package/dist/web/assets/{code-block-OCS4YCEC-DiXG3CzW.js → code-block-OCS4YCEC-C72vBOSD.js} +1 -1
  24. package/dist/web/assets/{confirm-dialog-Q8BsN1Up.js → confirm-dialog-DmuQeQ0J.js} +1 -1
  25. package/dist/web/assets/{folder-picker-C45cXliN.js → folder-picker-Dl5GZRtL.js} +1 -1
  26. package/dist/web/assets/{index-DK-vt3Cl.js → index-D3_Vq2xm.js} +2 -2
  27. package/dist/web/assets/{loader-circle-DYUWI5Dr.js → loader-circle-DRKF9OZx.js} +1 -1
  28. package/dist/web/assets/{mermaid-NOHMQCX5-C5mvGqWa.js → mermaid-NOHMQCX5-DyQsSSRd.js} +3 -3
  29. package/dist/web/assets/{modal-BgEFLccc.js → modal-wSbeXj_V.js} +1 -1
  30. package/dist/web/assets/{pencil-CjaX70qm.js → pencil-CT2HBX6f.js} +1 -1
  31. package/dist/web/assets/{rotate-ccw-CDDSxb2s.js → rotate-ccw-DkZPjdAj.js} +1 -1
  32. package/dist/web/assets/{select-DKQPvWiV.js → select-BRJQTh28.js} +1 -1
  33. package/dist/web/assets/{use-profiles-Brdh89vT.js → use-profiles-zSSuAJaA.js} +1 -1
  34. package/dist/web/assets/{use-providers-Es21U-kq.js → use-providers-BfLpM8PB.js} +1 -1
  35. package/dist/web/index.html +1 -1
  36. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-block-OCS4YCEC-DiXG3CzW.js","assets/index-DK-vt3Cl.js","assets/index-BGvfX18x.css","assets/log-adapter-50wgehrc.js","assets/chevron-right-DlWP8lVM.js","assets/chevron-down-CgN79gJE.js","assets/utils-CkSf8FUe.js"])))=>i.map(i=>d[i]);
2
- import{h as Bt,j as g,W as qs,r as N,_ as Vs,u as rc,s as Vt,S as De,C as Wt,g as ic}from"./index-DK-vt3Cl.js";import{L as He,n as ac,c as sc}from"./log-adapter-50wgehrc.js";import{C as ir}from"./chevron-right-DlWP8lVM.js";import{C as Ti,a as uc}from"./chevron-down-CgN79gJE.js";import{b as oc,a as lc}from"./utils-CkSf8FUe.js";const cc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],hc=Bt("circle-dot",cc);const dc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ca=Bt("circle",dc);const fc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Cx=Bt("globe",fc);const pc=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Nx=Bt("paperclip",pc);const mc=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ix=Bt("settings",mc);const gc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Sx=Bt("square",gc),wx=({className:e})=>g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("path",{d:"M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1z",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M8 1a7 7 0 0 0 0 14V1z",fill:"currentColor"})]}),Lx=({className:e})=>g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.4"}),g.jsx("circle",{cx:"8",cy:"8",r:"3",fill:"currentColor"})]}),Ox=({className:e})=>g.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:g.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"})}),Rx=({className:e})=>g.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M13.5 4.5L6.5 11.5L2.5 7.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Dx=({className:e})=>g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M5.5 5.5L10.5 10.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),ar=(function(e){if(e==null)return xc;if(typeof e=="function")return sr(e);if(typeof e=="object")return Array.isArray(e)?Ec(e):bc(e);if(typeof e=="string")return Tc(e);throw new Error("Expected function, string, or object as test")});function Ec(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ar(e[n]);return sr(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function bc(e){const t=e;return sr(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Tc(e){return sr(t);function t(n){return n&&n.type===e}}function sr(e){return t;function t(n,r,i){return!!(kc(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function xc(){return!0}function kc(e){return e!==null&&typeof e=="object"&&"type"in e}const Ws=[],nn=!0,Yr=!1,Vn="skip";function xi(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=ar(i),s=r?-1:1;u(e,void 0,[])();function u(o,c,h){const d=o&&typeof o=="object"?o:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(o.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=Ws,b,y,I;if((!t||a(o,c,h[h.length-1]||void 0))&&(p=_c(n(o,h)),p[0]===Yr))return p;if("children"in o&&o.children){const A=o;if(A.children&&p[0]!==Vn)for(y=(r?A.children.length:-1)+s,I=h.concat(A);y>-1&&y<A.children.length;){const O=A.children[y];if(b=u(O,y,I)(),b[0]===Yr)return b;y=typeof b[1]=="number"?b[1]:y+s}}return p}}}function _c(e){return Array.isArray(e)?e:typeof e=="number"?[nn,e]:e==null?Ws:[e]}function st(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),xi(e,a,u,i);function u(o,c){const h=c[c.length-1],d=h?h.children.indexOf(o):void 0;return s(o,d,h)}}function Ac({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:s="text-gray-500"}){const u=t.length&&!t.every(c=>c==="*"),o=n.length&&!n.every(c=>c==="*");if(!e&&(u||o))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return c=>{const h=Ic(e,t,n,r,i,a,s);st(c,h)}}function ha(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function yc(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Cc=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),Nc=new Set(["javascript:","data:","file:","vbscript:"]);function da(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const h=e.substring(5);if(h&&h.length>0&&h!=="invalid")return e}}catch{return null}return null}const s=ha(e,n);if(!s||Nc.has(s.protocol)||!(Cc.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const o=yc(e);return s&&t.some(c=>{const h=ha(c,n);return!h||h.origin!==s.origin?!1:s.href.startsWith(h.href)})?o?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:o?s.pathname+s.search+s.hash:s.href:null}const kr=Symbol("node-seen"),Ic=(e,t,n,r,i,a,s)=>{const u=(o,c,h)=>{if(o.type!=="element"||o[kr])return nn;if(o.tagName==="a"){const d=da(o.properties.href,t,e,!1,!1,i);return d===null?(o[kr]=!0,st(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(o.properties.href),class:s},children:[...o.children,{type:"text",value:" [blocked]"}]}),Vn):(o.properties.href=d,o.properties.target="_blank",o.properties.rel="noopener noreferrer",nn)}if(o.tagName==="img"){const d=da(o.properties.src,n,e,r,!0,i);return d===null?(o[kr]=!0,st(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{class:a},children:[{type:"text",value:"[Image blocked: "+String(o.properties.alt||"No description")+"]"}]}),Vn):(o.properties.src=d,nn)}return nn};return u},Gs=-1,ur=0,sn=1,Wn=2,ki=3,_i=4,Ai=5,yi=6,Qs=7,Ks=8,fa=typeof self=="object"?self:globalThis,Sc=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case ur:case Gs:return n(s,i);case sn:{const u=n([],i);for(const o of s)u.push(r(o));return u}case Wn:{const u=n({},i);for(const[o,c]of s)u[r(o)]=r(c);return u}case ki:return n(new Date(s),i);case _i:{const{source:u,flags:o}=s;return n(new RegExp(u,o),i)}case Ai:{const u=n(new Map,i);for(const[o,c]of s)u.set(r(o),r(c));return u}case yi:{const u=n(new Set,i);for(const o of s)u.add(r(o));return u}case Qs:{const{name:u,message:o}=s;return n(new fa[u](o),i)}case Ks:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:u}=new Uint8Array(s);return n(new DataView(u),s)}}return n(new fa[a](s),i)};return r},pa=e=>Sc(new Map,e)(0),St="",{toString:wc}={},{keys:Lc}=Object,Gt=e=>{const t=typeof e;if(t!=="object"||!e)return[ur,t];const n=wc.call(e).slice(8,-1);switch(n){case"Array":return[sn,St];case"Object":return[Wn,St];case"Date":return[ki,St];case"RegExp":return[_i,St];case"Map":return[Ai,St];case"Set":return[yi,St];case"DataView":return[sn,n]}return n.includes("Array")?[sn,n]:n.includes("Error")?[Qs,n]:[Wn,n]},Pn=([e,t])=>e===ur&&(t==="function"||t==="symbol"),Oc=(e,t,n,r)=>{const i=(s,u)=>{const o=r.push(s)-1;return n.set(u,o),o},a=s=>{if(n.has(s))return n.get(s);let[u,o]=Gt(s);switch(u){case ur:{let h=s;switch(o){case"bigint":u=Ks,h=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);h=null;break;case"undefined":return i([Gs],s)}return i([u,h],s)}case sn:{if(o){let f=s;return o==="DataView"?f=new Uint8Array(s.buffer):o==="ArrayBuffer"&&(f=new Uint8Array(s)),i([o,[...f]],s)}const h=[],d=i([u,h],s);for(const f of s)h.push(a(f));return d}case Wn:{if(o)switch(o){case"BigInt":return i([o,s.toString()],s);case"Boolean":case"Number":case"String":return i([o,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const h=[],d=i([u,h],s);for(const f of Lc(s))(e||!Pn(Gt(s[f])))&&h.push([a(f),a(s[f])]);return d}case ki:return i([u,s.toISOString()],s);case _i:{const{source:h,flags:d}=s;return i([u,{source:h,flags:d}],s)}case Ai:{const h=[],d=i([u,h],s);for(const[f,p]of s)(e||!(Pn(Gt(f))||Pn(Gt(p))))&&h.push([a(f),a(p)]);return d}case yi:{const h=[],d=i([u,h],s);for(const f of s)(e||!Pn(Gt(f)))&&h.push(a(f));return d}}const{message:c}=s;return i([u,{name:o,message:c}],s)};return a},ma=(e,{json:t,lossy:n}={})=>{const r=[];return Oc(!(t||n),!!t,new Map,r)(e),r},Et=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?pa(ma(e,t)):structuredClone(e):(e,t)=>pa(ma(e,t));class Cn{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Cn.prototype.normal={};Cn.prototype.property={};Cn.prototype.space=void 0;function Xs(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Cn(n,r,t)}function bn(e){return e.toLowerCase()}class Se{constructor(t,n){this.attribute=n,this.property=t}}Se.prototype.attribute="";Se.prototype.booleanish=!1;Se.prototype.boolean=!1;Se.prototype.commaOrSpaceSeparated=!1;Se.prototype.commaSeparated=!1;Se.prototype.defined=!1;Se.prototype.mustUseProperty=!1;Se.prototype.number=!1;Se.prototype.overloadedBoolean=!1;Se.prototype.property="";Se.prototype.spaceSeparated=!1;Se.prototype.space=void 0;let Rc=0;const K=kt(),fe=kt(),qr=kt(),v=kt(),ue=kt(),Dt=kt(),Le=kt();function kt(){return 2**++Rc}const Vr=Object.freeze(Object.defineProperty({__proto__:null,boolean:K,booleanish:fe,commaOrSpaceSeparated:Le,commaSeparated:Dt,number:v,overloadedBoolean:qr,spaceSeparated:ue},Symbol.toStringTag,{value:"Module"})),_r=Object.keys(Vr);class Ci extends Se{constructor(t,n,r,i){let a=-1;if(super(t,n),ga(this,"space",i),typeof r=="number")for(;++a<_r.length;){const s=_r[a];ga(this,_r[a],(r&Vr[s])===Vr[s])}}}Ci.prototype.defined=!0;function ga(e,t,n){n&&(e[t]=n)}function Ft(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new Ci(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[bn(r)]=r,n[bn(a.attribute)]=r}return new Cn(t,n,e.space)}const Zs=Ft({properties:{ariaActiveDescendant:null,ariaAtomic:fe,ariaAutoComplete:null,ariaBusy:fe,ariaChecked:fe,ariaColCount:v,ariaColIndex:v,ariaColSpan:v,ariaControls:ue,ariaCurrent:null,ariaDescribedBy:ue,ariaDetails:null,ariaDisabled:fe,ariaDropEffect:ue,ariaErrorMessage:null,ariaExpanded:fe,ariaFlowTo:ue,ariaGrabbed:fe,ariaHasPopup:null,ariaHidden:fe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ue,ariaLevel:v,ariaLive:null,ariaModal:fe,ariaMultiLine:fe,ariaMultiSelectable:fe,ariaOrientation:null,ariaOwns:ue,ariaPlaceholder:null,ariaPosInSet:v,ariaPressed:fe,ariaReadOnly:fe,ariaRelevant:null,ariaRequired:fe,ariaRoleDescription:ue,ariaRowCount:v,ariaRowIndex:v,ariaRowSpan:v,ariaSelected:fe,ariaSetSize:v,ariaSort:null,ariaValueMax:v,ariaValueMin:v,ariaValueNow:v,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Js(e,t){return t in e?e[t]:t}function eu(e,t){return Js(e,t.toLowerCase())}const Dc=Ft({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Dt,acceptCharset:ue,accessKey:ue,action:null,allow:null,allowFullScreen:K,allowPaymentRequest:K,allowUserMedia:K,alt:null,as:null,async:K,autoCapitalize:null,autoComplete:ue,autoFocus:K,autoPlay:K,blocking:ue,capture:null,charSet:null,checked:K,cite:null,className:ue,cols:v,colSpan:null,content:null,contentEditable:fe,controls:K,controlsList:ue,coords:v|Dt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:K,defer:K,dir:null,dirName:null,disabled:K,download:qr,draggable:fe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:K,formTarget:null,headers:ue,height:v,hidden:qr,high:v,href:null,hrefLang:null,htmlFor:ue,httpEquiv:ue,id:null,imageSizes:null,imageSrcSet:null,inert:K,inputMode:null,integrity:null,is:null,isMap:K,itemId:null,itemProp:ue,itemRef:ue,itemScope:K,itemType:ue,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:K,low:v,manifest:null,max:null,maxLength:v,media:null,method:null,min:null,minLength:v,multiple:K,muted:K,name:null,nonce:null,noModule:K,noValidate:K,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:K,optimum:v,pattern:null,ping:ue,placeholder:null,playsInline:K,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:K,referrerPolicy:null,rel:ue,required:K,reversed:K,rows:v,rowSpan:v,sandbox:ue,scope:null,scoped:K,seamless:K,selected:K,shadowRootClonable:K,shadowRootDelegatesFocus:K,shadowRootMode:null,shape:null,size:v,sizes:null,slot:null,span:v,spellCheck:fe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:v,step:null,style:null,tabIndex:v,target:null,title:null,translate:null,type:null,typeMustMatch:K,useMap:null,value:fe,width:v,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ue,axis:null,background:null,bgColor:null,border:v,borderColor:null,bottomMargin:v,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:K,declare:K,event:null,face:null,frame:null,frameBorder:null,hSpace:v,leftMargin:v,link:null,longDesc:null,lowSrc:null,marginHeight:v,marginWidth:v,noResize:K,noHref:K,noShade:K,noWrap:K,object:null,profile:null,prompt:null,rev:null,rightMargin:v,rules:null,scheme:null,scrolling:fe,standby:null,summary:null,text:null,topMargin:v,valueType:null,version:null,vAlign:null,vLink:null,vSpace:v,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:K,disableRemotePlayback:K,prefix:null,property:null,results:v,security:null,unselectable:null},space:"html",transform:eu}),Pc=Ft({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Le,accentHeight:v,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:v,amplitude:v,arabicForm:null,ascent:v,attributeName:null,attributeType:null,azimuth:v,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:v,by:null,calcMode:null,capHeight:v,className:ue,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:v,diffuseConstant:v,direction:null,display:null,dur:null,divisor:v,dominantBaseline:null,download:K,dx:null,dy:null,edgeMode:null,editable:null,elevation:v,enableBackground:null,end:null,event:null,exponent:v,externalResourcesRequired:null,fill:null,fillOpacity:v,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:Dt,g2:Dt,glyphName:Dt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:v,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:v,horizOriginX:v,horizOriginY:v,id:null,ideographic:v,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:v,k:v,k1:v,k2:v,k3:v,k4:v,kernelMatrix:Le,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:v,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:v,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:v,overlineThickness:v,paintOrder:null,panose1:null,path:null,pathLength:v,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ue,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:v,pointsAtY:v,pointsAtZ:v,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Le,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Le,rev:Le,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Le,requiredFeatures:Le,requiredFonts:Le,requiredFormats:Le,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:v,specularExponent:v,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:v,strikethroughThickness:v,string:null,stroke:null,strokeDashArray:Le,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:v,strokeOpacity:v,strokeWidth:null,style:null,surfaceScale:v,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Le,tabIndex:v,tableValues:null,target:null,targetX:v,targetY:v,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Le,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:v,underlineThickness:v,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:v,values:null,vAlphabetic:v,vMathematical:v,vectorEffect:null,vHanging:v,vIdeographic:v,version:null,vertAdvY:v,vertOriginX:v,vertOriginY:v,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:v,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Js}),tu=Ft({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),nu=Ft({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:eu}),ru=Ft({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Mc={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},vc=/[A-Z]/g,Ea=/-[a-z]/g,Bc=/^data[-\w.:]+$/i;function or(e,t){const n=bn(t);let r=t,i=Se;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Bc.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ea,Hc);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ea.test(a)){let s=a.replace(vc,Fc);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Ci}return new i(r,t)}function Fc(e){return"-"+e.toLowerCase()}function Hc(e){return e.charAt(1).toUpperCase()}const Nn=Xs([Zs,Dc,tu,nu,ru],"html"),ot=Xs([Zs,Pc,tu,nu,ru],"svg");function ba(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function iu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Ta=/[#.]/g;function Uc(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){Ta.lastIndex=i;const u=Ta.exec(n),o=n.slice(i,u?u.index:n.length);o&&(a?a==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:s=o,i+=o.length),u&&(a=u[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function xa(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function au(e){return e.join(" ").trim()}function su(e,t,n){const r=n?Yc(n):void 0;function i(a,s,...u){let o;if(a==null){o={type:"root",children:[]};const c=s;u.unshift(c)}else{o=Uc(a,t);const c=o.tagName.toLowerCase(),h=r?r.get(c):void 0;if(o.tagName=h||c,jc(s))u.unshift(s);else for(const[d,f]of Object.entries(s))zc(e,o.properties,d,f)}for(const c of u)Wr(o.children,c);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function jc(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function zc(e,t,n,r){const i=or(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=xa(r):i.commaSeparated?a=ba(r):i.commaOrSpaceSeparated?a=xa(ba(r).join(" ")):a=ka(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?$c(r):String(r);if(Array.isArray(a)){const s=[];for(const u of a)s.push(ka(i,i.property,u));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Wr(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Wr(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Wr(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ka(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||bn(n)===bn(t)))return!0}return n}function $c(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Yc(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const qc=["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"],Vc=su(Nn,"div"),Wc=su(ot,"g",qc);function Gc(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let u=n[s];if(u===void 0){const o=_a(t,n[s-1]);u=o===-1?t.length+1:o+1,n[s]=u}if(u>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const u=n[n.length-1],o=_a(t,u),c=o===-1?t.length+1:o+1;if(u===c)break;n.push(c)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function _a(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-block-OCS4YCEC-C72vBOSD.js","assets/index-D3_Vq2xm.js","assets/index-BGvfX18x.css","assets/log-adapter-50wgehrc.js","assets/chevron-right-BrrhT2ph.js","assets/chevron-down-BZ2n6wh3.js","assets/utils-CkSf8FUe.js"])))=>i.map(i=>d[i]);
2
+ import{h as Bt,j as g,W as qs,r as N,_ as Vs,u as rc,s as Vt,S as De,C as Wt,g as ic}from"./index-D3_Vq2xm.js";import{L as He,n as ac,c as sc}from"./log-adapter-50wgehrc.js";import{C as ir}from"./chevron-right-BrrhT2ph.js";import{C as Ti,a as uc}from"./chevron-down-BZ2n6wh3.js";import{b as oc,a as lc}from"./utils-CkSf8FUe.js";const cc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],hc=Bt("circle-dot",cc);const dc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ca=Bt("circle",dc);const fc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Cx=Bt("globe",fc);const pc=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Nx=Bt("paperclip",pc);const mc=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ix=Bt("settings",mc);const gc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Sx=Bt("square",gc),wx=({className:e})=>g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("path",{d:"M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1z",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M8 1a7 7 0 0 0 0 14V1z",fill:"currentColor"})]}),Lx=({className:e})=>g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.4"}),g.jsx("circle",{cx:"8",cy:"8",r:"3",fill:"currentColor"})]}),Ox=({className:e})=>g.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:g.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"})}),Rx=({className:e})=>g.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M13.5 4.5L6.5 11.5L2.5 7.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Dx=({className:e})=>g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M5.5 5.5L10.5 10.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),ar=(function(e){if(e==null)return xc;if(typeof e=="function")return sr(e);if(typeof e=="object")return Array.isArray(e)?Ec(e):bc(e);if(typeof e=="string")return Tc(e);throw new Error("Expected function, string, or object as test")});function Ec(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ar(e[n]);return sr(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function bc(e){const t=e;return sr(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Tc(e){return sr(t);function t(n){return n&&n.type===e}}function sr(e){return t;function t(n,r,i){return!!(kc(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function xc(){return!0}function kc(e){return e!==null&&typeof e=="object"&&"type"in e}const Ws=[],nn=!0,Yr=!1,Vn="skip";function xi(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=ar(i),s=r?-1:1;u(e,void 0,[])();function u(o,c,h){const d=o&&typeof o=="object"?o:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(o.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=Ws,b,y,I;if((!t||a(o,c,h[h.length-1]||void 0))&&(p=_c(n(o,h)),p[0]===Yr))return p;if("children"in o&&o.children){const A=o;if(A.children&&p[0]!==Vn)for(y=(r?A.children.length:-1)+s,I=h.concat(A);y>-1&&y<A.children.length;){const O=A.children[y];if(b=u(O,y,I)(),b[0]===Yr)return b;y=typeof b[1]=="number"?b[1]:y+s}}return p}}}function _c(e){return Array.isArray(e)?e:typeof e=="number"?[nn,e]:e==null?Ws:[e]}function st(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),xi(e,a,u,i);function u(o,c){const h=c[c.length-1],d=h?h.children.indexOf(o):void 0;return s(o,d,h)}}function Ac({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:s="text-gray-500"}){const u=t.length&&!t.every(c=>c==="*"),o=n.length&&!n.every(c=>c==="*");if(!e&&(u||o))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return c=>{const h=Ic(e,t,n,r,i,a,s);st(c,h)}}function ha(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function yc(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Cc=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),Nc=new Set(["javascript:","data:","file:","vbscript:"]);function da(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const h=e.substring(5);if(h&&h.length>0&&h!=="invalid")return e}}catch{return null}return null}const s=ha(e,n);if(!s||Nc.has(s.protocol)||!(Cc.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const o=yc(e);return s&&t.some(c=>{const h=ha(c,n);return!h||h.origin!==s.origin?!1:s.href.startsWith(h.href)})?o?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:o?s.pathname+s.search+s.hash:s.href:null}const kr=Symbol("node-seen"),Ic=(e,t,n,r,i,a,s)=>{const u=(o,c,h)=>{if(o.type!=="element"||o[kr])return nn;if(o.tagName==="a"){const d=da(o.properties.href,t,e,!1,!1,i);return d===null?(o[kr]=!0,st(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(o.properties.href),class:s},children:[...o.children,{type:"text",value:" [blocked]"}]}),Vn):(o.properties.href=d,o.properties.target="_blank",o.properties.rel="noopener noreferrer",nn)}if(o.tagName==="img"){const d=da(o.properties.src,n,e,r,!0,i);return d===null?(o[kr]=!0,st(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{class:a},children:[{type:"text",value:"[Image blocked: "+String(o.properties.alt||"No description")+"]"}]}),Vn):(o.properties.src=d,nn)}return nn};return u},Gs=-1,ur=0,sn=1,Wn=2,ki=3,_i=4,Ai=5,yi=6,Qs=7,Ks=8,fa=typeof self=="object"?self:globalThis,Sc=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case ur:case Gs:return n(s,i);case sn:{const u=n([],i);for(const o of s)u.push(r(o));return u}case Wn:{const u=n({},i);for(const[o,c]of s)u[r(o)]=r(c);return u}case ki:return n(new Date(s),i);case _i:{const{source:u,flags:o}=s;return n(new RegExp(u,o),i)}case Ai:{const u=n(new Map,i);for(const[o,c]of s)u.set(r(o),r(c));return u}case yi:{const u=n(new Set,i);for(const o of s)u.add(r(o));return u}case Qs:{const{name:u,message:o}=s;return n(new fa[u](o),i)}case Ks:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:u}=new Uint8Array(s);return n(new DataView(u),s)}}return n(new fa[a](s),i)};return r},pa=e=>Sc(new Map,e)(0),St="",{toString:wc}={},{keys:Lc}=Object,Gt=e=>{const t=typeof e;if(t!=="object"||!e)return[ur,t];const n=wc.call(e).slice(8,-1);switch(n){case"Array":return[sn,St];case"Object":return[Wn,St];case"Date":return[ki,St];case"RegExp":return[_i,St];case"Map":return[Ai,St];case"Set":return[yi,St];case"DataView":return[sn,n]}return n.includes("Array")?[sn,n]:n.includes("Error")?[Qs,n]:[Wn,n]},Pn=([e,t])=>e===ur&&(t==="function"||t==="symbol"),Oc=(e,t,n,r)=>{const i=(s,u)=>{const o=r.push(s)-1;return n.set(u,o),o},a=s=>{if(n.has(s))return n.get(s);let[u,o]=Gt(s);switch(u){case ur:{let h=s;switch(o){case"bigint":u=Ks,h=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);h=null;break;case"undefined":return i([Gs],s)}return i([u,h],s)}case sn:{if(o){let f=s;return o==="DataView"?f=new Uint8Array(s.buffer):o==="ArrayBuffer"&&(f=new Uint8Array(s)),i([o,[...f]],s)}const h=[],d=i([u,h],s);for(const f of s)h.push(a(f));return d}case Wn:{if(o)switch(o){case"BigInt":return i([o,s.toString()],s);case"Boolean":case"Number":case"String":return i([o,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const h=[],d=i([u,h],s);for(const f of Lc(s))(e||!Pn(Gt(s[f])))&&h.push([a(f),a(s[f])]);return d}case ki:return i([u,s.toISOString()],s);case _i:{const{source:h,flags:d}=s;return i([u,{source:h,flags:d}],s)}case Ai:{const h=[],d=i([u,h],s);for(const[f,p]of s)(e||!(Pn(Gt(f))||Pn(Gt(p))))&&h.push([a(f),a(p)]);return d}case yi:{const h=[],d=i([u,h],s);for(const f of s)(e||!Pn(Gt(f)))&&h.push(a(f));return d}}const{message:c}=s;return i([u,{name:o,message:c}],s)};return a},ma=(e,{json:t,lossy:n}={})=>{const r=[];return Oc(!(t||n),!!t,new Map,r)(e),r},Et=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?pa(ma(e,t)):structuredClone(e):(e,t)=>pa(ma(e,t));class Cn{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Cn.prototype.normal={};Cn.prototype.property={};Cn.prototype.space=void 0;function Xs(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Cn(n,r,t)}function bn(e){return e.toLowerCase()}class Se{constructor(t,n){this.attribute=n,this.property=t}}Se.prototype.attribute="";Se.prototype.booleanish=!1;Se.prototype.boolean=!1;Se.prototype.commaOrSpaceSeparated=!1;Se.prototype.commaSeparated=!1;Se.prototype.defined=!1;Se.prototype.mustUseProperty=!1;Se.prototype.number=!1;Se.prototype.overloadedBoolean=!1;Se.prototype.property="";Se.prototype.spaceSeparated=!1;Se.prototype.space=void 0;let Rc=0;const K=kt(),fe=kt(),qr=kt(),v=kt(),ue=kt(),Dt=kt(),Le=kt();function kt(){return 2**++Rc}const Vr=Object.freeze(Object.defineProperty({__proto__:null,boolean:K,booleanish:fe,commaOrSpaceSeparated:Le,commaSeparated:Dt,number:v,overloadedBoolean:qr,spaceSeparated:ue},Symbol.toStringTag,{value:"Module"})),_r=Object.keys(Vr);class Ci extends Se{constructor(t,n,r,i){let a=-1;if(super(t,n),ga(this,"space",i),typeof r=="number")for(;++a<_r.length;){const s=_r[a];ga(this,_r[a],(r&Vr[s])===Vr[s])}}}Ci.prototype.defined=!0;function ga(e,t,n){n&&(e[t]=n)}function Ft(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new Ci(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[bn(r)]=r,n[bn(a.attribute)]=r}return new Cn(t,n,e.space)}const Zs=Ft({properties:{ariaActiveDescendant:null,ariaAtomic:fe,ariaAutoComplete:null,ariaBusy:fe,ariaChecked:fe,ariaColCount:v,ariaColIndex:v,ariaColSpan:v,ariaControls:ue,ariaCurrent:null,ariaDescribedBy:ue,ariaDetails:null,ariaDisabled:fe,ariaDropEffect:ue,ariaErrorMessage:null,ariaExpanded:fe,ariaFlowTo:ue,ariaGrabbed:fe,ariaHasPopup:null,ariaHidden:fe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ue,ariaLevel:v,ariaLive:null,ariaModal:fe,ariaMultiLine:fe,ariaMultiSelectable:fe,ariaOrientation:null,ariaOwns:ue,ariaPlaceholder:null,ariaPosInSet:v,ariaPressed:fe,ariaReadOnly:fe,ariaRelevant:null,ariaRequired:fe,ariaRoleDescription:ue,ariaRowCount:v,ariaRowIndex:v,ariaRowSpan:v,ariaSelected:fe,ariaSetSize:v,ariaSort:null,ariaValueMax:v,ariaValueMin:v,ariaValueNow:v,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Js(e,t){return t in e?e[t]:t}function eu(e,t){return Js(e,t.toLowerCase())}const Dc=Ft({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Dt,acceptCharset:ue,accessKey:ue,action:null,allow:null,allowFullScreen:K,allowPaymentRequest:K,allowUserMedia:K,alt:null,as:null,async:K,autoCapitalize:null,autoComplete:ue,autoFocus:K,autoPlay:K,blocking:ue,capture:null,charSet:null,checked:K,cite:null,className:ue,cols:v,colSpan:null,content:null,contentEditable:fe,controls:K,controlsList:ue,coords:v|Dt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:K,defer:K,dir:null,dirName:null,disabled:K,download:qr,draggable:fe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:K,formTarget:null,headers:ue,height:v,hidden:qr,high:v,href:null,hrefLang:null,htmlFor:ue,httpEquiv:ue,id:null,imageSizes:null,imageSrcSet:null,inert:K,inputMode:null,integrity:null,is:null,isMap:K,itemId:null,itemProp:ue,itemRef:ue,itemScope:K,itemType:ue,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:K,low:v,manifest:null,max:null,maxLength:v,media:null,method:null,min:null,minLength:v,multiple:K,muted:K,name:null,nonce:null,noModule:K,noValidate:K,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:K,optimum:v,pattern:null,ping:ue,placeholder:null,playsInline:K,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:K,referrerPolicy:null,rel:ue,required:K,reversed:K,rows:v,rowSpan:v,sandbox:ue,scope:null,scoped:K,seamless:K,selected:K,shadowRootClonable:K,shadowRootDelegatesFocus:K,shadowRootMode:null,shape:null,size:v,sizes:null,slot:null,span:v,spellCheck:fe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:v,step:null,style:null,tabIndex:v,target:null,title:null,translate:null,type:null,typeMustMatch:K,useMap:null,value:fe,width:v,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ue,axis:null,background:null,bgColor:null,border:v,borderColor:null,bottomMargin:v,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:K,declare:K,event:null,face:null,frame:null,frameBorder:null,hSpace:v,leftMargin:v,link:null,longDesc:null,lowSrc:null,marginHeight:v,marginWidth:v,noResize:K,noHref:K,noShade:K,noWrap:K,object:null,profile:null,prompt:null,rev:null,rightMargin:v,rules:null,scheme:null,scrolling:fe,standby:null,summary:null,text:null,topMargin:v,valueType:null,version:null,vAlign:null,vLink:null,vSpace:v,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:K,disableRemotePlayback:K,prefix:null,property:null,results:v,security:null,unselectable:null},space:"html",transform:eu}),Pc=Ft({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Le,accentHeight:v,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:v,amplitude:v,arabicForm:null,ascent:v,attributeName:null,attributeType:null,azimuth:v,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:v,by:null,calcMode:null,capHeight:v,className:ue,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:v,diffuseConstant:v,direction:null,display:null,dur:null,divisor:v,dominantBaseline:null,download:K,dx:null,dy:null,edgeMode:null,editable:null,elevation:v,enableBackground:null,end:null,event:null,exponent:v,externalResourcesRequired:null,fill:null,fillOpacity:v,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:Dt,g2:Dt,glyphName:Dt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:v,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:v,horizOriginX:v,horizOriginY:v,id:null,ideographic:v,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:v,k:v,k1:v,k2:v,k3:v,k4:v,kernelMatrix:Le,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:v,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:v,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:v,overlineThickness:v,paintOrder:null,panose1:null,path:null,pathLength:v,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ue,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:v,pointsAtY:v,pointsAtZ:v,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Le,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Le,rev:Le,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Le,requiredFeatures:Le,requiredFonts:Le,requiredFormats:Le,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:v,specularExponent:v,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:v,strikethroughThickness:v,string:null,stroke:null,strokeDashArray:Le,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:v,strokeOpacity:v,strokeWidth:null,style:null,surfaceScale:v,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Le,tabIndex:v,tableValues:null,target:null,targetX:v,targetY:v,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Le,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:v,underlineThickness:v,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:v,values:null,vAlphabetic:v,vMathematical:v,vectorEffect:null,vHanging:v,vIdeographic:v,version:null,vertAdvY:v,vertOriginX:v,vertOriginY:v,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:v,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Js}),tu=Ft({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),nu=Ft({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:eu}),ru=Ft({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Mc={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},vc=/[A-Z]/g,Ea=/-[a-z]/g,Bc=/^data[-\w.:]+$/i;function or(e,t){const n=bn(t);let r=t,i=Se;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Bc.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ea,Hc);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ea.test(a)){let s=a.replace(vc,Fc);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Ci}return new i(r,t)}function Fc(e){return"-"+e.toLowerCase()}function Hc(e){return e.charAt(1).toUpperCase()}const Nn=Xs([Zs,Dc,tu,nu,ru],"html"),ot=Xs([Zs,Pc,tu,nu,ru],"svg");function ba(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function iu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Ta=/[#.]/g;function Uc(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){Ta.lastIndex=i;const u=Ta.exec(n),o=n.slice(i,u?u.index:n.length);o&&(a?a==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:s=o,i+=o.length),u&&(a=u[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function xa(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function au(e){return e.join(" ").trim()}function su(e,t,n){const r=n?Yc(n):void 0;function i(a,s,...u){let o;if(a==null){o={type:"root",children:[]};const c=s;u.unshift(c)}else{o=Uc(a,t);const c=o.tagName.toLowerCase(),h=r?r.get(c):void 0;if(o.tagName=h||c,jc(s))u.unshift(s);else for(const[d,f]of Object.entries(s))zc(e,o.properties,d,f)}for(const c of u)Wr(o.children,c);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function jc(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function zc(e,t,n,r){const i=or(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=xa(r):i.commaSeparated?a=ba(r):i.commaOrSpaceSeparated?a=xa(ba(r).join(" ")):a=ka(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?$c(r):String(r);if(Array.isArray(a)){const s=[];for(const u of a)s.push(ka(i,i.property,u));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Wr(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Wr(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Wr(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ka(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||bn(n)===bn(t)))return!0}return n}function $c(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Yc(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const qc=["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"],Vc=su(Nn,"div"),Wc=su(ot,"g",qc);function Gc(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let u=n[s];if(u===void 0){const o=_a(t,n[s-1]);u=o===-1?t.length+1:o+1,n[s]=u}if(u>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const u=n[n.length-1],o=_a(t,u),c=o===-1?t.length+1:o+1;if(u===c)break;n.push(c)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function _a(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
3
3
  `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const pt={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/"},uu={}.hasOwnProperty,Qc=Object.prototype;function Kc(e,t){const n=t||{};return Ni({file:n.file||void 0,location:!1,schema:n.space==="svg"?ot:Nn,verbose:n.verbose||!1},e)}function Ni(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},zn(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:ou(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=Gc(a),u=s.toPoint(0),o=s.toPoint(a.length);n.position={start:u,end:o}}return n}case"#documentType":{const r=t;return n={type:"doctype"},zn(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},zn(e,r,n),n}default:return n=Xc(e,t),n}}function ou(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Ni(e,t[n]);r.push(i)}return r}function Xc(e,t){const n=e.schema;e.schema=t.namespaceURI===pt.svg?ot:Nn;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;uu.call(Qc,o)||(i[o]=u.value)}const s=(e.schema.space==="svg"?Wc:Vc)(t.tagName,i,ou(e,t.childNodes));if(zn(e,t,s),s.tagName==="template"){const u=t,o=u.sourceCodeLocation,c=o&&o.startTag&&Ot(o.startTag),h=o&&o.endTag&&Ot(o.endTag),d=Ni(e,u.content);c&&h&&e.file&&(d.position={start:c.end,end:h.start}),s.content=d}return e.schema=n,s}function zn(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Zc(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Zc(e,t,n){const r=Ot(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(n.attrs)for(s in n.attrs)uu.call(n.attrs,s)&&(a[or(e.schema,s).property]=Ot(n.attrs[s]));n.startTag;const u=Ot(n.startTag),o=n.endTag?Ot(n.endTag):void 0,c={opening:u};o&&(c.closing=o),c.properties=a,t.data={position:c}}}return r}function Ot(e){const t=Aa({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Aa({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Aa(e){return e.line&&e.column?e:void 0}const ya={}.hasOwnProperty;function lu(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const u=r.handlers;if(i&&ya.call(i,e)){const o=String(i[e]);s=ya.call(u,o)?u[o]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Jc={},eh={}.hasOwnProperty,cu=lu("type",{handlers:{root:nh,element:uh,text:ah,comment:sh,doctype:ih}});function th(e,t){const r=(t||Jc).space;return cu(e,r==="svg"?ot:Nn)}function nh(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Ii(e.children,n,t),Ht(e,n),n}function rh(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Ii(e.children,n,t),Ht(e,n),n}function ih(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ht(e,t),t}function ah(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ht(e,t),t}function sh(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ht(e,t),t}function uh(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ot);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&eh.call(e.properties,a)){const o=oh(r,a,e.properties[a]);o&&i.push(o)}}const s=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:pt[s],childNodes:[],parentNode:null};return u.childNodes=Ii(e.children,u,r),Ht(e,u),e.tagName==="template"&&e.content&&(u.content=rh(e.content,r)),u}function oh(e,t,n){const r=or(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?iu(n):au(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=pt[r.space]}return i}function Ii(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=cu(e[r],n);a.parentNode=t,i.push(a)}return i}function Ht(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const lh=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],ch=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),le="�";var m;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(m||(m={}));const Ne={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function hu(e){return e>=55296&&e<=57343}function hh(e){return e>=56320&&e<=57343}function dh(e,t){return(e-55296)*1024+9216+t}function du(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function fu(e){return e>=64976&&e<=65007||ch.has(e)}var S;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(S||(S={}));const fh=65536;class ph{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=fh,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:r,col:i,offset:a}=this,s=i+n,u=a+n;return{code:t,startLine:r,endLine:r,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(hh(n))return this.pos++,this._addGap(),dh(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,m.EOF;return this._err(S.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 r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,m.EOF;const r=this.html.charCodeAt(n);return r===m.CARRIAGE_RETURN?m.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,m.EOF;let t=this.html.charCodeAt(this.pos);return t===m.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,m.LINE_FEED):t===m.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,hu(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===m.LINE_FEED||t===m.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){du(t)?this._err(S.controlCharacterInInputStream):fu(t)&&this._err(S.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var X;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(X||(X={}));function pu(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const mh=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),gh=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function Eh(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=gh.get(e))!==null&&t!==void 0?t:e}var ge;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ge||(ge={}));const bh=32;var at;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(at||(at={}));function Gr(e){return e>=ge.ZERO&&e<=ge.NINE}function Th(e){return e>=ge.UPPER_A&&e<=ge.UPPER_F||e>=ge.LOWER_A&&e<=ge.LOWER_F}function xh(e){return e>=ge.UPPER_A&&e<=ge.UPPER_Z||e>=ge.LOWER_A&&e<=ge.LOWER_Z||Gr(e)}function kh(e){return e===ge.EQUALS||xh(e)}var me;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(me||(me={}));var Xe;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Xe||(Xe={}));class _h{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=me.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Xe.Strict}startEntity(t){this.decodeMode=t,this.state=me.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case me.EntityStart:return t.charCodeAt(n)===ge.NUM?(this.state=me.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=me.NamedEntity,this.stateNamedEntity(t,n));case me.NumericStart:return this.stateNumericStart(t,n);case me.NumericDecimal:return this.stateNumericDecimal(t,n);case me.NumericHex:return this.stateNumericHex(t,n);case me.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|bh)===ge.LOWER_X?(this.state=me.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=me.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+Number.parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Gr(i)||Th(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Gr(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===ge.SEMI)this.consumed+=1;else if(this.decodeMode===Xe.Strict)return 0;return this.emitCodePoint(Eh(this.result),this.consumed),this.errors&&(t!==ge.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&at.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=Ah(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===Xe.Attribute&&(a===0||kh(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&at.VALUE_LENGTH)>>14,a!==0){if(s===ge.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Xe.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&at.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~at.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case me.NamedEntity:return this.result!==0&&(this.decodeMode!==Xe.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case me.NumericDecimal:return this.emitNumericEntity(0,2);case me.NumericHex:return this.emitNumericEntity(0,3);case me.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case me.EntityStart:return 0}}}function Ah(e,t,n,r){const i=(t&at.BRANCH_LENGTH)>>7,a=t&at.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const o=r-a;return o<0||o>=i?-1:e[n+o]-1}let s=n,u=s+i-1;for(;s<=u;){const o=s+u>>>1,c=e[o];if(c<r)s=o+1;else if(c>r)u=o-1;else return e[o+i]}return-1}var D;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(D||(D={}));var mt;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(mt||(mt={}));var Pe;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Pe||(Pe={}));var C;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(C||(C={}));var l;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(l||(l={}));const yh=new Map([[C.A,l.A],[C.ADDRESS,l.ADDRESS],[C.ANNOTATION_XML,l.ANNOTATION_XML],[C.APPLET,l.APPLET],[C.AREA,l.AREA],[C.ARTICLE,l.ARTICLE],[C.ASIDE,l.ASIDE],[C.B,l.B],[C.BASE,l.BASE],[C.BASEFONT,l.BASEFONT],[C.BGSOUND,l.BGSOUND],[C.BIG,l.BIG],[C.BLOCKQUOTE,l.BLOCKQUOTE],[C.BODY,l.BODY],[C.BR,l.BR],[C.BUTTON,l.BUTTON],[C.CAPTION,l.CAPTION],[C.CENTER,l.CENTER],[C.CODE,l.CODE],[C.COL,l.COL],[C.COLGROUP,l.COLGROUP],[C.DD,l.DD],[C.DESC,l.DESC],[C.DETAILS,l.DETAILS],[C.DIALOG,l.DIALOG],[C.DIR,l.DIR],[C.DIV,l.DIV],[C.DL,l.DL],[C.DT,l.DT],[C.EM,l.EM],[C.EMBED,l.EMBED],[C.FIELDSET,l.FIELDSET],[C.FIGCAPTION,l.FIGCAPTION],[C.FIGURE,l.FIGURE],[C.FONT,l.FONT],[C.FOOTER,l.FOOTER],[C.FOREIGN_OBJECT,l.FOREIGN_OBJECT],[C.FORM,l.FORM],[C.FRAME,l.FRAME],[C.FRAMESET,l.FRAMESET],[C.H1,l.H1],[C.H2,l.H2],[C.H3,l.H3],[C.H4,l.H4],[C.H5,l.H5],[C.H6,l.H6],[C.HEAD,l.HEAD],[C.HEADER,l.HEADER],[C.HGROUP,l.HGROUP],[C.HR,l.HR],[C.HTML,l.HTML],[C.I,l.I],[C.IMG,l.IMG],[C.IMAGE,l.IMAGE],[C.INPUT,l.INPUT],[C.IFRAME,l.IFRAME],[C.KEYGEN,l.KEYGEN],[C.LABEL,l.LABEL],[C.LI,l.LI],[C.LINK,l.LINK],[C.LISTING,l.LISTING],[C.MAIN,l.MAIN],[C.MALIGNMARK,l.MALIGNMARK],[C.MARQUEE,l.MARQUEE],[C.MATH,l.MATH],[C.MENU,l.MENU],[C.META,l.META],[C.MGLYPH,l.MGLYPH],[C.MI,l.MI],[C.MO,l.MO],[C.MN,l.MN],[C.MS,l.MS],[C.MTEXT,l.MTEXT],[C.NAV,l.NAV],[C.NOBR,l.NOBR],[C.NOFRAMES,l.NOFRAMES],[C.NOEMBED,l.NOEMBED],[C.NOSCRIPT,l.NOSCRIPT],[C.OBJECT,l.OBJECT],[C.OL,l.OL],[C.OPTGROUP,l.OPTGROUP],[C.OPTION,l.OPTION],[C.P,l.P],[C.PARAM,l.PARAM],[C.PLAINTEXT,l.PLAINTEXT],[C.PRE,l.PRE],[C.RB,l.RB],[C.RP,l.RP],[C.RT,l.RT],[C.RTC,l.RTC],[C.RUBY,l.RUBY],[C.S,l.S],[C.SCRIPT,l.SCRIPT],[C.SEARCH,l.SEARCH],[C.SECTION,l.SECTION],[C.SELECT,l.SELECT],[C.SOURCE,l.SOURCE],[C.SMALL,l.SMALL],[C.SPAN,l.SPAN],[C.STRIKE,l.STRIKE],[C.STRONG,l.STRONG],[C.STYLE,l.STYLE],[C.SUB,l.SUB],[C.SUMMARY,l.SUMMARY],[C.SUP,l.SUP],[C.TABLE,l.TABLE],[C.TBODY,l.TBODY],[C.TEMPLATE,l.TEMPLATE],[C.TEXTAREA,l.TEXTAREA],[C.TFOOT,l.TFOOT],[C.TD,l.TD],[C.TH,l.TH],[C.THEAD,l.THEAD],[C.TITLE,l.TITLE],[C.TR,l.TR],[C.TRACK,l.TRACK],[C.TT,l.TT],[C.U,l.U],[C.UL,l.UL],[C.SVG,l.SVG],[C.VAR,l.VAR],[C.WBR,l.WBR],[C.XMP,l.XMP]]);function Ut(e){var t;return(t=yh.get(e))!==null&&t!==void 0?t:l.UNKNOWN}const M=l,Ch={[D.HTML]:new Set([M.ADDRESS,M.APPLET,M.AREA,M.ARTICLE,M.ASIDE,M.BASE,M.BASEFONT,M.BGSOUND,M.BLOCKQUOTE,M.BODY,M.BR,M.BUTTON,M.CAPTION,M.CENTER,M.COL,M.COLGROUP,M.DD,M.DETAILS,M.DIR,M.DIV,M.DL,M.DT,M.EMBED,M.FIELDSET,M.FIGCAPTION,M.FIGURE,M.FOOTER,M.FORM,M.FRAME,M.FRAMESET,M.H1,M.H2,M.H3,M.H4,M.H5,M.H6,M.HEAD,M.HEADER,M.HGROUP,M.HR,M.HTML,M.IFRAME,M.IMG,M.INPUT,M.LI,M.LINK,M.LISTING,M.MAIN,M.MARQUEE,M.MENU,M.META,M.NAV,M.NOEMBED,M.NOFRAMES,M.NOSCRIPT,M.OBJECT,M.OL,M.P,M.PARAM,M.PLAINTEXT,M.PRE,M.SCRIPT,M.SECTION,M.SELECT,M.SOURCE,M.STYLE,M.SUMMARY,M.TABLE,M.TBODY,M.TD,M.TEMPLATE,M.TEXTAREA,M.TFOOT,M.TH,M.THEAD,M.TITLE,M.TR,M.TRACK,M.UL,M.WBR,M.XMP]),[D.MATHML]:new Set([M.MI,M.MO,M.MN,M.MS,M.MTEXT,M.ANNOTATION_XML]),[D.SVG]:new Set([M.TITLE,M.FOREIGN_OBJECT,M.DESC]),[D.XLINK]:new Set,[D.XML]:new Set,[D.XMLNS]:new Set},Qr=new Set([M.H1,M.H2,M.H3,M.H4,M.H5,M.H6]);C.STYLE,C.SCRIPT,C.XMP,C.IFRAME,C.NOEMBED,C.NOFRAMES,C.PLAINTEXT;var E;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(E||(E={}));const de={DATA:E.DATA,RCDATA:E.RCDATA,RAWTEXT:E.RAWTEXT,SCRIPT_DATA:E.SCRIPT_DATA,PLAINTEXT:E.PLAINTEXT,CDATA_SECTION:E.CDATA_SECTION};function Nh(e){return e>=m.DIGIT_0&&e<=m.DIGIT_9}function rn(e){return e>=m.LATIN_CAPITAL_A&&e<=m.LATIN_CAPITAL_Z}function Ih(e){return e>=m.LATIN_SMALL_A&&e<=m.LATIN_SMALL_Z}function nt(e){return Ih(e)||rn(e)}function Ca(e){return nt(e)||Nh(e)}function Mn(e){return e+32}function mu(e){return e===m.SPACE||e===m.LINE_FEED||e===m.TABULATION||e===m.FORM_FEED}function Na(e){return mu(e)||e===m.SOLIDUS||e===m.GREATER_THAN_SIGN}function Sh(e){return e===m.NULL?S.nullCharacterReference:e>1114111?S.characterReferenceOutsideUnicodeRange:hu(e)?S.surrogateCharacterReference:fu(e)?S.noncharacterCharacterReference:du(e)||e===m.CARRIAGE_RETURN?S.controlCharacterReference:null}class wh{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=E.DATA,this.returnState=E.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new ph(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new _h(mh,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(S.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(S.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=Sh(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,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,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}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:X.START_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:X.END_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:X.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:X.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 r=this.currentToken;if(pu(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(S.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=Ut(t.tagName),t.type===X.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(S.endTagWithAttributes),t.selfClosing&&this._err(S.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 X.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case X.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case X.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:X.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=mu(t)?X.WHITESPACE_CHARACTER:t===m.NULL?X.NULL_CHARACTER:X.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(X.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=E.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Xe.Attribute:Xe.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===E.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case E.DATA:{this._stateData(t);break}case E.RCDATA:{this._stateRcdata(t);break}case E.RAWTEXT:{this._stateRawtext(t);break}case E.SCRIPT_DATA:{this._stateScriptData(t);break}case E.PLAINTEXT:{this._statePlaintext(t);break}case E.TAG_OPEN:{this._stateTagOpen(t);break}case E.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case E.TAG_NAME:{this._stateTagName(t);break}case E.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case E.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case E.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case E.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case E.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case E.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case E.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case E.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case E.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case E.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case E.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case E.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case E.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case E.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case E.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case E.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case E.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case E.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case E.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case E.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case E.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case E.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case E.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case E.BOGUS_COMMENT:{this._stateBogusComment(t);break}case E.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case E.COMMENT_START:{this._stateCommentStart(t);break}case E.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case E.COMMENT:{this._stateComment(t);break}case E.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case E.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case E.COMMENT_END:{this._stateCommentEnd(t);break}case E.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case E.DOCTYPE:{this._stateDoctype(t);break}case E.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case E.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case E.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case E.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case E.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case E.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case E.CDATA_SECTION:{this._stateCdataSection(t);break}case E.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case E.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case E.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case E.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case m.LESS_THAN_SIGN:{this.state=E.TAG_OPEN;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitCodePoint(t);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case m.AMPERSAND:{this._startCharacterReference();break}case m.LESS_THAN_SIGN:{this.state=E.RCDATA_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(le);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case m.LESS_THAN_SIGN:{this.state=E.RAWTEXT_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(le);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(le);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(le);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(nt(t))this._createStartTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case m.EXCLAMATION_MARK:{this.state=E.MARKUP_DECLARATION_OPEN;break}case m.SOLIDUS:{this.state=E.END_TAG_OPEN;break}case m.QUESTION_MARK:{this._err(S.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t);break}case m.EOF:{this._err(S.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(S.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=E.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(nt(t))this._createEndTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case m.GREATER_THAN_SIGN:{this._err(S.missingEndTagName),this.state=E.DATA;break}case m.EOF:{this._err(S.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(S.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_ATTRIBUTE_NAME;break}case m.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.tagName+=le;break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(rn(t)?Mn(t):t)}}_stateRcdataLessThanSign(t){t===m.SOLIDUS?this.state=E.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){nt(t)?(this.state=E.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=E.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 m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=E.BEFORE_ATTRIBUTE_NAME,!1;case m.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=E.SELF_CLOSING_START_TAG,!1;case m.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=E.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===m.SOLIDUS?this.state=E.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){nt(t)?(this.state=E.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case m.SOLIDUS:{this.state=E.SCRIPT_DATA_END_TAG_OPEN;break}case m.EXCLAMATION_MARK:{this.state=E.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=E.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){nt(t)?(this.state=E.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===m.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===m.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(le);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(le);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case m.HYPHEN_MINUS:{this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(le);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===m.SOLIDUS?this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:nt(t)?(this._emitChars("<"),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){nt(t)?(this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Ne.SCRIPT,!1)&&Na(this.preprocessor.peek(Ne.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ne.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(le);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(le);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case m.HYPHEN_MINUS:{this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(le);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===m.SOLIDUS?(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Ne.SCRIPT,!1)&&Na(this.preprocessor.peek(Ne.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ne.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:{this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case m.EQUALS_SIGN:{this._err(S.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=E.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:{this._leaveAttrName(),this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case m.EQUALS_SIGN:{this._leaveAttrName(),this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:{this._err(S.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.name+=le;break}default:this.currentAttr.name+=String.fromCodePoint(rn(t)?Mn(t):t)}}_stateAfterAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case m.EQUALS_SIGN:{this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{this.state=E.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this.state=E.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(S.missingAttributeValue),this.state=E.DATA,this.emitCurrentTagToken();break}default:this.state=E.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case m.QUOTATION_MARK:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.value+=le;break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case m.APOSTROPHE:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.value+=le;break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.value+=le;break}case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:case m.EQUALS_SIGN:case m.GRAVE_ACCENT:{this._err(S.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case m.SOLIDUS:{this._leaveAttrValue(),this.state=E.SELF_CLOSING_START_TAG;break}case m.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this._err(S.missingWhitespaceBetweenAttributes),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case m.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=E.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this._err(S.unexpectedSolidusInTag),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case m.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.data+=le;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ne.DASH_DASH,!0)?(this._createCommentToken(Ne.DASH_DASH.length+1),this.state=E.COMMENT_START):this._consumeSequenceIfMatch(Ne.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ne.DOCTYPE.length+1),this.state=E.DOCTYPE):this._consumeSequenceIfMatch(Ne.CDATA_START,!0)?this.inForeignNode?this.state=E.CDATA_SECTION:(this._err(S.cdataInHtmlContent),this._createCommentToken(Ne.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=E.BOGUS_COMMENT):this._ensureHibernation()||(this._err(S.incorrectlyOpenedComment),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_START_DASH;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptClosingOfEmptyComment),this.state=E.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptClosingOfEmptyComment),this.state=E.DATA,this.emitCurrentComment(n);break}case m.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_END_DASH;break}case m.LESS_THAN_SIGN:{n.data+="<",this.state=E.COMMENT_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.data+=le;break}case m.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case m.EXCLAMATION_MARK:{n.data+="!",this.state=E.COMMENT_LESS_THAN_SIGN_BANG;break}case m.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===m.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=E.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===m.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=E.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==m.GREATER_THAN_SIGN&&t!==m.EOF&&this._err(S.nestedComment),this.state=E.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case m.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case m.EXCLAMATION_MARK:{this.state=E.COMMENT_END_BANG;break}case m.HYPHEN_MINUS:{n.data+="-";break}case m.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{n.data+="--!",this.state=E.COMMENT_END_DASH;break}case m.GREATER_THAN_SIGN:{this._err(S.incorrectlyClosedComment),this.state=E.DATA,this.emitCurrentComment(n);break}case m.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=E.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case m.EOF:{this._err(S.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingWhitespaceBeforeDoctypeName),this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(rn(t))this._createDoctypeToken(String.fromCharCode(Mn(t))),this.state=E.DOCTYPE_NAME;else switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.NULL:{this._err(S.unexpectedNullCharacter),this._createDoctypeToken(le),this.state=E.DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this._err(S.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.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=E.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.AFTER_DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.name+=le;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(rn(t)?Mn(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ne.PUBLIC,!1)?this.state=E.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ne.SYSTEM,!1)?this.state=E.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(S.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.QUOTATION_MARK:{this._err(S.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(S.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(S.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(S.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case m.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.publicId+=le;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.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 m.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.publicId+=le;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.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 m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.QUOTATION_MARK:{this._err(S.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(S.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.QUOTATION_MARK:{this._err(S.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(S.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(S.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(S.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case m.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.systemId+=le;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.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 m.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.systemId+=le;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.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 m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.NULL:{this._err(S.unexpectedNullCharacter);break}case m.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case m.RIGHT_SQUARE_BRACKET:{this.state=E.CDATA_SECTION_BRACKET;break}case m.EOF:{this._err(S.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===m.RIGHT_SQUARE_BRACKET?this.state=E.CDATA_SECTION_END:(this._emitChars("]"),this.state=E.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case m.GREATER_THAN_SIGN:{this.state=E.DATA;break}case m.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=E.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(m.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ca(this.preprocessor.peek(1))?E.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ca(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===m.SEMICOLON&&this._err(S.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const gu=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),Ia=new Set([...gu,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),Gn=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),Lh=new Set([...Gn,l.OL,l.UL]),Oh=new Set([...Gn,l.BUTTON]),Sa=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),wa=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),Rh=new Set([l.TR,l.TEMPLATE,l.HTML]),Dh=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),Ph=new Set([l.TABLE,l.TEMPLATE,l.HTML]),Mh=new Set([l.TD,l.TH]);class vh{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=l.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===l.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===D.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 r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==D.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Qr,D.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Mh,D.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(Ph,D.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Dh,D.HTML)}clearBackToTableRowContext(){this.clearBackTo(Rh,D.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]===l.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]===l.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case D.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case D.SVG:{if(wa.has(i))return!1;break}case D.MATHML:{if(Sa.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Gn)}hasInListItemScope(t){return this.hasInDynamicScope(t,Lh)}hasInButtonScope(t){return this.hasInDynamicScope(t,Oh)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case D.HTML:{if(Qr.has(n))return!0;if(Gn.has(n))return!1;break}case D.SVG:{if(wa.has(n))return!1;break}case D.MATHML:{if(Sa.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===D.HTML)switch(this.tagIDs[n]){case t:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===D.HTML)switch(this.tagIDs[t]){case l.TBODY:case l.THEAD:case l.TFOOT:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===D.HTML)switch(this.tagIDs[n]){case t:return!0;case l.OPTION:case l.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&gu.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Ia.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Ia.has(this.currentTagId);)this.pop()}}const Ar=3;var qe;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(qe||(qe={}));const La={type:qe.Marker};class Bh{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){const o=this.entries[u];if(o.type===qe.Marker)break;const{element:c}=o;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const h=this.treeAdapter.getAttrList(c);h.length===i&&r.push({idx:u,attrs:h})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Ar)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Ar)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const u=r[s];u.attrs.every(o=>i.get(o.name)===o.value)&&(a+=1,a>=Ar&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(La)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:qe.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:qe.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(La);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===qe.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===qe.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===qe.Element&&n.element===t)}}const rt={createDocument(){return{nodeName:"#document",mode:Pe.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};rt.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(rt.isTextNode(n)){n.value+=t;return}}rt.appendChild(e,rt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&rt.isTextNode(r)?r.value+=t:rt.insertBefore(e,rt.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Eu="html",Fh="about:legacy-compat",Hh="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",bu=["+//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//"],Uh=[...bu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],jh=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Tu=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],zh=[...Tu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Oa(e,t){return t.some(n=>e.startsWith(n))}function $h(e){return e.name===Eu&&e.publicId===null&&(e.systemId===null||e.systemId===Fh)}function Yh(e){if(e.name!==Eu)return Pe.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Hh)return Pe.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),jh.has(n))return Pe.QUIRKS;let r=t===null?Uh:bu;if(Oa(n,r))return Pe.QUIRKS;if(r=t===null?Tu:zh,Oa(n,r))return Pe.LIMITED_QUIRKS}return Pe.NO_QUIRKS}const Ra={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},qh="definitionurl",Vh="definitionURL",Wh=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),Gh=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:D.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:D.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:D.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:D.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:D.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:D.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:D.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:D.XML}],["xml:space",{prefix:"xml",name:"space",namespace:D.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:D.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:D.XMLNS}]]),Qh=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),Kh=new Set([l.B,l.BIG,l.BLOCKQUOTE,l.BODY,l.BR,l.CENTER,l.CODE,l.DD,l.DIV,l.DL,l.DT,l.EM,l.EMBED,l.H1,l.H2,l.H3,l.H4,l.H5,l.H6,l.HEAD,l.HR,l.I,l.IMG,l.LI,l.LISTING,l.MENU,l.META,l.NOBR,l.OL,l.P,l.PRE,l.RUBY,l.S,l.SMALL,l.SPAN,l.STRONG,l.STRIKE,l.SUB,l.SUP,l.TABLE,l.TT,l.U,l.UL,l.VAR]);function Xh(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===mt.COLOR||r===mt.SIZE||r===mt.FACE)||Kh.has(t)}function xu(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===qh){e.attrs[t].name=Vh;break}}function ku(e){for(let t=0;t<e.attrs.length;t++){const n=Wh.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Si(e){for(let t=0;t<e.attrs.length;t++){const n=Gh.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Zh(e){const t=Qh.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ut(e.tagName))}function Jh(e,t){return t===D.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function ed(e,t,n){if(t===D.MATHML&&e===l.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===mt.ENCODING){const i=n[r].value.toLowerCase();return i===Ra.TEXT_HTML||i===Ra.APPLICATION_XML}}return t===D.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function td(e,t,n,r){return(!r||r===D.HTML)&&ed(e,t,n)||(!r||r===D.MATHML)&&Jh(e,t)}const nd="hidden",rd=8,id=3;var x;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(x||(x={}));const ad={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},_u=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),Da={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:rt,onParseError:null};class Pa{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=x.INITIAL,this.originalInsertionMode=x.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={...Da,...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 wh(this.options,this),this.activeFormattingElements=new Bh(this.treeAdapter),this.fragmentContextID=r?Ut(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new vh(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...Da,...n};t??(t=r.treeAdapter.createElement(C.TEMPLATE,D.HTML,[]));const i=r.treeAdapter.createElement("documentmock",D.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===l.TEMPLATE&&a.tmplInsertionModeStack.unshift(x.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:ad,s={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===D.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,D.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=x.TEXT}switchToPlaintextParsing(){this.insertionMode=x.TEXT,this.originalInsertionMode=x.IN_BODY,this.tokenizer.state=de.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)===C.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==D.HTML))switch(this.fragmentContextID){case l.TITLE:case l.TEXTAREA:{this.tokenizer.state=de.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=de.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=de.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=de.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),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 r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,D.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,D.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(C.HTML,D.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,l.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:o,endCol:c,endOffset:h}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:o,endCol:c,endOffset:h})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),a=n.type===X.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===l.SVG&&this.treeAdapter.getTagName(n)===C.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===D.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===l.MGLYPH||t.tagID===l.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,D.HTML)}_processToken(t){switch(t.type){case X.CHARACTER:{this.onCharacter(t);break}case X.NULL_CHARACTER:{this.onNullCharacter(t);break}case X.COMMENT:{this.onComment(t);break}case X.DOCTYPE:{this.onDoctype(t);break}case X.START_TAG:{this._processStartTag(t);break}case X.END_TAG:{this.onEndTag(t);break}case X.EOF:{this.onEof(t);break}case X.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return td(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===qe.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=x.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(l.P),this.openElements.popUntilTagNamePopped(l.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case l.TR:{this.insertionMode=x.IN_ROW;return}case l.TBODY:case l.THEAD:case l.TFOOT:{this.insertionMode=x.IN_TABLE_BODY;return}case l.CAPTION:{this.insertionMode=x.IN_CAPTION;return}case l.COLGROUP:{this.insertionMode=x.IN_COLUMN_GROUP;return}case l.TABLE:{this.insertionMode=x.IN_TABLE;return}case l.BODY:{this.insertionMode=x.IN_BODY;return}case l.FRAMESET:{this.insertionMode=x.IN_FRAMESET;return}case l.SELECT:{this._resetInsertionModeForSelect(t);return}case l.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case l.HTML:{this.insertionMode=this.headElement?x.AFTER_HEAD:x.BEFORE_HEAD;return}case l.TD:case l.TH:{if(t>0){this.insertionMode=x.IN_CELL;return}break}case l.HEAD:{if(t>0){this.insertionMode=x.IN_HEAD;return}break}}this.insertionMode=x.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===l.TEMPLATE)break;if(r===l.TABLE){this.insertionMode=x.IN_SELECT_IN_TABLE;return}}this.insertionMode=x.IN_SELECT}_isElementCausesFosterParenting(t){return _u.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case l.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===D.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case l.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,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 r=this.treeAdapter.getNamespaceURI(t);return Ch[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){vf(this,t);return}switch(this.insertionMode){case x.INITIAL:{Qt(this,t);break}case x.BEFORE_HTML:{un(this,t);break}case x.BEFORE_HEAD:{on(this,t);break}case x.IN_HEAD:{ln(this,t);break}case x.IN_HEAD_NO_SCRIPT:{cn(this,t);break}case x.AFTER_HEAD:{hn(this,t);break}case x.IN_BODY:case x.IN_CAPTION:case x.IN_CELL:case x.IN_TEMPLATE:{yu(this,t);break}case x.TEXT:case x.IN_SELECT:case x.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case x.IN_TABLE:case x.IN_TABLE_BODY:case x.IN_ROW:{yr(this,t);break}case x.IN_TABLE_TEXT:{Lu(this,t);break}case x.IN_COLUMN_GROUP:{Qn(this,t);break}case x.AFTER_BODY:{Kn(this,t);break}case x.AFTER_AFTER_BODY:{$n(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Mf(this,t);return}switch(this.insertionMode){case x.INITIAL:{Qt(this,t);break}case x.BEFORE_HTML:{un(this,t);break}case x.BEFORE_HEAD:{on(this,t);break}case x.IN_HEAD:{ln(this,t);break}case x.IN_HEAD_NO_SCRIPT:{cn(this,t);break}case x.AFTER_HEAD:{hn(this,t);break}case x.TEXT:{this._insertCharacters(t);break}case x.IN_TABLE:case x.IN_TABLE_BODY:case x.IN_ROW:{yr(this,t);break}case x.IN_COLUMN_GROUP:{Qn(this,t);break}case x.AFTER_BODY:{Kn(this,t);break}case x.AFTER_AFTER_BODY:{$n(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Kr(this,t);return}switch(this.insertionMode){case x.INITIAL:case x.BEFORE_HTML:case x.BEFORE_HEAD:case x.IN_HEAD:case x.IN_HEAD_NO_SCRIPT:case x.AFTER_HEAD:case x.IN_BODY:case x.IN_TABLE:case x.IN_CAPTION:case x.IN_COLUMN_GROUP:case x.IN_TABLE_BODY:case x.IN_ROW:case x.IN_CELL:case x.IN_SELECT:case x.IN_SELECT_IN_TABLE:case x.IN_TEMPLATE:case x.IN_FRAMESET:case x.AFTER_FRAMESET:{Kr(this,t);break}case x.IN_TABLE_TEXT:{Kt(this,t);break}case x.AFTER_BODY:{dd(this,t);break}case x.AFTER_AFTER_BODY:case x.AFTER_AFTER_FRAMESET:{fd(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case x.INITIAL:{pd(this,t);break}case x.BEFORE_HEAD:case x.IN_HEAD:case x.IN_HEAD_NO_SCRIPT:case x.AFTER_HEAD:{this._err(t,S.misplacedDoctype);break}case x.IN_TABLE_TEXT:{Kt(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,S.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Bf(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case x.INITIAL:{Qt(this,t);break}case x.BEFORE_HTML:{md(this,t);break}case x.BEFORE_HEAD:{Ed(this,t);break}case x.IN_HEAD:{ze(this,t);break}case x.IN_HEAD_NO_SCRIPT:{xd(this,t);break}case x.AFTER_HEAD:{_d(this,t);break}case x.IN_BODY:{ke(this,t);break}case x.IN_TABLE:{Mt(this,t);break}case x.IN_TABLE_TEXT:{Kt(this,t);break}case x.IN_CAPTION:{Tf(this,t);break}case x.IN_COLUMN_GROUP:{Oi(this,t);break}case x.IN_TABLE_BODY:{hr(this,t);break}case x.IN_ROW:{dr(this,t);break}case x.IN_CELL:{_f(this,t);break}case x.IN_SELECT:{Du(this,t);break}case x.IN_SELECT_IN_TABLE:{yf(this,t);break}case x.IN_TEMPLATE:{Nf(this,t);break}case x.AFTER_BODY:{Sf(this,t);break}case x.IN_FRAMESET:{wf(this,t);break}case x.AFTER_FRAMESET:{Of(this,t);break}case x.AFTER_AFTER_BODY:{Df(this,t);break}case x.AFTER_AFTER_FRAMESET:{Pf(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Ff(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case x.INITIAL:{Qt(this,t);break}case x.BEFORE_HTML:{gd(this,t);break}case x.BEFORE_HEAD:{bd(this,t);break}case x.IN_HEAD:{Td(this,t);break}case x.IN_HEAD_NO_SCRIPT:{kd(this,t);break}case x.AFTER_HEAD:{Ad(this,t);break}case x.IN_BODY:{cr(this,t);break}case x.TEXT:{lf(this,t);break}case x.IN_TABLE:{Tn(this,t);break}case x.IN_TABLE_TEXT:{Kt(this,t);break}case x.IN_CAPTION:{xf(this,t);break}case x.IN_COLUMN_GROUP:{kf(this,t);break}case x.IN_TABLE_BODY:{Xr(this,t);break}case x.IN_ROW:{Ru(this,t);break}case x.IN_CELL:{Af(this,t);break}case x.IN_SELECT:{Pu(this,t);break}case x.IN_SELECT_IN_TABLE:{Cf(this,t);break}case x.IN_TEMPLATE:{If(this,t);break}case x.AFTER_BODY:{vu(this,t);break}case x.IN_FRAMESET:{Lf(this,t);break}case x.AFTER_FRAMESET:{Rf(this,t);break}case x.AFTER_AFTER_BODY:{$n(this,t);break}}}onEof(t){switch(this.insertionMode){case x.INITIAL:{Qt(this,t);break}case x.BEFORE_HTML:{un(this,t);break}case x.BEFORE_HEAD:{on(this,t);break}case x.IN_HEAD:{ln(this,t);break}case x.IN_HEAD_NO_SCRIPT:{cn(this,t);break}case x.AFTER_HEAD:{hn(this,t);break}case x.IN_BODY:case x.IN_TABLE:case x.IN_CAPTION:case x.IN_COLUMN_GROUP:case x.IN_TABLE_BODY:case x.IN_ROW:case x.IN_CELL:case x.IN_SELECT:case x.IN_SELECT_IN_TABLE:{Su(this,t);break}case x.TEXT:{cf(this,t);break}case x.IN_TABLE_TEXT:{Kt(this,t);break}case x.IN_TEMPLATE:{Mu(this,t);break}case x.AFTER_BODY:case x.IN_FRAMESET:case x.AFTER_FRAMESET:case x.AFTER_AFTER_BODY:case x.AFTER_AFTER_FRAMESET:{Li(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===m.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 x.IN_HEAD:case x.IN_HEAD_NO_SCRIPT:case x.AFTER_HEAD:case x.TEXT:case x.IN_COLUMN_GROUP:case x.IN_SELECT:case x.IN_SELECT_IN_TABLE:case x.IN_FRAMESET:case x.AFTER_FRAMESET:{this._insertCharacters(t);break}case x.IN_BODY:case x.IN_CAPTION:case x.IN_CELL:case x.IN_TEMPLATE:case x.AFTER_BODY:case x.AFTER_AFTER_BODY:case x.AFTER_AFTER_FRAMESET:{Au(this,t);break}case x.IN_TABLE:case x.IN_TABLE_BODY:case x.IN_ROW:{yr(this,t);break}case x.IN_TABLE_TEXT:{wu(this,t);break}}}}function sd(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Iu(e,t),n}function ud(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function od(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const u=e.activeFormattingElements.getElementEntry(s),o=u&&a>=id;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(s)):(s=ld(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function ld(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function cd(e,t,n){const r=e.treeAdapter.getTagName(t),i=Ut(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===l.TEMPLATE&&a===D.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function hd(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function wi(e,t){for(let n=0;n<rd;n++){const r=sd(e,t);if(!r)break;const i=ud(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=od(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&cd(e,s,a),hd(e,i,r)}}function Kr(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function dd(e,t){e._appendCommentNode(t,e.openElements.items[0])}function fd(e,t){e._appendCommentNode(t,e.document)}function Li(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function pd(e,t){e._setDocumentType(t);const n=t.forceQuirks?Pe.QUIRKS:Yh(t);$h(t)||e._err(t,S.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=x.BEFORE_HTML}function Qt(e,t){e._err(t,S.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Pe.QUIRKS),e.insertionMode=x.BEFORE_HTML,e._processToken(t)}function md(e,t){t.tagID===l.HTML?(e._insertElement(t,D.HTML),e.insertionMode=x.BEFORE_HEAD):un(e,t)}function gd(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&un(e,t)}function un(e,t){e._insertFakeRootElement(),e.insertionMode=x.BEFORE_HEAD,e._processToken(t)}function Ed(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.HEAD:{e._insertElement(t,D.HTML),e.headElement=e.openElements.current,e.insertionMode=x.IN_HEAD;break}default:on(e,t)}}function bd(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?on(e,t):e._err(t,S.endTagWithoutMatchingOpenElement)}function on(e,t){e._insertFakeElement(C.HEAD,l.HEAD),e.headElement=e.openElements.current,e.insertionMode=x.IN_HEAD,e._processToken(t)}function ze(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TITLE:{e._switchToTextParsing(t,de.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,de.RAWTEXT):(e._insertElement(t,D.HTML),e.insertionMode=x.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,de.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,de.SCRIPT_DATA);break}case l.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=x.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(x.IN_TEMPLATE);break}case l.HEAD:{e._err(t,S.misplacedStartTagForHeadElement);break}default:ln(e,t)}}function Td(e,t){switch(t.tagID){case l.HEAD:{e.openElements.pop(),e.insertionMode=x.AFTER_HEAD;break}case l.BODY:case l.BR:case l.HTML:{ln(e,t);break}case l.TEMPLATE:{_t(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function _t(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==l.TEMPLATE&&e._err(t,S.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,S.endTagWithoutMatchingOpenElement)}function ln(e,t){e.openElements.pop(),e.insertionMode=x.AFTER_HEAD,e._processToken(t)}function xd(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.BASEFONT:case l.BGSOUND:case l.HEAD:case l.LINK:case l.META:case l.NOFRAMES:case l.STYLE:{ze(e,t);break}case l.NOSCRIPT:{e._err(t,S.nestedNoscriptInHead);break}default:cn(e,t)}}function kd(e,t){switch(t.tagID){case l.NOSCRIPT:{e.openElements.pop(),e.insertionMode=x.IN_HEAD;break}case l.BR:{cn(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function cn(e,t){const n=t.type===X.EOF?S.openElementsLeftAfterEof:S.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=x.IN_HEAD,e._processToken(t)}function _d(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.BODY:{e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=x.IN_BODY;break}case l.FRAMESET:{e._insertElement(t,D.HTML),e.insertionMode=x.IN_FRAMESET;break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{e._err(t,S.abandonedHeadElementChild),e.openElements.push(e.headElement,l.HEAD),ze(e,t),e.openElements.remove(e.headElement);break}case l.HEAD:{e._err(t,S.misplacedStartTagForHeadElement);break}default:hn(e,t)}}function Ad(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{hn(e,t);break}case l.TEMPLATE:{_t(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function hn(e,t){e._insertFakeElement(C.BODY,l.BODY),e.insertionMode=x.IN_BODY,lr(e,t)}function lr(e,t){switch(t.type){case X.CHARACTER:{yu(e,t);break}case X.WHITESPACE_CHARACTER:{Au(e,t);break}case X.COMMENT:{Kr(e,t);break}case X.START_TAG:{ke(e,t);break}case X.END_TAG:{cr(e,t);break}case X.EOF:{Su(e,t);break}}}function Au(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function yu(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function yd(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Cd(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Nd(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,D.HTML),e.insertionMode=x.IN_FRAMESET)}function Id(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML)}function Sd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Qr.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,D.HTML)}function wd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Ld(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),n||(e.formElement=e.openElements.current))}function Od(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===l.LI&&i===l.LI||(n===l.DD||n===l.DT)&&(i===l.DD||i===l.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==l.ADDRESS&&i!==l.DIV&&i!==l.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML)}function Rd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.tokenizer.state=de.PLAINTEXT}function Dd(e,t){e.openElements.hasInScope(l.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.framesetOk=!1}function Pd(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(C.A);n&&(wi(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Md(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function vd(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&(wi(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Bd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Fd(e,t){e.treeAdapter.getDocumentMode(e.document)!==Pe.QUIRKS&&e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=x.IN_TABLE}function Cu(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Nu(e){const t=pu(e,mt.TYPE);return t!=null&&t.toLowerCase()===nd}function Hd(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),Nu(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Ud(e,t){e._appendElement(t,D.HTML),t.ackSelfClosing=!0}function jd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function zd(e,t){t.tagName=C.IMG,t.tagID=l.IMG,Cu(e,t)}function $d(e,t){e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.tokenizer.state=de.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=x.TEXT}function Yd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,de.RAWTEXT)}function qd(e,t){e.framesetOk=!1,e._switchToTextParsing(t,de.RAWTEXT)}function Ma(e,t){e._switchToTextParsing(t,de.RAWTEXT)}function Vd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===x.IN_TABLE||e.insertionMode===x.IN_CAPTION||e.insertionMode===x.IN_TABLE_BODY||e.insertionMode===x.IN_ROW||e.insertionMode===x.IN_CELL?x.IN_SELECT_IN_TABLE:x.IN_SELECT}function Wd(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function Gd(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,D.HTML)}function Qd(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,D.HTML)}function Kd(e,t){e._reconstructActiveFormattingElements(),xu(t),Si(t),t.selfClosing?e._appendElement(t,D.MATHML):e._insertElement(t,D.MATHML),t.ackSelfClosing=!0}function Xd(e,t){e._reconstructActiveFormattingElements(),ku(t),Si(t),t.selfClosing?e._appendElement(t,D.SVG):e._insertElement(t,D.SVG),t.ackSelfClosing=!0}function va(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function ke(e,t){switch(t.tagID){case l.I:case l.S:case l.B:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.SMALL:case l.STRIKE:case l.STRONG:{Md(e,t);break}case l.A:{Pd(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{Sd(e,t);break}case l.P:case l.DL:case l.OL:case l.UL:case l.DIV:case l.DIR:case l.NAV:case l.MAIN:case l.MENU:case l.ASIDE:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.DETAILS:case l.ADDRESS:case l.ARTICLE:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{Id(e,t);break}case l.LI:case l.DD:case l.DT:{Od(e,t);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{Cu(e,t);break}case l.HR:{jd(e,t);break}case l.RB:case l.RTC:{Gd(e,t);break}case l.RT:case l.RP:{Qd(e,t);break}case l.PRE:case l.LISTING:{wd(e,t);break}case l.XMP:{Yd(e,t);break}case l.SVG:{Xd(e,t);break}case l.HTML:{yd(e,t);break}case l.BASE:case l.LINK:case l.META:case l.STYLE:case l.TITLE:case l.SCRIPT:case l.BGSOUND:case l.BASEFONT:case l.TEMPLATE:{ze(e,t);break}case l.BODY:{Cd(e,t);break}case l.FORM:{Ld(e,t);break}case l.NOBR:{vd(e,t);break}case l.MATH:{Kd(e,t);break}case l.TABLE:{Fd(e,t);break}case l.INPUT:{Hd(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{Ud(e,t);break}case l.IMAGE:{zd(e,t);break}case l.BUTTON:{Dd(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{Bd(e,t);break}case l.IFRAME:{qd(e,t);break}case l.SELECT:{Vd(e,t);break}case l.OPTION:case l.OPTGROUP:{Wd(e,t);break}case l.NOEMBED:case l.NOFRAMES:{Ma(e,t);break}case l.FRAMESET:{Nd(e,t);break}case l.TEXTAREA:{$d(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?Ma(e,t):va(e,t);break}case l.PLAINTEXT:{Rd(e,t);break}case l.COL:case l.TH:case l.TD:case l.TR:case l.HEAD:case l.FRAME:case l.TBODY:case l.TFOOT:case l.THEAD:case l.CAPTION:case l.COLGROUP:break;default:va(e,t)}}function Zd(e,t){if(e.openElements.hasInScope(l.BODY)&&(e.insertionMode=x.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Jd(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=x.AFTER_BODY,vu(e,t))}function ef(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function tf(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(l.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(l.FORM):n&&e.openElements.remove(n))}function nf(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(C.P,l.P),e._closePElement()}function rf(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function af(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function sf(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function uf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function of(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(C.BR,l.BR),e.openElements.pop(),e.framesetOk=!1}function Iu(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==l.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function cr(e,t){switch(t.tagID){case l.A:case l.B:case l.I:case l.S:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.NOBR:case l.SMALL:case l.STRIKE:case l.STRONG:{wi(e,t);break}case l.P:{nf(e);break}case l.DL:case l.UL:case l.OL:case l.DIR:case l.DIV:case l.NAV:case l.PRE:case l.MAIN:case l.MENU:case l.ASIDE:case l.BUTTON:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.ADDRESS:case l.ARTICLE:case l.DETAILS:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.LISTING:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{ef(e,t);break}case l.LI:{rf(e);break}case l.DD:case l.DT:{af(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{sf(e);break}case l.BR:{of(e);break}case l.BODY:{Zd(e,t);break}case l.HTML:{Jd(e,t);break}case l.FORM:{tf(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{uf(e,t);break}case l.TEMPLATE:{_t(e,t);break}default:Iu(e,t)}}function Su(e,t){e.tmplInsertionModeStack.length>0?Mu(e,t):Li(e,t)}function lf(e,t){var n;t.tagID===l.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function cf(e,t){e._err(t,S.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function yr(e,t){if(e.openElements.currentTagId!==void 0&&_u.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=x.IN_TABLE_TEXT,t.type){case X.CHARACTER:{Lu(e,t);break}case X.WHITESPACE_CHARACTER:{wu(e,t);break}}else In(e,t)}function hf(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,D.HTML),e.insertionMode=x.IN_CAPTION}function df(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=x.IN_COLUMN_GROUP}function ff(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(C.COLGROUP,l.COLGROUP),e.insertionMode=x.IN_COLUMN_GROUP,Oi(e,t)}function pf(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=x.IN_TABLE_BODY}function mf(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(C.TBODY,l.TBODY),e.insertionMode=x.IN_TABLE_BODY,hr(e,t)}function gf(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Ef(e,t){Nu(t)?e._appendElement(t,D.HTML):In(e,t),t.ackSelfClosing=!0}function bf(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,D.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Mt(e,t){switch(t.tagID){case l.TD:case l.TH:case l.TR:{mf(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{ze(e,t);break}case l.COL:{ff(e,t);break}case l.FORM:{bf(e,t);break}case l.TABLE:{gf(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{pf(e,t);break}case l.INPUT:{Ef(e,t);break}case l.CAPTION:{hf(e,t);break}case l.COLGROUP:{df(e,t);break}default:In(e,t)}}function Tn(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{_t(e,t);break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:In(e,t)}}function In(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,lr(e,t),e.fosterParentingEnabled=n}function wu(e,t){e.pendingCharacterTokens.push(t)}function Lu(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Kt(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)In(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Ou=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function Tf(e,t){const n=t.tagID;Ou.has(n)?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=x.IN_TABLE,Mt(e,t)):ke(e,t)}function xf(e,t){const n=t.tagID;switch(n){case l.CAPTION:case l.TABLE:{e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=x.IN_TABLE,n===l.TABLE&&Tn(e,t));break}case l.BODY:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:cr(e,t)}}function Oi(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.COL:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{ze(e,t);break}default:Qn(e,t)}}function kf(e,t){switch(t.tagID){case l.COLGROUP:{e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=x.IN_TABLE);break}case l.TEMPLATE:{_t(e,t);break}case l.COL:break;default:Qn(e,t)}}function Qn(e,t){e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=x.IN_TABLE,e._processToken(t))}function hr(e,t){switch(t.tagID){case l.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,D.HTML),e.insertionMode=x.IN_ROW;break}case l.TH:case l.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(C.TR,l.TR),e.insertionMode=x.IN_ROW,dr(e,t);break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE,Mt(e,t));break}default:Mt(e,t)}}function Xr(e,t){const n=t.tagID;switch(t.tagID){case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE);break}case l.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE,Tn(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:case l.TR:break;default:Tn(e,t)}}function dr(e,t){switch(t.tagID){case l.TH:case l.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,D.HTML),e.insertionMode=x.IN_CELL,e.activeFormattingElements.insertMarker();break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE_BODY,hr(e,t));break}default:Mt(e,t)}}function Ru(e,t){switch(t.tagID){case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE_BODY);break}case l.TABLE:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE_BODY,Xr(e,t));break}case l.TBODY:case l.TFOOT:case l.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(l.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE_BODY,Xr(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:break;default:Tn(e,t)}}function _f(e,t){const n=t.tagID;Ou.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),dr(e,t)):ke(e,t)}function Af(e,t){const n=t.tagID;switch(n){case l.TD:case l.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=x.IN_ROW);break}case l.TABLE:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Ru(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:cr(e,t)}}function Du(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case l.OPTGROUP:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case l.HR:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.INPUT:case l.KEYGEN:case l.TEXTAREA:case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),t.tagID!==l.SELECT&&e._processStartTag(t));break}case l.SCRIPT:case l.TEMPLATE:{ze(e,t);break}}}function Pu(e,t){switch(t.tagID){case l.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===l.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===l.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop();break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop();break}case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode());break}case l.TEMPLATE:{_t(e,t);break}}}function yf(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Du(e,t)}function Cf(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Pu(e,t)}function Nf(e,t){switch(t.tagID){case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{ze(e,t);break}case l.CAPTION:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.tmplInsertionModeStack[0]=x.IN_TABLE,e.insertionMode=x.IN_TABLE,Mt(e,t);break}case l.COL:{e.tmplInsertionModeStack[0]=x.IN_COLUMN_GROUP,e.insertionMode=x.IN_COLUMN_GROUP,Oi(e,t);break}case l.TR:{e.tmplInsertionModeStack[0]=x.IN_TABLE_BODY,e.insertionMode=x.IN_TABLE_BODY,hr(e,t);break}case l.TD:case l.TH:{e.tmplInsertionModeStack[0]=x.IN_ROW,e.insertionMode=x.IN_ROW,dr(e,t);break}default:e.tmplInsertionModeStack[0]=x.IN_BODY,e.insertionMode=x.IN_BODY,ke(e,t)}}function If(e,t){t.tagID===l.TEMPLATE&&_t(e,t)}function Mu(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Li(e,t)}function Sf(e,t){t.tagID===l.HTML?ke(e,t):Kn(e,t)}function vu(e,t){var n;if(t.tagID===l.HTML){if(e.fragmentContext||(e.insertionMode=x.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===l.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Kn(e,t)}function Kn(e,t){e.insertionMode=x.IN_BODY,lr(e,t)}function wf(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.FRAMESET:{e._insertElement(t,D.HTML);break}case l.FRAME:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.NOFRAMES:{ze(e,t);break}}}function Lf(e,t){t.tagID===l.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==l.FRAMESET&&(e.insertionMode=x.AFTER_FRAMESET))}function Of(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.NOFRAMES:{ze(e,t);break}}}function Rf(e,t){t.tagID===l.HTML&&(e.insertionMode=x.AFTER_AFTER_FRAMESET)}function Df(e,t){t.tagID===l.HTML?ke(e,t):$n(e,t)}function $n(e,t){e.insertionMode=x.IN_BODY,lr(e,t)}function Pf(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.NOFRAMES:{ze(e,t);break}}}function Mf(e,t){t.chars=le,e._insertCharacters(t)}function vf(e,t){e._insertCharacters(t),e.framesetOk=!1}function Bu(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==D.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Bf(e,t){if(Xh(t))Bu(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===D.MATHML?xu(t):r===D.SVG&&(Zh(t),ku(t)),Si(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Ff(e,t){if(t.tagID===l.P||t.tagID===l.BR){Bu(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===D.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}C.AREA,C.BASE,C.BASEFONT,C.BGSOUND,C.BR,C.COL,C.EMBED,C.FRAME,C.HR,C.IMG,C.INPUT,C.KEYGEN,C.LINK,C.META,C.PARAM,C.SOURCE,C.TRACK,C.WBR;const fr=Fu("end"),Ve=Fu("start");function Fu(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Hu(e){const t=Ve(e),n=fr(e);if(t&&n)return{start:t,end:n}}const Hf=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Uf=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Ba={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Uu(e,t){const n=Kf(e),r=lu("type",{handlers:{root:jf,element:zf,text:$f,comment:zu,doctype:Yf,raw:Vf},unknown:Wf}),i={parser:n?new Pa(Ba):Pa.getFragmentParser(void 0,Ba),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),jt(i,Ve());const a=n?i.parser.document:i.parser.getFragment(),s=Kc(a,{file:i.options.file});return i.stitches&&st(s,"comment",function(u,o,c){const h=u;if(h.value.stitch&&c&&o!==void 0){const d=c.children;return d[o]=h.value.stitch,o}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function ju(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function jf(e,t){ju(e.children,t)}function zf(e,t){Gf(e,t),ju(e.children,t),Qf(e,t)}function $f(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:X.CHARACTER,chars:e.value,location:Sn(e)};jt(t,Ve(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Yf(e,t){const n={type:X.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Sn(e)};jt(t,Ve(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function qf(e,t){t.stitches=!0;const n=Xf(e);if("children"in e&&"children"in n){const r=Uu({type:"root",children:e.children},t.options);n.children=r.children}zu({type:"comment",value:{stitch:n}},t)}function zu(e,t){const n=e.value,r={type:X.COMMENT,data:n,location:Sn(e)};jt(t,Ve(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Vf(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,$u(t,Ve(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Hf,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function Wf(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))qf(n,t);else{let r="";throw Uf.has(n.type)&&(r=". 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"+r)}}function jt(e,t){$u(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=de.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function $u(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function Gf(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===de.PLAINTEXT)return;jt(t,Ve(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:pt.html;i===pt.html&&n==="svg"&&(i=pt.svg);const a=th({...e,children:[]},{space:i===pt.svg?"svg":"html"}),s={type:X.START_TAG,tagName:n,tagID:Ut(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Sn(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Qf(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&lh.includes(n)||t.parser.tokenizer.state===de.PLAINTEXT)return;jt(t,fr(e));const r={type:X.END_TAG,tagName:n,tagID:Ut(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Sn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===de.RCDATA||t.parser.tokenizer.state===de.RAWTEXT||t.parser.tokenizer.state===de.SCRIPT_DATA)&&(t.parser.tokenizer.state=de.DATA)}function Kf(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Sn(e){const t=Ve(e)||{line:void 0,column:void 0,offset:void 0},n=fr(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Xf(e){return"children"in e?Et({...e,children:[]}):Et(e)}function Zr(e){return function(t,n){return Uu(t,{...e,file:n})}}const ht=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],dn={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...ht,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...ht],h2:[["className","sr-only"]],img:[...ht,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...ht,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...ht],table:[...ht],ul:[...ht,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},it={}.hasOwnProperty;function Zf(e,t){let n={type:"root",children:[]};const r={schema:t?{...dn,...t}:dn,stack:[]},i=Yu(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function Yu(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return Jf(e,n);case"doctype":return e0(e,n);case"element":return t0(e,n);case"root":return n0(e,n);case"text":return r0(e,n)}}}function Jf(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return wn(a,t),a}}function e0(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return wn(n,t),n}}function t0(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=qu(e,t.children),i=i0(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&it.call(e.schema.ancestors,n))){const u=e.schema.ancestors[n];let o=-1;for(a=!1;++o<u.length;)e.stack.includes(u[o])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const s={type:"element",tagName:n,properties:i,children:r};return wn(s,t),s}function n0(e,t){const r={type:"root",children:qu(e,t.children)};return wn(r,t),r}function r0(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return wn(r,t),r}function qu(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=Yu(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function i0(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&it.call(r,n)?r[n]:void 0,s=r&&it.call(r,"*")?r["*"]:void 0,u=t&&typeof t=="object"?t:{},o={};let c;for(c in u)if(it.call(u,c)){const h=u[c];let d=Fa(e,Ha(a,c),c,h);d==null&&(d=Fa(e,Ha(s,c),c,h)),d!=null&&(o[c]=d)}if(i&&it.call(i,n)){const h=i[n];for(c in h)it.call(h,c)&&!it.call(o,c)&&(o[c]=h[c])}return o}function Fa(e,t,n,r){return t?Array.isArray(r)?a0(e,t,n,r):Vu(e,t,n,r):void 0}function a0(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const s=Vu(e,t,n,r[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function Vu(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&s0(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const s=t[a];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){i=!0;break}}else if(s===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function s0(e,t,n){const r=e.schema.protocols&&it.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),a=i.indexOf(":"),s=i.indexOf("?"),u=i.indexOf("#"),o=i.indexOf("/");if(a<0||o>-1&&a>o||s>-1&&a>s||u>-1&&a>u)return!0;let c=-1;for(;++c<r.length;){const h=r[c];if(a===h.length&&i.slice(0,h.length)===h)return!0}return!1}function wn(e,t){const n=Hu(t);t.data&&(e.data=Et(t.data)),n&&(e.position=n)}function Ha(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Wu(e){return function(t){return Zf(t,e)}}function Ua(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const ye=lt(/[A-Za-z]/),xe=lt(/[\dA-Za-z]/),u0=lt(/[#-'*+\--9=?A-Z^-~]/);function Xn(e){return e!==null&&(e<32||e===127)}const Jr=lt(/\d/),o0=lt(/[\dA-Fa-f]/),l0=lt(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function se(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}const pr=lt(new RegExp("\\p{P}|\\p{S}","u")),bt=lt(/\s/);function lt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function c0(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function h0(e,t,n){const i=ar((n||{}).ignore||[]),a=d0(t);let s=-1;for(;++s<a.length;)xi(e,"text",u);function u(c,h){let d=-1,f;for(;++d<h.length;){const p=h[d],b=f?f.children:void 0;if(i(p,b?b.indexOf(p):void 0,f))return;f=p}if(f)return o(c,h)}function o(c,h){const d=h[h.length-1],f=a[s][0],p=a[s][1];let b=0;const I=d.children.indexOf(c);let A=!1,O=[];f.lastIndex=0;let L=f.exec(c.value);for(;L;){const U=L.index,j={index:L.index,input:L.input,stack:[...h,c]};let w=p(...L,j);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?f.lastIndex=U+1:(b!==U&&O.push({type:"text",value:c.value.slice(b,U)}),Array.isArray(w)?O.push(...w):w&&O.push(w),b=U+L[0].length,A=!0),!f.global)break;L=f.exec(c.value)}return A?(b<c.value.length&&O.push({type:"text",value:c.value.slice(b)}),d.children.splice(I,1,...O)):O=[c],I+O.length}}function d0(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([f0(i[0]),p0(i[1])])}return t}function f0(e){return typeof e=="string"?new RegExp(c0(e),"g"):e}function p0(e){return typeof e=="function"?e:function(){return e}}const Cr="phrasing",Nr=["autolink","link","image","label"];function m0(){return{transforms:[_0],enter:{literalAutolink:E0,literalAutolinkEmail:Ir,literalAutolinkHttp:Ir,literalAutolinkWww:Ir},exit:{literalAutolink:k0,literalAutolinkEmail:x0,literalAutolinkHttp:b0,literalAutolinkWww:T0}}}function g0(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Cr,notInConstruct:Nr},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Cr,notInConstruct:Nr},{character:":",before:"[ps]",after:"\\/",inConstruct:Cr,notInConstruct:Nr}]}}function E0(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ir(e){this.config.enter.autolinkProtocol.call(this,e)}function b0(e){this.config.exit.autolinkProtocol.call(this,e)}function T0(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function x0(e){this.config.exit.autolinkEmail.call(this,e)}function k0(e){this.exit(e)}function _0(e){h0(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,A0],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),y0]],{ignore:["link","linkReference"]})}function A0(e,t,n,r,i){let a="";if(!Gu(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!C0(n)))return!1;const s=N0(n+r);if(!s[0])return!1;const u={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[u,{type:"text",value:s[1]}]:u}function y0(e,t,n,r){return!Gu(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function C0(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function N0(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Ua(e,"(");let a=Ua(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Gu(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||bt(n)||pr(n))&&(!t||n!==47)}function je(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Qu.peek=M0;function I0(){this.buffer()}function S0(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function w0(){this.buffer()}function L0(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function O0(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=je(this.sliceSerialize(e)).toLowerCase(),n.label=t}function R0(e){this.exit(e)}function D0(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=je(this.sliceSerialize(e)).toLowerCase(),n.label=t}function P0(e){this.exit(e)}function M0(){return"["}function Qu(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),u=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),s(),a+=i.move("]"),a}function v0(){return{enter:{gfmFootnoteCallString:I0,gfmFootnoteCall:S0,gfmFootnoteDefinitionLabelString:w0,gfmFootnoteDefinition:L0},exit:{gfmFootnoteCallString:O0,gfmFootnoteCall:R0,gfmFootnoteDefinitionLabelString:D0,gfmFootnoteDefinition:P0}}}function B0(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Qu},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const u=a.createTracker(s);let o=u.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return o+=u.move(a.safe(a.associationId(r),{before:o,after:"]"})),h(),o+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),o+=u.move((t?`
4
4
  `:" ")+a.indentLines(a.containerFlow(r,u.current()),t?Ku:F0))),c(),o}}function F0(e,t,n){return t===0?e:Ku(e,t,n)}function Ku(e,t,n){return(n?"":" ")+e}const H0=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Xu.peek=Y0;function U0(){return{canContainEols:["delete"],enter:{strikethrough:z0},exit:{strikethrough:$0}}}function j0(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:H0}],handlers:{delete:Xu}}}function z0(e){this.enter({type:"delete",children:[]},e)}function $0(e){this.exit(e)}function Xu(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function Y0(){return"~"}function q0(e){return e.length}function V0(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||q0,a=[],s=[],u=[],o=[];let c=0,h=-1;for(;++h<e.length;){const y=[],I=[];let A=-1;for(e[h].length>c&&(c=e[h].length);++A<e[h].length;){const O=W0(e[h][A]);if(n.alignDelimiters!==!1){const L=i(O);I[A]=L,(o[A]===void 0||L>o[A])&&(o[A]=L)}y.push(O)}s[h]=y,u[h]=I}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)a[d]=ja(r[d]);else{const y=ja(r);for(;++d<c;)a[d]=y}d=-1;const f=[],p=[];for(;++d<c;){const y=a[d];let I="",A="";y===99?(I=":",A=":"):y===108?I=":":y===114&&(A=":");let O=n.alignDelimiters===!1?1:Math.max(1,o[d]-I.length-A.length);const L=I+"-".repeat(O)+A;n.alignDelimiters!==!1&&(O=I.length+O+A.length,O>o[d]&&(o[d]=O),p[d]=O),f[d]=L}s.splice(1,0,f),u.splice(1,0,p),h=-1;const b=[];for(;++h<s.length;){const y=s[h],I=u[h];d=-1;const A=[];for(;++d<c;){const O=y[d]||"";let L="",U="";if(n.alignDelimiters!==!1){const j=o[d]-(I[d]||0),w=a[d];w===114?L=" ".repeat(j):w===99?j%2?(L=" ".repeat(j/2+.5),U=" ".repeat(j/2-.5)):(L=" ".repeat(j/2),U=L):U=" ".repeat(j)}n.delimiterStart!==!1&&!d&&A.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&O==="")&&(n.delimiterStart!==!1||d)&&A.push(" "),n.alignDelimiters!==!1&&A.push(L),A.push(O),n.alignDelimiters!==!1&&A.push(U),n.padding!==!1&&A.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&A.push("|")}b.push(n.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return b.join(`
5
5
  `)}function W0(e){return e==null?"":String(e)}function ja(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function G0(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),Q0);return i(),s}function Q0(e,t,n){return">"+(n?"":" ")+e}function K0(e,t){return za(e,t.inConstruct,!0)&&!za(e,t.notInConstruct,!1)}function za(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function $a(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
@@ -113,7 +113,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error
113
113
  `||h==="\r"){o=!0;break}if(!o)return u;let c=[];for(let h of u)h===" "?c.push("\\t"):h===`
114
114
  `?c.push("\\n"):h==="\r"?c.push("\\r"):c.push(h);return c.join("")},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(" "),s+=1);for(let u of n)a[s]=u.map(r).join(" "),s+=1;return a.join(`
115
115
  `)},zr=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},x2=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,a=t.map(u=>zr(u));r[i]=`| ${a.join(" | ")} |`,i+=1;let s=new Array(t.length);for(let u=0;u<t.length;u+=1)s[u]="---";r[i]=`| ${s.join(" | ")} |`,i+=1;for(let u of n)if(u.length<t.length){let o=new Array(t.length);for(let c=0;c<t.length;c+=1)o[c]=c<u.length?zr(u[c]):"";r[i]=`| ${o.join(" | ")} |`,i+=1}else{let o=u.map(c=>zr(c));r[i]=`| ${o.join(" | ")} |`,i+=1}return r.join(`
116
- `)},k2=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,s]=N.useState(!1),[u,o]=N.useState(!1),c=N.useRef(null),h=N.useRef(0),{isAnimating:d}=N.useContext(Be),f=async b=>{var y,I;if(typeof window>"u"||!((y=navigator?.clipboard)!=null&&y.write)){r?.(new Error("Clipboard API not available"));return}try{let A=(I=c.current)==null?void 0:I.closest('[data-streamdown="table-wrapper"]'),O=A?.querySelector("table");if(!O){r?.(new Error("Table not found"));return}let L=ul(O),U=b==="csv"?ol(L):T2(L),j=new ClipboardItem({"text/plain":new Blob([U],{type:"text/plain"}),"text/html":new Blob([O.outerHTML],{type:"text/html"})});await navigator.clipboard.write([j]),o(!0),s(!1),n?.(b),h.current=window.setTimeout(()=>o(!1),i)}catch(A){r?.(A)}};N.useEffect(()=>{let b=y=>{let I=y.composedPath();c.current&&!I.includes(c.current)&&s(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b),window.clearTimeout(h.current)}},[]);let p=u?Zi:Ji;return g.jsxs("div",{className:"relative",ref:c,children:[g.jsx("button",{className:W("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>s(!a),title:"Copy table",type:"button",children:e??g.jsx(p,{size:14})}),a?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},_2=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=N.useState(!1),s=N.useRef(null),{isAnimating:u}=N.useContext(Be),o=c=>{var h;try{let d=(h=s.current)==null?void 0:h.closest('[data-streamdown="table-wrapper"]'),f=d?.querySelector("table");if(!f){r?.(new Error("Table not found"));return}let p=ul(f),b=c==="csv"?ol(p):x2(p);Pt(`table.${c==="csv"?"csv":"md"}`,b,c==="csv"?"text/csv":"text/markdown"),a(!1),n?.(c)}catch(d){r?.(d)}};return N.useEffect(()=>{let c=h=>{let d=h.composedPath();s.current&&!d.includes(s.current)&&a(!1)};return document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[]),g.jsxs("div",{className:"relative",ref:s,children:[g.jsx("button",{className:W("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:()=>a(!i),title:"Download table",type:"button",children:e??g.jsx(Tr,{size:14})}),i?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>o("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>o("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},A2=({children:e,className:t,showControls:n,...r})=>g.jsxs("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[n?g.jsxs("div",{className:"flex items-center justify-end gap-1",children:[g.jsx(k2,{}),g.jsx(_2,{})]}):null,g.jsx("div",{className:"overflow-x-auto overscroll-y-auto",children:g.jsx("table",{className:W("w-full border-collapse border border-border",t),"data-streamdown":"table",...r,children:e})})]}),y2=N.lazy(()=>Vs(()=>import("./code-block-OCS4YCEC-DiXG3CzW.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(e=>({default:e.CodeBlock}))),C2=N.lazy(()=>Vs(()=>Promise.resolve().then(()=>Tx),void 0).then(e=>({default:e.Mermaid}))),N2=/language-([^\s]+)/;function xr(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function he(e,t){return e.className===t.className&&xr(e.node,t.node)}var hi=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Un=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},ta=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("ol",{className:W("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>he(e,t));ta.displayName="MarkdownOl";var ll=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("li",{className:W("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&xr(e.node,t.node));ll.displayName="MarkdownLi";var cl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("ul",{className:W("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>he(e,t));cl.displayName="MarkdownUl";var hl=N.memo(({className:e,node:t,...n})=>g.jsx("hr",{className:W("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>he(e,t));hl.displayName="MarkdownHr";var dl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("span",{className:W("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>he(e,t));dl.displayName="MarkdownStrong";var I2=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:a}=N.useContext(Be),[s,u]=N.useState(!1),o=n==="streamdown:incomplete-link",c=N.useCallback(async p=>{if(!(!(a!=null&&a.enabled&&n)||o)){if(p.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}u(!0)}},[a,n,o]),h=N.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),d=N.useCallback(()=>{u(!1)},[]),f={url:n??"",isOpen:s,onClose:d,onConfirm:h};return a!=null&&a.enabled&&n?g.jsxs(g.Fragment,{children:[g.jsx("button",{className:W("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",onClick:c,type:"button",children:e}),a.renderModal?a.renderModal(f):g.jsx(f2,{...f})]}):g.jsx("a",{className:W("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},fl=N.memo(I2,(e,t)=>he(e,t)&&e.href===t.href);fl.displayName="MarkdownA";var pl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("h1",{className:W("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>he(e,t));pl.displayName="MarkdownH1";var ml=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("h2",{className:W("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>he(e,t));ml.displayName="MarkdownH2";var gl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("h3",{className:W("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>he(e,t));gl.displayName="MarkdownH3";var El=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("h4",{className:W("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>he(e,t));El.displayName="MarkdownH4";var bl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("h5",{className:W("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>he(e,t));bl.displayName="MarkdownH5";var Tl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("h6",{className:W("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>he(e,t));Tl.displayName="MarkdownH6";var xl=N.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=N.useContext(Be),a=hi(i,"table");return g.jsx(A2,{className:t,showControls:a,...r,children:e})},(e,t)=>he(e,t));xl.displayName="MarkdownTable";var kl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("thead",{className:W("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>he(e,t));kl.displayName="MarkdownThead";var _l=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("tbody",{className:W("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>he(e,t));_l.displayName="MarkdownTbody";var Al=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("tr",{className:W("border-border border-b",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>he(e,t));Al.displayName="MarkdownTr";var yl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("th",{className:W("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>he(e,t));yl.displayName="MarkdownTh";var Cl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("td",{className:W("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>he(e,t));Cl.displayName="MarkdownTd";var Nl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("blockquote",{className:W("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>he(e,t));Nl.displayName="MarkdownBlockquote";var Il=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("sup",{className:W("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>he(e,t));Il.displayName="MarkdownSup";var Sl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("sub",{className:W("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>he(e,t));Sl.displayName="MarkdownSub";var wl=N.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var u,o;if(!N.isValidElement(s))return!1;let c=Array.isArray(s.props.children)?s.props.children:[s.props.children],h=!1,d=!1;for(let f of c)if(f){if(typeof f=="string")f.trim()!==""&&(h=!0);else if(N.isValidElement(f))if(((u=f.props)==null?void 0:u["data-footnote-backref"])!==void 0)d=!0;else{let p=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let b of p){if(typeof b=="string"&&b.trim()!==""){h=!0;break}if(N.isValidElement(b)&&((o=b.props)==null?void 0:o["data-footnote-backref"])===void 0){h=!0;break}}}}return d&&!h},a=Array.isArray(e)?e.map(s=>{if(!N.isValidElement(s))return s;if(s.type===ta){let u=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(o=>!i(o));return u.length===0?null:{...s,props:{...s.props,children:u}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?g.jsx("section",{className:t,...r,children:a}):null}return g.jsx("section",{className:t,...r,children:e})},(e,t)=>he(e,t));wl.displayName="MarkdownSection";var S2=({node:e,className:t,children:n,...r})=>{var i;let a=!("data-block"in r),{mermaid:s,controls:u}=N.useContext(Be),o=ea();if(a)return g.jsx("code",{className:W("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let c=t?.match(N2),h=(i=c?.at(1))!=null?i:"",d="";if(N.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?d=n.props.children:typeof n=="string"&&(d=n),h==="mermaid"&&o){let p=hi(u,"mermaid"),b=Un(u,"download"),y=Un(u,"copy"),I=Un(u,"fullscreen"),A=Un(u,"panZoom"),O=p&&(b||y||I);return g.jsx(N.Suspense,{fallback:g.jsx(Ms,{}),children:g.jsxs("div",{className:W("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[O?g.jsxs("div",{className:"flex items-center justify-end gap-2",children:[b?g.jsx(m2,{chart:d,config:s?.config}):null,y?g.jsx(Ds,{code:d}):null,I?g.jsx(b2,{chart:d,config:s?.config}):null]}):null,g.jsx(C2,{chart:d,config:s?.config,showControls:A})]})})}let f=hi(u,"code");return g.jsx(N.Suspense,{fallback:g.jsx(Ms,{}),children:g.jsx(y2,{className:W("overflow-x-auto border-border border-t",t),code:d,language:h,children:f?g.jsxs(g.Fragment,{children:[g.jsx(o2,{code:d,language:h}),g.jsx(Ds,{})]}):null})})},Ll=N.memo(S2,(e,t)=>e.className===t.className&&xr(e.node,t.node));Ll.displayName="MarkdownCode";var Ol=N.memo(c2,(e,t)=>e.className===t.className&&xr(e.node,t.node));Ol.displayName="MarkdownImg";var Rl=N.memo(({children:e,className:t,node:n,...r})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>a!=null&&a!=="");if(i.length===1&&N.isValidElement(i[0])){let a=i[0].props.node,s=a?.tagName;if(s==="img")return g.jsx(g.Fragment,{children:e});if(s==="code"&&"data-block"in i[0].props)return g.jsx(g.Fragment,{children:e})}return g.jsx("p",{className:t,...r,children:e})},(e,t)=>he(e,t));Rl.displayName="MarkdownParagraph";var w2={ol:ta,li:ll,ul:cl,hr:hl,strong:dl,a:fl,h1:pl,h2:ml,h3:gl,h4:El,h5:bl,h6:Tl,table:xl,thead:kl,tbody:_l,tr:Al,th:yl,td:Cl,blockquote:Nl,code:Ll,img:Ol,pre:({children:e})=>N.isValidElement(e)?N.cloneElement(e,{"data-block":"true"}):e,sup:Il,sub:Sl,p:Rl,section:wl},L2=()=>e=>{st(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},vs=[],Bs={allowDangerousHtml:!0},jn=new WeakMap,O2=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let h="default";return this.keyCache.set(e,h),h}let a=h=>{if(!h||h.length===0)return"";let d="";for(let f=0;f<h.length;f+=1){let p=h[f];if(f>0&&(d+=","),Array.isArray(p)){let[b,y]=p;if(typeof b=="function"){let I=jn.get(b);I||(I=b.name,jn.set(b,I)),d+=I}else d+=String(b);d+=":",d+=JSON.stringify(y)}else if(typeof p=="function"){let b=jn.get(p);b||(b=p.name,jn.set(p,b)),d+=b}else d+=String(p)}return d},s=a(n),u=a(r),o=i?JSON.stringify(i):"",c=`${u}::${s}::${o}`;return this.keyCache.set(e,c),c}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},Fs=new O2,Dl=e=>{let t=R2(e),n=e.children||"";return H2(t.runSync(t.parse(n),n),e)},R2=e=>{let t=Fs.get(e);if(t)return t;let n=P2(e);return Fs.set(e,n),n},D2=e=>e.some(t=>Array.isArray(t)?t[0]===Zr:t===Zr),P2=e=>{let t=e.rehypePlugins||vs,n=e.remarkPlugins||vs,r=D2(t)?n:[...n,L2],i=e.remarkRehypeOptions?{...Bs,...e.remarkRehypeOptions}:Bs;return rT().use(nb).use(r).use(Fb,i).use(t)},M2=e=>e,v2=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},B2=(e,t)=>{var n;for(let r in Dr)if(Object.hasOwn(Dr,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=Dr[r];(a===null||a.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},F2=(e,t,n,r,i,a)=>{let s=!1;return r?s=!r.includes(e.tagName):i&&(s=i.includes(e.tagName)),!s&&a&&typeof t=="number"&&(s=!a(e,t,n)),s},H2=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:s,urlTransform:u}=t;if(n||r||i||a||u){let o=u||M2;st(e,(c,h,d)=>{if(c.type==="raw"&&d&&typeof h=="number")return v2(d,h,a,c.value),h;if(c.type==="element"&&(B2(c,o),F2(c,h,d,r,i,n)&&d&&typeof h=="number"))return s&&c.children?d.children.splice(h,1,...c.children):d.children.splice(h,1),h})}return cE(e,{Fragment:g.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0})},U2=/\[\^[\w-]{1,200}\](?!:)/,j2=/\[\^[\w-]{1,200}\]:/,z2=/<\/(\w+)>/,$2=/<(\w+)[\s>]/,Y2=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),q2=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},V2=e=>{let t=U2.test(e),n=j2.test(e);if(t||n)return[e];let r=ve.lex(e,{gfm:!0}),i=[],a=[],s=!1;for(let u of r){let o=u.raw,c=i.length;if(a.length>0){if(i[c-1]+=o,u.type==="html"){let h=o.match(z2);if(h){let d=h[1];a.at(-1)===d&&a.pop()}}continue}if(u.type==="html"&&u.block){let h=o.match($2);if(h){let d=h[1];o.includes(`</${d}>`)||Y2.has(d.toLowerCase())||a.push(d)}}if(c>0&&!s){let h=i[c-1];if(q2(h)%2===1){i[c-1]=h+o;continue}}i.push(o),u.type!=="space"&&(s=u.type==="code")}return i},Hs,Us,qn={...dn,protocols:{...dn.protocols,href:[...(Us=(Hs=dn.protocols)==null?void 0:Hs.href)!=null?Us:[],"tel"]}},di={raw:Zr,sanitize:[Wu,qn],harden:[Ac,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},W2={gfm:[U1,{}]},js=Object.values(di),G2=Object.values(W2),Q2={block:" ▋",circle:" ●"},K2={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Be=N.createContext(K2),Pl=N.memo(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>g.jsx(Dl,{...r,children:e}),(e,t)=>{if(e.content!==t.content||e.index!==t.index)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var a,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});Pl.displayName="Block";var X2=["github-light","github-dark"],na=N.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:i=js,remarkPlugins:a=G2,className:s,shikiTheme:u=X2,mermaid:o,controls:c=!0,isAnimating:h=!1,animated:d,BlockComponent:f=Pl,parseMarkdownIntoBlocksFn:p=V2,caret:b,plugins:y,remend:I,linkSafety:A={enabled:!0},allowedTags:O,...L})=>{let U=N.useId(),[j,w]=N.useTransition(),V=N.useMemo(()=>typeof e!="string"?"":t==="streaming"&&n?Gg(e,I):e,[e,t,n,I]),q=N.useMemo(()=>p(V),[V,p]),[Q,_]=N.useState(q);N.useEffect(()=>{t==="streaming"?w(()=>{_(q)}):_(q)},[q,t]);let B=t==="streaming"?Q:q,P=N.useMemo(()=>B.map((re,T)=>`${U}-${T}`),[B.length,U]),Y=N.useMemo(()=>d?d===!0?li():li(d):null,[d]),z=N.useMemo(()=>{var re,T;return{shikiTheme:(T=(re=y?.code)==null?void 0:re.getThemes())!=null?T:u,controls:c,isAnimating:h,mode:t,mermaid:o,linkSafety:A}},[u,c,h,t,o,A,y?.code]),F=N.useMemo(()=>({...w2,...r}),[r]),ee=N.useMemo(()=>{let re=[];return y!=null&&y.cjk&&(re=[...re,...y.cjk.remarkPluginsBefore]),re=[...re,...a],y!=null&&y.cjk&&(re=[...re,...y.cjk.remarkPluginsAfter]),y!=null&&y.math&&(re=[...re,y.math.remarkPlugin]),re},[a,y?.math,y?.cjk]),oe=N.useMemo(()=>{var re;let T=i;if(O&&Object.keys(O).length>0&&i===js){let pe={...qn,tagNames:[...(re=qn.tagNames)!=null?re:[],...Object.keys(O)],attributes:{...qn.attributes,...O}};T=[di.raw,[Wu,pe],di.harden]}return y!=null&&y.math&&(T=[...T,y.math.rehypePlugin]),Y&&h&&(T=[...T,Y.rehypePlugin]),T},[i,y?.math,Y,h,O]),be=N.useMemo(()=>b&&h?{"--streamdown-caret":`"${Q2[b]}"`}:void 0,[b,h]);return t==="static"?g.jsx(ci.Provider,{value:y??null,children:g.jsx(Be.Provider,{value:z,children:g.jsx("div",{className:W("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",s),children:g.jsx(Dl,{components:F,rehypePlugins:oe,remarkPlugins:ee,...L,children:e})})})}):g.jsx(ci.Provider,{value:y??null,children:g.jsx(Be.Provider,{value:z,children:g.jsxs("div",{className:W("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",b?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,s),style:be,children:[B.length===0&&b&&h&&g.jsx("span",{}),B.map((re,T)=>g.jsx(f,{components:F,content:re,index:T,rehypePlugins:oe,remarkPlugins:ee,shouldParseIncompleteMarkdown:n,...L},P[T]))]})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety);na.displayName="Streamdown";var Z2=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:u=!1})=>{let o=N.useRef(null),c=N.useRef(null),[h,d]=N.useState(s),[f,p]=N.useState({x:0,y:0}),[b,y]=N.useState(!1),[I,A]=N.useState({x:0,y:0}),[O,L]=N.useState({x:0,y:0}),U=N.useCallback(P=>{d(Y=>Math.max(n,Math.min(r,Y+P)))},[n,r]),j=N.useCallback(()=>{U(i)},[U,i]),w=N.useCallback(()=>{U(-i)},[U,i]),V=N.useCallback(()=>{d(s),p({x:0,y:0})},[s]),q=N.useCallback(P=>{P.preventDefault();let Y=P.deltaY>0?-i:i;U(Y)},[U,i]),Q=N.useCallback(P=>{if(P.button!==0||P.isPrimary===!1)return;y(!0),A({x:P.clientX,y:P.clientY}),L(f);let Y=P.currentTarget;Y instanceof HTMLElement&&Y.setPointerCapture(P.pointerId)},[f]),_=N.useCallback(P=>{if(!b)return;P.preventDefault();let Y=P.clientX-I.x,z=P.clientY-I.y;p({x:O.x+Y,y:O.y+z})},[b,I,O]),B=N.useCallback(P=>{y(!1);let Y=P.currentTarget;Y instanceof HTMLElement&&Y.releasePointerCapture(P.pointerId)},[]);return N.useEffect(()=>{let P=o.current;if(P)return P.addEventListener("wheel",q,{passive:!1}),()=>{P.removeEventListener("wheel",q)}},[q]),N.useEffect(()=>{let P=c.current;if(P&&b)return document.body.style.userSelect="none",P.addEventListener("pointermove",_,{passive:!1}),P.addEventListener("pointerup",B),P.addEventListener("pointercancel",B),()=>{document.body.style.userSelect="",P.removeEventListener("pointermove",_),P.removeEventListener("pointerup",B),P.removeEventListener("pointercancel",B)}},[b,_,B]),g.jsxs("div",{className:W("relative flex flex-col",u?"h-full w-full":"min-h-28 w-full",t),ref:o,style:{cursor:b?"grabbing":"grab"},children:[a?g.jsxs("div",{className:W("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm",u?"bottom-4 left-4":"bottom-2 left-2"),children:[g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h>=r,onClick:j,title:"Zoom in",type:"button",children:g.jsx(a2,{size:16})}),g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h<=n,onClick:w,title:"Zoom out",type:"button",children:g.jsx(s2,{size:16})}),g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:V,title:"Reset zoom and pan",type:"button",children:g.jsx(i2,{size:16})})]}):null,g.jsx("div",{className:W("flex-1 origin-center transition-transform duration-150 ease-out",u?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:Q,ref:c,role:"application",style:{transform:`translate(${f.x}px, ${f.y}px) scale(${h})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},Ml=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,s]=N.useState(null),[u,o]=N.useState(!1),[c,h]=N.useState(""),[d,f]=N.useState(""),[p,b]=N.useState(0),{mermaid:y}=N.useContext(Be),I=ea(),A=y?.errorComponent,{shouldRender:O,containerRef:L}=WT({immediate:r});if(N.useEffect(()=>{if(O){if(!I){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),o(!0);let j=I.getMermaid(n),w=e.split("").reduce((Q,_)=>(Q<<5)-Q+_.charCodeAt(0)|0,0),V=`mermaid-${Math.abs(w)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:q}=await j.render(V,e);h(q),f(q)}catch(j){if(!(d||c)){let w=j instanceof Error?j.message:"Failed to render Mermaid chart";s(w)}}finally{o(!1)}})()}},[e,n,p,O,I]),!(O||c||d))return g.jsx("div",{className:W("my-4 min-h-[200px]",t),ref:L});if(u&&!c&&!d)return g.jsx("div",{className:W("my-4 flex justify-center p-4",t),ref:L,children:g.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[g.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),g.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(a&&!c&&!d){let j=()=>b(w=>w+1);return A?g.jsx("div",{ref:L,children:g.jsx(A,{chart:e,error:a,retry:j})}):g.jsxs("div",{className:W("rounded-lg border border-red-200 bg-red-50 p-4",t),ref:L,children:[g.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",a]}),g.jsxs("details",{className:"mt-2",children:[g.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),g.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]})}let U=c||d;return g.jsx("div",{className:W("size-full",t),"data-streamdown":"mermaid",ref:L,children:g.jsx(Z2,{className:W(r?"size-full overflow-hidden":"my-4 overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:g.jsx("div",{"aria-label":"Mermaid chart",className:W("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:U},role:"img"})})})};function zs(e){return e.replace(/\s*[✓✗]$/,"").replace(/\s*\(.*\)$/,"").trim()}function J2(e){const t=[];let n=0;for(;n<e.length;){const r=e[n];if(r.type===He.Tool&&r.title){const i=zs(r.title),a=[r];let s=n+1;for(;s<e.length;){const u=e[s];if(u.type===He.Tool&&u.title&&zs(u.title)===i)a.push(u),s++;else break}if(a.length>=2)t.push({kind:"group",label:i,logs:a,key:a[0].id});else for(const u of a)t.push({kind:"single",log:u,key:u.id});n=s}else t.push({kind:"single",log:r,key:r.id}),n++}return t}const ex="/api",vl=e=>e.includes("://")||e.startsWith("/api/")?e:e.startsWith("/")?`${ex}/attachments/by-path?path=${encodeURIComponent(e)}`:e,tx=({src:e,alt:t,...n})=>g.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-block",children:g.jsx("img",{src:e,alt:t,...n,className:"max-w-[300px] max-h-[200px] object-contain rounded-lg border border-neutral-200 cursor-pointer hover:opacity-90 transition-opacity"})}),Bl={img:tx},Fl=N.memo(({content:e,compact:t})=>g.jsx("div",{className:t?"flex justify-end mb-4 mt-2":"flex justify-end mb-8 mt-4",children:g.jsx("div",{className:`relative bg-neutral-200 text-neutral-900 rounded-2xl rounded-tr-sm max-w-[85%] min-w-0 leading-relaxed ${t?"px-3.5 py-2.5 text-[13px]":"px-5 py-3.5 text-sm"}`,children:g.jsx(na,{urlTransform:vl,components:Bl,children:e})})}));Fl.displayName="UserMessage";const Hl=N.memo(({content:e,isOpenDefault:t=!0})=>{const[n,r]=N.useState(t),i=N.useRef(null),[a,s]=N.useState(0);N.useEffect(()=>{i.current&&s(i.current.scrollHeight)},[e,n]);const u=N.useMemo(()=>{const c=e.replace(/^Thinking:\s*/i,"").trim().split(`
116
+ `)},k2=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,s]=N.useState(!1),[u,o]=N.useState(!1),c=N.useRef(null),h=N.useRef(0),{isAnimating:d}=N.useContext(Be),f=async b=>{var y,I;if(typeof window>"u"||!((y=navigator?.clipboard)!=null&&y.write)){r?.(new Error("Clipboard API not available"));return}try{let A=(I=c.current)==null?void 0:I.closest('[data-streamdown="table-wrapper"]'),O=A?.querySelector("table");if(!O){r?.(new Error("Table not found"));return}let L=ul(O),U=b==="csv"?ol(L):T2(L),j=new ClipboardItem({"text/plain":new Blob([U],{type:"text/plain"}),"text/html":new Blob([O.outerHTML],{type:"text/html"})});await navigator.clipboard.write([j]),o(!0),s(!1),n?.(b),h.current=window.setTimeout(()=>o(!1),i)}catch(A){r?.(A)}};N.useEffect(()=>{let b=y=>{let I=y.composedPath();c.current&&!I.includes(c.current)&&s(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b),window.clearTimeout(h.current)}},[]);let p=u?Zi:Ji;return g.jsxs("div",{className:"relative",ref:c,children:[g.jsx("button",{className:W("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>s(!a),title:"Copy table",type:"button",children:e??g.jsx(p,{size:14})}),a?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},_2=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=N.useState(!1),s=N.useRef(null),{isAnimating:u}=N.useContext(Be),o=c=>{var h;try{let d=(h=s.current)==null?void 0:h.closest('[data-streamdown="table-wrapper"]'),f=d?.querySelector("table");if(!f){r?.(new Error("Table not found"));return}let p=ul(f),b=c==="csv"?ol(p):x2(p);Pt(`table.${c==="csv"?"csv":"md"}`,b,c==="csv"?"text/csv":"text/markdown"),a(!1),n?.(c)}catch(d){r?.(d)}};return N.useEffect(()=>{let c=h=>{let d=h.composedPath();s.current&&!d.includes(s.current)&&a(!1)};return document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[]),g.jsxs("div",{className:"relative",ref:s,children:[g.jsx("button",{className:W("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:()=>a(!i),title:"Download table",type:"button",children:e??g.jsx(Tr,{size:14})}),i?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>o("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>o("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},A2=({children:e,className:t,showControls:n,...r})=>g.jsxs("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[n?g.jsxs("div",{className:"flex items-center justify-end gap-1",children:[g.jsx(k2,{}),g.jsx(_2,{})]}):null,g.jsx("div",{className:"overflow-x-auto overscroll-y-auto",children:g.jsx("table",{className:W("w-full border-collapse border border-border",t),"data-streamdown":"table",...r,children:e})})]}),y2=N.lazy(()=>Vs(()=>import("./code-block-OCS4YCEC-C72vBOSD.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(e=>({default:e.CodeBlock}))),C2=N.lazy(()=>Vs(()=>Promise.resolve().then(()=>Tx),void 0).then(e=>({default:e.Mermaid}))),N2=/language-([^\s]+)/;function xr(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function he(e,t){return e.className===t.className&&xr(e.node,t.node)}var hi=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Un=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},ta=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("ol",{className:W("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>he(e,t));ta.displayName="MarkdownOl";var ll=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("li",{className:W("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&xr(e.node,t.node));ll.displayName="MarkdownLi";var cl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("ul",{className:W("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>he(e,t));cl.displayName="MarkdownUl";var hl=N.memo(({className:e,node:t,...n})=>g.jsx("hr",{className:W("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>he(e,t));hl.displayName="MarkdownHr";var dl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("span",{className:W("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>he(e,t));dl.displayName="MarkdownStrong";var I2=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:a}=N.useContext(Be),[s,u]=N.useState(!1),o=n==="streamdown:incomplete-link",c=N.useCallback(async p=>{if(!(!(a!=null&&a.enabled&&n)||o)){if(p.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}u(!0)}},[a,n,o]),h=N.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),d=N.useCallback(()=>{u(!1)},[]),f={url:n??"",isOpen:s,onClose:d,onConfirm:h};return a!=null&&a.enabled&&n?g.jsxs(g.Fragment,{children:[g.jsx("button",{className:W("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",onClick:c,type:"button",children:e}),a.renderModal?a.renderModal(f):g.jsx(f2,{...f})]}):g.jsx("a",{className:W("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},fl=N.memo(I2,(e,t)=>he(e,t)&&e.href===t.href);fl.displayName="MarkdownA";var pl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("h1",{className:W("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>he(e,t));pl.displayName="MarkdownH1";var ml=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("h2",{className:W("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>he(e,t));ml.displayName="MarkdownH2";var gl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("h3",{className:W("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>he(e,t));gl.displayName="MarkdownH3";var El=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("h4",{className:W("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>he(e,t));El.displayName="MarkdownH4";var bl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("h5",{className:W("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>he(e,t));bl.displayName="MarkdownH5";var Tl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("h6",{className:W("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>he(e,t));Tl.displayName="MarkdownH6";var xl=N.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=N.useContext(Be),a=hi(i,"table");return g.jsx(A2,{className:t,showControls:a,...r,children:e})},(e,t)=>he(e,t));xl.displayName="MarkdownTable";var kl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("thead",{className:W("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>he(e,t));kl.displayName="MarkdownThead";var _l=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("tbody",{className:W("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>he(e,t));_l.displayName="MarkdownTbody";var Al=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("tr",{className:W("border-border border-b",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>he(e,t));Al.displayName="MarkdownTr";var yl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("th",{className:W("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>he(e,t));yl.displayName="MarkdownTh";var Cl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("td",{className:W("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>he(e,t));Cl.displayName="MarkdownTd";var Nl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("blockquote",{className:W("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>he(e,t));Nl.displayName="MarkdownBlockquote";var Il=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("sup",{className:W("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>he(e,t));Il.displayName="MarkdownSup";var Sl=N.memo(({children:e,className:t,node:n,...r})=>g.jsx("sub",{className:W("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>he(e,t));Sl.displayName="MarkdownSub";var wl=N.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var u,o;if(!N.isValidElement(s))return!1;let c=Array.isArray(s.props.children)?s.props.children:[s.props.children],h=!1,d=!1;for(let f of c)if(f){if(typeof f=="string")f.trim()!==""&&(h=!0);else if(N.isValidElement(f))if(((u=f.props)==null?void 0:u["data-footnote-backref"])!==void 0)d=!0;else{let p=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let b of p){if(typeof b=="string"&&b.trim()!==""){h=!0;break}if(N.isValidElement(b)&&((o=b.props)==null?void 0:o["data-footnote-backref"])===void 0){h=!0;break}}}}return d&&!h},a=Array.isArray(e)?e.map(s=>{if(!N.isValidElement(s))return s;if(s.type===ta){let u=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(o=>!i(o));return u.length===0?null:{...s,props:{...s.props,children:u}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?g.jsx("section",{className:t,...r,children:a}):null}return g.jsx("section",{className:t,...r,children:e})},(e,t)=>he(e,t));wl.displayName="MarkdownSection";var S2=({node:e,className:t,children:n,...r})=>{var i;let a=!("data-block"in r),{mermaid:s,controls:u}=N.useContext(Be),o=ea();if(a)return g.jsx("code",{className:W("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let c=t?.match(N2),h=(i=c?.at(1))!=null?i:"",d="";if(N.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?d=n.props.children:typeof n=="string"&&(d=n),h==="mermaid"&&o){let p=hi(u,"mermaid"),b=Un(u,"download"),y=Un(u,"copy"),I=Un(u,"fullscreen"),A=Un(u,"panZoom"),O=p&&(b||y||I);return g.jsx(N.Suspense,{fallback:g.jsx(Ms,{}),children:g.jsxs("div",{className:W("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[O?g.jsxs("div",{className:"flex items-center justify-end gap-2",children:[b?g.jsx(m2,{chart:d,config:s?.config}):null,y?g.jsx(Ds,{code:d}):null,I?g.jsx(b2,{chart:d,config:s?.config}):null]}):null,g.jsx(C2,{chart:d,config:s?.config,showControls:A})]})})}let f=hi(u,"code");return g.jsx(N.Suspense,{fallback:g.jsx(Ms,{}),children:g.jsx(y2,{className:W("overflow-x-auto border-border border-t",t),code:d,language:h,children:f?g.jsxs(g.Fragment,{children:[g.jsx(o2,{code:d,language:h}),g.jsx(Ds,{})]}):null})})},Ll=N.memo(S2,(e,t)=>e.className===t.className&&xr(e.node,t.node));Ll.displayName="MarkdownCode";var Ol=N.memo(c2,(e,t)=>e.className===t.className&&xr(e.node,t.node));Ol.displayName="MarkdownImg";var Rl=N.memo(({children:e,className:t,node:n,...r})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>a!=null&&a!=="");if(i.length===1&&N.isValidElement(i[0])){let a=i[0].props.node,s=a?.tagName;if(s==="img")return g.jsx(g.Fragment,{children:e});if(s==="code"&&"data-block"in i[0].props)return g.jsx(g.Fragment,{children:e})}return g.jsx("p",{className:t,...r,children:e})},(e,t)=>he(e,t));Rl.displayName="MarkdownParagraph";var w2={ol:ta,li:ll,ul:cl,hr:hl,strong:dl,a:fl,h1:pl,h2:ml,h3:gl,h4:El,h5:bl,h6:Tl,table:xl,thead:kl,tbody:_l,tr:Al,th:yl,td:Cl,blockquote:Nl,code:Ll,img:Ol,pre:({children:e})=>N.isValidElement(e)?N.cloneElement(e,{"data-block":"true"}):e,sup:Il,sub:Sl,p:Rl,section:wl},L2=()=>e=>{st(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},vs=[],Bs={allowDangerousHtml:!0},jn=new WeakMap,O2=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let h="default";return this.keyCache.set(e,h),h}let a=h=>{if(!h||h.length===0)return"";let d="";for(let f=0;f<h.length;f+=1){let p=h[f];if(f>0&&(d+=","),Array.isArray(p)){let[b,y]=p;if(typeof b=="function"){let I=jn.get(b);I||(I=b.name,jn.set(b,I)),d+=I}else d+=String(b);d+=":",d+=JSON.stringify(y)}else if(typeof p=="function"){let b=jn.get(p);b||(b=p.name,jn.set(p,b)),d+=b}else d+=String(p)}return d},s=a(n),u=a(r),o=i?JSON.stringify(i):"",c=`${u}::${s}::${o}`;return this.keyCache.set(e,c),c}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},Fs=new O2,Dl=e=>{let t=R2(e),n=e.children||"";return H2(t.runSync(t.parse(n),n),e)},R2=e=>{let t=Fs.get(e);if(t)return t;let n=P2(e);return Fs.set(e,n),n},D2=e=>e.some(t=>Array.isArray(t)?t[0]===Zr:t===Zr),P2=e=>{let t=e.rehypePlugins||vs,n=e.remarkPlugins||vs,r=D2(t)?n:[...n,L2],i=e.remarkRehypeOptions?{...Bs,...e.remarkRehypeOptions}:Bs;return rT().use(nb).use(r).use(Fb,i).use(t)},M2=e=>e,v2=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},B2=(e,t)=>{var n;for(let r in Dr)if(Object.hasOwn(Dr,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=Dr[r];(a===null||a.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},F2=(e,t,n,r,i,a)=>{let s=!1;return r?s=!r.includes(e.tagName):i&&(s=i.includes(e.tagName)),!s&&a&&typeof t=="number"&&(s=!a(e,t,n)),s},H2=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:s,urlTransform:u}=t;if(n||r||i||a||u){let o=u||M2;st(e,(c,h,d)=>{if(c.type==="raw"&&d&&typeof h=="number")return v2(d,h,a,c.value),h;if(c.type==="element"&&(B2(c,o),F2(c,h,d,r,i,n)&&d&&typeof h=="number"))return s&&c.children?d.children.splice(h,1,...c.children):d.children.splice(h,1),h})}return cE(e,{Fragment:g.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0})},U2=/\[\^[\w-]{1,200}\](?!:)/,j2=/\[\^[\w-]{1,200}\]:/,z2=/<\/(\w+)>/,$2=/<(\w+)[\s>]/,Y2=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),q2=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},V2=e=>{let t=U2.test(e),n=j2.test(e);if(t||n)return[e];let r=ve.lex(e,{gfm:!0}),i=[],a=[],s=!1;for(let u of r){let o=u.raw,c=i.length;if(a.length>0){if(i[c-1]+=o,u.type==="html"){let h=o.match(z2);if(h){let d=h[1];a.at(-1)===d&&a.pop()}}continue}if(u.type==="html"&&u.block){let h=o.match($2);if(h){let d=h[1];o.includes(`</${d}>`)||Y2.has(d.toLowerCase())||a.push(d)}}if(c>0&&!s){let h=i[c-1];if(q2(h)%2===1){i[c-1]=h+o;continue}}i.push(o),u.type!=="space"&&(s=u.type==="code")}return i},Hs,Us,qn={...dn,protocols:{...dn.protocols,href:[...(Us=(Hs=dn.protocols)==null?void 0:Hs.href)!=null?Us:[],"tel"]}},di={raw:Zr,sanitize:[Wu,qn],harden:[Ac,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},W2={gfm:[U1,{}]},js=Object.values(di),G2=Object.values(W2),Q2={block:" ▋",circle:" ●"},K2={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Be=N.createContext(K2),Pl=N.memo(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>g.jsx(Dl,{...r,children:e}),(e,t)=>{if(e.content!==t.content||e.index!==t.index)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var a,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});Pl.displayName="Block";var X2=["github-light","github-dark"],na=N.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:i=js,remarkPlugins:a=G2,className:s,shikiTheme:u=X2,mermaid:o,controls:c=!0,isAnimating:h=!1,animated:d,BlockComponent:f=Pl,parseMarkdownIntoBlocksFn:p=V2,caret:b,plugins:y,remend:I,linkSafety:A={enabled:!0},allowedTags:O,...L})=>{let U=N.useId(),[j,w]=N.useTransition(),V=N.useMemo(()=>typeof e!="string"?"":t==="streaming"&&n?Gg(e,I):e,[e,t,n,I]),q=N.useMemo(()=>p(V),[V,p]),[Q,_]=N.useState(q);N.useEffect(()=>{t==="streaming"?w(()=>{_(q)}):_(q)},[q,t]);let B=t==="streaming"?Q:q,P=N.useMemo(()=>B.map((re,T)=>`${U}-${T}`),[B.length,U]),Y=N.useMemo(()=>d?d===!0?li():li(d):null,[d]),z=N.useMemo(()=>{var re,T;return{shikiTheme:(T=(re=y?.code)==null?void 0:re.getThemes())!=null?T:u,controls:c,isAnimating:h,mode:t,mermaid:o,linkSafety:A}},[u,c,h,t,o,A,y?.code]),F=N.useMemo(()=>({...w2,...r}),[r]),ee=N.useMemo(()=>{let re=[];return y!=null&&y.cjk&&(re=[...re,...y.cjk.remarkPluginsBefore]),re=[...re,...a],y!=null&&y.cjk&&(re=[...re,...y.cjk.remarkPluginsAfter]),y!=null&&y.math&&(re=[...re,y.math.remarkPlugin]),re},[a,y?.math,y?.cjk]),oe=N.useMemo(()=>{var re;let T=i;if(O&&Object.keys(O).length>0&&i===js){let pe={...qn,tagNames:[...(re=qn.tagNames)!=null?re:[],...Object.keys(O)],attributes:{...qn.attributes,...O}};T=[di.raw,[Wu,pe],di.harden]}return y!=null&&y.math&&(T=[...T,y.math.rehypePlugin]),Y&&h&&(T=[...T,Y.rehypePlugin]),T},[i,y?.math,Y,h,O]),be=N.useMemo(()=>b&&h?{"--streamdown-caret":`"${Q2[b]}"`}:void 0,[b,h]);return t==="static"?g.jsx(ci.Provider,{value:y??null,children:g.jsx(Be.Provider,{value:z,children:g.jsx("div",{className:W("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",s),children:g.jsx(Dl,{components:F,rehypePlugins:oe,remarkPlugins:ee,...L,children:e})})})}):g.jsx(ci.Provider,{value:y??null,children:g.jsx(Be.Provider,{value:z,children:g.jsxs("div",{className:W("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",b?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,s),style:be,children:[B.length===0&&b&&h&&g.jsx("span",{}),B.map((re,T)=>g.jsx(f,{components:F,content:re,index:T,rehypePlugins:oe,remarkPlugins:ee,shouldParseIncompleteMarkdown:n,...L},P[T]))]})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety);na.displayName="Streamdown";var Z2=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:u=!1})=>{let o=N.useRef(null),c=N.useRef(null),[h,d]=N.useState(s),[f,p]=N.useState({x:0,y:0}),[b,y]=N.useState(!1),[I,A]=N.useState({x:0,y:0}),[O,L]=N.useState({x:0,y:0}),U=N.useCallback(P=>{d(Y=>Math.max(n,Math.min(r,Y+P)))},[n,r]),j=N.useCallback(()=>{U(i)},[U,i]),w=N.useCallback(()=>{U(-i)},[U,i]),V=N.useCallback(()=>{d(s),p({x:0,y:0})},[s]),q=N.useCallback(P=>{P.preventDefault();let Y=P.deltaY>0?-i:i;U(Y)},[U,i]),Q=N.useCallback(P=>{if(P.button!==0||P.isPrimary===!1)return;y(!0),A({x:P.clientX,y:P.clientY}),L(f);let Y=P.currentTarget;Y instanceof HTMLElement&&Y.setPointerCapture(P.pointerId)},[f]),_=N.useCallback(P=>{if(!b)return;P.preventDefault();let Y=P.clientX-I.x,z=P.clientY-I.y;p({x:O.x+Y,y:O.y+z})},[b,I,O]),B=N.useCallback(P=>{y(!1);let Y=P.currentTarget;Y instanceof HTMLElement&&Y.releasePointerCapture(P.pointerId)},[]);return N.useEffect(()=>{let P=o.current;if(P)return P.addEventListener("wheel",q,{passive:!1}),()=>{P.removeEventListener("wheel",q)}},[q]),N.useEffect(()=>{let P=c.current;if(P&&b)return document.body.style.userSelect="none",P.addEventListener("pointermove",_,{passive:!1}),P.addEventListener("pointerup",B),P.addEventListener("pointercancel",B),()=>{document.body.style.userSelect="",P.removeEventListener("pointermove",_),P.removeEventListener("pointerup",B),P.removeEventListener("pointercancel",B)}},[b,_,B]),g.jsxs("div",{className:W("relative flex flex-col",u?"h-full w-full":"min-h-28 w-full",t),ref:o,style:{cursor:b?"grabbing":"grab"},children:[a?g.jsxs("div",{className:W("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm",u?"bottom-4 left-4":"bottom-2 left-2"),children:[g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h>=r,onClick:j,title:"Zoom in",type:"button",children:g.jsx(a2,{size:16})}),g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h<=n,onClick:w,title:"Zoom out",type:"button",children:g.jsx(s2,{size:16})}),g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:V,title:"Reset zoom and pan",type:"button",children:g.jsx(i2,{size:16})})]}):null,g.jsx("div",{className:W("flex-1 origin-center transition-transform duration-150 ease-out",u?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:Q,ref:c,role:"application",style:{transform:`translate(${f.x}px, ${f.y}px) scale(${h})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},Ml=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,s]=N.useState(null),[u,o]=N.useState(!1),[c,h]=N.useState(""),[d,f]=N.useState(""),[p,b]=N.useState(0),{mermaid:y}=N.useContext(Be),I=ea(),A=y?.errorComponent,{shouldRender:O,containerRef:L}=WT({immediate:r});if(N.useEffect(()=>{if(O){if(!I){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),o(!0);let j=I.getMermaid(n),w=e.split("").reduce((Q,_)=>(Q<<5)-Q+_.charCodeAt(0)|0,0),V=`mermaid-${Math.abs(w)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:q}=await j.render(V,e);h(q),f(q)}catch(j){if(!(d||c)){let w=j instanceof Error?j.message:"Failed to render Mermaid chart";s(w)}}finally{o(!1)}})()}},[e,n,p,O,I]),!(O||c||d))return g.jsx("div",{className:W("my-4 min-h-[200px]",t),ref:L});if(u&&!c&&!d)return g.jsx("div",{className:W("my-4 flex justify-center p-4",t),ref:L,children:g.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[g.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),g.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(a&&!c&&!d){let j=()=>b(w=>w+1);return A?g.jsx("div",{ref:L,children:g.jsx(A,{chart:e,error:a,retry:j})}):g.jsxs("div",{className:W("rounded-lg border border-red-200 bg-red-50 p-4",t),ref:L,children:[g.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",a]}),g.jsxs("details",{className:"mt-2",children:[g.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),g.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]})}let U=c||d;return g.jsx("div",{className:W("size-full",t),"data-streamdown":"mermaid",ref:L,children:g.jsx(Z2,{className:W(r?"size-full overflow-hidden":"my-4 overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:g.jsx("div",{"aria-label":"Mermaid chart",className:W("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:U},role:"img"})})})};function zs(e){return e.replace(/\s*[✓✗]$/,"").replace(/\s*\(.*\)$/,"").trim()}function J2(e){const t=[];let n=0;for(;n<e.length;){const r=e[n];if(r.type===He.Tool&&r.title){const i=zs(r.title),a=[r];let s=n+1;for(;s<e.length;){const u=e[s];if(u.type===He.Tool&&u.title&&zs(u.title)===i)a.push(u),s++;else break}if(a.length>=2)t.push({kind:"group",label:i,logs:a,key:a[0].id});else for(const u of a)t.push({kind:"single",log:u,key:u.id});n=s}else t.push({kind:"single",log:r,key:r.id}),n++}return t}const ex="/api",vl=e=>e.includes("://")||e.startsWith("/api/")?e:e.startsWith("/")?`${ex}/attachments/by-path?path=${encodeURIComponent(e)}`:e,tx=({src:e,alt:t,...n})=>g.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-block",children:g.jsx("img",{src:e,alt:t,...n,className:"max-w-[300px] max-h-[200px] object-contain rounded-lg border border-neutral-200 cursor-pointer hover:opacity-90 transition-opacity"})}),Bl={img:tx},Fl=N.memo(({content:e,compact:t})=>g.jsx("div",{className:t?"flex justify-end mb-4 mt-2":"flex justify-end mb-8 mt-4",children:g.jsx("div",{className:`relative bg-neutral-200 text-neutral-900 rounded-2xl rounded-tr-sm max-w-[85%] min-w-0 leading-relaxed ${t?"px-3.5 py-2.5 text-[13px]":"px-5 py-3.5 text-sm"}`,children:g.jsx(na,{urlTransform:vl,components:Bl,children:e})})}));Fl.displayName="UserMessage";const Hl=N.memo(({content:e,isOpenDefault:t=!0})=>{const[n,r]=N.useState(t),i=N.useRef(null),[a,s]=N.useState(0);N.useEffect(()=>{i.current&&s(i.current.scrollHeight)},[e,n]);const u=N.useMemo(()=>{const c=e.replace(/^Thinking:\s*/i,"").trim().split(`
117
117
  `)[0]||"";return c.length>80?c.slice(0,80)+"…":c},[e]);return g.jsxs("div",{className:"my-1.5",children:[g.jsxs("button",{onClick:()=>r(!n),className:"group flex items-center gap-1.5 py-1 text-xs text-neutral-400 hover:text-neutral-500 transition-colors select-none w-full text-left",children:[g.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-transform duration-200",style:{transform:n?"rotate(90deg)":"rotate(0deg)"},children:g.jsx(ir,{size:11,strokeWidth:2})}),g.jsx("span",{className:"font-medium",children:"Thinking"}),!n&&u&&g.jsx("span",{className:"truncate text-neutral-300 ml-1 font-normal",children:u})]}),g.jsx("div",{className:"overflow-hidden relative",style:{maxHeight:n?a+16:0},children:g.jsx("div",{ref:i,className:"pl-5 pt-1 pb-2 before:absolute before:left-[7px] before:top-1 before:bottom-2 before:w-px before:bg-neutral-100",children:g.jsx("div",{className:"text-xs text-neutral-400 leading-relaxed whitespace-pre-wrap min-w-0",children:e.replace(/^Thinking:\s*/i,"").trim()})})})]})});Hl.displayName="ThinkingBlock";const fi=N.memo(({title:e,content:t,type:n})=>{const[r,i]=N.useState(!1);if(n===He.Action)return g.jsxs("div",{className:"flex items-center gap-1.5 py-0.5 text-xs text-neutral-400",children:[g.jsx("span",{className:"shrink-0 w-1 h-1 rounded-full bg-neutral-300"}),g.jsx("span",{children:t})]});const s=e.endsWith("✓"),u=e.endsWith("✗"),o=u?"text-red-400":s?"text-emerald-400":"text-neutral-400",c=t?.split(`
118
118
  `)[0]||"",h=c!==e?c:"";return g.jsxs("div",{className:"my-0.5",children:[g.jsxs("button",{onClick:()=>i(!r),className:"group flex items-center gap-1.5 py-1 text-xs w-full text-left transition-colors",children:[g.jsx("span",{className:`shrink-0 w-3.5 h-3.5 flex items-center justify-center ${o}`,children:u?g.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:g.jsx("path",{d:"M2 2l6 6M8 2l-6 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}):s?g.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:g.jsx("path",{d:"M2 5.5l2 2 4-4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):g.jsx("span",{className:"w-1 h-1 rounded-full bg-neutral-300"})}),g.jsx("span",{className:"font-medium text-neutral-500 shrink-0",children:e.replace(/\s*[✓✗]$/,"")}),h&&g.jsx("span",{className:"truncate text-neutral-300 font-mono",children:h}),t&&g.jsx("span",{className:"ml-auto shrink-0 opacity-0 group-hover:opacity-100 transition-opacity text-neutral-300",children:r?g.jsx(Ti,{size:10}):g.jsx(ir,{size:10})})]}),r&&t&&g.jsx("div",{className:"ml-5 mt-0.5 mb-1.5 rounded-md bg-neutral-50 border border-neutral-100 overflow-x-auto",children:g.jsx("code",{className:"block p-2.5 text-[11px] font-mono text-neutral-500 leading-relaxed whitespace-pre-wrap break-all",children:t})})]})});fi.displayName="ToolBlock";const Ul=N.memo(({label:e,logs:t})=>{const[n,r]=N.useState(!1),i=t.map(u=>{const o=u.content.split(`
119
119
  `)[0]||"",c=o.match(/([^/\\]+\.[a-zA-Z0-9]+)/);return c?c[1]:o.slice(0,40)}),a=t.filter(u=>u.title?.endsWith("✓")).length,s=t.filter(u=>u.title?.endsWith("✗")).length;return g.jsxs("div",{className:"my-0.5",children:[g.jsxs("button",{onClick:()=>r(!n),className:"group flex items-center gap-1.5 py-1 text-xs w-full text-left transition-colors",children:[g.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-transform duration-200",style:{transform:n?"rotate(90deg)":"rotate(0deg)"},children:g.jsx(ir,{size:11,strokeWidth:2,className:"text-neutral-400"})}),g.jsx("span",{className:"font-medium text-neutral-500 shrink-0",children:e}),g.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1",children:[g.jsx("span",{className:"inline-flex items-center justify-center px-1.5 py-0.5 rounded-full bg-neutral-100 text-neutral-400 text-[10px] font-medium leading-none tabular-nums",children:t.length}),a>0&&g.jsxs("span",{className:"text-emerald-400 text-[10px]",children:[a,"✓"]}),s>0&&g.jsxs("span",{className:"text-red-400 text-[10px]",children:[s,"✗"]})]}),!n&&g.jsxs("span",{className:"truncate text-neutral-300 font-mono",children:[i.slice(0,3).join(", "),t.length>3?" …":""]})]}),n&&g.jsx("div",{className:"ml-5 mt-0.5 mb-1.5",children:t.map(u=>{const o=u.content.split(`