@hyperflow.fun/ghost 0.0.5 → 0.0.7

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 (22) hide show
  1. package/dist/index.js +147262 -157048
  2. package/dist/package.json +1 -1
  3. package/dist/skills/builtin/ask-user-questions/SKILL.md +67 -14
  4. package/dist/templates/SOUL.md +3 -1
  5. package/dist/web/dist/assets/{Chart-cnNd398J.js → Chart-234Kdnfi.js} +1 -1
  6. package/dist/web/dist/assets/{Config-Bui5kcW0.js → Config-BYGKgURp.js} +1 -1
  7. package/dist/web/dist/assets/{Cost-BDSIn5ub.js → Cost-BQAkdVIa.js} +1 -1
  8. package/dist/web/dist/assets/{Cron-C7gaZhMu.js → Cron-D5wFcTwJ.js} +1 -1
  9. package/dist/web/dist/assets/{Dashboard-qwYsK3Gi.js → Dashboard-BdZ2aC9H.js} +1 -1
  10. package/dist/web/dist/assets/{Logs-DyfS6kEe.js → Logs-D47Y9BIl.js} +1 -1
  11. package/dist/web/dist/assets/{Memory-BPMmbFbx.js → Memory-BexXuxoQ.js} +1 -1
  12. package/dist/web/dist/assets/{Sessions-nANl57gZ.js → Sessions-D3walnqk.js} +1 -1
  13. package/dist/web/dist/assets/{Skills-BPXH_m1K.js → Skills-pAthDu4_.js} +1 -1
  14. package/dist/web/dist/assets/{Tools-CypplonI.js → Tools-BFHGHPXB.js} +1 -1
  15. package/dist/web/dist/assets/{activity-BLl_txfw.js → activity-DoII5Fp-.js} +1 -1
  16. package/dist/web/dist/assets/{clock-CMLb2b5z.js → clock-RU3zeFmt.js} +1 -1
  17. package/dist/web/dist/assets/{highlighted-body-OFNGDK62-CKxBaGN5.js → highlighted-body-OFNGDK62-y6A7wCrG.js} +1 -1
  18. package/dist/web/dist/assets/{index-CKAK_IGv.js → index-BcTR6SiD.js} +6 -6
  19. package/dist/web/dist/assets/{mermaid-GHXKKRXX-BuHBmaw6.js → mermaid-GHXKKRXX-DC3T5XzO.js} +6 -6
  20. package/dist/web/dist/assets/{refresh-cw-DHCgoaOK.js → refresh-cw-BYmwU45d.js} +1 -1
  21. package/dist/web/dist/index.html +1 -1
  22. package/package.json +4 -3
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-OFNGDK62-CKxBaGN5.js","assets/vendor-react-B0mWfPOm.js","assets/vendor-viem-wp7lz4Hc.js","assets/index-CKAK_IGv.js","assets/vendor-charts-CfOL2F-E.js","assets/index-PX2emSv9.css","assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-D4QpJJKB.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-B12qg9BL.js","assets/ruby-Dw2BHqvy.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-CxzCAyBv.js","assets/r-Dspwwk_N.js","assets/just-Cw27pwNe.js","assets/perl-C0TMdlhV.js","assets/latex-CWtU0Tv5.js","assets/tex-idrVyKtj.js","assets/liquid-DYVedYrR.js","assets/marko-CnJfTvn9.js","assets/less-B1dDrJ26.js","assets/mdc-BMNejdWA.js","assets/nextflow-Zz6hmt5N.js","assets/nextflow-groovy-BeH2EWoN.js","assets/nginx-BpAMiNFr.js","assets/nim-CVrawwO9.js","assets/php-Dhbhpdrm.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-Uh8Bk_45.js","assets/csharp-COcwbKMJ.js","assets/rst-BrH8l1NY.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-C_ipcX3V.js","assets/templ-P3uqSqPl.js","assets/go-CxLEBnE3.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-DNn4PbVi.js","assets/vue-DN_0RTcg.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-CQOfvN7w.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
2
- var A0=Object.defineProperty;var C0=Object.getPrototypeOf;var w0=Reflect.get;var Pu=e=>{throw TypeError(e)};var I0=(e,t,n)=>t in e?A0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var O=(e,t,n)=>I0(e,typeof t!="symbol"?t+"":t,n),$s=(e,t,n)=>t.has(e)||Pu("Cannot "+n);var We=(e,t,n)=>($s(e,t,"read from private field"),n?n.call(e):t.get(e)),gn=(e,t,n)=>t.has(e)?Pu("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Et=(e,t,n,r)=>($s(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),js=(e,t,n)=>($s(e,t,"access private method"),n);var Du=(e,t,n)=>w0(C0(e),n,t);import{g as Td,r as k,j as E,a as yo,f as S0,h as N0,o as L0,s as R0,i as v0,k as O0,l as P0,m as D0,n as M0,p as B0,q as F0}from"./vendor-react-B0mWfPOm.js";import{_}from"./vendor-viem-wp7lz4Hc.js";import{T as H0,d as U0,e as zt,f as Gt,B as qr,g as yd,G as $i,F as xd,h as kd,i as Ad,j as Cd,k as xo,l as ko,m as Mu,R as Bu,a as $0,n as j0}from"./index-CKAK_IGv.js";import{q as ji,R as Ao,n as An,V as V0,K as wd,W as Id,h as Fu}from"./vendor-charts-CfOL2F-E.js";const ps=(function(e){if(e==null)return q0;if(typeof e=="function")return ms(e);if(typeof e=="object")return Array.isArray(e)?z0(e):G0(e);if(typeof e=="string")return W0(e);throw new Error("Expected function, string, or object as test")});function z0(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ps(e[n]);return ms(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function G0(e){const t=e;return ms(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function W0(e){return ms(t);function t(n){return n&&n.type===e}}function ms(e){return t;function t(n,r,i){return!!(Y0(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function q0(){return!0}function Y0(e){return e!==null&&typeof e=="object"&&"type"in e}const Sd=[],Rr=!0,Ra=!1,Zn="skip";function Co(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=ps(i),a=r?-1:1;o(e,void 0,[])();function o(u,l,c){const d=u&&typeof u=="object"?u:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(f?"<"+f+">":""))+")"})}return p;function p(){let f=Sd,m,b,y;if((!t||s(u,l,c[c.length-1]||void 0))&&(f=Q0(n(u,c)),f[0]===Ra))return f;if("children"in u&&u.children){const g=u;if(g.children&&f[0]!==Zn)for(b=(r?g.children.length:-1)+a,y=c.concat(g);b>-1&&b<g.children.length;){const I=g.children[b];if(m=o(I,b,y)(),m[0]===Ra)return m;b=typeof m[1]=="number"?m[1]:b+a}}return f}}}function Q0(e){return Array.isArray(e)?e:typeof e=="number"?[Rr,e]:e==null?Sd:[e]}function Rt(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),Co(e,s,o,i);function o(u,l){const c=l[l.length-1],d=c?c.children.indexOf(u):void 0;return a(u,d,c)}}const ir={indicator:"indicator",textOnly:"text-only",remove:"remove"};function K0({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:s="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:a="text-gray-500",linkBlockPolicy:o=ir.indicator,imageBlockPolicy:u=ir.indicator}){const l=t.length&&!t.every(d=>d==="*"),c=n.length&&!n.every(d=>d==="*");if(!e&&(l||c))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return d=>{const p=ng(e,t,n,r,i,s,a,o,u);Nd(d),Rt(d,p)}}function Hu(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 X0(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Z0=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),J0=new Set(["javascript:","data:","file:","vbscript:"]);function Uu(e,t,n,r=!1,i=!1,s=[]){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 c=e.substring(5);if(c&&c.length>0&&c!=="invalid")return e}}catch{return null}return null}const a=Hu(e,n);if(!a||J0.has(a.protocol)||!(Z0.has(a.protocol)||s.includes(a.protocol)||s.includes("*")))return null;if(a.protocol==="mailto:"||!a.protocol.match(/^https?:$/))return a.href;const u=X0(e);return a&&t.some(l=>{const c=Hu(l,n);return!c||c.origin!==a.origin?!1:a.href.startsWith(c.href)})?u?a.pathname+a.search+a.hash:a.href:t.includes("*")?a.protocol!=="https:"&&a.protocol!=="http:"?null:u?a.pathname+a.search+a.hash:a.href:null}function Nd(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)Nd(t)}}const Vs=Symbol("node-seen");function eg(e,t,n){return t===ir.remove?{type:"remove"}:t===ir.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function tg(e,t,n){if(t===ir.remove)return{type:"remove"};if(t===ir.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const ng=(e,t,n,r,i,s,a,o,u)=>{const l=(c,d,p)=>{if(c.type!=="element"||c[Vs])return Rr;if(c.tagName==="a"){const f=Uu(c.properties.href,t,e,!1,!1,i);if(f===null){if(c[Vs]=!0,Rt(c,l),p&&typeof d=="number"){const m=eg(c,o,a);if(m.type==="remove")return p.children.splice(d,1),[Zn,d];p.children[d]=m.element}return Zn}else return c.properties.href=f,c.properties.target="_blank",c.properties.rel="noopener noreferrer",Rr}if(c.tagName==="img"){const f=Uu(c.properties.src,n,e,r,!0,i);if(f===null){if(c[Vs]=!0,Rt(c,l),p&&typeof d=="number"){const m=tg(c,u,s);if(m.type==="remove")return p.children.splice(d,1),[Zn,d];p.children[d]=m.element}return Zn}else return c.properties.src=f,Rr}return Rr};return l},Ld=-1,gs=0,Mr=1,Vi=2,wo=3,Io=4,So=5,No=6,Rd=7,vd=8,$u=typeof self=="object"?self:globalThis,rg=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case gs:case Ld:return n(a,i);case Mr:{const o=n([],i);for(const u of a)o.push(r(u));return o}case Vi:{const o=n({},i);for(const[u,l]of a)o[r(u)]=r(l);return o}case wo:return n(new Date(a),i);case Io:{const{source:o,flags:u}=a;return n(new RegExp(o,u),i)}case So:{const o=n(new Map,i);for(const[u,l]of a)o.set(r(u),r(l));return o}case No:{const o=n(new Set,i);for(const u of a)o.add(r(u));return o}case Rd:{const{name:o,message:u}=a;return n(new $u[o](u),i)}case vd:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return n(new DataView(o),a)}}return n(new $u[s](a),i)};return r},ju=e=>rg(new Map,e)(0),zn="",{toString:ig}={},{keys:sg}=Object,yr=e=>{const t=typeof e;if(t!=="object"||!e)return[gs,t];const n=ig.call(e).slice(8,-1);switch(n){case"Array":return[Mr,zn];case"Object":return[Vi,zn];case"Date":return[wo,zn];case"RegExp":return[Io,zn];case"Map":return[So,zn];case"Set":return[No,zn];case"DataView":return[Mr,n]}return n.includes("Array")?[Mr,n]:n.includes("Error")?[Rd,n]:[Vi,n]},pi=([e,t])=>e===gs&&(t==="function"||t==="symbol"),ag=(e,t,n,r)=>{const i=(a,o)=>{const u=r.push(a)-1;return n.set(o,u),u},s=a=>{if(n.has(a))return n.get(a);let[o,u]=yr(a);switch(o){case gs:{let c=a;switch(u){case"bigint":o=vd,c=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([Ld],a)}return i([o,c],a)}case Mr:{if(u){let p=a;return u==="DataView"?p=new Uint8Array(a.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(a)),i([u,[...p]],a)}const c=[],d=i([o,c],a);for(const p of a)c.push(s(p));return d}case Vi:{if(u)switch(u){case"BigInt":return i([u,a.toString()],a);case"Boolean":case"Number":case"String":return i([u,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const c=[],d=i([o,c],a);for(const p of sg(a))(e||!pi(yr(a[p])))&&c.push([s(p),s(a[p])]);return d}case wo:return i([o,a.toISOString()],a);case Io:{const{source:c,flags:d}=a;return i([o,{source:c,flags:d}],a)}case So:{const c=[],d=i([o,c],a);for(const[p,f]of a)(e||!(pi(yr(p))||pi(yr(f))))&&c.push([s(p),s(f)]);return d}case No:{const c=[],d=i([o,c],a);for(const p of a)(e||!pi(yr(p)))&&c.push(s(p));return d}}const{message:l}=a;return i([o,{name:u,message:l}],a)};return s},Vu=(e,{json:t,lossy:n}={})=>{const r=[];return ag(!(t||n),!!t,new Map,r)(e),r},Rn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ju(Vu(e,t)):structuredClone(e):(e,t)=>ju(Vu(e,t));class ii{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ii.prototype.normal={};ii.prototype.property={};ii.prototype.space=void 0;function Od(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ii(n,r,t)}function Yr(e){return e.toLowerCase()}class nt{constructor(t,n){this.attribute=n,this.property=t}}nt.prototype.attribute="";nt.prototype.booleanish=!1;nt.prototype.boolean=!1;nt.prototype.commaOrSpaceSeparated=!1;nt.prototype.commaSeparated=!1;nt.prototype.defined=!1;nt.prototype.mustUseProperty=!1;nt.prototype.number=!1;nt.prototype.overloadedBoolean=!1;nt.prototype.property="";nt.prototype.spaceSeparated=!1;nt.prototype.space=void 0;let og=0;const ne=Mn(),Se=Mn(),va=Mn(),j=Mn(),_e=Mn(),tr=Mn(),it=Mn();function Mn(){return 2**++og}const Oa=Object.freeze(Object.defineProperty({__proto__:null,boolean:ne,booleanish:Se,commaOrSpaceSeparated:it,commaSeparated:tr,number:j,overloadedBoolean:va,spaceSeparated:_e},Symbol.toStringTag,{value:"Module"})),zs=Object.keys(Oa);class Lo extends nt{constructor(t,n,r,i){let s=-1;if(super(t,n),zu(this,"space",i),typeof r=="number")for(;++s<zs.length;){const a=zs[s];zu(this,zs[s],(r&Oa[a])===Oa[a])}}}Lo.prototype.defined=!0;function zu(e,t,n){n&&(e[t]=n)}function ur(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Lo(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Yr(r)]=r,n[Yr(s.attribute)]=r}return new ii(t,n,e.space)}const Pd=ur({properties:{ariaActiveDescendant:null,ariaAtomic:Se,ariaAutoComplete:null,ariaBusy:Se,ariaChecked:Se,ariaColCount:j,ariaColIndex:j,ariaColSpan:j,ariaControls:_e,ariaCurrent:null,ariaDescribedBy:_e,ariaDetails:null,ariaDisabled:Se,ariaDropEffect:_e,ariaErrorMessage:null,ariaExpanded:Se,ariaFlowTo:_e,ariaGrabbed:Se,ariaHasPopup:null,ariaHidden:Se,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_e,ariaLevel:j,ariaLive:null,ariaModal:Se,ariaMultiLine:Se,ariaMultiSelectable:Se,ariaOrientation:null,ariaOwns:_e,ariaPlaceholder:null,ariaPosInSet:j,ariaPressed:Se,ariaReadOnly:Se,ariaRelevant:null,ariaRequired:Se,ariaRoleDescription:_e,ariaRowCount:j,ariaRowIndex:j,ariaRowSpan:j,ariaSelected:Se,ariaSetSize:j,ariaSort:null,ariaValueMax:j,ariaValueMin:j,ariaValueNow:j,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Dd(e,t){return t in e?e[t]:t}function Md(e,t){return Dd(e,t.toLowerCase())}const ug=ur({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:tr,acceptCharset:_e,accessKey:_e,action:null,allow:null,allowFullScreen:ne,allowPaymentRequest:ne,allowUserMedia:ne,alt:null,as:null,async:ne,autoCapitalize:null,autoComplete:_e,autoFocus:ne,autoPlay:ne,blocking:_e,capture:null,charSet:null,checked:ne,cite:null,className:_e,cols:j,colSpan:null,content:null,contentEditable:Se,controls:ne,controlsList:_e,coords:j|tr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ne,defer:ne,dir:null,dirName:null,disabled:ne,download:va,draggable:Se,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ne,formTarget:null,headers:_e,height:j,hidden:va,high:j,href:null,hrefLang:null,htmlFor:_e,httpEquiv:_e,id:null,imageSizes:null,imageSrcSet:null,inert:ne,inputMode:null,integrity:null,is:null,isMap:ne,itemId:null,itemProp:_e,itemRef:_e,itemScope:ne,itemType:_e,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ne,low:j,manifest:null,max:null,maxLength:j,media:null,method:null,min:null,minLength:j,multiple:ne,muted:ne,name:null,nonce:null,noModule:ne,noValidate:ne,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:ne,optimum:j,pattern:null,ping:_e,placeholder:null,playsInline:ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ne,referrerPolicy:null,rel:_e,required:ne,reversed:ne,rows:j,rowSpan:j,sandbox:_e,scope:null,scoped:ne,seamless:ne,selected:ne,shadowRootClonable:ne,shadowRootDelegatesFocus:ne,shadowRootMode:null,shape:null,size:j,sizes:null,slot:null,span:j,spellCheck:Se,src:null,srcDoc:null,srcLang:null,srcSet:null,start:j,step:null,style:null,tabIndex:j,target:null,title:null,translate:null,type:null,typeMustMatch:ne,useMap:null,value:Se,width:j,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_e,axis:null,background:null,bgColor:null,border:j,borderColor:null,bottomMargin:j,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ne,declare:ne,event:null,face:null,frame:null,frameBorder:null,hSpace:j,leftMargin:j,link:null,longDesc:null,lowSrc:null,marginHeight:j,marginWidth:j,noResize:ne,noHref:ne,noShade:ne,noWrap:ne,object:null,profile:null,prompt:null,rev:null,rightMargin:j,rules:null,scheme:null,scrolling:Se,standby:null,summary:null,text:null,topMargin:j,valueType:null,version:null,vAlign:null,vLink:null,vSpace:j,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ne,disableRemotePlayback:ne,prefix:null,property:null,results:j,security:null,unselectable:null},space:"html",transform:Md}),lg=ur({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:it,accentHeight:j,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:j,amplitude:j,arabicForm:null,ascent:j,attributeName:null,attributeType:null,azimuth:j,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:j,by:null,calcMode:null,capHeight:j,className:_e,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:j,diffuseConstant:j,direction:null,display:null,dur:null,divisor:j,dominantBaseline:null,download:ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:j,enableBackground:null,end:null,event:null,exponent:j,externalResourcesRequired:null,fill:null,fillOpacity:j,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:tr,g2:tr,glyphName:tr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:j,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:j,horizOriginX:j,horizOriginY:j,id:null,ideographic:j,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:j,k:j,k1:j,k2:j,k3:j,k4:j,kernelMatrix:it,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:j,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:j,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:j,overlineThickness:j,paintOrder:null,panose1:null,path:null,pathLength:j,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_e,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:j,pointsAtY:j,pointsAtZ:j,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:it,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:it,rev:it,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:it,requiredFeatures:it,requiredFonts:it,requiredFormats:it,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:j,specularExponent:j,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:j,strikethroughThickness:j,string:null,stroke:null,strokeDashArray:it,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:j,strokeOpacity:j,strokeWidth:null,style:null,surfaceScale:j,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:it,tabIndex:j,tableValues:null,target:null,targetX:j,targetY:j,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:it,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:j,underlineThickness:j,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:j,values:null,vAlphabetic:j,vMathematical:j,vectorEffect:null,vHanging:j,vIdeographic:j,version:null,vertAdvY:j,vertOriginX:j,vertOriginY:j,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:j,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Dd}),Bd=ur({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()}}),Fd=ur({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Md}),Hd=ur({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),cg={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"},dg=/[A-Z]/g,Gu=/-[a-z]/g,hg=/^data[-\w.:]+$/i;function si(e,t){const n=Yr(t);let r=t,i=nt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&hg.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Gu,pg);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Gu.test(s)){let a=s.replace(dg,fg);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Lo}return new i(r,t)}function fg(e){return"-"+e.toLowerCase()}function pg(e){return e.charAt(1).toUpperCase()}const lr=Od([Pd,ug,Bd,Fd,Hd],"html"),vt=Od([Pd,lg,Bd,Fd,Hd],"svg");function Wu(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function Ro(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const qu=/[#.]/g;function mg(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){qu.lastIndex=i;const o=qu.exec(n),u=n.slice(i,o?o.index:n.length);u&&(s?s==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:a=u,i+=u.length),o&&(s=o[0],i++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function Yu(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function vo(e){return e.join(" ").trim()}function Ud(e,t,n){const r=n?_g(n):void 0;function i(s,a,...o){let u;if(s==null){u={type:"root",children:[]};const l=a;o.unshift(l)}else{u=mg(s,t);const l=u.tagName.toLowerCase(),c=r?r.get(l):void 0;if(u.tagName=c||l,gg(a))o.unshift(a);else for(const[d,p]of Object.entries(a))bg(e,u.properties,d,p)}for(const l of o)Pa(u.children,l);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return i}function gg(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 s=i;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function bg(e,t,n,r){const i=si(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=Yu(r):i.commaSeparated?s=Wu(r):i.commaOrSpaceSeparated?s=Yu(Wu(r).join(" ")):s=Qu(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?Eg(r):String(r);if(Array.isArray(s)){const a=[];for(const o of s)a.push(Qu(i,i.property,o));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function Pa(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)Pa(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Pa(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Qu(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Yr(n)===Yr(t)))return!0}return n}function Eg(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function _g(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Tg=["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"],yg=Ud(lr,"div"),xg=Ud(vt,"g",Tg);function kg(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=t.length){let a=0;for(;;){let o=n[a];if(o===void 0){const u=Ku(t,n[a-1]);o=u===-1?t.length+1:u+1,n[a]=o}if(o>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s};a++}}}function i(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const o=n[n.length-1],u=Ku(t,o),l=u===-1?t.length+1:u+1;if(o===l)break;n.push(l)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function Ku(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/highlighted-body-OFNGDK62-y6A7wCrG.js","assets/vendor-react-B0mWfPOm.js","assets/vendor-viem-wp7lz4Hc.js","assets/index-BcTR6SiD.js","assets/vendor-charts-CfOL2F-E.js","assets/index-PX2emSv9.css","assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-D4QpJJKB.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-B12qg9BL.js","assets/ruby-Dw2BHqvy.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-CxzCAyBv.js","assets/r-Dspwwk_N.js","assets/just-Cw27pwNe.js","assets/perl-C0TMdlhV.js","assets/latex-CWtU0Tv5.js","assets/tex-idrVyKtj.js","assets/liquid-DYVedYrR.js","assets/marko-CnJfTvn9.js","assets/less-B1dDrJ26.js","assets/mdc-BMNejdWA.js","assets/nextflow-Zz6hmt5N.js","assets/nextflow-groovy-BeH2EWoN.js","assets/nginx-BpAMiNFr.js","assets/nim-CVrawwO9.js","assets/php-Dhbhpdrm.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-Uh8Bk_45.js","assets/csharp-COcwbKMJ.js","assets/rst-BrH8l1NY.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-C_ipcX3V.js","assets/templ-P3uqSqPl.js","assets/go-CxLEBnE3.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-DNn4PbVi.js","assets/vue-DN_0RTcg.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-CQOfvN7w.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
2
+ var A0=Object.defineProperty;var C0=Object.getPrototypeOf;var w0=Reflect.get;var Pu=e=>{throw TypeError(e)};var I0=(e,t,n)=>t in e?A0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var O=(e,t,n)=>I0(e,typeof t!="symbol"?t+"":t,n),$s=(e,t,n)=>t.has(e)||Pu("Cannot "+n);var We=(e,t,n)=>($s(e,t,"read from private field"),n?n.call(e):t.get(e)),gn=(e,t,n)=>t.has(e)?Pu("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Et=(e,t,n,r)=>($s(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),js=(e,t,n)=>($s(e,t,"access private method"),n);var Du=(e,t,n)=>w0(C0(e),n,t);import{g as Td,r as k,j as E,a as yo,f as S0,h as N0,o as L0,s as R0,i as v0,k as O0,l as P0,m as D0,n as M0,p as B0,q as F0}from"./vendor-react-B0mWfPOm.js";import{_}from"./vendor-viem-wp7lz4Hc.js";import{T as H0,d as U0,e as zt,f as Gt,B as qr,g as yd,G as $i,F as xd,h as kd,i as Ad,j as Cd,k as xo,l as ko,m as Mu,R as Bu,a as $0,n as j0}from"./index-BcTR6SiD.js";import{q as ji,R as Ao,n as An,V as V0,K as wd,W as Id,h as Fu}from"./vendor-charts-CfOL2F-E.js";const ps=(function(e){if(e==null)return q0;if(typeof e=="function")return ms(e);if(typeof e=="object")return Array.isArray(e)?z0(e):G0(e);if(typeof e=="string")return W0(e);throw new Error("Expected function, string, or object as test")});function z0(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ps(e[n]);return ms(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function G0(e){const t=e;return ms(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function W0(e){return ms(t);function t(n){return n&&n.type===e}}function ms(e){return t;function t(n,r,i){return!!(Y0(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function q0(){return!0}function Y0(e){return e!==null&&typeof e=="object"&&"type"in e}const Sd=[],Rr=!0,Ra=!1,Zn="skip";function Co(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=ps(i),a=r?-1:1;o(e,void 0,[])();function o(u,l,c){const d=u&&typeof u=="object"?u:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(f?"<"+f+">":""))+")"})}return p;function p(){let f=Sd,m,b,y;if((!t||s(u,l,c[c.length-1]||void 0))&&(f=Q0(n(u,c)),f[0]===Ra))return f;if("children"in u&&u.children){const g=u;if(g.children&&f[0]!==Zn)for(b=(r?g.children.length:-1)+a,y=c.concat(g);b>-1&&b<g.children.length;){const I=g.children[b];if(m=o(I,b,y)(),m[0]===Ra)return m;b=typeof m[1]=="number"?m[1]:b+a}}return f}}}function Q0(e){return Array.isArray(e)?e:typeof e=="number"?[Rr,e]:e==null?Sd:[e]}function Rt(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),Co(e,s,o,i);function o(u,l){const c=l[l.length-1],d=c?c.children.indexOf(u):void 0;return a(u,d,c)}}const ir={indicator:"indicator",textOnly:"text-only",remove:"remove"};function K0({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:s="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:a="text-gray-500",linkBlockPolicy:o=ir.indicator,imageBlockPolicy:u=ir.indicator}){const l=t.length&&!t.every(d=>d==="*"),c=n.length&&!n.every(d=>d==="*");if(!e&&(l||c))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return d=>{const p=ng(e,t,n,r,i,s,a,o,u);Nd(d),Rt(d,p)}}function Hu(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 X0(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Z0=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),J0=new Set(["javascript:","data:","file:","vbscript:"]);function Uu(e,t,n,r=!1,i=!1,s=[]){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 c=e.substring(5);if(c&&c.length>0&&c!=="invalid")return e}}catch{return null}return null}const a=Hu(e,n);if(!a||J0.has(a.protocol)||!(Z0.has(a.protocol)||s.includes(a.protocol)||s.includes("*")))return null;if(a.protocol==="mailto:"||!a.protocol.match(/^https?:$/))return a.href;const u=X0(e);return a&&t.some(l=>{const c=Hu(l,n);return!c||c.origin!==a.origin?!1:a.href.startsWith(c.href)})?u?a.pathname+a.search+a.hash:a.href:t.includes("*")?a.protocol!=="https:"&&a.protocol!=="http:"?null:u?a.pathname+a.search+a.hash:a.href:null}function Nd(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)Nd(t)}}const Vs=Symbol("node-seen");function eg(e,t,n){return t===ir.remove?{type:"remove"}:t===ir.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function tg(e,t,n){if(t===ir.remove)return{type:"remove"};if(t===ir.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const ng=(e,t,n,r,i,s,a,o,u)=>{const l=(c,d,p)=>{if(c.type!=="element"||c[Vs])return Rr;if(c.tagName==="a"){const f=Uu(c.properties.href,t,e,!1,!1,i);if(f===null){if(c[Vs]=!0,Rt(c,l),p&&typeof d=="number"){const m=eg(c,o,a);if(m.type==="remove")return p.children.splice(d,1),[Zn,d];p.children[d]=m.element}return Zn}else return c.properties.href=f,c.properties.target="_blank",c.properties.rel="noopener noreferrer",Rr}if(c.tagName==="img"){const f=Uu(c.properties.src,n,e,r,!0,i);if(f===null){if(c[Vs]=!0,Rt(c,l),p&&typeof d=="number"){const m=tg(c,u,s);if(m.type==="remove")return p.children.splice(d,1),[Zn,d];p.children[d]=m.element}return Zn}else return c.properties.src=f,Rr}return Rr};return l},Ld=-1,gs=0,Mr=1,Vi=2,wo=3,Io=4,So=5,No=6,Rd=7,vd=8,$u=typeof self=="object"?self:globalThis,rg=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case gs:case Ld:return n(a,i);case Mr:{const o=n([],i);for(const u of a)o.push(r(u));return o}case Vi:{const o=n({},i);for(const[u,l]of a)o[r(u)]=r(l);return o}case wo:return n(new Date(a),i);case Io:{const{source:o,flags:u}=a;return n(new RegExp(o,u),i)}case So:{const o=n(new Map,i);for(const[u,l]of a)o.set(r(u),r(l));return o}case No:{const o=n(new Set,i);for(const u of a)o.add(r(u));return o}case Rd:{const{name:o,message:u}=a;return n(new $u[o](u),i)}case vd:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return n(new DataView(o),a)}}return n(new $u[s](a),i)};return r},ju=e=>rg(new Map,e)(0),zn="",{toString:ig}={},{keys:sg}=Object,yr=e=>{const t=typeof e;if(t!=="object"||!e)return[gs,t];const n=ig.call(e).slice(8,-1);switch(n){case"Array":return[Mr,zn];case"Object":return[Vi,zn];case"Date":return[wo,zn];case"RegExp":return[Io,zn];case"Map":return[So,zn];case"Set":return[No,zn];case"DataView":return[Mr,n]}return n.includes("Array")?[Mr,n]:n.includes("Error")?[Rd,n]:[Vi,n]},pi=([e,t])=>e===gs&&(t==="function"||t==="symbol"),ag=(e,t,n,r)=>{const i=(a,o)=>{const u=r.push(a)-1;return n.set(o,u),u},s=a=>{if(n.has(a))return n.get(a);let[o,u]=yr(a);switch(o){case gs:{let c=a;switch(u){case"bigint":o=vd,c=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([Ld],a)}return i([o,c],a)}case Mr:{if(u){let p=a;return u==="DataView"?p=new Uint8Array(a.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(a)),i([u,[...p]],a)}const c=[],d=i([o,c],a);for(const p of a)c.push(s(p));return d}case Vi:{if(u)switch(u){case"BigInt":return i([u,a.toString()],a);case"Boolean":case"Number":case"String":return i([u,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const c=[],d=i([o,c],a);for(const p of sg(a))(e||!pi(yr(a[p])))&&c.push([s(p),s(a[p])]);return d}case wo:return i([o,a.toISOString()],a);case Io:{const{source:c,flags:d}=a;return i([o,{source:c,flags:d}],a)}case So:{const c=[],d=i([o,c],a);for(const[p,f]of a)(e||!(pi(yr(p))||pi(yr(f))))&&c.push([s(p),s(f)]);return d}case No:{const c=[],d=i([o,c],a);for(const p of a)(e||!pi(yr(p)))&&c.push(s(p));return d}}const{message:l}=a;return i([o,{name:u,message:l}],a)};return s},Vu=(e,{json:t,lossy:n}={})=>{const r=[];return ag(!(t||n),!!t,new Map,r)(e),r},Rn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ju(Vu(e,t)):structuredClone(e):(e,t)=>ju(Vu(e,t));class ii{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ii.prototype.normal={};ii.prototype.property={};ii.prototype.space=void 0;function Od(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ii(n,r,t)}function Yr(e){return e.toLowerCase()}class nt{constructor(t,n){this.attribute=n,this.property=t}}nt.prototype.attribute="";nt.prototype.booleanish=!1;nt.prototype.boolean=!1;nt.prototype.commaOrSpaceSeparated=!1;nt.prototype.commaSeparated=!1;nt.prototype.defined=!1;nt.prototype.mustUseProperty=!1;nt.prototype.number=!1;nt.prototype.overloadedBoolean=!1;nt.prototype.property="";nt.prototype.spaceSeparated=!1;nt.prototype.space=void 0;let og=0;const ne=Mn(),Se=Mn(),va=Mn(),j=Mn(),_e=Mn(),tr=Mn(),it=Mn();function Mn(){return 2**++og}const Oa=Object.freeze(Object.defineProperty({__proto__:null,boolean:ne,booleanish:Se,commaOrSpaceSeparated:it,commaSeparated:tr,number:j,overloadedBoolean:va,spaceSeparated:_e},Symbol.toStringTag,{value:"Module"})),zs=Object.keys(Oa);class Lo extends nt{constructor(t,n,r,i){let s=-1;if(super(t,n),zu(this,"space",i),typeof r=="number")for(;++s<zs.length;){const a=zs[s];zu(this,zs[s],(r&Oa[a])===Oa[a])}}}Lo.prototype.defined=!0;function zu(e,t,n){n&&(e[t]=n)}function ur(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Lo(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Yr(r)]=r,n[Yr(s.attribute)]=r}return new ii(t,n,e.space)}const Pd=ur({properties:{ariaActiveDescendant:null,ariaAtomic:Se,ariaAutoComplete:null,ariaBusy:Se,ariaChecked:Se,ariaColCount:j,ariaColIndex:j,ariaColSpan:j,ariaControls:_e,ariaCurrent:null,ariaDescribedBy:_e,ariaDetails:null,ariaDisabled:Se,ariaDropEffect:_e,ariaErrorMessage:null,ariaExpanded:Se,ariaFlowTo:_e,ariaGrabbed:Se,ariaHasPopup:null,ariaHidden:Se,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_e,ariaLevel:j,ariaLive:null,ariaModal:Se,ariaMultiLine:Se,ariaMultiSelectable:Se,ariaOrientation:null,ariaOwns:_e,ariaPlaceholder:null,ariaPosInSet:j,ariaPressed:Se,ariaReadOnly:Se,ariaRelevant:null,ariaRequired:Se,ariaRoleDescription:_e,ariaRowCount:j,ariaRowIndex:j,ariaRowSpan:j,ariaSelected:Se,ariaSetSize:j,ariaSort:null,ariaValueMax:j,ariaValueMin:j,ariaValueNow:j,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Dd(e,t){return t in e?e[t]:t}function Md(e,t){return Dd(e,t.toLowerCase())}const ug=ur({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:tr,acceptCharset:_e,accessKey:_e,action:null,allow:null,allowFullScreen:ne,allowPaymentRequest:ne,allowUserMedia:ne,alt:null,as:null,async:ne,autoCapitalize:null,autoComplete:_e,autoFocus:ne,autoPlay:ne,blocking:_e,capture:null,charSet:null,checked:ne,cite:null,className:_e,cols:j,colSpan:null,content:null,contentEditable:Se,controls:ne,controlsList:_e,coords:j|tr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ne,defer:ne,dir:null,dirName:null,disabled:ne,download:va,draggable:Se,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ne,formTarget:null,headers:_e,height:j,hidden:va,high:j,href:null,hrefLang:null,htmlFor:_e,httpEquiv:_e,id:null,imageSizes:null,imageSrcSet:null,inert:ne,inputMode:null,integrity:null,is:null,isMap:ne,itemId:null,itemProp:_e,itemRef:_e,itemScope:ne,itemType:_e,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ne,low:j,manifest:null,max:null,maxLength:j,media:null,method:null,min:null,minLength:j,multiple:ne,muted:ne,name:null,nonce:null,noModule:ne,noValidate:ne,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:ne,optimum:j,pattern:null,ping:_e,placeholder:null,playsInline:ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ne,referrerPolicy:null,rel:_e,required:ne,reversed:ne,rows:j,rowSpan:j,sandbox:_e,scope:null,scoped:ne,seamless:ne,selected:ne,shadowRootClonable:ne,shadowRootDelegatesFocus:ne,shadowRootMode:null,shape:null,size:j,sizes:null,slot:null,span:j,spellCheck:Se,src:null,srcDoc:null,srcLang:null,srcSet:null,start:j,step:null,style:null,tabIndex:j,target:null,title:null,translate:null,type:null,typeMustMatch:ne,useMap:null,value:Se,width:j,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_e,axis:null,background:null,bgColor:null,border:j,borderColor:null,bottomMargin:j,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ne,declare:ne,event:null,face:null,frame:null,frameBorder:null,hSpace:j,leftMargin:j,link:null,longDesc:null,lowSrc:null,marginHeight:j,marginWidth:j,noResize:ne,noHref:ne,noShade:ne,noWrap:ne,object:null,profile:null,prompt:null,rev:null,rightMargin:j,rules:null,scheme:null,scrolling:Se,standby:null,summary:null,text:null,topMargin:j,valueType:null,version:null,vAlign:null,vLink:null,vSpace:j,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ne,disableRemotePlayback:ne,prefix:null,property:null,results:j,security:null,unselectable:null},space:"html",transform:Md}),lg=ur({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:it,accentHeight:j,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:j,amplitude:j,arabicForm:null,ascent:j,attributeName:null,attributeType:null,azimuth:j,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:j,by:null,calcMode:null,capHeight:j,className:_e,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:j,diffuseConstant:j,direction:null,display:null,dur:null,divisor:j,dominantBaseline:null,download:ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:j,enableBackground:null,end:null,event:null,exponent:j,externalResourcesRequired:null,fill:null,fillOpacity:j,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:tr,g2:tr,glyphName:tr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:j,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:j,horizOriginX:j,horizOriginY:j,id:null,ideographic:j,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:j,k:j,k1:j,k2:j,k3:j,k4:j,kernelMatrix:it,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:j,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:j,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:j,overlineThickness:j,paintOrder:null,panose1:null,path:null,pathLength:j,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_e,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:j,pointsAtY:j,pointsAtZ:j,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:it,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:it,rev:it,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:it,requiredFeatures:it,requiredFonts:it,requiredFormats:it,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:j,specularExponent:j,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:j,strikethroughThickness:j,string:null,stroke:null,strokeDashArray:it,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:j,strokeOpacity:j,strokeWidth:null,style:null,surfaceScale:j,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:it,tabIndex:j,tableValues:null,target:null,targetX:j,targetY:j,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:it,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:j,underlineThickness:j,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:j,values:null,vAlphabetic:j,vMathematical:j,vectorEffect:null,vHanging:j,vIdeographic:j,version:null,vertAdvY:j,vertOriginX:j,vertOriginY:j,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:j,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Dd}),Bd=ur({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()}}),Fd=ur({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Md}),Hd=ur({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),cg={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"},dg=/[A-Z]/g,Gu=/-[a-z]/g,hg=/^data[-\w.:]+$/i;function si(e,t){const n=Yr(t);let r=t,i=nt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&hg.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Gu,pg);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Gu.test(s)){let a=s.replace(dg,fg);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Lo}return new i(r,t)}function fg(e){return"-"+e.toLowerCase()}function pg(e){return e.charAt(1).toUpperCase()}const lr=Od([Pd,ug,Bd,Fd,Hd],"html"),vt=Od([Pd,lg,Bd,Fd,Hd],"svg");function Wu(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function Ro(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const qu=/[#.]/g;function mg(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){qu.lastIndex=i;const o=qu.exec(n),u=n.slice(i,o?o.index:n.length);u&&(s?s==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:a=u,i+=u.length),o&&(s=o[0],i++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function Yu(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function vo(e){return e.join(" ").trim()}function Ud(e,t,n){const r=n?_g(n):void 0;function i(s,a,...o){let u;if(s==null){u={type:"root",children:[]};const l=a;o.unshift(l)}else{u=mg(s,t);const l=u.tagName.toLowerCase(),c=r?r.get(l):void 0;if(u.tagName=c||l,gg(a))o.unshift(a);else for(const[d,p]of Object.entries(a))bg(e,u.properties,d,p)}for(const l of o)Pa(u.children,l);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return i}function gg(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 s=i;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function bg(e,t,n,r){const i=si(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=Yu(r):i.commaSeparated?s=Wu(r):i.commaOrSpaceSeparated?s=Yu(Wu(r).join(" ")):s=Qu(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?Eg(r):String(r);if(Array.isArray(s)){const a=[];for(const o of s)a.push(Qu(i,i.property,o));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function Pa(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)Pa(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Pa(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Qu(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Yr(n)===Yr(t)))return!0}return n}function Eg(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function _g(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Tg=["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"],yg=Ud(lr,"div"),xg=Ud(vt,"g",Tg);function kg(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=t.length){let a=0;for(;;){let o=n[a];if(o===void 0){const u=Ku(t,n[a-1]);o=u===-1?t.length+1:u+1,n[a]=o}if(o>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s};a++}}}function i(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const o=n[n.length-1],u=Ku(t,o),l=u===-1?t.length+1:u+1;if(o===l)break;n.push(l)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function Ku(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 Cn={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/"},$d={}.hasOwnProperty,Ag=Object.prototype;function Cg(e,t){const n=t||{};return Oo({file:n.file||void 0,location:!1,schema:n.space==="svg"?vt:lr,verbose:n.verbose||!1},e)}function Oo(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Oi(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:jd(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),a=kg(s),o=a.toPoint(0),u=a.toPoint(s.length);n.position={start:o,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Oi(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Oi(e,r,n),n}default:return n=wg(e,t),n}}function jd(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Oo(e,t[n]);r.push(i)}return r}function wg(e,t){const n=e.schema;e.schema=t.namespaceURI===Cn.svg?vt:lr;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],u=(o.prefix?o.prefix+":":"")+o.name;$d.call(Ag,u)||(i[u]=o.value)}const a=(e.schema.space==="svg"?xg:yg)(t.tagName,i,jd(e,t.childNodes));if(Oi(e,t,a),a.tagName==="template"){const o=t,u=o.sourceCodeLocation,l=u&&u.startTag&&Jn(u.startTag),c=u&&u.endTag&&Jn(u.endTag),d=Oo(e,o.content);l&&c&&e.file&&(d.position={start:l.end,end:c.start}),a.content=d}return e.schema=n,a}function Oi(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Ig(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Ig(e,t,n){const r=Jn(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 s={};let a;if(n.attrs)for(a in n.attrs)$d.call(n.attrs,a)&&(s[si(e.schema,a).property]=Jn(n.attrs[a]));n.startTag;const o=Jn(n.startTag),u=n.endTag?Jn(n.endTag):void 0,l={opening:o};u&&(l.closing=u),l.properties=s,t.data={position:l}}}return r}function Jn(e){const t=Xu({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Xu({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Xu(e){return e.line&&e.column?e:void 0}const Zu={}.hasOwnProperty;function Po(e,t){const n=t||{};function r(i,...s){let a=r.invalid;const o=r.handlers;if(i&&Zu.call(i,e)){const u=String(i[e]);a=Zu.call(o,u)?o[u]:r.unknown}if(a)return a.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Sg={},Ng={}.hasOwnProperty,Vd=Po("type",{handlers:{root:Rg,element:Mg,text:Pg,comment:Dg,doctype:Og}});function Lg(e,t){const r=(t||Sg).space;return Vd(e,r==="svg"?vt:lr)}function Rg(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Do(e.children,n,t),cr(e,n),n}function vg(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Do(e.children,n,t),cr(e,n),n}function Og(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return cr(e,t),t}function Pg(e){const t={nodeName:"#text",value:e.value,parentNode:null};return cr(e,t),t}function Dg(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return cr(e,t),t}function Mg(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=vt);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&Ng.call(e.properties,s)){const u=Bg(r,s,e.properties[s]);u&&i.push(u)}}const a=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Cn[a],childNodes:[],parentNode:null};return o.childNodes=Do(e.children,o,r),cr(e,o),e.tagName==="template"&&e.content&&(o.content=vg(e.content,r)),o}function Bg(e,t,n){const r=si(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?Ro(n):vo(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const s=i.name.indexOf(":");s<0?i.prefix="":(i.name=i.name.slice(s+1),i.prefix=r.attribute.slice(0,s)),i.namespace=Cn[r.space]}return i}function Do(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=Vd(e[r],n);s.parentNode=t,i.push(s)}return i}function cr(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 zd=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Fg=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]),ye="�";var T;(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"})(T||(T={}));const et={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Gd(e){return e>=55296&&e<=57343}function Hg(e){return e>=56320&&e<=57343}function Ug(e,t){return(e-55296)*1024+9216+t}function Wd(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function qd(e){return e>=64976&&e<=65007||Fg.has(e)}var D;(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"})(D||(D={}));const $g=65536;class jg{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=$g,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:s}=this,a=i+n,o=s+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:o,endOffset:o}}_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(Hg(n))return this.pos++,this._addGap(),Ug(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,T.EOF;return this._err(D.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,T.EOF;const r=this.html.charCodeAt(n);return r===T.CARRIAGE_RETURN?T.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,T.EOF;let t=this.html.charCodeAt(this.pos);return t===T.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,T.LINE_FEED):t===T.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Gd(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===T.LINE_FEED||t===T.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Wd(t)?this._err(D.controlCharacterInInputStream):qd(t)&&this._err(D.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var ae;(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"})(ae||(ae={}));function Yd(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 Vg=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))),zg=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 Gg(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=zg.get(e))!==null&&t!==void 0?t:e}var Be;(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"})(Be||(Be={}));const Wg=32;var an;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(an||(an={}));function Da(e){return e>=Be.ZERO&&e<=Be.NINE}function qg(e){return e>=Be.UPPER_A&&e<=Be.UPPER_F||e>=Be.LOWER_A&&e<=Be.LOWER_F}function Yg(e){return e>=Be.UPPER_A&&e<=Be.UPPER_Z||e>=Be.LOWER_A&&e<=Be.LOWER_Z||Da(e)}function Qg(e){return e===Be.EQUALS||Yg(e)}var De;(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"})(De||(De={}));var $t;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})($t||($t={}));class Kg{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=De.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=$t.Strict}startEntity(t){this.decodeMode=t,this.state=De.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case De.EntityStart:return t.charCodeAt(n)===Be.NUM?(this.state=De.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=De.NamedEntity,this.stateNamedEntity(t,n));case De.NumericStart:return this.stateNumericStart(t,n);case De.NumericDecimal:return this.stateNumericDecimal(t,n);case De.NumericHex:return this.stateNumericHex(t,n);case De.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Wg)===Be.LOWER_X?(this.state=De.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=De.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+Number.parseInt(t.substr(n,s),i),this.consumed+=s}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Da(i)||qg(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(Da(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===Be.SEMI)this.consumed+=1;else if(this.decodeMode===$t.Strict)return 0;return this.emitCodePoint(Gg(this.result),this.consumed),this.errors&&(t!==Be.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&an.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=Xg(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===$t.Attribute&&(s===0||Qg(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&an.VALUE_LENGTH)>>14,s!==0){if(a===Be.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==$t.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]&an.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]&~an.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case De.NamedEntity:return this.result!==0&&(this.decodeMode!==$t.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case De.NumericDecimal:return this.emitNumericEntity(0,2);case De.NumericHex:return this.emitNumericEntity(0,3);case De.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case De.EntityStart:return 0}}}function Xg(e,t,n,r){const i=(t&an.BRANCH_LENGTH)>>7,s=t&an.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const u=r-s;return u<0||u>=i?-1:e[n+u]-1}let a=n,o=a+i-1;for(;a<=o;){const u=a+o>>>1,l=e[u];if(l<r)a=u+1;else if(l>r)o=u-1;else return e[u+i]}return-1}var H;(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/"})(H||(H={}));var Ln;(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"})(Ln||(Ln={}));var ct;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(ct||(ct={}));var R;(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"})(R||(R={}));var h;(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"})(h||(h={}));const Zg=new Map([[R.A,h.A],[R.ADDRESS,h.ADDRESS],[R.ANNOTATION_XML,h.ANNOTATION_XML],[R.APPLET,h.APPLET],[R.AREA,h.AREA],[R.ARTICLE,h.ARTICLE],[R.ASIDE,h.ASIDE],[R.B,h.B],[R.BASE,h.BASE],[R.BASEFONT,h.BASEFONT],[R.BGSOUND,h.BGSOUND],[R.BIG,h.BIG],[R.BLOCKQUOTE,h.BLOCKQUOTE],[R.BODY,h.BODY],[R.BR,h.BR],[R.BUTTON,h.BUTTON],[R.CAPTION,h.CAPTION],[R.CENTER,h.CENTER],[R.CODE,h.CODE],[R.COL,h.COL],[R.COLGROUP,h.COLGROUP],[R.DD,h.DD],[R.DESC,h.DESC],[R.DETAILS,h.DETAILS],[R.DIALOG,h.DIALOG],[R.DIR,h.DIR],[R.DIV,h.DIV],[R.DL,h.DL],[R.DT,h.DT],[R.EM,h.EM],[R.EMBED,h.EMBED],[R.FIELDSET,h.FIELDSET],[R.FIGCAPTION,h.FIGCAPTION],[R.FIGURE,h.FIGURE],[R.FONT,h.FONT],[R.FOOTER,h.FOOTER],[R.FOREIGN_OBJECT,h.FOREIGN_OBJECT],[R.FORM,h.FORM],[R.FRAME,h.FRAME],[R.FRAMESET,h.FRAMESET],[R.H1,h.H1],[R.H2,h.H2],[R.H3,h.H3],[R.H4,h.H4],[R.H5,h.H5],[R.H6,h.H6],[R.HEAD,h.HEAD],[R.HEADER,h.HEADER],[R.HGROUP,h.HGROUP],[R.HR,h.HR],[R.HTML,h.HTML],[R.I,h.I],[R.IMG,h.IMG],[R.IMAGE,h.IMAGE],[R.INPUT,h.INPUT],[R.IFRAME,h.IFRAME],[R.KEYGEN,h.KEYGEN],[R.LABEL,h.LABEL],[R.LI,h.LI],[R.LINK,h.LINK],[R.LISTING,h.LISTING],[R.MAIN,h.MAIN],[R.MALIGNMARK,h.MALIGNMARK],[R.MARQUEE,h.MARQUEE],[R.MATH,h.MATH],[R.MENU,h.MENU],[R.META,h.META],[R.MGLYPH,h.MGLYPH],[R.MI,h.MI],[R.MO,h.MO],[R.MN,h.MN],[R.MS,h.MS],[R.MTEXT,h.MTEXT],[R.NAV,h.NAV],[R.NOBR,h.NOBR],[R.NOFRAMES,h.NOFRAMES],[R.NOEMBED,h.NOEMBED],[R.NOSCRIPT,h.NOSCRIPT],[R.OBJECT,h.OBJECT],[R.OL,h.OL],[R.OPTGROUP,h.OPTGROUP],[R.OPTION,h.OPTION],[R.P,h.P],[R.PARAM,h.PARAM],[R.PLAINTEXT,h.PLAINTEXT],[R.PRE,h.PRE],[R.RB,h.RB],[R.RP,h.RP],[R.RT,h.RT],[R.RTC,h.RTC],[R.RUBY,h.RUBY],[R.S,h.S],[R.SCRIPT,h.SCRIPT],[R.SEARCH,h.SEARCH],[R.SECTION,h.SECTION],[R.SELECT,h.SELECT],[R.SOURCE,h.SOURCE],[R.SMALL,h.SMALL],[R.SPAN,h.SPAN],[R.STRIKE,h.STRIKE],[R.STRONG,h.STRONG],[R.STYLE,h.STYLE],[R.SUB,h.SUB],[R.SUMMARY,h.SUMMARY],[R.SUP,h.SUP],[R.TABLE,h.TABLE],[R.TBODY,h.TBODY],[R.TEMPLATE,h.TEMPLATE],[R.TEXTAREA,h.TEXTAREA],[R.TFOOT,h.TFOOT],[R.TD,h.TD],[R.TH,h.TH],[R.THEAD,h.THEAD],[R.TITLE,h.TITLE],[R.TR,h.TR],[R.TRACK,h.TRACK],[R.TT,h.TT],[R.U,h.U],[R.UL,h.UL],[R.SVG,h.SVG],[R.VAR,h.VAR],[R.WBR,h.WBR],[R.XMP,h.XMP]]);function dr(e){var t;return(t=Zg.get(e))!==null&&t!==void 0?t:h.UNKNOWN}const U=h,Jg={[H.HTML]:new Set([U.ADDRESS,U.APPLET,U.AREA,U.ARTICLE,U.ASIDE,U.BASE,U.BASEFONT,U.BGSOUND,U.BLOCKQUOTE,U.BODY,U.BR,U.BUTTON,U.CAPTION,U.CENTER,U.COL,U.COLGROUP,U.DD,U.DETAILS,U.DIR,U.DIV,U.DL,U.DT,U.EMBED,U.FIELDSET,U.FIGCAPTION,U.FIGURE,U.FOOTER,U.FORM,U.FRAME,U.FRAMESET,U.H1,U.H2,U.H3,U.H4,U.H5,U.H6,U.HEAD,U.HEADER,U.HGROUP,U.HR,U.HTML,U.IFRAME,U.IMG,U.INPUT,U.LI,U.LINK,U.LISTING,U.MAIN,U.MARQUEE,U.MENU,U.META,U.NAV,U.NOEMBED,U.NOFRAMES,U.NOSCRIPT,U.OBJECT,U.OL,U.P,U.PARAM,U.PLAINTEXT,U.PRE,U.SCRIPT,U.SECTION,U.SELECT,U.SOURCE,U.STYLE,U.SUMMARY,U.TABLE,U.TBODY,U.TD,U.TEMPLATE,U.TEXTAREA,U.TFOOT,U.TH,U.THEAD,U.TITLE,U.TR,U.TRACK,U.UL,U.WBR,U.XMP]),[H.MATHML]:new Set([U.MI,U.MO,U.MN,U.MS,U.MTEXT,U.ANNOTATION_XML]),[H.SVG]:new Set([U.TITLE,U.FOREIGN_OBJECT,U.DESC]),[H.XLINK]:new Set,[H.XML]:new Set,[H.XMLNS]:new Set},Ma=new Set([U.H1,U.H2,U.H3,U.H4,U.H5,U.H6]);R.STYLE,R.SCRIPT,R.XMP,R.IFRAME,R.NOEMBED,R.NOFRAMES,R.PLAINTEXT;var x;(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"})(x||(x={}));const Ae={DATA:x.DATA,RCDATA:x.RCDATA,RAWTEXT:x.RAWTEXT,SCRIPT_DATA:x.SCRIPT_DATA,PLAINTEXT:x.PLAINTEXT,CDATA_SECTION:x.CDATA_SECTION};function e1(e){return e>=T.DIGIT_0&&e<=T.DIGIT_9}function vr(e){return e>=T.LATIN_CAPITAL_A&&e<=T.LATIN_CAPITAL_Z}function t1(e){return e>=T.LATIN_SMALL_A&&e<=T.LATIN_SMALL_Z}function Zt(e){return t1(e)||vr(e)}function Ju(e){return Zt(e)||e1(e)}function mi(e){return e+32}function Qd(e){return e===T.SPACE||e===T.LINE_FEED||e===T.TABULATION||e===T.FORM_FEED}function el(e){return Qd(e)||e===T.SOLIDUS||e===T.GREATER_THAN_SIGN}function n1(e){return e===T.NULL?D.nullCharacterReference:e>1114111?D.characterReferenceOutsideUnicodeRange:Gd(e)?D.surrogateCharacterReference:qd(e)?D.noncharacterCharacterReference:Wd(e)||e===T.CARRIAGE_RETURN?D.controlCharacterReference:null}class r1{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=x.DATA,this.returnState=x.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new jg(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Kg(Vg,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(D.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(D.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=n1(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==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||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:ae.START_TAG,tagName:"",tagID:h.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ae.END_TAG,tagName:"",tagID:h.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:ae.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:ae.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(Yd(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(D.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=dr(t.tagName),t.type===ae.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(D.endTagWithAttributes),t.selfClosing&&this._err(D.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 ae.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ae.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ae.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:ae.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=Qd(t)?ae.WHITESPACE_CHARACTER:t===T.NULL?ae.NULL_CHARACTER:ae.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(ae.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=x.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?$t.Attribute:$t.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===x.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===x.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===x.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case x.DATA:{this._stateData(t);break}case x.RCDATA:{this._stateRcdata(t);break}case x.RAWTEXT:{this._stateRawtext(t);break}case x.SCRIPT_DATA:{this._stateScriptData(t);break}case x.PLAINTEXT:{this._statePlaintext(t);break}case x.TAG_OPEN:{this._stateTagOpen(t);break}case x.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case x.TAG_NAME:{this._stateTagName(t);break}case x.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case x.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case x.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case x.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case x.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case x.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case x.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case x.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case x.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case x.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case x.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case x.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case x.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case x.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case x.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case x.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case x.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case x.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case x.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case x.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case x.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case x.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case x.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case x.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case x.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case x.BOGUS_COMMENT:{this._stateBogusComment(t);break}case x.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case x.COMMENT_START:{this._stateCommentStart(t);break}case x.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case x.COMMENT:{this._stateComment(t);break}case x.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case x.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case x.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case x.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case x.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case x.COMMENT_END:{this._stateCommentEnd(t);break}case x.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case x.DOCTYPE:{this._stateDoctype(t);break}case x.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case x.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case x.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case x.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case x.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case x.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case x.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case x.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case x.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case x.CDATA_SECTION:{this._stateCdataSection(t);break}case x.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case x.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case x.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case x.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case T.LESS_THAN_SIGN:{this.state=x.TAG_OPEN;break}case T.AMPERSAND:{this._startCharacterReference();break}case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitCodePoint(t);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case T.AMPERSAND:{this._startCharacterReference();break}case T.LESS_THAN_SIGN:{this.state=x.RCDATA_LESS_THAN_SIGN;break}case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(ye);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case T.LESS_THAN_SIGN:{this.state=x.RAWTEXT_LESS_THAN_SIGN;break}case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(ye);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_LESS_THAN_SIGN;break}case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(ye);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(ye);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Zt(t))this._createStartTagToken(),this.state=x.TAG_NAME,this._stateTagName(t);else switch(t){case T.EXCLAMATION_MARK:{this.state=x.MARKUP_DECLARATION_OPEN;break}case T.SOLIDUS:{this.state=x.END_TAG_OPEN;break}case T.QUESTION_MARK:{this._err(D.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=x.BOGUS_COMMENT,this._stateBogusComment(t);break}case T.EOF:{this._err(D.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(D.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=x.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Zt(t))this._createEndTagToken(),this.state=x.TAG_NAME,this._stateTagName(t);else switch(t){case T.GREATER_THAN_SIGN:{this._err(D.missingEndTagName),this.state=x.DATA;break}case T.EOF:{this._err(D.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(D.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=x.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=x.BEFORE_ATTRIBUTE_NAME;break}case T.SOLIDUS:{this.state=x.SELF_CLOSING_START_TAG;break}case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentTagToken();break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.tagName+=ye;break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(vr(t)?mi(t):t)}}_stateRcdataLessThanSign(t){t===T.SOLIDUS?this.state=x.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=x.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Zt(t)?(this.state=x.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=x.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 T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=x.BEFORE_ATTRIBUTE_NAME,!1;case T.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=x.SELF_CLOSING_START_TAG,!1;case T.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=x.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=x.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===T.SOLIDUS?this.state=x.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=x.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Zt(t)?(this.state=x.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=x.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=x.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case T.SOLIDUS:{this.state=x.SCRIPT_DATA_END_TAG_OPEN;break}case T.EXCLAMATION_MARK:{this.state=x.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=x.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Zt(t)?(this.state=x.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=x.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=x.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===T.HYPHEN_MINUS?(this.state=x.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=x.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===T.HYPHEN_MINUS?(this.state=x.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=x.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case T.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(ye);break}case T.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case T.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_ESCAPED,this._emitChars(ye);break}case T.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case T.HYPHEN_MINUS:{this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case T.GREATER_THAN_SIGN:{this.state=x.SCRIPT_DATA,this._emitChars(">");break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_ESCAPED,this._emitChars(ye);break}case T.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===T.SOLIDUS?this.state=x.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Zt(t)?(this._emitChars("<"),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Zt(t)?(this.state=x.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(et.SCRIPT,!1)&&el(this.preprocessor.peek(et.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<et.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case T.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(ye);break}case T.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case T.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ye);break}case T.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case T.HYPHEN_MINUS:{this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case T.GREATER_THAN_SIGN:{this.state=x.SCRIPT_DATA,this._emitChars(">");break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ye);break}case T.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===T.SOLIDUS?(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(et.SCRIPT,!1)&&el(this.preprocessor.peek(et.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<et.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=x.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.SOLIDUS:case T.GREATER_THAN_SIGN:case T.EOF:{this.state=x.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case T.EQUALS_SIGN:{this._err(D.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=x.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=x.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:case T.SOLIDUS:case T.GREATER_THAN_SIGN:case T.EOF:{this._leaveAttrName(),this.state=x.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case T.EQUALS_SIGN:{this._leaveAttrName(),this.state=x.BEFORE_ATTRIBUTE_VALUE;break}case T.QUOTATION_MARK:case T.APOSTROPHE:case T.LESS_THAN_SIGN:{this._err(D.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.name+=ye;break}default:this.currentAttr.name+=String.fromCodePoint(vr(t)?mi(t):t)}}_stateAfterAttributeName(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.SOLIDUS:{this.state=x.SELF_CLOSING_START_TAG;break}case T.EQUALS_SIGN:{this.state=x.BEFORE_ATTRIBUTE_VALUE;break}case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentTagToken();break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=x.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:{this.state=x.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case T.APOSTROPHE:{this.state=x.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(D.missingAttributeValue),this.state=x.DATA,this.emitCurrentTagToken();break}default:this.state=x.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case T.QUOTATION_MARK:{this.state=x.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case T.AMPERSAND:{this._startCharacterReference();break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=ye;break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case T.APOSTROPHE:{this.state=x.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case T.AMPERSAND:{this._startCharacterReference();break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=ye;break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this._leaveAttrValue(),this.state=x.BEFORE_ATTRIBUTE_NAME;break}case T.AMPERSAND:{this._startCharacterReference();break}case T.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=x.DATA,this.emitCurrentTagToken();break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=ye;break}case T.QUOTATION_MARK:case T.APOSTROPHE:case T.LESS_THAN_SIGN:case T.EQUALS_SIGN:case T.GRAVE_ACCENT:{this._err(D.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this._leaveAttrValue(),this.state=x.BEFORE_ATTRIBUTE_NAME;break}case T.SOLIDUS:{this._leaveAttrValue(),this.state=x.SELF_CLOSING_START_TAG;break}case T.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=x.DATA,this.emitCurrentTagToken();break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._err(D.missingWhitespaceBetweenAttributes),this.state=x.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case T.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=x.DATA,this.emitCurrentTagToken();break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._err(D.unexpectedSolidusInTag),this.state=x.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentComment(n);break}case T.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.data+=ye;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(et.DASH_DASH,!0)?(this._createCommentToken(et.DASH_DASH.length+1),this.state=x.COMMENT_START):this._consumeSequenceIfMatch(et.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(et.DOCTYPE.length+1),this.state=x.DOCTYPE):this._consumeSequenceIfMatch(et.CDATA_START,!0)?this.inForeignNode?this.state=x.CDATA_SECTION:(this._err(D.cdataInHtmlContent),this._createCommentToken(et.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=x.BOGUS_COMMENT):this._ensureHibernation()||(this._err(D.incorrectlyOpenedComment),this._createCommentToken(2),this.state=x.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case T.HYPHEN_MINUS:{this.state=x.COMMENT_START_DASH;break}case T.GREATER_THAN_SIGN:{this._err(D.abruptClosingOfEmptyComment),this.state=x.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=x.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case T.HYPHEN_MINUS:{this.state=x.COMMENT_END;break}case T.GREATER_THAN_SIGN:{this._err(D.abruptClosingOfEmptyComment),this.state=x.DATA,this.emitCurrentComment(n);break}case T.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=x.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case T.HYPHEN_MINUS:{this.state=x.COMMENT_END_DASH;break}case T.LESS_THAN_SIGN:{n.data+="<",this.state=x.COMMENT_LESS_THAN_SIGN;break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.data+=ye;break}case T.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case T.EXCLAMATION_MARK:{n.data+="!",this.state=x.COMMENT_LESS_THAN_SIGN_BANG;break}case T.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=x.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===T.HYPHEN_MINUS?this.state=x.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=x.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===T.HYPHEN_MINUS?this.state=x.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=x.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==T.GREATER_THAN_SIGN&&t!==T.EOF&&this._err(D.nestedComment),this.state=x.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case T.HYPHEN_MINUS:{this.state=x.COMMENT_END;break}case T.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=x.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentComment(n);break}case T.EXCLAMATION_MARK:{this.state=x.COMMENT_END_BANG;break}case T.HYPHEN_MINUS:{n.data+="-";break}case T.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=x.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case T.HYPHEN_MINUS:{n.data+="--!",this.state=x.COMMENT_END_DASH;break}case T.GREATER_THAN_SIGN:{this._err(D.incorrectlyClosedComment),this.state=x.DATA,this.emitCurrentComment(n);break}case T.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=x.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=x.BEFORE_DOCTYPE_NAME;break}case T.GREATER_THAN_SIGN:{this.state=x.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case T.EOF:{this._err(D.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingWhitespaceBeforeDoctypeName),this.state=x.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(vr(t))this._createDoctypeToken(String.fromCharCode(mi(t))),this.state=x.DOCTYPE_NAME;else switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.NULL:{this._err(D.unexpectedNullCharacter),this._createDoctypeToken(ye),this.state=x.DOCTYPE_NAME;break}case T.GREATER_THAN_SIGN:{this._err(D.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.EOF:{this._err(D.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=x.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=x.AFTER_DOCTYPE_NAME;break}case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.name+=ye;break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(vr(t)?mi(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(et.PUBLIC,!1)?this.state=x.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(et.SYSTEM,!1)?this.state=x.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(D.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=x.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case T.QUOTATION_MARK:{this._err(D.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{this._err(D.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(D.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:{n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(D.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case T.QUOTATION_MARK:{this.state=x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.publicId+=ye;break}case T.GREATER_THAN_SIGN:{this._err(D.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.EOF:{this._err(D.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 T.APOSTROPHE:{this.state=x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.publicId+=ye;break}case T.GREATER_THAN_SIGN:{this._err(D.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.EOF:{this._err(D.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 T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=x.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.QUOTATION_MARK:{this._err(D.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{this._err(D.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.QUOTATION_MARK:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=x.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case T.QUOTATION_MARK:{this._err(D.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{this._err(D.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(D.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(D.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case T.QUOTATION_MARK:{this.state=x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.systemId+=ye;break}case T.GREATER_THAN_SIGN:{this._err(D.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.EOF:{this._err(D.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 T.APOSTROPHE:{this.state=x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.systemId+=ye;break}case T.GREATER_THAN_SIGN:{this._err(D.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.EOF:{this._err(D.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 T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case T.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.NULL:{this._err(D.unexpectedNullCharacter);break}case T.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case T.RIGHT_SQUARE_BRACKET:{this.state=x.CDATA_SECTION_BRACKET;break}case T.EOF:{this._err(D.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===T.RIGHT_SQUARE_BRACKET?this.state=x.CDATA_SECTION_END:(this._emitChars("]"),this.state=x.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case T.GREATER_THAN_SIGN:{this.state=x.DATA;break}case T.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=x.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(T.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ju(this.preprocessor.peek(1))?x.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ju(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===T.SEMICOLON&&this._err(D.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Kd=new Set([h.DD,h.DT,h.LI,h.OPTGROUP,h.OPTION,h.P,h.RB,h.RP,h.RT,h.RTC]),tl=new Set([...Kd,h.CAPTION,h.COLGROUP,h.TBODY,h.TD,h.TFOOT,h.TH,h.THEAD,h.TR]),zi=new Set([h.APPLET,h.CAPTION,h.HTML,h.MARQUEE,h.OBJECT,h.TABLE,h.TD,h.TEMPLATE,h.TH]),i1=new Set([...zi,h.OL,h.UL]),s1=new Set([...zi,h.BUTTON]),nl=new Set([h.ANNOTATION_XML,h.MI,h.MN,h.MO,h.MS,h.MTEXT]),rl=new Set([h.DESC,h.FOREIGN_OBJECT,h.TITLE]),a1=new Set([h.TR,h.TEMPLATE,h.HTML]),o1=new Set([h.TBODY,h.TFOOT,h.THEAD,h.TEMPLATE,h.HTML]),u1=new Set([h.TABLE,h.TEMPLATE,h.HTML]),l1=new Set([h.TD,h.TH]);class c1{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=h.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===h.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===H.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])!==H.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(Ma,H.HTML)}popUntilTableCellPopped(){this.popUntilPopped(l1,H.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(u1,H.HTML)}clearBackToTableBodyContext(){this.clearBackTo(o1,H.HTML)}clearBackToTableRowContext(){this.clearBackTo(a1,H.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]===h.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]===h.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 H.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case H.SVG:{if(rl.has(i))return!1;break}case H.MATHML:{if(nl.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,zi)}hasInListItemScope(t){return this.hasInDynamicScope(t,i1)}hasInButtonScope(t){return this.hasInDynamicScope(t,s1)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case H.HTML:{if(Ma.has(n))return!0;if(zi.has(n))return!1;break}case H.SVG:{if(rl.has(n))return!1;break}case H.MATHML:{if(nl.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===H.HTML)switch(this.tagIDs[n]){case t:return!0;case h.TABLE:case h.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===H.HTML)switch(this.tagIDs[t]){case h.TBODY:case h.THEAD:case h.TFOOT:return!0;case h.TABLE:case h.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===H.HTML)switch(this.tagIDs[n]){case t:return!0;case h.OPTION:case h.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Kd.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&tl.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&tl.has(this.currentTagId);)this.pop()}}const Gs=3;var Lt;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Lt||(Lt={}));const il={type:Lt.Marker};class d1{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,s=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const u=this.entries[o];if(u.type===Lt.Marker)break;const{element:l}=u;if(this.treeAdapter.getTagName(l)===s&&this.treeAdapter.getNamespaceURI(l)===a){const c=this.treeAdapter.getAttrList(l);c.length===i&&r.push({idx:o,attrs:c})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Gs)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Gs)return;const i=new Map(n.map(a=>[a.name,a.value]));let s=0;for(let a=0;a<r.length;a++){const o=r[a];o.attrs.every(u=>i.get(u.name)===u.value)&&(s+=1,s>=Gs&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(il)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Lt.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Lt.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(il);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Lt.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Lt.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Lt.Element&&n.element===t)}}const Jt={createDocument(){return{nodeName:"#document",mode:ct.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(s=>s.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Jt.appendChild(e,s)}},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(Jt.isTextNode(n)){n.value+=t;return}}Jt.appendChild(e,Jt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Jt.isTextNode(r)?r.value+=t:Jt.insertBefore(e,Jt.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}}},Xd="html",h1="about:legacy-compat",f1="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Zd=["+//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//"],p1=[...Zd,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],m1=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Jd=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],g1=[...Jd,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function sl(e,t){return t.some(n=>e.startsWith(n))}function b1(e){return e.name===Xd&&e.publicId===null&&(e.systemId===null||e.systemId===h1)}function E1(e){if(e.name!==Xd)return ct.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===f1)return ct.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),m1.has(n))return ct.QUIRKS;let r=t===null?p1:Zd;if(sl(n,r))return ct.QUIRKS;if(r=t===null?Jd:g1,sl(n,r))return ct.LIMITED_QUIRKS}return ct.NO_QUIRKS}const al={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},_1="definitionurl",T1="definitionURL",y1=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])),x1=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:H.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:H.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:H.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:H.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:H.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:H.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:H.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:H.XML}],["xml:space",{prefix:"xml",name:"space",namespace:H.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:H.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:H.XMLNS}]]),k1=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])),A1=new Set([h.B,h.BIG,h.BLOCKQUOTE,h.BODY,h.BR,h.CENTER,h.CODE,h.DD,h.DIV,h.DL,h.DT,h.EM,h.EMBED,h.H1,h.H2,h.H3,h.H4,h.H5,h.H6,h.HEAD,h.HR,h.I,h.IMG,h.LI,h.LISTING,h.MENU,h.META,h.NOBR,h.OL,h.P,h.PRE,h.RUBY,h.S,h.SMALL,h.SPAN,h.STRONG,h.STRIKE,h.SUB,h.SUP,h.TABLE,h.TT,h.U,h.UL,h.VAR]);function C1(e){const t=e.tagID;return t===h.FONT&&e.attrs.some(({name:r})=>r===Ln.COLOR||r===Ln.SIZE||r===Ln.FACE)||A1.has(t)}function eh(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===_1){e.attrs[t].name=T1;break}}function th(e){for(let t=0;t<e.attrs.length;t++){const n=y1.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Mo(e){for(let t=0;t<e.attrs.length;t++){const n=x1.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 w1(e){const t=k1.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=dr(e.tagName))}function I1(e,t){return t===H.MATHML&&(e===h.MI||e===h.MO||e===h.MN||e===h.MS||e===h.MTEXT)}function S1(e,t,n){if(t===H.MATHML&&e===h.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Ln.ENCODING){const i=n[r].value.toLowerCase();return i===al.TEXT_HTML||i===al.APPLICATION_XML}}return t===H.SVG&&(e===h.FOREIGN_OBJECT||e===h.DESC||e===h.TITLE)}function N1(e,t,n,r){return(!r||r===H.HTML)&&S1(e,t,n)||(!r||r===H.MATHML)&&I1(e,t)}const L1="hidden",R1=8,v1=3;var w;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(w||(w={}));const O1={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},nh=new Set([h.TABLE,h.TBODY,h.TFOOT,h.THEAD,h.TR]),ol={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Jt,onParseError:null};class ul{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=w.INITIAL,this.originalInsertionMode=w.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...ol,...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 r1(this.options,this),this.activeFormattingElements=new d1(this.treeAdapter),this.fragmentContextID=r?dr(this.treeAdapter.getTagName(r)):h.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new c1(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={...ol,...n};t??(t=r.treeAdapter.createElement(R.TEMPLATE,H.HTML,[]));const i=r.treeAdapter.createElement("documentmock",H.HTML,[]),s=new this(r,i,t);return s.fragmentContextID===h.TEMPLATE&&s.tmplInsertionModeStack.unshift(w.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}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 s=(i=t.location)!==null&&i!==void 0?i:O1,a={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset};this.onParseError(a)}onItemPush(t,n,r){var i,s;(s=(i=this.treeAdapter).onItemPush)===null||s===void 0||s.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 s,a;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,a=this.fragmentContextID):{current:s,currentTagId:a}=this.openElements,this._setContextModes(s,a)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===H.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,H.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=w.TEXT}switchToPlaintextParsing(){this.insertionMode=w.TEXT,this.originalInsertionMode=w.IN_BODY,this.tokenizer.state=Ae.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===R.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==H.HTML))switch(this.fragmentContextID){case h.TITLE:case h.TEXTAREA:{this.tokenizer.state=Ae.RCDATA;break}case h.STYLE:case h.XMP:case h.IFRAME:case h.NOEMBED:case h.NOFRAMES:case h.NOSCRIPT:{this.tokenizer.state=Ae.RAWTEXT;break}case h.SCRIPT:{this.tokenizer.state=Ae.SCRIPT_DATA;break}case h.PLAINTEXT:{this.tokenizer.state=Ae.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 a=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));a&&this.treeAdapter.setNodeSourceCodeLocation(a,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,H.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,H.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(R.HTML,H.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,h.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),s=r?i.lastIndexOf(r):i.length,a=i[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:u,endCol:l,endOffset:c}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:u,endCol:l,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,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),s=n.type===ae.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,s)}}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===h.SVG&&this.treeAdapter.getTagName(n)===R.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===H.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===h.MGLYPH||t.tagID===h.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,H.HTML)}_processToken(t){switch(t.type){case ae.CHARACTER:{this.onCharacter(t);break}case ae.NULL_CHARACTER:{this.onNullCharacter(t);break}case ae.COMMENT:{this.onComment(t);break}case ae.DOCTYPE:{this.onDoctype(t);break}case ae.START_TAG:{this._processStartTag(t);break}case ae.END_TAG:{this.onEndTag(t);break}case ae.EOF:{this.onEof(t);break}case ae.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return N1(t,i,s,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Lt.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const s=this.activeFormattingElements.entries[i];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=w.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(h.P),this.openElements.popUntilTagNamePopped(h.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case h.TR:{this.insertionMode=w.IN_ROW;return}case h.TBODY:case h.THEAD:case h.TFOOT:{this.insertionMode=w.IN_TABLE_BODY;return}case h.CAPTION:{this.insertionMode=w.IN_CAPTION;return}case h.COLGROUP:{this.insertionMode=w.IN_COLUMN_GROUP;return}case h.TABLE:{this.insertionMode=w.IN_TABLE;return}case h.BODY:{this.insertionMode=w.IN_BODY;return}case h.FRAMESET:{this.insertionMode=w.IN_FRAMESET;return}case h.SELECT:{this._resetInsertionModeForSelect(t);return}case h.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case h.HTML:{this.insertionMode=this.headElement?w.AFTER_HEAD:w.BEFORE_HEAD;return}case h.TD:case h.TH:{if(t>0){this.insertionMode=w.IN_CELL;return}break}case h.HEAD:{if(t>0){this.insertionMode=w.IN_HEAD;return}break}}this.insertionMode=w.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===h.TEMPLATE)break;if(r===h.TABLE){this.insertionMode=w.IN_SELECT_IN_TABLE;return}}this.insertionMode=w.IN_SELECT}_isElementCausesFosterParenting(t){return nh.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 h.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===H.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case h.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 Jg[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){lE(this,t);return}switch(this.insertionMode){case w.INITIAL:{xr(this,t);break}case w.BEFORE_HTML:{Br(this,t);break}case w.BEFORE_HEAD:{Fr(this,t);break}case w.IN_HEAD:{Hr(this,t);break}case w.IN_HEAD_NO_SCRIPT:{Ur(this,t);break}case w.AFTER_HEAD:{$r(this,t);break}case w.IN_BODY:case w.IN_CAPTION:case w.IN_CELL:case w.IN_TEMPLATE:{ih(this,t);break}case w.TEXT:case w.IN_SELECT:case w.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case w.IN_TABLE:case w.IN_TABLE_BODY:case w.IN_ROW:{Ws(this,t);break}case w.IN_TABLE_TEXT:{ch(this,t);break}case w.IN_COLUMN_GROUP:{Gi(this,t);break}case w.AFTER_BODY:{Wi(this,t);break}case w.AFTER_AFTER_BODY:{Pi(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){uE(this,t);return}switch(this.insertionMode){case w.INITIAL:{xr(this,t);break}case w.BEFORE_HTML:{Br(this,t);break}case w.BEFORE_HEAD:{Fr(this,t);break}case w.IN_HEAD:{Hr(this,t);break}case w.IN_HEAD_NO_SCRIPT:{Ur(this,t);break}case w.AFTER_HEAD:{$r(this,t);break}case w.TEXT:{this._insertCharacters(t);break}case w.IN_TABLE:case w.IN_TABLE_BODY:case w.IN_ROW:{Ws(this,t);break}case w.IN_COLUMN_GROUP:{Gi(this,t);break}case w.AFTER_BODY:{Wi(this,t);break}case w.AFTER_AFTER_BODY:{Pi(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ba(this,t);return}switch(this.insertionMode){case w.INITIAL:case w.BEFORE_HTML:case w.BEFORE_HEAD:case w.IN_HEAD:case w.IN_HEAD_NO_SCRIPT:case w.AFTER_HEAD:case w.IN_BODY:case w.IN_TABLE:case w.IN_CAPTION:case w.IN_COLUMN_GROUP:case w.IN_TABLE_BODY:case w.IN_ROW:case w.IN_CELL:case w.IN_SELECT:case w.IN_SELECT_IN_TABLE:case w.IN_TEMPLATE:case w.IN_FRAMESET:case w.AFTER_FRAMESET:{Ba(this,t);break}case w.IN_TABLE_TEXT:{kr(this,t);break}case w.AFTER_BODY:{U1(this,t);break}case w.AFTER_AFTER_BODY:case w.AFTER_AFTER_FRAMESET:{$1(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case w.INITIAL:{j1(this,t);break}case w.BEFORE_HEAD:case w.IN_HEAD:case w.IN_HEAD_NO_SCRIPT:case w.AFTER_HEAD:{this._err(t,D.misplacedDoctype);break}case w.IN_TABLE_TEXT:{kr(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,D.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?cE(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case w.INITIAL:{xr(this,t);break}case w.BEFORE_HTML:{V1(this,t);break}case w.BEFORE_HEAD:{G1(this,t);break}case w.IN_HEAD:{kt(this,t);break}case w.IN_HEAD_NO_SCRIPT:{Y1(this,t);break}case w.AFTER_HEAD:{K1(this,t);break}case w.IN_BODY:{je(this,t);break}case w.IN_TABLE:{sr(this,t);break}case w.IN_TABLE_TEXT:{kr(this,t);break}case w.IN_CAPTION:{Wb(this,t);break}case w.IN_COLUMN_GROUP:{Ho(this,t);break}case w.IN_TABLE_BODY:{_s(this,t);break}case w.IN_ROW:{Ts(this,t);break}case w.IN_CELL:{Qb(this,t);break}case w.IN_SELECT:{fh(this,t);break}case w.IN_SELECT_IN_TABLE:{Xb(this,t);break}case w.IN_TEMPLATE:{Jb(this,t);break}case w.AFTER_BODY:{tE(this,t);break}case w.IN_FRAMESET:{nE(this,t);break}case w.AFTER_FRAMESET:{iE(this,t);break}case w.AFTER_AFTER_BODY:{aE(this,t);break}case w.AFTER_AFTER_FRAMESET:{oE(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?dE(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case w.INITIAL:{xr(this,t);break}case w.BEFORE_HTML:{z1(this,t);break}case w.BEFORE_HEAD:{W1(this,t);break}case w.IN_HEAD:{q1(this,t);break}case w.IN_HEAD_NO_SCRIPT:{Q1(this,t);break}case w.AFTER_HEAD:{X1(this,t);break}case w.IN_BODY:{Es(this,t);break}case w.TEXT:{Mb(this,t);break}case w.IN_TABLE:{Qr(this,t);break}case w.IN_TABLE_TEXT:{kr(this,t);break}case w.IN_CAPTION:{qb(this,t);break}case w.IN_COLUMN_GROUP:{Yb(this,t);break}case w.IN_TABLE_BODY:{Fa(this,t);break}case w.IN_ROW:{hh(this,t);break}case w.IN_CELL:{Kb(this,t);break}case w.IN_SELECT:{ph(this,t);break}case w.IN_SELECT_IN_TABLE:{Zb(this,t);break}case w.IN_TEMPLATE:{eE(this,t);break}case w.AFTER_BODY:{gh(this,t);break}case w.IN_FRAMESET:{rE(this,t);break}case w.AFTER_FRAMESET:{sE(this,t);break}case w.AFTER_AFTER_BODY:{Pi(this,t);break}}}onEof(t){switch(this.insertionMode){case w.INITIAL:{xr(this,t);break}case w.BEFORE_HTML:{Br(this,t);break}case w.BEFORE_HEAD:{Fr(this,t);break}case w.IN_HEAD:{Hr(this,t);break}case w.IN_HEAD_NO_SCRIPT:{Ur(this,t);break}case w.AFTER_HEAD:{$r(this,t);break}case w.IN_BODY:case w.IN_TABLE:case w.IN_CAPTION:case w.IN_COLUMN_GROUP:case w.IN_TABLE_BODY:case w.IN_ROW:case w.IN_CELL:case w.IN_SELECT:case w.IN_SELECT_IN_TABLE:{uh(this,t);break}case w.TEXT:{Bb(this,t);break}case w.IN_TABLE_TEXT:{kr(this,t);break}case w.IN_TEMPLATE:{mh(this,t);break}case w.AFTER_BODY:case w.IN_FRAMESET:case w.AFTER_FRAMESET:case w.AFTER_AFTER_BODY:case w.AFTER_AFTER_FRAMESET:{Fo(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===T.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 w.IN_HEAD:case w.IN_HEAD_NO_SCRIPT:case w.AFTER_HEAD:case w.TEXT:case w.IN_COLUMN_GROUP:case w.IN_SELECT:case w.IN_SELECT_IN_TABLE:case w.IN_FRAMESET:case w.AFTER_FRAMESET:{this._insertCharacters(t);break}case w.IN_BODY:case w.IN_CAPTION:case w.IN_CELL:case w.IN_TEMPLATE:case w.AFTER_BODY:case w.AFTER_AFTER_BODY:case w.AFTER_AFTER_FRAMESET:{rh(this,t);break}case w.IN_TABLE:case w.IN_TABLE_BODY:case w.IN_ROW:{Ws(this,t);break}case w.IN_TABLE_TEXT:{lh(this,t);break}}}}function P1(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):oh(e,t),n}function D1(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 M1(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let s=0,a=i;a!==n;s++,a=i){i=e.openElements.getCommonAncestor(a);const o=e.activeFormattingElements.getElementEntry(a),u=o&&s>=v1;!o||u?(u&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(a)):(a=B1(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function B1(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 F1(e,t,n){const r=e.treeAdapter.getTagName(t),i=dr(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);i===h.TEMPLATE&&s===H.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function H1(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,s=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,i.tagID)}function Bo(e,t){for(let n=0;n<R1;n++){const r=P1(e,t);if(!r)break;const i=D1(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=M1(e,i,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),a&&F1(e,a,s),H1(e,i,r)}}function Ba(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function U1(e,t){e._appendCommentNode(t,e.openElements.items[0])}function $1(e,t){e._appendCommentNode(t,e.document)}function Fo(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 s=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&e._setEndLocation(s,t)}}}}function j1(e,t){e._setDocumentType(t);const n=t.forceQuirks?ct.QUIRKS:E1(t);b1(t)||e._err(t,D.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=w.BEFORE_HTML}function xr(e,t){e._err(t,D.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ct.QUIRKS),e.insertionMode=w.BEFORE_HTML,e._processToken(t)}function V1(e,t){t.tagID===h.HTML?(e._insertElement(t,H.HTML),e.insertionMode=w.BEFORE_HEAD):Br(e,t)}function z1(e,t){const n=t.tagID;(n===h.HTML||n===h.HEAD||n===h.BODY||n===h.BR)&&Br(e,t)}function Br(e,t){e._insertFakeRootElement(),e.insertionMode=w.BEFORE_HEAD,e._processToken(t)}function G1(e,t){switch(t.tagID){case h.HTML:{je(e,t);break}case h.HEAD:{e._insertElement(t,H.HTML),e.headElement=e.openElements.current,e.insertionMode=w.IN_HEAD;break}default:Fr(e,t)}}function W1(e,t){const n=t.tagID;n===h.HEAD||n===h.BODY||n===h.HTML||n===h.BR?Fr(e,t):e._err(t,D.endTagWithoutMatchingOpenElement)}function Fr(e,t){e._insertFakeElement(R.HEAD,h.HEAD),e.headElement=e.openElements.current,e.insertionMode=w.IN_HEAD,e._processToken(t)}function kt(e,t){switch(t.tagID){case h.HTML:{je(e,t);break}case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:{e._appendElement(t,H.HTML),t.ackSelfClosing=!0;break}case h.TITLE:{e._switchToTextParsing(t,Ae.RCDATA);break}case h.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ae.RAWTEXT):(e._insertElement(t,H.HTML),e.insertionMode=w.IN_HEAD_NO_SCRIPT);break}case h.NOFRAMES:case h.STYLE:{e._switchToTextParsing(t,Ae.RAWTEXT);break}case h.SCRIPT:{e._switchToTextParsing(t,Ae.SCRIPT_DATA);break}case h.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=w.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(w.IN_TEMPLATE);break}case h.HEAD:{e._err(t,D.misplacedStartTagForHeadElement);break}default:Hr(e,t)}}function q1(e,t){switch(t.tagID){case h.HEAD:{e.openElements.pop(),e.insertionMode=w.AFTER_HEAD;break}case h.BODY:case h.BR:case h.HTML:{Hr(e,t);break}case h.TEMPLATE:{Bn(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function Bn(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==h.TEMPLATE&&e._err(t,D.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(h.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,D.endTagWithoutMatchingOpenElement)}function Hr(e,t){e.openElements.pop(),e.insertionMode=w.AFTER_HEAD,e._processToken(t)}function Y1(e,t){switch(t.tagID){case h.HTML:{je(e,t);break}case h.BASEFONT:case h.BGSOUND:case h.HEAD:case h.LINK:case h.META:case h.NOFRAMES:case h.STYLE:{kt(e,t);break}case h.NOSCRIPT:{e._err(t,D.nestedNoscriptInHead);break}default:Ur(e,t)}}function Q1(e,t){switch(t.tagID){case h.NOSCRIPT:{e.openElements.pop(),e.insertionMode=w.IN_HEAD;break}case h.BR:{Ur(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function Ur(e,t){const n=t.type===ae.EOF?D.openElementsLeftAfterEof:D.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=w.IN_HEAD,e._processToken(t)}function K1(e,t){switch(t.tagID){case h.HTML:{je(e,t);break}case h.BODY:{e._insertElement(t,H.HTML),e.framesetOk=!1,e.insertionMode=w.IN_BODY;break}case h.FRAMESET:{e._insertElement(t,H.HTML),e.insertionMode=w.IN_FRAMESET;break}case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:case h.NOFRAMES:case h.SCRIPT:case h.STYLE:case h.TEMPLATE:case h.TITLE:{e._err(t,D.abandonedHeadElementChild),e.openElements.push(e.headElement,h.HEAD),kt(e,t),e.openElements.remove(e.headElement);break}case h.HEAD:{e._err(t,D.misplacedStartTagForHeadElement);break}default:$r(e,t)}}function X1(e,t){switch(t.tagID){case h.BODY:case h.HTML:case h.BR:{$r(e,t);break}case h.TEMPLATE:{Bn(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function $r(e,t){e._insertFakeElement(R.BODY,h.BODY),e.insertionMode=w.IN_BODY,bs(e,t)}function bs(e,t){switch(t.type){case ae.CHARACTER:{ih(e,t);break}case ae.WHITESPACE_CHARACTER:{rh(e,t);break}case ae.COMMENT:{Ba(e,t);break}case ae.START_TAG:{je(e,t);break}case ae.END_TAG:{Es(e,t);break}case ae.EOF:{uh(e,t);break}}}function rh(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function ih(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Z1(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function J1(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function eb(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,H.HTML),e.insertionMode=w.IN_FRAMESET)}function tb(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,H.HTML)}function nb(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Ma.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,H.HTML)}function rb(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,H.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function ib(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,H.HTML),n||(e.formElement=e.openElements.current))}function sb(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===h.LI&&i===h.LI||(n===h.DD||n===h.DT)&&(i===h.DD||i===h.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==h.ADDRESS&&i!==h.DIV&&i!==h.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,H.HTML)}function ab(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,H.HTML),e.tokenizer.state=Ae.PLAINTEXT}function ob(e,t){e.openElements.hasInScope(h.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.framesetOk=!1}function ub(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(R.A);n&&(Bo(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function lb(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function cb(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(h.NOBR)&&(Bo(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,H.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function db(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function hb(e,t){e.treeAdapter.getDocumentMode(e.document)!==ct.QUIRKS&&e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,H.HTML),e.framesetOk=!1,e.insertionMode=w.IN_TABLE}function sh(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,H.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ah(e){const t=Yd(e,Ln.TYPE);return t!=null&&t.toLowerCase()===L1}function fb(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,H.HTML),ah(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function pb(e,t){e._appendElement(t,H.HTML),t.ackSelfClosing=!0}function mb(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._appendElement(t,H.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function gb(e,t){t.tagName=R.IMG,t.tagID=h.IMG,sh(e,t)}function bb(e,t){e._insertElement(t,H.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ae.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=w.TEXT}function Eb(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ae.RAWTEXT)}function _b(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ae.RAWTEXT)}function ll(e,t){e._switchToTextParsing(t,Ae.RAWTEXT)}function Tb(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===w.IN_TABLE||e.insertionMode===w.IN_CAPTION||e.insertionMode===w.IN_TABLE_BODY||e.insertionMode===w.IN_ROW||e.insertionMode===w.IN_CELL?w.IN_SELECT_IN_TABLE:w.IN_SELECT}function yb(e,t){e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML)}function xb(e,t){e.openElements.hasInScope(h.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,H.HTML)}function kb(e,t){e.openElements.hasInScope(h.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(h.RTC),e._insertElement(t,H.HTML)}function Ab(e,t){e._reconstructActiveFormattingElements(),eh(t),Mo(t),t.selfClosing?e._appendElement(t,H.MATHML):e._insertElement(t,H.MATHML),t.ackSelfClosing=!0}function Cb(e,t){e._reconstructActiveFormattingElements(),th(t),Mo(t),t.selfClosing?e._appendElement(t,H.SVG):e._insertElement(t,H.SVG),t.ackSelfClosing=!0}function cl(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML)}function je(e,t){switch(t.tagID){case h.I:case h.S:case h.B:case h.U:case h.EM:case h.TT:case h.BIG:case h.CODE:case h.FONT:case h.SMALL:case h.STRIKE:case h.STRONG:{lb(e,t);break}case h.A:{ub(e,t);break}case h.H1:case h.H2:case h.H3:case h.H4:case h.H5:case h.H6:{nb(e,t);break}case h.P:case h.DL:case h.OL:case h.UL:case h.DIV:case h.DIR:case h.NAV:case h.MAIN:case h.MENU:case h.ASIDE:case h.CENTER:case h.FIGURE:case h.FOOTER:case h.HEADER:case h.HGROUP:case h.DIALOG:case h.DETAILS:case h.ADDRESS:case h.ARTICLE:case h.SEARCH:case h.SECTION:case h.SUMMARY:case h.FIELDSET:case h.BLOCKQUOTE:case h.FIGCAPTION:{tb(e,t);break}case h.LI:case h.DD:case h.DT:{sb(e,t);break}case h.BR:case h.IMG:case h.WBR:case h.AREA:case h.EMBED:case h.KEYGEN:{sh(e,t);break}case h.HR:{mb(e,t);break}case h.RB:case h.RTC:{xb(e,t);break}case h.RT:case h.RP:{kb(e,t);break}case h.PRE:case h.LISTING:{rb(e,t);break}case h.XMP:{Eb(e,t);break}case h.SVG:{Cb(e,t);break}case h.HTML:{Z1(e,t);break}case h.BASE:case h.LINK:case h.META:case h.STYLE:case h.TITLE:case h.SCRIPT:case h.BGSOUND:case h.BASEFONT:case h.TEMPLATE:{kt(e,t);break}case h.BODY:{J1(e,t);break}case h.FORM:{ib(e,t);break}case h.NOBR:{cb(e,t);break}case h.MATH:{Ab(e,t);break}case h.TABLE:{hb(e,t);break}case h.INPUT:{fb(e,t);break}case h.PARAM:case h.TRACK:case h.SOURCE:{pb(e,t);break}case h.IMAGE:{gb(e,t);break}case h.BUTTON:{ob(e,t);break}case h.APPLET:case h.OBJECT:case h.MARQUEE:{db(e,t);break}case h.IFRAME:{_b(e,t);break}case h.SELECT:{Tb(e,t);break}case h.OPTION:case h.OPTGROUP:{yb(e,t);break}case h.NOEMBED:case h.NOFRAMES:{ll(e,t);break}case h.FRAMESET:{eb(e,t);break}case h.TEXTAREA:{bb(e,t);break}case h.NOSCRIPT:{e.options.scriptingEnabled?ll(e,t):cl(e,t);break}case h.PLAINTEXT:{ab(e,t);break}case h.COL:case h.TH:case h.TD:case h.TR:case h.HEAD:case h.FRAME:case h.TBODY:case h.TFOOT:case h.THEAD:case h.CAPTION:case h.COLGROUP:break;default:cl(e,t)}}function wb(e,t){if(e.openElements.hasInScope(h.BODY)&&(e.insertionMode=w.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Ib(e,t){e.openElements.hasInScope(h.BODY)&&(e.insertionMode=w.AFTER_BODY,gh(e,t))}function Sb(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Nb(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(h.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(h.FORM):n&&e.openElements.remove(n))}function Lb(e){e.openElements.hasInButtonScope(h.P)||e._insertFakeElement(R.P,h.P),e._closePElement()}function Rb(e){e.openElements.hasInListItemScope(h.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(h.LI),e.openElements.popUntilTagNamePopped(h.LI))}function vb(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Ob(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Pb(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Db(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(R.BR,h.BR),e.openElements.pop(),e.framesetOk=!1}function oh(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const s=e.openElements.items[i],a=e.openElements.tagIDs[i];if(r===a&&(r!==h.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(s,a))break}}function Es(e,t){switch(t.tagID){case h.A:case h.B:case h.I:case h.S:case h.U:case h.EM:case h.TT:case h.BIG:case h.CODE:case h.FONT:case h.NOBR:case h.SMALL:case h.STRIKE:case h.STRONG:{Bo(e,t);break}case h.P:{Lb(e);break}case h.DL:case h.UL:case h.OL:case h.DIR:case h.DIV:case h.NAV:case h.PRE:case h.MAIN:case h.MENU:case h.ASIDE:case h.BUTTON:case h.CENTER:case h.FIGURE:case h.FOOTER:case h.HEADER:case h.HGROUP:case h.DIALOG:case h.ADDRESS:case h.ARTICLE:case h.DETAILS:case h.SEARCH:case h.SECTION:case h.SUMMARY:case h.LISTING:case h.FIELDSET:case h.BLOCKQUOTE:case h.FIGCAPTION:{Sb(e,t);break}case h.LI:{Rb(e);break}case h.DD:case h.DT:{vb(e,t);break}case h.H1:case h.H2:case h.H3:case h.H4:case h.H5:case h.H6:{Ob(e);break}case h.BR:{Db(e);break}case h.BODY:{wb(e,t);break}case h.HTML:{Ib(e,t);break}case h.FORM:{Nb(e);break}case h.APPLET:case h.OBJECT:case h.MARQUEE:{Pb(e,t);break}case h.TEMPLATE:{Bn(e,t);break}default:oh(e,t)}}function uh(e,t){e.tmplInsertionModeStack.length>0?mh(e,t):Fo(e,t)}function Mb(e,t){var n;t.tagID===h.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Bb(e,t){e._err(t,D.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ws(e,t){if(e.openElements.currentTagId!==void 0&&nh.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=w.IN_TABLE_TEXT,t.type){case ae.CHARACTER:{ch(e,t);break}case ae.WHITESPACE_CHARACTER:{lh(e,t);break}}else ai(e,t)}function Fb(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,H.HTML),e.insertionMode=w.IN_CAPTION}function Hb(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,H.HTML),e.insertionMode=w.IN_COLUMN_GROUP}function Ub(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.COLGROUP,h.COLGROUP),e.insertionMode=w.IN_COLUMN_GROUP,Ho(e,t)}function $b(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,H.HTML),e.insertionMode=w.IN_TABLE_BODY}function jb(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.TBODY,h.TBODY),e.insertionMode=w.IN_TABLE_BODY,_s(e,t)}function Vb(e,t){e.openElements.hasInTableScope(h.TABLE)&&(e.openElements.popUntilTagNamePopped(h.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function zb(e,t){ah(t)?e._appendElement(t,H.HTML):ai(e,t),t.ackSelfClosing=!0}function Gb(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,H.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function sr(e,t){switch(t.tagID){case h.TD:case h.TH:case h.TR:{jb(e,t);break}case h.STYLE:case h.SCRIPT:case h.TEMPLATE:{kt(e,t);break}case h.COL:{Ub(e,t);break}case h.FORM:{Gb(e,t);break}case h.TABLE:{Vb(e,t);break}case h.TBODY:case h.TFOOT:case h.THEAD:{$b(e,t);break}case h.INPUT:{zb(e,t);break}case h.CAPTION:{Fb(e,t);break}case h.COLGROUP:{Hb(e,t);break}default:ai(e,t)}}function Qr(e,t){switch(t.tagID){case h.TABLE:{e.openElements.hasInTableScope(h.TABLE)&&(e.openElements.popUntilTagNamePopped(h.TABLE),e._resetInsertionMode());break}case h.TEMPLATE:{Bn(e,t);break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TBODY:case h.TD:case h.TFOOT:case h.TH:case h.THEAD:case h.TR:break;default:ai(e,t)}}function ai(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,bs(e,t),e.fosterParentingEnabled=n}function lh(e,t){e.pendingCharacterTokens.push(t)}function ch(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function kr(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ai(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const dh=new Set([h.CAPTION,h.COL,h.COLGROUP,h.TBODY,h.TD,h.TFOOT,h.TH,h.THEAD,h.TR]);function Wb(e,t){const n=t.tagID;dh.has(n)?e.openElements.hasInTableScope(h.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=w.IN_TABLE,sr(e,t)):je(e,t)}function qb(e,t){const n=t.tagID;switch(n){case h.CAPTION:case h.TABLE:{e.openElements.hasInTableScope(h.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=w.IN_TABLE,n===h.TABLE&&Qr(e,t));break}case h.BODY:case h.COL:case h.COLGROUP:case h.HTML:case h.TBODY:case h.TD:case h.TFOOT:case h.TH:case h.THEAD:case h.TR:break;default:Es(e,t)}}function Ho(e,t){switch(t.tagID){case h.HTML:{je(e,t);break}case h.COL:{e._appendElement(t,H.HTML),t.ackSelfClosing=!0;break}case h.TEMPLATE:{kt(e,t);break}default:Gi(e,t)}}function Yb(e,t){switch(t.tagID){case h.COLGROUP:{e.openElements.currentTagId===h.COLGROUP&&(e.openElements.pop(),e.insertionMode=w.IN_TABLE);break}case h.TEMPLATE:{Bn(e,t);break}case h.COL:break;default:Gi(e,t)}}function Gi(e,t){e.openElements.currentTagId===h.COLGROUP&&(e.openElements.pop(),e.insertionMode=w.IN_TABLE,e._processToken(t))}function _s(e,t){switch(t.tagID){case h.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,H.HTML),e.insertionMode=w.IN_ROW;break}case h.TH:case h.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(R.TR,h.TR),e.insertionMode=w.IN_ROW,Ts(e,t);break}case h.CAPTION:case h.COL:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=w.IN_TABLE,sr(e,t));break}default:sr(e,t)}}function Fa(e,t){const n=t.tagID;switch(t.tagID){case h.TBODY:case h.TFOOT:case h.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=w.IN_TABLE);break}case h.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=w.IN_TABLE,Qr(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TD:case h.TH:case h.TR:break;default:Qr(e,t)}}function Ts(e,t){switch(t.tagID){case h.TH:case h.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,H.HTML),e.insertionMode=w.IN_CELL,e.activeFormattingElements.insertMarker();break}case h.CAPTION:case h.COL:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:case h.TR:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=w.IN_TABLE_BODY,_s(e,t));break}default:sr(e,t)}}function hh(e,t){switch(t.tagID){case h.TR:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=w.IN_TABLE_BODY);break}case h.TABLE:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=w.IN_TABLE_BODY,Fa(e,t));break}case h.TBODY:case h.TFOOT:case h.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(h.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=w.IN_TABLE_BODY,Fa(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TD:case h.TH:break;default:Qr(e,t)}}function Qb(e,t){const n=t.tagID;dh.has(n)?(e.openElements.hasInTableScope(h.TD)||e.openElements.hasInTableScope(h.TH))&&(e._closeTableCell(),Ts(e,t)):je(e,t)}function Kb(e,t){const n=t.tagID;switch(n){case h.TD:case h.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=w.IN_ROW);break}case h.TABLE:case h.TBODY:case h.TFOOT:case h.THEAD:case h.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),hh(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:break;default:Es(e,t)}}function fh(e,t){switch(t.tagID){case h.HTML:{je(e,t);break}case h.OPTION:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e._insertElement(t,H.HTML);break}case h.OPTGROUP:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop(),e._insertElement(t,H.HTML);break}case h.HR:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop(),e._appendElement(t,H.HTML),t.ackSelfClosing=!0;break}case h.INPUT:case h.KEYGEN:case h.TEXTAREA:case h.SELECT:{e.openElements.hasInSelectScope(h.SELECT)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),t.tagID!==h.SELECT&&e._processStartTag(t));break}case h.SCRIPT:case h.TEMPLATE:{kt(e,t);break}}}function ph(e,t){switch(t.tagID){case h.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===h.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===h.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop();break}case h.OPTION:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop();break}case h.SELECT:{e.openElements.hasInSelectScope(h.SELECT)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode());break}case h.TEMPLATE:{Bn(e,t);break}}}function Xb(e,t){const n=t.tagID;n===h.CAPTION||n===h.TABLE||n===h.TBODY||n===h.TFOOT||n===h.THEAD||n===h.TR||n===h.TD||n===h.TH?(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),e._processStartTag(t)):fh(e,t)}function Zb(e,t){const n=t.tagID;n===h.CAPTION||n===h.TABLE||n===h.TBODY||n===h.TFOOT||n===h.THEAD||n===h.TR||n===h.TD||n===h.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),e.onEndTag(t)):ph(e,t)}function Jb(e,t){switch(t.tagID){case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:case h.NOFRAMES:case h.SCRIPT:case h.STYLE:case h.TEMPLATE:case h.TITLE:{kt(e,t);break}case h.CAPTION:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:{e.tmplInsertionModeStack[0]=w.IN_TABLE,e.insertionMode=w.IN_TABLE,sr(e,t);break}case h.COL:{e.tmplInsertionModeStack[0]=w.IN_COLUMN_GROUP,e.insertionMode=w.IN_COLUMN_GROUP,Ho(e,t);break}case h.TR:{e.tmplInsertionModeStack[0]=w.IN_TABLE_BODY,e.insertionMode=w.IN_TABLE_BODY,_s(e,t);break}case h.TD:case h.TH:{e.tmplInsertionModeStack[0]=w.IN_ROW,e.insertionMode=w.IN_ROW,Ts(e,t);break}default:e.tmplInsertionModeStack[0]=w.IN_BODY,e.insertionMode=w.IN_BODY,je(e,t)}}function eE(e,t){t.tagID===h.TEMPLATE&&Bn(e,t)}function mh(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(h.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Fo(e,t)}function tE(e,t){t.tagID===h.HTML?je(e,t):Wi(e,t)}function gh(e,t){var n;if(t.tagID===h.HTML){if(e.fragmentContext||(e.insertionMode=w.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===h.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 Wi(e,t)}function Wi(e,t){e.insertionMode=w.IN_BODY,bs(e,t)}function nE(e,t){switch(t.tagID){case h.HTML:{je(e,t);break}case h.FRAMESET:{e._insertElement(t,H.HTML);break}case h.FRAME:{e._appendElement(t,H.HTML),t.ackSelfClosing=!0;break}case h.NOFRAMES:{kt(e,t);break}}}function rE(e,t){t.tagID===h.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==h.FRAMESET&&(e.insertionMode=w.AFTER_FRAMESET))}function iE(e,t){switch(t.tagID){case h.HTML:{je(e,t);break}case h.NOFRAMES:{kt(e,t);break}}}function sE(e,t){t.tagID===h.HTML&&(e.insertionMode=w.AFTER_AFTER_FRAMESET)}function aE(e,t){t.tagID===h.HTML?je(e,t):Pi(e,t)}function Pi(e,t){e.insertionMode=w.IN_BODY,bs(e,t)}function oE(e,t){switch(t.tagID){case h.HTML:{je(e,t);break}case h.NOFRAMES:{kt(e,t);break}}}function uE(e,t){t.chars=ye,e._insertCharacters(t)}function lE(e,t){e._insertCharacters(t),e.framesetOk=!1}function bh(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==H.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function cE(e,t){if(C1(t))bh(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===H.MATHML?eh(t):r===H.SVG&&(w1(t),th(t)),Mo(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function dE(e,t){if(t.tagID===h.P||t.tagID===h.BR){bh(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)===H.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}R.AREA,R.BASE,R.BASEFONT,R.BGSOUND,R.BR,R.COL,R.EMBED,R.FRAME,R.HR,R.IMG,R.INPUT,R.KEYGEN,R.LINK,R.META,R.PARAM,R.SOURCE,R.TRACK,R.WBR;const ys=Eh("end"),Ot=Eh("start");function Eh(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 _h(e){const t=Ot(e),n=ys(e);if(t&&n)return{start:t,end:n}}const hE=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,fE=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),dl={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Th(e,t){const n=kE(e),r=Po("type",{handlers:{root:pE,element:mE,text:gE,comment:xh,doctype:bE,raw:_E},unknown:TE}),i={parser:n?new ul(dl):ul.getFragmentParser(void 0,dl),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),hr(i,Ot());const s=n?i.parser.document:i.parser.getFragment(),a=Cg(s,{file:i.options.file});return i.stitches&&Rt(a,"comment",function(o,u,l){const c=o;if(c.value.stitch&&l&&u!==void 0){const d=l.children;return d[u]=c.value.stitch,u}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function yh(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function pE(e,t){yh(e.children,t)}function mE(e,t){yE(e,t),yh(e.children,t),xE(e,t)}function gE(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ae.CHARACTER,chars:e.value,location:oi(e)};hr(t,Ot(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function bE(e,t){const n={type:ae.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:oi(e)};hr(t,Ot(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function EE(e,t){t.stitches=!0;const n=AE(e);if("children"in e&&"children"in n){const r=Th({type:"root",children:e.children},t.options);n.children=r.children}xh({type:"comment",value:{stitch:n}},t)}function xh(e,t){const n=e.value,r={type:ae.COMMENT,data:n,location:oi(e)};hr(t,Ot(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function _E(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,kh(t,Ot(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(hE,"&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 TE(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))EE(n,t);else{let r="";throw fE.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 hr(e,t){kh(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=Ae.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 kh(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 yE(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ae.PLAINTEXT)return;hr(t,Ot(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Cn.html;i===Cn.html&&n==="svg"&&(i=Cn.svg);const s=Lg({...e,children:[]},{space:i===Cn.svg?"svg":"html"}),a={type:ae.START_TAG,tagName:n,tagID:dr(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:oi(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function xE(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&zd.includes(n)||t.parser.tokenizer.state===Ae.PLAINTEXT)return;hr(t,ys(e));const r={type:ae.END_TAG,tagName:n,tagID:dr(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:oi(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ae.RCDATA||t.parser.tokenizer.state===Ae.RAWTEXT||t.parser.tokenizer.state===Ae.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ae.DATA)}function kE(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function oi(e){const t=Ot(e)||{line:void 0,column:void 0,offset:void 0},n=ys(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 AE(e){return"children"in e?Rn({...e,children:[]}):Rn(e)}function Ha(e){return function(t,n){return Th(t,{...e,file:n})}}const bn=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],yn={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...bn,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...bn],h2:[["className","sr-only"]],img:[...bn,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...bn,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...bn],table:[...bn],ul:[...bn,["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"]},nn={}.hasOwnProperty;function CE(e,t){let n={type:"root",children:[]};const r={schema:t?{...yn,...t}:yn,stack:[]},i=Ah(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function Ah(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return wE(e,n);case"doctype":return IE(e,n);case"element":return SE(e,n);case"root":return NE(e,n);case"text":return LE(e,n)}}}function wE(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),s={type:"comment",value:r<0?n:n.slice(0,r)};return ui(s,t),s}}function IE(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ui(n,t),n}}function SE(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Ch(e,t.children),i=RE(e,t.properties);e.stack.pop();let s=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(s=!0,e.schema.ancestors&&nn.call(e.schema.ancestors,n))){const o=e.schema.ancestors[n];let u=-1;for(s=!1;++u<o.length;)e.stack.includes(o[u])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const a={type:"element",tagName:n,properties:i,children:r};return ui(a,t),a}function NE(e,t){const r={type:"root",children:Ch(e,t.children)};return ui(r,t),r}function LE(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return ui(r,t),r}function Ch(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const s=Ah(e,r[i]);s&&(Array.isArray(s)?n.push(...s):n.push(s))}}return n}function RE(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,s=r&&nn.call(r,n)?r[n]:void 0,a=r&&nn.call(r,"*")?r["*"]:void 0,o=t&&typeof t=="object"?t:{},u={};let l;for(l in o)if(nn.call(o,l)){const c=o[l];let d=hl(e,fl(s,l),l,c);d==null&&(d=hl(e,fl(a,l),l,c)),d!=null&&(u[l]=d)}if(i&&nn.call(i,n)){const c=i[n];for(l in c)nn.call(c,l)&&!nn.call(u,l)&&(u[l]=c[l])}return u}function hl(e,t,n,r){return t?Array.isArray(r)?vE(e,t,n,r):wh(e,t,n,r):void 0}function vE(e,t,n,r){let i=-1;const s=[];for(;++i<r.length;){const a=wh(e,t,n,r[i]);(typeof a=="number"||typeof a=="string")&&s.push(a)}return s}function wh(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&OE(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,s=0;for(;++s<t.length;){const a=t[s];if(a&&typeof a=="object"&&"flags"in a){if(a.test(String(r))){i=!0;break}}else if(a===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 OE(e,t,n){const r=e.schema.protocols&&nn.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),s=i.indexOf(":"),a=i.indexOf("?"),o=i.indexOf("#"),u=i.indexOf("/");if(s<0||u>-1&&s>u||a>-1&&s>a||o>-1&&s>o)return!0;let l=-1;for(;++l<r.length;){const c=r[l];if(s===c.length&&i.slice(0,c.length)===c)return!0}return!1}function ui(e,t){const n=_h(t);t.data&&(e.data=Rn(t.data)),n&&(e.position=n)}function fl(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],s=typeof i=="string"?i:i[0];if(s===t)return i;s==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Ih(e){return function(t){return CE(t,e)}}function qi(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=dn(/[A-Za-z]/),$e=dn(/[\dA-Za-z]/),PE=dn(/[#-'*+\--9=?A-Z^-~]/);function Yi(e){return e!==null&&(e<32||e===127)}const Ua=dn(/\d/),DE=dn(/[\dA-Fa-f]/),ME=dn(/[!-/:-@[-`{-~]/);function X(e){return e!==null&&e<-2}function Ee(e){return e!==null&&(e<0||e===32)}function ue(e){return e===-2||e===-1||e===32}const xs=dn(new RegExp("\\p{P}|\\p{S}","u")),vn=dn(/\s/);function dn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function BE(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function FE(e,t,n){const i=ps((n||{}).ignore||[]),s=HE(t);let a=-1;for(;++a<s.length;)Co(e,"text",o);function o(l,c){let d=-1,p;for(;++d<c.length;){const f=c[d],m=p?p.children:void 0;if(i(f,m?m.indexOf(f):void 0,p))return;p=f}if(p)return u(l,c)}function u(l,c){const d=c[c.length-1],p=s[a][0],f=s[a][1];let m=0;const y=d.children.indexOf(l);let g=!1,I=[];p.lastIndex=0;let C=p.exec(l.value);for(;C;){const v=C.index,P={index:C.index,input:C.input,stack:[...c,l]};let N=f(...C,P);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?p.lastIndex=v+1:(m!==v&&I.push({type:"text",value:l.value.slice(m,v)}),Array.isArray(N)?I.push(...N):N&&I.push(N),m=v+C[0].length,g=!0),!p.global)break;C=p.exec(l.value)}return g?(m<l.value.length&&I.push({type:"text",value:l.value.slice(m)}),d.children.splice(y,1,...I)):I=[l],y+I.length}}function HE(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([UE(i[0]),$E(i[1])])}return t}function UE(e){return typeof e=="string"?new RegExp(BE(e),"g"):e}function $E(e){return typeof e=="function"?e:function(){return e}}const qs="phrasing",Ys=["autolink","link","image","label"];function jE(){return{transforms:[QE],enter:{literalAutolink:zE,literalAutolinkEmail:Qs,literalAutolinkHttp:Qs,literalAutolinkWww:Qs},exit:{literalAutolink:YE,literalAutolinkEmail:qE,literalAutolinkHttp:GE,literalAutolinkWww:WE}}}function VE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:qs,notInConstruct:Ys},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:qs,notInConstruct:Ys},{character:":",before:"[ps]",after:"\\/",inConstruct:qs,notInConstruct:Ys}]}}function zE(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Qs(e){this.config.enter.autolinkProtocol.call(this,e)}function GE(e){this.config.exit.autolinkProtocol.call(this,e)}function WE(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 qE(e){this.config.exit.autolinkEmail.call(this,e)}function YE(e){this.exit(e)}function QE(e){FE(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,KE],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),XE]],{ignore:["link","linkReference"]})}function KE(e,t,n,r,i){let s="";if(!Sh(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!ZE(n)))return!1;const a=JE(n+r);if(!a[0])return!1;const o={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function XE(e,t,n,r){return!Sh(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ZE(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 JE(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=qi(e,"(");let s=qi(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function Sh(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||vn(n)||xs(n))&&(!t||n!==47)}function yt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Nh.peek=u_;function e_(){this.buffer()}function t_(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function n_(){this.buffer()}function r_(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function i_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function s_(e){this.exit(e)}function a_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function o_(e){this.exit(e)}function u_(){return"["}function Nh(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),o=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),o(),a(),s+=i.move("]"),s}function l_(){return{enter:{gfmFootnoteCallString:e_,gfmFootnoteCall:t_,gfmFootnoteDefinitionLabelString:n_,gfmFootnoteDefinition:r_},exit:{gfmFootnoteCallString:i_,gfmFootnoteCall:s_,gfmFootnoteDefinitionLabelString:a_,gfmFootnoteDefinition:o_}}}function c_(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Nh},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const o=s.createTracker(a);let u=o.move("[^");const l=s.enter("footnoteDefinition"),c=s.enter("label");return u+=o.move(s.safe(s.associationId(r),{before:u,after:"]"})),c(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((t?`
4
4
  `:" ")+s.indentLines(s.containerFlow(r,o.current()),t?Lh:d_))),l(),u}}function d_(e,t,n){return t===0?e:Lh(e,t,n)}function Lh(e,t,n){return(n?"":" ")+e}const h_=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Rh.peek=b_;function f_(){return{canContainEols:["delete"],enter:{strikethrough:m_},exit:{strikethrough:g_}}}function p_(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:h_}],handlers:{delete:Rh}}}function m_(e){this.enter({type:"delete",children:[]},e)}function g_(e){this.exit(e)}function Rh(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function b_(){return"~"}function E_(e){return e.length}function __(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||E_,s=[],a=[],o=[],u=[];let l=0,c=-1;for(;++c<e.length;){const b=[],y=[];let g=-1;for(e[c].length>l&&(l=e[c].length);++g<e[c].length;){const I=T_(e[c][g]);if(n.alignDelimiters!==!1){const C=i(I);y[g]=C,(u[g]===void 0||C>u[g])&&(u[g]=C)}b.push(I)}a[c]=b,o[c]=y}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<l;)s[d]=pl(r[d]);else{const b=pl(r);for(;++d<l;)s[d]=b}d=-1;const p=[],f=[];for(;++d<l;){const b=s[d];let y="",g="";b===99?(y=":",g=":"):b===108?y=":":b===114&&(g=":");let I=n.alignDelimiters===!1?1:Math.max(1,u[d]-y.length-g.length);const C=y+"-".repeat(I)+g;n.alignDelimiters!==!1&&(I=y.length+I+g.length,I>u[d]&&(u[d]=I),f[d]=I),p[d]=C}a.splice(1,0,p),o.splice(1,0,f),c=-1;const m=[];for(;++c<a.length;){const b=a[c],y=o[c];d=-1;const g=[];for(;++d<l;){const I=b[d]||"";let C="",v="";if(n.alignDelimiters!==!1){const P=u[d]-(y[d]||0),N=s[d];N===114?C=" ".repeat(P):N===99?P%2?(C=" ".repeat(P/2+.5),v=" ".repeat(P/2-.5)):(C=" ".repeat(P/2),v=C):v=" ".repeat(P)}n.delimiterStart!==!1&&!d&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&I==="")&&(n.delimiterStart!==!1||d)&&g.push(" "),n.alignDelimiters!==!1&&g.push(C),g.push(I),n.alignDelimiters!==!1&&g.push(v),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||d!==l-1)&&g.push("|")}m.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return m.join(`
5
5
  `)}function T_(e){return e==null?"":String(e)}function pl(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 y_(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),x_);return i(),a}function x_(e,t,n){return">"+(n?"":" ")+e}function k_(e,t){return ml(e,t.inConstruct,!0)&&!ml(e,t.notInConstruct,!1)}function ml(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 gl(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
@@ -109,14 +109,14 @@ ${t}</tr>
109
109
  `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${wt(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:r}){let i=this.parser.parseInline(r),s=lc(t);if(s===null)return i;t=s;let a='<a href="'+t+'"';return n&&(a+=' title="'+wt(n)+'"'),a+=">"+i+"</a>",a}image({href:t,title:n,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let s=lc(t);if(s===null)return wt(r);t=s;let a=`<img src="${t}" alt="${wt(r)}"`;return n&&(a+=` title="${wt(n)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:wt(t.text)}},uu=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},_t=class Ka{constructor(t){O(this,"options");O(this,"renderer");O(this,"textRenderer");this.options=t||Un,this.options.renderer=this.options.renderer||new Ji,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new uu}static parse(t,n){return new Ka(n).parse(t)}static parseInline(t,n){return new Ka(n).parseInline(t)}parse(t){var r,i;this.renderer.parser=this;let n="";for(let s=0;s<t.length;s++){let a=t[s];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[a.type]){let u=a,l=this.options.extensions.renderers[u.type].call({parser:this},u);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(u.type)){n+=l||"";continue}}let o=a;switch(o.type){case"space":{n+=this.renderer.space(o);break}case"hr":{n+=this.renderer.hr(o);break}case"heading":{n+=this.renderer.heading(o);break}case"code":{n+=this.renderer.code(o);break}case"table":{n+=this.renderer.table(o);break}case"blockquote":{n+=this.renderer.blockquote(o);break}case"list":{n+=this.renderer.list(o);break}case"checkbox":{n+=this.renderer.checkbox(o);break}case"html":{n+=this.renderer.html(o);break}case"def":{n+=this.renderer.def(o);break}case"paragraph":{n+=this.renderer.paragraph(o);break}case"text":{n+=this.renderer.text(o);break}default:{let u='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}parseInline(t,n=this.renderer){var i,s;this.renderer.parser=this;let r="";for(let a=0;a<t.length;a++){let o=t[a];if((s=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&s[o.type]){let l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=l||"";continue}}let u=o;switch(u.type){case"escape":{r+=n.text(u);break}case"html":{r+=n.html(u);break}case"link":{r+=n.link(u);break}case"image":{r+=n.image(u);break}case"checkbox":{r+=n.checkbox(u);break}case"strong":{r+=n.strong(u);break}case"em":{r+=n.em(u);break}case"codespan":{r+=n.codespan(u);break}case"br":{r+=n.br(u);break}case"del":{r+=n.del(u);break}case"text":{r+=n.text(u);break}default:{let l='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}},vi,Or=(vi=class{constructor(t){O(this,"options");O(this,"block");this.options=t||Un}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?ht.lex:ht.lexInline}provideParser(t=this.block){return t?_t.parse:_t.parseInline}},O(vi,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),O(vi,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),vi),cw=class{constructor(...t){O(this,"defaults",eu());O(this,"options",this.setOptions);O(this,"parse",this.parseMarkdown(!0));O(this,"parseInline",this.parseMarkdown(!1));O(this,"Parser",_t);O(this,"Renderer",Ji);O(this,"TextRenderer",uu);O(this,"Lexer",ht);O(this,"Tokenizer",Zi);O(this,"Hooks",Or);this.use(...t)}walkTokens(t,n){var i,s;let r=[];for(let a of t)switch(r=r.concat(n.call(this,a)),a.type){case"table":{let o=a;for(let u of o.header)r=r.concat(this.walkTokens(u.tokens,n));for(let u of o.rows)for(let l of u)r=r.concat(this.walkTokens(l.tokens,n));break}case"list":{let o=a;r=r.concat(this.walkTokens(o.items,n));break}default:{let o=a;(s=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&s[o.type]?this.defaults.extensions.childTokens[o.type].forEach(u=>{let l=o[u].flat(1/0);r=r.concat(this.walkTokens(l,n))}):o.tokens&&(r=r.concat(this.walkTokens(o.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let a=n.renderers[s.name];a?n.renderers[s.name]=function(...o){let u=s.renderer.apply(this,o);return u===!1&&(u=a.apply(this,o)),u}:n.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=n[s.level];a?a.unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(n.childTokens[s.name]=s.childTokens)}),i.extensions=n),r.renderer){let s=this.defaults.renderer||new Ji(this.defaults);for(let a in r.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let o=a,u=r.renderer[o],l=s[o];s[o]=(...c)=>{let d=u.apply(s,c);return d===!1&&(d=l.apply(s,c)),d||""}}i.renderer=s}if(r.tokenizer){let s=this.defaults.tokenizer||new Zi(this.defaults);for(let a in r.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let o=a,u=r.tokenizer[o],l=s[o];s[o]=(...c)=>{let d=u.apply(s,c);return d===!1&&(d=l.apply(s,c)),d}}i.tokenizer=s}if(r.hooks){let s=this.defaults.hooks||new Or;for(let a in r.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let o=a,u=r.hooks[o],l=s[o];Or.passThroughHooks.has(a)?s[o]=c=>{if(this.defaults.async&&Or.passThroughHooksRespectAsync.has(a))return(async()=>{let p=await u.call(s,c);return l.call(s,p)})();let d=u.call(s,c);return l.call(s,d)}:s[o]=(...c)=>{if(this.defaults.async)return(async()=>{let p=await u.apply(s,c);return p===!1&&(p=await l.apply(s,c)),p})();let d=u.apply(s,c);return d===!1&&(d=l.apply(s,c)),d}}i.hooks=s}if(r.walkTokens){let s=this.defaults.walkTokens,a=r.walkTokens;i.walkTokens=function(o){let u=[];return u.push(a.call(this,o)),s&&(u=u.concat(s.call(this,o))),u}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return ht.lex(t,n??this.defaults)}parser(t,n){return _t.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},s={...this.defaults,...i},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&i.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let o=s.hooks?await s.hooks.preprocess(n):n,u=await(s.hooks?await s.hooks.provideLexer(t):t?ht.lex:ht.lexInline)(o,s),l=s.hooks?await s.hooks.processAllTokens(u):u;s.walkTokens&&await Promise.all(this.walkTokens(l,s.walkTokens));let c=await(s.hooks?await s.hooks.provideParser(t):t?_t.parse:_t.parseInline)(l,s);return s.hooks?await s.hooks.postprocess(c):c})().catch(a);try{s.hooks&&(n=s.hooks.preprocess(n));let o=(s.hooks?s.hooks.provideLexer(t):t?ht.lex:ht.lexInline)(n,s);s.hooks&&(o=s.hooks.processAllTokens(o)),s.walkTokens&&this.walkTokens(o,s.walkTokens);let u=(s.hooks?s.hooks.provideParser(t):t?_t.parse:_t.parseInline)(o,s);return s.hooks&&(u=s.hooks.postprocess(u)),u}catch(o){return a(o)}}}onError(t,n){return r=>{if(r.message+=`
110
110
  Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+wt(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},On=new cw;function ge(e,t){return On.parse(e,t)}ge.options=ge.setOptions=function(e){return On.setOptions(e),ge.defaults=On.defaults,zf(ge.defaults),ge};ge.getDefaults=eu;ge.defaults=Un;ge.use=function(...e){return On.use(...e),ge.defaults=On.defaults,zf(ge.defaults),ge};ge.walkTokens=function(e,t){return On.walkTokens(e,t)};ge.parseInline=On.parseInline;ge.Parser=_t;ge.parser=_t.parse;ge.Renderer=Ji;ge.TextRenderer=uu;ge.Lexer=ht;ge.lexer=ht.lex;ge.Tokenizer=Zi;ge.Hooks=Or;ge.parse=ge;ge.options;ge.setOptions;ge.use;ge.walkTokens;ge.parseInline;_t.parse;ht.lex;var dw=300,hw="300px",fw=500;function pw(e={}){let{immediate:t=!1,debounceDelay:n=dw,rootMargin:r=hw,idleTimeout:i=fw}=e,[s,a]=k.useState(!1),o=k.useRef(null),u=k.useRef(null),l=k.useRef(null),c=k.useMemo(()=>f=>{let m=Date.now();return window.setTimeout(()=>{f({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-m))})},1)},[]),d=k.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(f,m)=>window.requestIdleCallback(f,m):c,[c]),p=k.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?f=>window.cancelIdleCallback(f):f=>{clearTimeout(f)},[]);return k.useEffect(()=>{if(t){a(!0);return}let f=o.current;if(!f)return;u.current&&(clearTimeout(u.current),u.current=null),l.current&&(p(l.current),l.current=null);let m=()=>{u.current&&(clearTimeout(u.current),u.current=null),l.current&&(p(l.current),l.current=null)},b=C=>{l.current=d(v=>{v.timeRemaining()>0||v.didTimeout?(a(!0),C.disconnect()):l.current=d(()=>{a(!0),C.disconnect()},{timeout:i/2})},{timeout:i})},y=C=>{m(),u.current=window.setTimeout(()=>{var v,P;let N=C.takeRecords();(N.length===0||(P=(v=N.at(-1))==null?void 0:v.isIntersecting)!=null&&P)&&b(C)},n)},g=(C,v)=>{C.isIntersecting?y(v):m()},I=new IntersectionObserver(C=>{for(let v of C)g(v,I)},{rootMargin:r,threshold:0});return I.observe(f),()=>{u.current&&clearTimeout(u.current),l.current&&p(l.current),I.disconnect()}},[t,n,r,i,p,d]),{shouldRender:s,containerRef:o}}var ep=/\s/,mw=/^\s+$/,gw=new Set(["code","pre","svg","math","annotation"]),bw=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",Ew=e=>e.some(t=>bw(t)&&gw.has(t.tagName)),_w=e=>{let t=[],n="",r=!1;for(let i of e){let s=ep.test(i);s!==r&&n&&(t.push(n),n=""),n+=i,r=s}return n&&t.push(n),t},Tw=e=>{let t=[],n="";for(let r of e)ep.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},yw=(e,t,n,r,i,s)=>{let a=`--sd-animation:sd-${t};--sd-duration:${i?0:n}ms;--sd-easing:${r}`;return s&&(a+=`;--sd-delay:${s}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:a},children:[{type:"text",value:e}]}},xw=(e,t,n,r,i)=>{let s=t.at(-1);if(!(s&&"children"in s))return;if(Ew(t))return Zn;let a=s,o=a.children.indexOf(e);if(o===-1)return;let u=e.value;if(!u.trim()){i.count+=u.length;return}let l=n.sep==="char"?Tw(u):_w(u),c=r.prevContentLength,d=l.map(p=>{let f=i.count;if(i.count+=p.length,mw.test(p))return{type:"text",value:p};let m=c>0&&f<c,b=m?0:i.newIndex++*n.stagger;return yw(p,n.animation,n.duration,n.easing,m,b)});return a.children.splice(o,1,...d),o+d.length},kw=0;function Xa(e){var t,n,r,i,s;let a={animation:(t=e==null?void 0:e.animation)!=null?t:"fadeIn",duration:(n=e==null?void 0:e.duration)!=null?n:150,easing:(r=e==null?void 0:e.easing)!=null?r:"ease",sep:(i=e==null?void 0:e.sep)!=null?i:"word",stagger:(s=e==null?void 0:e.stagger)!=null?s:40},o={prevContentLength:0,lastRenderCharCount:0},u=kw++,l=()=>c=>{let d={count:0,newIndex:0};Co(c,"text",(p,f)=>xw(p,f,a,o,d)),o.lastRenderCharCount=d.count,o.prevContentLength=0};return Object.defineProperty(l,"name",{value:`rehypeAnimate$${u}`}),{name:"animate",type:"animate",rehypePlugin:l,setPrevContentLength(c){o.prevContentLength=c},getLastRenderCharCount(){let c=o.lastRenderCharCount;return o.lastRenderCharCount=0,c}}}Xa();var tp=k.createContext(!1),Aw=()=>k.useContext(tp),lu=(...e)=>Of(Ef(e)),Cw=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(r=>r.startsWith(n)?r:`${e}:${r}`).join(" ")},ww=e=>e?(...t)=>Cw(e,Of(Ef(t))):lu,nr=(e,t,n)=>{let r=typeof t=="string"&&n.startsWith("text/csv")?"\uFEFF":"",i=typeof t=="string"?new Blob([r+t],{type:n}):t,s=URL.createObjectURL(i),a=document.createElement("a");a.href=s,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(s)},Za=k.createContext(lu),oe=()=>k.useContext(Za),Iw=lu("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),Sw=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),s=n.slice(r+1).trim();i&&s&&(t[i]=s)}}return t},Nw=k.memo(({children:e,result:t,language:n,className:r,startLine:i,lineNumbers:s=!0,...a})=>{let o=oe(),u=k.useMemo(()=>o(Iw),[o]),l=k.useMemo(()=>{let c={};return t.bg&&(c["--sdm-bg"]=t.bg),t.fg&&(c["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(c,Sw(t.rootStyle)),c},[t.bg,t.fg,t.rootStyle]);return E.jsx("div",{className:o(r,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...a,children:E.jsx("pre",{className:o(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:l,children:E.jsx("code",{className:s?o("[counter-increment:line_0] [counter-reset:line]"):void 0,style:s&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((c,d)=>E.jsx("span",{className:s?u:void 0,children:c.length===0||c.length===1&&c[0].content===""?`
111
111
  `:c.map((p,f)=>{let m={},b=!!p.bgColor;if(p.color&&(m["--sdm-c"]=p.color),p.bgColor&&(m["--sdm-tbg"]=p.bgColor),p.htmlStyle)for(let[y,g]of Object.entries(p.htmlStyle))y==="color"?m["--sdm-c"]=g:y==="background-color"?(m["--sdm-tbg"]=g,b=!0):m[y]=g;return E.jsx("span",{className:o("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",b&&"bg-[var(--sdm-tbg)]",b&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:m,...p.htmlAttrs,children:p.content},f)})},d))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),Lw=({className:e,language:t,style:n,isIncomplete:r,...i})=>{let s=oe();return E.jsx("div",{className:s("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...i})},np=k.createContext({code:""}),rp=()=>k.useContext(np),Rw=({language:e})=>{let t=oe();return E.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:E.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},vw=e=>{let t=e.length;for(;t>0&&e[t-1]===`
112
- `;)t--;return e.slice(0,t)},Ow=k.lazy(()=>_(()=>import("./highlighted-body-OFNGDK62-CKxBaGN5.js"),__vite__mapDeps([0,1,2,3,4,5])).then(e=>({default:e.HighlightedCodeBlockBody}))),Pw=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:s,lineNumbers:a,...o})=>{let u=oe(),l=k.useMemo(()=>vw(e),[e]),c=k.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:l.split(`
113
- `).map(d=>[{content:d,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[l]);return E.jsx(np.Provider,{value:{code:e},children:E.jsxs(Lw,{isIncomplete:i,language:t,children:[E.jsx(Rw,{language:t}),r?E.jsx("div",{className:u("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:E.jsx("div",{className:u("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:r})}):null,E.jsx(k.Suspense,{fallback:E.jsx(Nw,{className:n,language:t,lineNumbers:a,result:c,startLine:s,...o}),children:E.jsx(Ow,{className:n,code:l,language:t,lineNumbers:a,raw:c,startLine:s,...o})})]})})},Dw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),Mw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),Bw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),Fw=e=>E.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[E.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),Hw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),Uw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),$w=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),jw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),Vw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),zw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Pr={CheckIcon:Dw,CopyIcon:Mw,DownloadIcon:Bw,ExternalLinkIcon:jw,Loader2Icon:Fw,Maximize2Icon:Hw,RotateCcwIcon:Uw,XIcon:$w,ZoomInIcon:Vw,ZoomOutIcon:zw},ip=k.createContext(Pr),Gw=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>e[i]===t[i])},hc=({icons:e,children:t})=>{let n=k.useRef(e),r=k.useRef(e?{...Pr,...e}:Pr);Gw(n.current,e)||(n.current=e,r.current=e?{...Pr,...e}:Pr);let i=r.current;return E.jsx(ip.Provider,{value:i,children:t})},At=()=>k.useContext(ip),sp={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},Ja=k.createContext(sp),qt=()=>k.useContext(Ja),fc=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:s,...a})=>{let o=oe(),[u,l]=k.useState(!1),c=k.useRef(0),{code:d}=rp(),{isAnimating:p}=k.useContext(at),f=qt(),m=s??d,b=async()=>{var I;if(typeof window>"u"||!((I=navigator==null?void 0:navigator.clipboard)!=null&&I.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{u||(await navigator.clipboard.writeText(m),l(!0),e==null||e(),c.current=window.setTimeout(()=>l(!1),n))}catch(C){t==null||t(C)}};k.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let y=At(),g=u?y.CheckIcon:y.CopyIcon;return E.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:p,onClick:b,title:f.copyCode,type:"button",...a,children:r??E.jsx(g,{size:14})})},pc={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},Ww=({onDownload:e,onError:t,language:n,children:r,className:i,code:s,...a})=>{let o=oe(),{code:u}=rp(),{isAnimating:l}=k.useContext(at),c=qt(),d=At(),p=s??u,f=`file.${n&&n in pc?pc[n]:"txt"}`,m="text/plain",b=()=>{try{nr(f,p,m),e==null||e()}catch(y){t==null||t(y)}};return E.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:l,onClick:b,title:c.downloadFile,type:"button",...a,children:r??E.jsx(d.DownloadIcon,{size:14})})},mc=()=>{let{Loader2Icon:e}=At(),t=oe();return E.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[E.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),E.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:E.jsx(e,{className:t("size-4 animate-spin")})})]})},qw=/\.[^/.]+$/,Yw=({node:e,className:t,src:n,alt:r,onLoad:i,onError:s,...a})=>{let{DownloadIcon:o}=At(),u=oe(),l=k.useRef(null),[c,d]=k.useState(!1),[p,f]=k.useState(!1),m=qt(),b=a.width!=null||a.height!=null,y=(c||b)&&!p,g=p&&!b;k.useEffect(()=>{let P=l.current;if(P!=null&&P.complete){let N=P.naturalWidth>0;d(N),f(!N)}},[]);let I=k.useCallback(P=>{d(!0),f(!1),i==null||i(P)},[i]),C=k.useCallback(P=>{d(!1),f(!0),s==null||s(P)},[s]),v=async()=>{if(n)try{let P=await(await fetch(n)).blob(),N=new URL(n,window.location.origin).pathname.split("/").pop()||"",B=N.split(".").pop(),M=N.includes(".")&&B!==void 0&&B.length<=4,z="";if(M)z=N;else{let L=P.type,V="png";L.includes("jpeg")||L.includes("jpg")?V="jpg":L.includes("png")?V="png":L.includes("svg")?V="svg":L.includes("gif")?V="gif":L.includes("webp")&&(V="webp"),z=`${(r||N||"image").replace(qw,"")}.${V}`}nr(z,P,P.type)}catch{window.open(n,"_blank")}};return n?E.jsxs("div",{className:u("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[E.jsx("img",{alt:r,className:u("max-w-full rounded-lg",g&&"hidden",t),"data-streamdown":"image",onError:C,onLoad:I,ref:l,src:n,...a}),g&&E.jsx("span",{className:u("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:m.imageNotAvailable}),E.jsx("div",{className:u("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),y&&E.jsx("button",{className:u("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:v,title:m.downloadImage,type:"button",children:E.jsx(o,{size:14})})]}):null},zr=0,cu=()=>{zr+=1,zr===1&&(document.body.style.overflow="hidden")},du=()=>{zr=Math.max(0,zr-1),zr===0&&(document.body.style.overflow="")},Qw=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:s,ExternalLinkIcon:a,XIcon:o}=At(),u=oe(),[l,c]=k.useState(!1),d=qt(),p=k.useCallback(async()=>{try{await navigator.clipboard.writeText(e),c(!0),setTimeout(()=>c(!1),2e3)}catch{}},[e]),f=k.useCallback(()=>{r(),n()},[r,n]);return k.useEffect(()=>{if(t){cu();let m=b=>{b.key==="Escape"&&n()};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m),du()}}},[t,n]),t?E.jsx("div",{className:u("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:m=>{m.key==="Escape"&&n()},role:"button",tabIndex:0,children:E.jsxs("div",{className:u("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:m=>m.stopPropagation(),onKeyDown:m=>m.stopPropagation(),role:"presentation",children:[E.jsx("button",{className:u("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:d.close,type:"button",children:E.jsx(o,{size:16})}),E.jsxs("div",{className:u("flex flex-col gap-2"),children:[E.jsxs("div",{className:u("flex items-center gap-2 font-semibold text-lg"),children:[E.jsx(a,{size:20}),E.jsx("span",{children:d.openExternalLink})]}),E.jsx("p",{className:u("text-muted-foreground text-sm"),children:d.externalLinkWarning})]}),E.jsx("div",{className:u("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),E.jsxs("div",{className:u("flex gap-2"),children:[E.jsx("button",{className:u("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:p,type:"button",children:l?E.jsxs(E.Fragment,{children:[E.jsx(i,{size:14}),E.jsx("span",{children:d.copied})]}):E.jsxs(E.Fragment,{children:[E.jsx(s,{size:14}),E.jsx("span",{children:d.copyLink})]})}),E.jsxs("button",{className:u("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:f,type:"button",children:[E.jsx(a,{size:14}),E.jsx("span",{children:d.openLink})]})]})]})}):null},eo=k.createContext(null),hu=()=>k.useContext(eo),pO=()=>{var e;let t=hu();return(e=t==null?void 0:t.code)!=null?e:null},fu=()=>{var e;let t=hu();return(e=t==null?void 0:t.mermaid)!=null?e:null},Kw=e=>{var t;let n=hu();return n!=null&&n.renderers&&e&&(t=n.renderers.find(r=>Array.isArray(r.language)?r.language.includes(e):r.language===e))!=null?t:null},Xw=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,s)=>{let a="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let u=document.createElement("canvas"),l=o.width*r,c=o.height*r;u.width=l,u.height=c;let d=u.getContext("2d");if(!d){s(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(o,0,0,l,c),u.toBlob(p=>{if(!p){s(new Error("Failed to create PNG blob"));return}i(p)},"image/png")},o.onerror=()=>s(new Error("Failed to load SVG image")),o.src=a})},Zw=({chart:e,children:t,className:n,onDownload:r,config:i,onError:s})=>{let a=oe(),[o,u]=k.useState(!1),l=k.useRef(null),{isAnimating:c}=k.useContext(at),d=At(),p=fu(),f=qt(),m=async b=>{try{if(b==="mmd"){nr("diagram.mmd",e,"text/plain"),u(!1),r==null||r(b);return}if(!p){s==null||s(new Error("Mermaid plugin not available"));return}let y=p.getMermaid(i),g=e.split("").reduce((v,P)=>(v<<5)-v+P.charCodeAt(0)|0,0),I=`mermaid-${Math.abs(g)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:C}=await y.render(I,e);if(!C){s==null||s(new Error("SVG not found. Please wait for the diagram to render."));return}if(b==="svg"){nr("diagram.svg",C,"image/svg+xml"),u(!1),r==null||r(b);return}if(b==="png"){let v=await Xw(C);nr("diagram.png",v,"image/png"),r==null||r(b),u(!1);return}}catch(y){s==null||s(y)}};return k.useEffect(()=>{let b=y=>{let g=y.composedPath();l.current&&!g.includes(l.current)&&u(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b)}},[]),E.jsxs("div",{className:a("relative"),ref:l,children:[E.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:c,onClick:()=>u(!o),title:f.downloadDiagram,type:"button",children:t??E.jsx(d.DownloadIcon,{size:14})}),o?E.jsxs("div",{className:a("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[E.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("svg"),title:f.downloadDiagramAsSvg,type:"button",children:f.mermaidFormatSvg}),E.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("png"),title:f.downloadDiagramAsPng,type:"button",children:f.mermaidFormatPng}),E.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("mmd"),title:f.downloadDiagramAsMmd,type:"button",children:f.mermaidFormatMmd})]}):null]})},Jw=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...s})=>{let{Maximize2Icon:a,XIcon:o}=At(),u=oe(),[l,c]=k.useState(!1),{isAnimating:d,controls:p}=k.useContext(at),f=qt(),m=(()=>{if(typeof p=="boolean")return p;let y=p.mermaid;return y===!1?!1:y===!0||y===void 0?!0:y.panZoom!==!1})(),b=()=>{c(!l)};return k.useEffect(()=>{if(l){cu();let y=g=>{g.key==="Escape"&&c(!1)};return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y),du()}}},[l]),k.useEffect(()=>{l?n==null||n():r&&r()},[l,n,r]),E.jsxs(E.Fragment,{children:[E.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:d,onClick:b,title:f.viewFullscreen,type:"button",...s,children:E.jsx(a,{size:14})}),l?yo.createPortal(E.jsxs("div",{className:u("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:b,onKeyDown:y=>{y.key==="Escape"&&b()},role:"button",tabIndex:0,children:[E.jsx("button",{className:u("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:b,title:f.exitFullscreen,type:"button",children:E.jsx(o,{size:20})}),E.jsx("div",{className:u("flex size-full items-center justify-center p-4"),onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),role:"presentation",children:E.jsx(Up,{chart:e,className:u("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:m})})]}),document.body):null]})},ap=e=>{var t,n;let r=[],i=[],s=e.querySelectorAll("thead th");for(let o of s)r.push(((t=o.textContent)==null?void 0:t.trim())||"");let a=e.querySelectorAll("tbody tr");for(let o of a){let u=[],l=o.querySelectorAll("td");for(let c of l)u.push(((n=c.textContent)==null?void 0:n.trim())||"");i.push(u)}return{headers:r,rows:i}},op=e=>{let{headers:t,rows:n}=e,r=o=>{let u=!1,l=!1;for(let c of o){if(c==='"'){u=!0,l=!0;break}(c===","||c===`
112
+ `;)t--;return e.slice(0,t)},Ow=k.lazy(()=>_(()=>import("./highlighted-body-OFNGDK62-y6A7wCrG.js"),__vite__mapDeps([0,1,2,3,4,5])).then(e=>({default:e.HighlightedCodeBlockBody}))),Pw=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:s,lineNumbers:a,...o})=>{let u=oe(),l=k.useMemo(()=>vw(e),[e]),c=k.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:l.split(`
113
+ `).map(d=>[{content:d,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[l]);return E.jsx(np.Provider,{value:{code:e},children:E.jsxs(Lw,{isIncomplete:i,language:t,children:[E.jsx(Rw,{language:t}),r?E.jsx("div",{className:u("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:E.jsx("div",{className:u("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:r})}):null,E.jsx(k.Suspense,{fallback:E.jsx(Nw,{className:n,language:t,lineNumbers:a,result:c,startLine:s,...o}),children:E.jsx(Ow,{className:n,code:l,language:t,lineNumbers:a,raw:c,startLine:s,...o})})]})})},Dw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),Mw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),Bw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),Fw=e=>E.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[E.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),Hw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),Uw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),$w=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),jw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),Vw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),zw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Pr={CheckIcon:Dw,CopyIcon:Mw,DownloadIcon:Bw,ExternalLinkIcon:jw,Loader2Icon:Fw,Maximize2Icon:Hw,RotateCcwIcon:Uw,XIcon:$w,ZoomInIcon:Vw,ZoomOutIcon:zw},ip=k.createContext(Pr),Gw=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>e[i]===t[i])},hc=({icons:e,children:t})=>{let n=k.useRef(e),r=k.useRef(e?{...Pr,...e}:Pr);Gw(n.current,e)||(n.current=e,r.current=e?{...Pr,...e}:Pr);let i=r.current;return E.jsx(ip.Provider,{value:i,children:t})},At=()=>k.useContext(ip),sp={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},Ja=k.createContext(sp),qt=()=>k.useContext(Ja),fc=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:s,...a})=>{let o=oe(),[u,l]=k.useState(!1),c=k.useRef(0),{code:d}=rp(),{isAnimating:p}=k.useContext(at),f=qt(),m=s??d,b=async()=>{var I;if(typeof window>"u"||!((I=navigator==null?void 0:navigator.clipboard)!=null&&I.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{u||(await navigator.clipboard.writeText(m),l(!0),e==null||e(),c.current=window.setTimeout(()=>l(!1),n))}catch(C){t==null||t(C)}};k.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let y=At(),g=u?y.CheckIcon:y.CopyIcon;return E.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:p,onClick:b,title:f.copyCode,type:"button",...a,children:r??E.jsx(g,{size:14})})},pc={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},Ww=({onDownload:e,onError:t,language:n,children:r,className:i,code:s,...a})=>{let o=oe(),{code:u}=rp(),{isAnimating:l}=k.useContext(at),c=qt(),d=At(),p=s??u,f=`file.${n&&n in pc?pc[n]:"txt"}`,m="text/plain",b=()=>{try{nr(f,p,m),e==null||e()}catch(y){t==null||t(y)}};return E.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:l,onClick:b,title:c.downloadFile,type:"button",...a,children:r??E.jsx(d.DownloadIcon,{size:14})})},mc=()=>{let{Loader2Icon:e}=At(),t=oe();return E.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[E.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),E.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:E.jsx(e,{className:t("size-4 animate-spin")})})]})},qw=/\.[^/.]+$/,Yw=({node:e,className:t,src:n,alt:r,onLoad:i,onError:s,...a})=>{let{DownloadIcon:o}=At(),u=oe(),l=k.useRef(null),[c,d]=k.useState(!1),[p,f]=k.useState(!1),m=qt(),b=a.width!=null||a.height!=null,y=(c||b)&&!p,g=p&&!b;k.useEffect(()=>{let P=l.current;if(P!=null&&P.complete){let N=P.naturalWidth>0;d(N),f(!N)}},[]);let I=k.useCallback(P=>{d(!0),f(!1),i==null||i(P)},[i]),C=k.useCallback(P=>{d(!1),f(!0),s==null||s(P)},[s]),v=async()=>{if(n)try{let P=await(await fetch(n)).blob(),N=new URL(n,window.location.origin).pathname.split("/").pop()||"",B=N.split(".").pop(),M=N.includes(".")&&B!==void 0&&B.length<=4,z="";if(M)z=N;else{let L=P.type,V="png";L.includes("jpeg")||L.includes("jpg")?V="jpg":L.includes("png")?V="png":L.includes("svg")?V="svg":L.includes("gif")?V="gif":L.includes("webp")&&(V="webp"),z=`${(r||N||"image").replace(qw,"")}.${V}`}nr(z,P,P.type)}catch{window.open(n,"_blank")}};return n?E.jsxs("div",{className:u("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[E.jsx("img",{alt:r,className:u("max-w-full rounded-lg",g&&"hidden",t),"data-streamdown":"image",onError:C,onLoad:I,ref:l,src:n,...a}),g&&E.jsx("span",{className:u("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:m.imageNotAvailable}),E.jsx("div",{className:u("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),y&&E.jsx("button",{className:u("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:v,title:m.downloadImage,type:"button",children:E.jsx(o,{size:14})})]}):null},zr=0,cu=()=>{zr+=1,zr===1&&(document.body.style.overflow="hidden")},du=()=>{zr=Math.max(0,zr-1),zr===0&&(document.body.style.overflow="")},Qw=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:s,ExternalLinkIcon:a,XIcon:o}=At(),u=oe(),[l,c]=k.useState(!1),d=qt(),p=k.useCallback(async()=>{try{await navigator.clipboard.writeText(e),c(!0),setTimeout(()=>c(!1),2e3)}catch{}},[e]),f=k.useCallback(()=>{r(),n()},[r,n]);return k.useEffect(()=>{if(t){cu();let m=b=>{b.key==="Escape"&&n()};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m),du()}}},[t,n]),t?E.jsx("div",{className:u("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:m=>{m.key==="Escape"&&n()},role:"button",tabIndex:0,children:E.jsxs("div",{className:u("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:m=>m.stopPropagation(),onKeyDown:m=>m.stopPropagation(),role:"presentation",children:[E.jsx("button",{className:u("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:d.close,type:"button",children:E.jsx(o,{size:16})}),E.jsxs("div",{className:u("flex flex-col gap-2"),children:[E.jsxs("div",{className:u("flex items-center gap-2 font-semibold text-lg"),children:[E.jsx(a,{size:20}),E.jsx("span",{children:d.openExternalLink})]}),E.jsx("p",{className:u("text-muted-foreground text-sm"),children:d.externalLinkWarning})]}),E.jsx("div",{className:u("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),E.jsxs("div",{className:u("flex gap-2"),children:[E.jsx("button",{className:u("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:p,type:"button",children:l?E.jsxs(E.Fragment,{children:[E.jsx(i,{size:14}),E.jsx("span",{children:d.copied})]}):E.jsxs(E.Fragment,{children:[E.jsx(s,{size:14}),E.jsx("span",{children:d.copyLink})]})}),E.jsxs("button",{className:u("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:f,type:"button",children:[E.jsx(a,{size:14}),E.jsx("span",{children:d.openLink})]})]})]})}):null},eo=k.createContext(null),hu=()=>k.useContext(eo),mO=()=>{var e;let t=hu();return(e=t==null?void 0:t.code)!=null?e:null},fu=()=>{var e;let t=hu();return(e=t==null?void 0:t.mermaid)!=null?e:null},Kw=e=>{var t;let n=hu();return n!=null&&n.renderers&&e&&(t=n.renderers.find(r=>Array.isArray(r.language)?r.language.includes(e):r.language===e))!=null?t:null},Xw=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,s)=>{let a="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let u=document.createElement("canvas"),l=o.width*r,c=o.height*r;u.width=l,u.height=c;let d=u.getContext("2d");if(!d){s(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(o,0,0,l,c),u.toBlob(p=>{if(!p){s(new Error("Failed to create PNG blob"));return}i(p)},"image/png")},o.onerror=()=>s(new Error("Failed to load SVG image")),o.src=a})},Zw=({chart:e,children:t,className:n,onDownload:r,config:i,onError:s})=>{let a=oe(),[o,u]=k.useState(!1),l=k.useRef(null),{isAnimating:c}=k.useContext(at),d=At(),p=fu(),f=qt(),m=async b=>{try{if(b==="mmd"){nr("diagram.mmd",e,"text/plain"),u(!1),r==null||r(b);return}if(!p){s==null||s(new Error("Mermaid plugin not available"));return}let y=p.getMermaid(i),g=e.split("").reduce((v,P)=>(v<<5)-v+P.charCodeAt(0)|0,0),I=`mermaid-${Math.abs(g)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:C}=await y.render(I,e);if(!C){s==null||s(new Error("SVG not found. Please wait for the diagram to render."));return}if(b==="svg"){nr("diagram.svg",C,"image/svg+xml"),u(!1),r==null||r(b);return}if(b==="png"){let v=await Xw(C);nr("diagram.png",v,"image/png"),r==null||r(b),u(!1);return}}catch(y){s==null||s(y)}};return k.useEffect(()=>{let b=y=>{let g=y.composedPath();l.current&&!g.includes(l.current)&&u(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b)}},[]),E.jsxs("div",{className:a("relative"),ref:l,children:[E.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:c,onClick:()=>u(!o),title:f.downloadDiagram,type:"button",children:t??E.jsx(d.DownloadIcon,{size:14})}),o?E.jsxs("div",{className:a("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[E.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("svg"),title:f.downloadDiagramAsSvg,type:"button",children:f.mermaidFormatSvg}),E.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("png"),title:f.downloadDiagramAsPng,type:"button",children:f.mermaidFormatPng}),E.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("mmd"),title:f.downloadDiagramAsMmd,type:"button",children:f.mermaidFormatMmd})]}):null]})},Jw=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...s})=>{let{Maximize2Icon:a,XIcon:o}=At(),u=oe(),[l,c]=k.useState(!1),{isAnimating:d,controls:p}=k.useContext(at),f=qt(),m=(()=>{if(typeof p=="boolean")return p;let y=p.mermaid;return y===!1?!1:y===!0||y===void 0?!0:y.panZoom!==!1})(),b=()=>{c(!l)};return k.useEffect(()=>{if(l){cu();let y=g=>{g.key==="Escape"&&c(!1)};return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y),du()}}},[l]),k.useEffect(()=>{l?n==null||n():r&&r()},[l,n,r]),E.jsxs(E.Fragment,{children:[E.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:d,onClick:b,title:f.viewFullscreen,type:"button",...s,children:E.jsx(a,{size:14})}),l?yo.createPortal(E.jsxs("div",{className:u("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:b,onKeyDown:y=>{y.key==="Escape"&&b()},role:"button",tabIndex:0,children:[E.jsx("button",{className:u("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:b,title:f.exitFullscreen,type:"button",children:E.jsx(o,{size:20})}),E.jsx("div",{className:u("flex size-full items-center justify-center p-4"),onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),role:"presentation",children:E.jsx(Up,{chart:e,className:u("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:m})})]}),document.body):null]})},ap=e=>{var t,n;let r=[],i=[],s=e.querySelectorAll("thead th");for(let o of s)r.push(((t=o.textContent)==null?void 0:t.trim())||"");let a=e.querySelectorAll("tbody tr");for(let o of a){let u=[],l=o.querySelectorAll("td");for(let c of l)u.push(((n=c.textContent)==null?void 0:n.trim())||"");i.push(u)}return{headers:r,rows:i}},op=e=>{let{headers:t,rows:n}=e,r=o=>{let u=!1,l=!1;for(let c of o){if(c==='"'){u=!0,l=!0;break}(c===","||c===`
114
114
  `)&&(u=!0)}return u?l?`"${o.replace(/"/g,'""')}"`:`"${o}"`:o},i=t.length>0?n.length+1:n.length,s=new Array(i),a=0;t.length>0&&(s[a]=t.map(r).join(","),a+=1);for(let o of n)s[a]=o.map(r).join(","),a+=1;return s.join(`
115
115
  `)},eI=e=>{let{headers:t,rows:n}=e,r=o=>{let u=!1;for(let c of o)if(c===" "||c===`
116
116
  `||c==="\r"){u=!0;break}if(!u)return o;let l=[];for(let c of o)c===" "?l.push("\\t"):c===`
117
117
  `?l.push("\\n"):c==="\r"?l.push("\\r"):l.push(c);return l.join("")},i=t.length>0?n.length+1:n.length,s=new Array(i),a=0;t.length>0&&(s[a]=t.map(r).join(" "),a+=1);for(let o of n)s[a]=o.map(r).join(" "),a+=1;return s.join(`
118
118
  `)},da=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("")},to=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,s=t.map(o=>da(o));r[i]=`| ${s.join(" | ")} |`,i+=1;let a=new Array(t.length);for(let o=0;o<t.length;o+=1)a[o]="---";r[i]=`| ${a.join(" | ")} |`,i+=1;for(let o of n)if(o.length<t.length){let u=new Array(t.length);for(let l=0;l<t.length;l+=1)u[l]=l<o.length?da(o[l]):"";r[i]=`| ${u.join(" | ")} |`,i+=1}else{let u=o.map(l=>da(l));r[i]=`| ${u.join(" | ")} |`,i+=1}return r.join(`
119
- `)},up=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let s=oe(),[a,o]=k.useState(!1),[u,l]=k.useState(!1),c=k.useRef(null),d=k.useRef(0),{isAnimating:p}=k.useContext(at),f=qt(),m=async g=>{var I,C;if(typeof window>"u"||!((I=navigator==null?void 0:navigator.clipboard)!=null&&I.write)){r==null||r(new Error("Clipboard API not available"));return}try{let v=(C=c.current)==null?void 0:C.closest('[data-streamdown="table-wrapper"]'),P=v==null?void 0:v.querySelector("table");if(!P){r==null||r(new Error("Table not found"));return}let N=ap(P),B=({csv:op,tsv:eI,md:to}[g]||to)(N),M=new ClipboardItem({"text/plain":new Blob([B],{type:"text/plain"}),"text/html":new Blob([P.outerHTML],{type:"text/html"})});await navigator.clipboard.write([M]),l(!0),o(!1),n==null||n(g),d.current=window.setTimeout(()=>l(!1),i)}catch(v){r==null||r(v)}};k.useEffect(()=>{let g=I=>{let C=I.composedPath();c.current&&!C.includes(c.current)&&o(!1)};return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g),window.clearTimeout(d.current)}},[]);let b=At(),y=u?b.CheckIcon:b.CopyIcon;return E.jsxs("div",{className:s("relative"),ref:c,children:[E.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:p,onClick:()=>o(!a),title:f.copyTable,type:"button",children:e??E.jsx(y,{height:14,width:14})}),a?E.jsxs("div",{className:s("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[E.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("md"),title:f.copyTableAsMarkdown,type:"button",children:f.tableFormatMarkdown}),E.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("csv"),title:f.copyTableAsCsv,type:"button",children:f.tableFormatCsv}),E.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("tsv"),title:f.copyTableAsTsv,type:"button",children:f.tableFormatTsv})]}):null]})},lp=({children:e,className:t,onDownload:n,onError:r})=>{let i=oe(),[s,a]=k.useState(!1),o=k.useRef(null),{isAnimating:u}=k.useContext(at),l=qt(),c=At(),d=p=>{var f;try{let m=(f=o.current)==null?void 0:f.closest('[data-streamdown="table-wrapper"]'),b=m==null?void 0:m.querySelector("table");if(!b){r==null||r(new Error("Table not found"));return}let y=ap(b),g=p==="csv"?op(y):to(y);nr(`table.${p==="csv"?"csv":"md"}`,g,p==="csv"?"text/csv":"text/markdown"),a(!1),n==null||n(p)}catch(m){r==null||r(m)}};return k.useEffect(()=>{let p=f=>{let m=f.composedPath();o.current&&!m.includes(o.current)&&a(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[]),E.jsxs("div",{className:i("relative"),ref:o,children:[E.jsx("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:()=>a(!s),title:l.downloadTable,type:"button",children:e??E.jsx(c.DownloadIcon,{size:14})}),s?E.jsxs("div",{className:i("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[E.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("csv"),title:l.downloadTableAsCsv,type:"button",children:l.tableFormatCsv}),E.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("markdown"),title:l.downloadTableAsMarkdown,type:"button",children:l.tableFormatMarkdown})]}):null]})},tI=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:s}=At(),a=oe(),[o,u]=k.useState(!1),{isAnimating:l}=k.useContext(at),c=qt(),d=()=>{u(!0)},p=()=>{u(!1)};return k.useEffect(()=>{if(o){cu();let f=m=>{m.key==="Escape"&&u(!1)};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),du()}}},[o]),E.jsxs(E.Fragment,{children:[E.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:l,onClick:d,title:c.viewFullscreen,type:"button",children:E.jsx(i,{size:14})}),o?yo.createPortal(E.jsx("div",{"aria-label":c.viewFullscreen,"aria-modal":"true",className:a("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:p,onKeyDown:f=>{f.key==="Escape"&&p()},role:"dialog",children:E.jsxs("div",{className:a("flex h-full flex-col"),onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),role:"presentation",children:[E.jsxs("div",{className:a("flex items-center justify-end gap-1 p-4"),children:[n?E.jsx(up,{}):null,r?E.jsx(lp,{}):null,E.jsx("button",{className:a("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:p,title:c.exitFullscreen,type:"button",children:E.jsx(s,{size:20})})]}),E.jsx("div",{className:a("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:E.jsx("table",{className:a("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},nI=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:s=!0,...a})=>{let o=oe(),u=n&&r,l=n&&i,c=n&&s,d=u||l||c;return E.jsxs("div",{className:o("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[d?E.jsxs("div",{className:o("flex items-center justify-end gap-1"),children:[u?E.jsx(up,{}):null,l?E.jsx(lp,{}):null,c?E.jsx(tI,{showCopy:u,showDownload:l,children:e}):null]}):null,E.jsx("div",{className:o("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:E.jsx("table",{className:o("w-full divide-y divide-border",t),"data-streamdown":"table",...a,children:e})})]})},rI=/startLine=(\d+)/,iI=/\bnoLineNumbers\b/,sI=k.lazy(()=>_(()=>Promise.resolve().then(()=>rO),void 0).then(e=>({default:e.Mermaid}))),aI=/language-([^\s]+)/;function Ss(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,s=t.position.end;return(n==null?void 0:n.line)===(r==null?void 0:r.line)&&(n==null?void 0:n.column)===(r==null?void 0:r.column)&&(i==null?void 0:i.line)===(s==null?void 0:s.line)&&(i==null?void 0:i.column)===(s==null?void 0:s.column)}function xe(e,t){return e.className===t.className&&Ss(e.node,t.node)}var no=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,ha=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},gc=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},xi=(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},pu=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e})},(e,t)=>xe(e,t));pu.displayName="MarkdownOl";var cp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("li",{className:i("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e})},(e,t)=>e.className===t.className&&Ss(e.node,t.node));cp.displayName="MarkdownLi";var dp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e})},(e,t)=>xe(e,t));dp.displayName="MarkdownUl";var hp=k.memo(({className:e,node:t,...n})=>{let r=oe();return E.jsx("hr",{className:r("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>xe(e,t));hp.displayName="MarkdownHr";var fp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("span",{className:i("font-semibold",t),"data-streamdown":"strong",...r,children:e})},(e,t)=>xe(e,t));fp.displayName="MarkdownStrong";var oI=({children:e,className:t,href:n,node:r,...i})=>{let s=oe(),{linkSafety:a}=k.useContext(at),[o,u]=k.useState(!1),l=n==="streamdown:incomplete-link",c=k.useCallback(async m=>{if(!(!(a!=null&&a.enabled&&n)||l)){if(m.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}u(!0)}},[a,n,l]),d=k.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),p=k.useCallback(()=>{u(!1)},[]),f={url:n??"",isOpen:o,onClose:p,onConfirm:d};return a!=null&&a.enabled&&n?E.jsxs(E.Fragment,{children:[E.jsx("button",{className:s("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",onClick:c,type:"button",children:e}),a.renderModal?a.renderModal(f):E.jsx(Qw,{...f})]}):E.jsx("a",{className:s("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},pp=k.memo(oI,(e,t)=>xe(e,t)&&e.href===t.href);pp.displayName="MarkdownA";var mp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e})},(e,t)=>xe(e,t));mp.displayName="MarkdownH1";var gp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e})},(e,t)=>xe(e,t));gp.displayName="MarkdownH2";var bp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e})},(e,t)=>xe(e,t));bp.displayName="MarkdownH3";var Ep=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e})},(e,t)=>xe(e,t));Ep.displayName="MarkdownH4";var _p=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e})},(e,t)=>xe(e,t));_p.displayName="MarkdownH5";var Tp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e})},(e,t)=>xe(e,t));Tp.displayName="MarkdownH6";var yp=k.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=k.useContext(at),s=no(i,"table"),a=ha(i,"copy"),o=ha(i,"download"),u=ha(i,"fullscreen");return E.jsx(nI,{className:t,showControls:s,showCopy:a,showDownload:o,showFullscreen:u,...r,children:e})},(e,t)=>xe(e,t));yp.displayName="MarkdownTable";var xp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e})},(e,t)=>xe(e,t));xp.displayName="MarkdownThead";var kp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e})},(e,t)=>xe(e,t));kp.displayName="MarkdownTbody";var Ap=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("tr",{className:i("border-border",t),"data-streamdown":"table-row",...r,children:e})},(e,t)=>xe(e,t));Ap.displayName="MarkdownTr";var Cp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("th",{className:i("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e})},(e,t)=>xe(e,t));Cp.displayName="MarkdownTh";var wp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e})},(e,t)=>xe(e,t));wp.displayName="MarkdownTd";var Ip=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("blockquote",{className:i("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e})},(e,t)=>xe(e,t));Ip.displayName="MarkdownBlockquote";var Sp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...r,children:e})},(e,t)=>xe(e,t));Sp.displayName="MarkdownSup";var Np=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...r,children:e})},(e,t)=>xe(e,t));Np.displayName="MarkdownSub";var Lp=k.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=a=>{var o,u;if(!k.isValidElement(a))return!1;let l=Array.isArray(a.props.children)?a.props.children:[a.props.children],c=!1,d=!1;for(let p of l)if(p){if(typeof p=="string")p.trim()!==""&&(c=!0);else if(k.isValidElement(p))if(((o=p.props)==null?void 0:o["data-footnote-backref"])!==void 0)d=!0;else{let f=Array.isArray(p.props.children)?p.props.children:[p.props.children];for(let m of f){if(typeof m=="string"&&m.trim()!==""){c=!0;break}if(k.isValidElement(m)&&((u=m.props)==null?void 0:u["data-footnote-backref"])===void 0){c=!0;break}}}}return d&&!c},s=Array.isArray(e)?e.map(a=>{if(!k.isValidElement(a))return a;if(a.type===pu){let o=(Array.isArray(a.props.children)?a.props.children:[a.props.children]).filter(u=>!i(u));return o.length===0?null:{...a,props:{...a.props,children:o}}}return a}):e;return(Array.isArray(s)?s.some(a=>a!==null):s!==null)?E.jsx("section",{className:t,...r,children:s}):null}return E.jsx("section",{className:t,...r,children:e})},(e,t)=>xe(e,t));Lp.displayName="MarkdownSection";var uI=({node:e,className:t,children:n,...r})=>{var i,s;let a=oe(),o=!("data-block"in r),{mermaid:u,controls:l,lineNumbers:c}=k.useContext(at),d=fu(),p=Aw(),f=t==null?void 0:t.match(aI),m=(i=f==null?void 0:f.at(1))!=null?i:"",b=Kw(m);if(o)return E.jsx("code",{className:a("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let y=(s=e==null?void 0:e.properties)==null?void 0:s.metastring,g=y==null?void 0:y.match(rI),I=g?Number.parseInt(g[1],10):void 0,C=I!==void 0&&I>=1?I:void 0,v=!(y&&iI.test(y))&&c!==!1,P="";if(k.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?P=n.props.children:typeof n=="string"&&(P=n),b){let z=b.component;return E.jsx(k.Suspense,{fallback:E.jsx(mc,{}),children:E.jsx(z,{code:P,isIncomplete:p,language:m,meta:y})})}if(m==="mermaid"&&d){let z=no(l,"mermaid"),L=xi(l,"download"),V=xi(l,"copy"),G=xi(l,"fullscreen"),Z=xi(l,"panZoom"),Y=z&&(L||V||G);return E.jsx(k.Suspense,{fallback:E.jsx(mc,{}),children:E.jsxs("div",{className:a("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[E.jsx("div",{className:a("flex h-8 items-center text-muted-foreground text-xs"),children:E.jsx("span",{className:a("ml-1 font-mono lowercase"),children:"mermaid"})}),Y?E.jsx("div",{className:a("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:E.jsxs("div",{className:a("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[L?E.jsx(Zw,{chart:P,config:u==null?void 0:u.config}):null,V?E.jsx(fc,{code:P}):null,G?E.jsx(Jw,{chart:P,config:u==null?void 0:u.config}):null]})}):null,E.jsx("div",{className:a("rounded-md border border-border bg-background"),children:E.jsx(sI,{chart:P,config:u==null?void 0:u.config,showControls:Z})})]})})}let N=no(l,"code"),B=gc(l,"download"),M=gc(l,"copy");return E.jsx(Pw,{className:t,code:P,isIncomplete:p,language:m,lineNumbers:v,startLine:C,children:N?E.jsxs(E.Fragment,{children:[B?E.jsx(Ww,{code:P,language:m}):null,M?E.jsx(fc,{}):null]}):null})},Rp=k.memo(uI,(e,t)=>e.className===t.className&&Ss(e.node,t.node));Rp.displayName="MarkdownCode";var vp=k.memo(Yw,(e,t)=>e.className===t.className&&Ss(e.node,t.node));vp.displayName="MarkdownImg";var Op=k.memo(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&k.isValidElement(r[0])){let i=r[0].props.node,s=i==null?void 0:i.tagName;if(s==="img")return E.jsx(E.Fragment,{children:e});if(s==="code"&&"data-block"in r[0].props)return E.jsx(E.Fragment,{children:e})}return E.jsx("p",{...n,children:e})},(e,t)=>xe(e,t));Op.displayName="MarkdownParagraph";var lI={ol:pu,li:cp,ul:dp,hr:hp,strong:fp,a:pp,h1:mp,h2:gp,h3:bp,h4:Ep,h5:_p,h6:Tp,table:yp,thead:xp,tbody:kp,tr:Ap,th:Cp,td:wp,blockquote:Ip,code:Rp,img:vp,pre:({children:e})=>k.isValidElement(e)?k.cloneElement(e,{"data-block":"true"}):e,sup:Sp,sub:Np,p:Op,section:Lp},cI=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,dI=new RegExp("\\p{L}","u");function bc(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let n of t){if(cI.test(n))return"rtl";if(dI.test(n))return"ltr"}return"ltr"}var hI=/^[ \t]{0,3}(`{3,}|~{3,})/,fI=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Ec=e=>{let t=e.split(`
119
+ `)},up=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let s=oe(),[a,o]=k.useState(!1),[u,l]=k.useState(!1),c=k.useRef(null),d=k.useRef(0),{isAnimating:p}=k.useContext(at),f=qt(),m=async g=>{var I,C;if(typeof window>"u"||!((I=navigator==null?void 0:navigator.clipboard)!=null&&I.write)){r==null||r(new Error("Clipboard API not available"));return}try{let v=(C=c.current)==null?void 0:C.closest('[data-streamdown="table-wrapper"]'),P=v==null?void 0:v.querySelector("table");if(!P){r==null||r(new Error("Table not found"));return}let N=ap(P),B=({csv:op,tsv:eI,md:to}[g]||to)(N),M=new ClipboardItem({"text/plain":new Blob([B],{type:"text/plain"}),"text/html":new Blob([P.outerHTML],{type:"text/html"})});await navigator.clipboard.write([M]),l(!0),o(!1),n==null||n(g),d.current=window.setTimeout(()=>l(!1),i)}catch(v){r==null||r(v)}};k.useEffect(()=>{let g=I=>{let C=I.composedPath();c.current&&!C.includes(c.current)&&o(!1)};return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g),window.clearTimeout(d.current)}},[]);let b=At(),y=u?b.CheckIcon:b.CopyIcon;return E.jsxs("div",{className:s("relative"),ref:c,children:[E.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:p,onClick:()=>o(!a),title:f.copyTable,type:"button",children:e??E.jsx(y,{height:14,width:14})}),a?E.jsxs("div",{className:s("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[E.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("md"),title:f.copyTableAsMarkdown,type:"button",children:f.tableFormatMarkdown}),E.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("csv"),title:f.copyTableAsCsv,type:"button",children:f.tableFormatCsv}),E.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("tsv"),title:f.copyTableAsTsv,type:"button",children:f.tableFormatTsv})]}):null]})},lp=({children:e,className:t,onDownload:n,onError:r})=>{let i=oe(),[s,a]=k.useState(!1),o=k.useRef(null),{isAnimating:u}=k.useContext(at),l=qt(),c=At(),d=p=>{var f;try{let m=(f=o.current)==null?void 0:f.closest('[data-streamdown="table-wrapper"]'),b=m==null?void 0:m.querySelector("table");if(!b){r==null||r(new Error("Table not found"));return}let y=ap(b),g=p==="csv"?op(y):to(y);nr(`table.${p==="csv"?"csv":"md"}`,g,p==="csv"?"text/csv":"text/markdown"),a(!1),n==null||n(p)}catch(m){r==null||r(m)}};return k.useEffect(()=>{let p=f=>{let m=f.composedPath();o.current&&!m.includes(o.current)&&a(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[]),E.jsxs("div",{className:i("relative"),ref:o,children:[E.jsx("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:()=>a(!s),title:l.downloadTable,type:"button",children:e??E.jsx(c.DownloadIcon,{size:14})}),s?E.jsxs("div",{className:i("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[E.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("csv"),title:l.downloadTableAsCsv,type:"button",children:l.tableFormatCsv}),E.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("markdown"),title:l.downloadTableAsMarkdown,type:"button",children:l.tableFormatMarkdown})]}):null]})},tI=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:s}=At(),a=oe(),[o,u]=k.useState(!1),{isAnimating:l}=k.useContext(at),c=qt(),d=()=>{u(!0)},p=()=>{u(!1)};return k.useEffect(()=>{if(o){cu();let f=m=>{m.key==="Escape"&&u(!1)};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),du()}}},[o]),E.jsxs(E.Fragment,{children:[E.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:l,onClick:d,title:c.viewFullscreen,type:"button",children:E.jsx(i,{size:14})}),o?yo.createPortal(E.jsx("div",{"aria-label":c.viewFullscreen,"aria-modal":"true",className:a("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:p,onKeyDown:f=>{f.key==="Escape"&&p()},role:"dialog",children:E.jsxs("div",{className:a("flex h-full flex-col"),onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),role:"presentation",children:[E.jsxs("div",{className:a("flex items-center justify-end gap-1 p-4"),children:[n?E.jsx(up,{}):null,r?E.jsx(lp,{}):null,E.jsx("button",{className:a("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:p,title:c.exitFullscreen,type:"button",children:E.jsx(s,{size:20})})]}),E.jsx("div",{className:a("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:E.jsx("table",{className:a("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},nI=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:s=!0,...a})=>{let o=oe(),u=n&&r,l=n&&i,c=n&&s,d=u||l||c;return E.jsxs("div",{className:o("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[d?E.jsxs("div",{className:o("flex items-center justify-end gap-1"),children:[u?E.jsx(up,{}):null,l?E.jsx(lp,{}):null,c?E.jsx(tI,{showCopy:u,showDownload:l,children:e}):null]}):null,E.jsx("div",{className:o("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:E.jsx("table",{className:o("w-full divide-y divide-border",t),"data-streamdown":"table",...a,children:e})})]})},rI=/startLine=(\d+)/,iI=/\bnoLineNumbers\b/,sI=k.lazy(()=>_(()=>Promise.resolve().then(()=>iO),void 0).then(e=>({default:e.Mermaid}))),aI=/language-([^\s]+)/;function Ss(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,s=t.position.end;return(n==null?void 0:n.line)===(r==null?void 0:r.line)&&(n==null?void 0:n.column)===(r==null?void 0:r.column)&&(i==null?void 0:i.line)===(s==null?void 0:s.line)&&(i==null?void 0:i.column)===(s==null?void 0:s.column)}function xe(e,t){return e.className===t.className&&Ss(e.node,t.node)}var no=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,ha=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},gc=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},xi=(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},pu=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e})},(e,t)=>xe(e,t));pu.displayName="MarkdownOl";var cp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("li",{className:i("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e})},(e,t)=>e.className===t.className&&Ss(e.node,t.node));cp.displayName="MarkdownLi";var dp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e})},(e,t)=>xe(e,t));dp.displayName="MarkdownUl";var hp=k.memo(({className:e,node:t,...n})=>{let r=oe();return E.jsx("hr",{className:r("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>xe(e,t));hp.displayName="MarkdownHr";var fp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("span",{className:i("font-semibold",t),"data-streamdown":"strong",...r,children:e})},(e,t)=>xe(e,t));fp.displayName="MarkdownStrong";var oI=({children:e,className:t,href:n,node:r,...i})=>{let s=oe(),{linkSafety:a}=k.useContext(at),[o,u]=k.useState(!1),l=n==="streamdown:incomplete-link",c=k.useCallback(async m=>{if(!(!(a!=null&&a.enabled&&n)||l)){if(m.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}u(!0)}},[a,n,l]),d=k.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),p=k.useCallback(()=>{u(!1)},[]),f={url:n??"",isOpen:o,onClose:p,onConfirm:d};return a!=null&&a.enabled&&n?E.jsxs(E.Fragment,{children:[E.jsx("button",{className:s("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",onClick:c,type:"button",children:e}),a.renderModal?a.renderModal(f):E.jsx(Qw,{...f})]}):E.jsx("a",{className:s("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},pp=k.memo(oI,(e,t)=>xe(e,t)&&e.href===t.href);pp.displayName="MarkdownA";var mp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e})},(e,t)=>xe(e,t));mp.displayName="MarkdownH1";var gp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e})},(e,t)=>xe(e,t));gp.displayName="MarkdownH2";var bp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e})},(e,t)=>xe(e,t));bp.displayName="MarkdownH3";var Ep=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e})},(e,t)=>xe(e,t));Ep.displayName="MarkdownH4";var _p=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e})},(e,t)=>xe(e,t));_p.displayName="MarkdownH5";var Tp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e})},(e,t)=>xe(e,t));Tp.displayName="MarkdownH6";var yp=k.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=k.useContext(at),s=no(i,"table"),a=ha(i,"copy"),o=ha(i,"download"),u=ha(i,"fullscreen");return E.jsx(nI,{className:t,showControls:s,showCopy:a,showDownload:o,showFullscreen:u,...r,children:e})},(e,t)=>xe(e,t));yp.displayName="MarkdownTable";var xp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e})},(e,t)=>xe(e,t));xp.displayName="MarkdownThead";var kp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e})},(e,t)=>xe(e,t));kp.displayName="MarkdownTbody";var Ap=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("tr",{className:i("border-border",t),"data-streamdown":"table-row",...r,children:e})},(e,t)=>xe(e,t));Ap.displayName="MarkdownTr";var Cp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("th",{className:i("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e})},(e,t)=>xe(e,t));Cp.displayName="MarkdownTh";var wp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e})},(e,t)=>xe(e,t));wp.displayName="MarkdownTd";var Ip=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("blockquote",{className:i("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e})},(e,t)=>xe(e,t));Ip.displayName="MarkdownBlockquote";var Sp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...r,children:e})},(e,t)=>xe(e,t));Sp.displayName="MarkdownSup";var Np=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...r,children:e})},(e,t)=>xe(e,t));Np.displayName="MarkdownSub";var Lp=k.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=a=>{var o,u;if(!k.isValidElement(a))return!1;let l=Array.isArray(a.props.children)?a.props.children:[a.props.children],c=!1,d=!1;for(let p of l)if(p){if(typeof p=="string")p.trim()!==""&&(c=!0);else if(k.isValidElement(p))if(((o=p.props)==null?void 0:o["data-footnote-backref"])!==void 0)d=!0;else{let f=Array.isArray(p.props.children)?p.props.children:[p.props.children];for(let m of f){if(typeof m=="string"&&m.trim()!==""){c=!0;break}if(k.isValidElement(m)&&((u=m.props)==null?void 0:u["data-footnote-backref"])===void 0){c=!0;break}}}}return d&&!c},s=Array.isArray(e)?e.map(a=>{if(!k.isValidElement(a))return a;if(a.type===pu){let o=(Array.isArray(a.props.children)?a.props.children:[a.props.children]).filter(u=>!i(u));return o.length===0?null:{...a,props:{...a.props,children:o}}}return a}):e;return(Array.isArray(s)?s.some(a=>a!==null):s!==null)?E.jsx("section",{className:t,...r,children:s}):null}return E.jsx("section",{className:t,...r,children:e})},(e,t)=>xe(e,t));Lp.displayName="MarkdownSection";var uI=({node:e,className:t,children:n,...r})=>{var i,s;let a=oe(),o=!("data-block"in r),{mermaid:u,controls:l,lineNumbers:c}=k.useContext(at),d=fu(),p=Aw(),f=t==null?void 0:t.match(aI),m=(i=f==null?void 0:f.at(1))!=null?i:"",b=Kw(m);if(o)return E.jsx("code",{className:a("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let y=(s=e==null?void 0:e.properties)==null?void 0:s.metastring,g=y==null?void 0:y.match(rI),I=g?Number.parseInt(g[1],10):void 0,C=I!==void 0&&I>=1?I:void 0,v=!(y&&iI.test(y))&&c!==!1,P="";if(k.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?P=n.props.children:typeof n=="string"&&(P=n),b){let z=b.component;return E.jsx(k.Suspense,{fallback:E.jsx(mc,{}),children:E.jsx(z,{code:P,isIncomplete:p,language:m,meta:y})})}if(m==="mermaid"&&d){let z=no(l,"mermaid"),L=xi(l,"download"),V=xi(l,"copy"),G=xi(l,"fullscreen"),Z=xi(l,"panZoom"),Y=z&&(L||V||G);return E.jsx(k.Suspense,{fallback:E.jsx(mc,{}),children:E.jsxs("div",{className:a("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[E.jsx("div",{className:a("flex h-8 items-center text-muted-foreground text-xs"),children:E.jsx("span",{className:a("ml-1 font-mono lowercase"),children:"mermaid"})}),Y?E.jsx("div",{className:a("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:E.jsxs("div",{className:a("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[L?E.jsx(Zw,{chart:P,config:u==null?void 0:u.config}):null,V?E.jsx(fc,{code:P}):null,G?E.jsx(Jw,{chart:P,config:u==null?void 0:u.config}):null]})}):null,E.jsx("div",{className:a("rounded-md border border-border bg-background"),children:E.jsx(sI,{chart:P,config:u==null?void 0:u.config,showControls:Z})})]})})}let N=no(l,"code"),B=gc(l,"download"),M=gc(l,"copy");return E.jsx(Pw,{className:t,code:P,isIncomplete:p,language:m,lineNumbers:v,startLine:C,children:N?E.jsxs(E.Fragment,{children:[B?E.jsx(Ww,{code:P,language:m}):null,M?E.jsx(fc,{}):null]}):null})},Rp=k.memo(uI,(e,t)=>e.className===t.className&&Ss(e.node,t.node));Rp.displayName="MarkdownCode";var vp=k.memo(Yw,(e,t)=>e.className===t.className&&Ss(e.node,t.node));vp.displayName="MarkdownImg";var Op=k.memo(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&k.isValidElement(r[0])){let i=r[0].props.node,s=i==null?void 0:i.tagName;if(s==="img")return E.jsx(E.Fragment,{children:e});if(s==="code"&&"data-block"in r[0].props)return E.jsx(E.Fragment,{children:e})}return E.jsx("p",{...n,children:e})},(e,t)=>xe(e,t));Op.displayName="MarkdownParagraph";var lI={ol:pu,li:cp,ul:dp,hr:hp,strong:fp,a:pp,h1:mp,h2:gp,h3:bp,h4:Ep,h5:_p,h6:Tp,table:yp,thead:xp,tbody:kp,tr:Ap,th:Cp,td:wp,blockquote:Ip,code:Rp,img:vp,pre:({children:e})=>k.isValidElement(e)?k.cloneElement(e,{"data-block":"true"}):e,sup:Sp,sub:Np,p:Op,section:Lp},cI=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,dI=new RegExp("\\p{L}","u");function bc(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let n of t){if(cI.test(n))return"rtl";if(dI.test(n))return"ltr"}return"ltr"}var hI=/^[ \t]{0,3}(`{3,}|~{3,})/,fI=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Ec=e=>{let t=e.split(`
120
120
  `),n=null,r=0;for(let i of t){let s=hI.exec(i);if(n===null){if(s){let a=s[1];n=a[0],r=a.length}}else if(s){let a=s[1],o=a[0],u=a.length;o===n&&u>=r&&(n=null,r=0)}}return n!==null},pI=e=>{let t=e.split(`
121
121
  `);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&fI.test(r))return!0}return!1},mI=()=>e=>{Rt(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},_c=[],Tc={allowDangerousHtml:!0},ki=new WeakMap,gI=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 c="default";return this.keyCache.set(e,c),c}let s=c=>{if(!c||c.length===0)return"";let d="";for(let p=0;p<c.length;p+=1){let f=c[p];if(p>0&&(d+=","),Array.isArray(f)){let[m,b]=f;if(typeof m=="function"){let y=ki.get(m);y||(y=m.name,ki.set(m,y)),d+=y}else d+=String(m);d+=":",d+=JSON.stringify(b)}else if(typeof f=="function"){let m=ki.get(f);m||(m=f.name,ki.set(f,m)),d+=m}else d+=String(f)}return d},a=s(n),o=s(r),u=i?JSON.stringify(i):"",l=`${o}::${a}::${u}`;return this.keyCache.set(e,l),l}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()}},yc=new gI,Pp=e=>{let t=bI(e),n=e.children||"",r=t.runSync(t.parse(n),n);return AI(r,e)},bI=e=>{let t=yc.get(e);if(t)return t;let n=_I(e);return yc.set(e,n),n},EI=e=>e.some(t=>Array.isArray(t)?t[0]===Ha:t===Ha),_I=e=>{let t=e.rehypePlugins||_c,n=e.remarkPlugins||_c,r=EI(t)?n:[...n,mI],i=e.remarkRehypeOptions?{...Tc,...e.remarkRehypeOptions}:Tc;return T2().use(_C).use(r).use(t2,i).use(t)},TI=e=>e,yI=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},xI=(e,t)=>{var n;for(let r in na)if(Object.hasOwn(na,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],s=na[r];(s===null||s.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},kI=(e,t,n,r,i,s)=>{let a=!1;return r?a=!r.includes(e.tagName):i&&(a=i.includes(e.tagName)),!a&&s&&typeof t=="number"&&(a=!s(e,t,n)),a},AI=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:s,unwrapDisallowed:a,urlTransform:o}=t;if(n||r||i||s||o){let u=o||TI;Rt(e,(l,c,d)=>{if(l.type==="raw"&&d&&typeof c=="number")return yI(d,c,s,l.value),c;if(l.type==="element"&&(xI(l,u),kI(l,c,d,r,i,n)&&d&&typeof c=="number"))return a&&l.children?d.children.splice(c,1,...l.children):d.children.splice(c,1),c})}return IA(e,{Fragment:E.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0})},CI=/\[\^[\w-]{1,200}\](?!:)/,wI=/\[\^[\w-]{1,200}\]:/,II=/<(\w+)[\s>]/,SI=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),xc=new Map,kc=new Map,NI=e=>{let t=e.toLowerCase(),n=xc.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return xc.set(t,r),r},LI=e=>{let t=e.toLowerCase(),n=kc.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return kc.set(t,r),r},Ac=(e,t)=>{if(SI.has(t.toLowerCase()))return 0;let n=e.match(NI(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},Cc=(e,t)=>{let n=e.match(LI(t));return n?n.length:0},RI=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},vI=e=>{let t=CI.test(e),n=wI.test(e);if(t||n)return[e];let r=ht.lex(e,{gfm:!0}),i=[],s=[],a=!1;for(let o of r){let u=o.raw,l=i.length;if(s.length>0){i[l-1]+=u;let c=s.at(-1),d=Ac(u,c),p=Cc(u,c);for(let f=0;f<d;f+=1)s.push(c);for(let f=0;f<p;f+=1)s.length>0&&s.at(-1)===c&&s.pop();continue}if(o.type==="html"&&o.block){let c=u.match(II);if(c){let d=c[1],p=Ac(u,d),f=Cc(u,d);p>f&&s.push(d)}}if(l>0&&!a){let c=i[l-1];if(RI(c)%2===1){i[l-1]=c+u;continue}}i.push(u),o.type!=="space"&&(a=o.type==="code")}return i},OI=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(s,a,o,u)=>{if(!o.includes(`
122
122
 
@@ -279,4 +279,4 @@ XID_Continue XIDC
279
279
  XID_Start XIDS`.split(/\s/).map(e=>[Ps(e),e])),YL=new Map([["s",ve(383)],[ve(383),"s"]]),QL=new Map([[ve(223),ve(7838)],[ve(107),ve(8490)],[ve(229),ve(8491)],[ve(969),ve(8486)]]),KL=new Map([en(453),en(456),en(459),en(498),...ka(8072,8079),...ka(8088,8095),...ka(8104,8111),en(8124),en(8140),en(8188)]),XL=new Map([["alnum",te`[\p{Alpha}\p{Nd}]`],["alpha",te`\p{Alpha}`],["ascii",te`\p{ASCII}`],["blank",te`[\p{Zs}\t]`],["cntrl",te`\p{Cc}`],["digit",te`\p{Nd}`],["graph",te`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",te`\p{Lower}`],["print",te`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",te`[\p{P}\p{S}]`],["space",te`\p{space}`],["upper",te`\p{Upper}`],["word",te`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",te`\p{AHex}`]]);function ZL(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function en(e){const t=ve(e);return[t.toLowerCase(),t]}function ka(e,t){return ZL(e,t).map(n=>en(n))}var Dm=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function JL(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};Mm(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:bo(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Wr(e,eR,r);const i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},s={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};Wr(e,tR,s);const a={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return Wr(e,nR,a),e._originMap=s.groupOriginByCopy,e._strategy=r.strategy,e}var eR={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:i}=e;if(i==="repeater"){const s=Tt();s.body[0].body.push(kn({negate:!0,body:r}),Xn("Any"));const a=Tt();a.body[0].body.push(Im("greedy",0,1/0,s)),n(ke(a,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const i=e.body.filter(s=>s.kind==="flags");for(let s=n+1;s<t.body.length;s++){const a=t.body[s];ni(r,a,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){var n;if((n=t.get(e))!=null&&n.length){const r=Fm(t.get(e));if(r){const i=Tt({flags:r});i.body[0].body=e.body,e.body=[ke(i,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:s,replaceWith:a},o){const{kind:u,negate:l}=e,{asciiWordBoundaries:c,avoidSubclass:d,supportedGNodes:p,wordIsAscii:f}=o;if(u==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${l?"Y":"y"}"`);if(u==="line_end")a(ke(kn({body:[Pn({body:[fo("string_end")]}),Pn({body:[Os(10)]})]}),t));else if(u==="line_start")a(ke(Ht(te`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(u==="search_start")if(p.has(e))i.flags.sticky=!0,s();else{const m=r[n-1];if(m&&uR(m))a(ke(kn({negate:!0}),t));else{if(d)throw new Error(te`Uses "\G" in a way that requires a subclass`);a(tn(fo("string_start"),t)),o.strategy="clip_search"}}else if(!(u==="string_end"||u==="string_start"))if(u==="string_end_newline")a(ke(Ht(te`(?=\n?\z)`),t));else if(u==="word_boundary"){if(!f&&!c){const m=`(?:(?<=${Ft})(?!${Ft})|(?<!${Ft})(?=${Ft}))`,b=`(?:(?<=${Ft})(?=${Ft})|(?<!${Ft})(?!${Ft}))`;a(ke(Ht(l?b:m),t))}}else throw new Error(`Unexpected assertion kind "${u}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Ca(n)&&(n=Aa(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!Ca(r)&&(r=Aa(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const r=Hi({body:[e]});n(ke(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:s,spaceIsAscii:a,wordIsAscii:o}){const{kind:u,negate:l,value:c}=e;if(s&&(u==="digit"||c==="digit")){n(tn(mo("digit",{negate:l}),t));return}if(a&&(u==="space"||c==="space")){n(ke(wa(Ht(WL),l),t));return}if(o&&(u==="word"||c==="word")){n(tn(mo("word",{negate:l}),t));return}if(u==="any")n(tn(Xn("Any"),t));else if(u==="digit")n(tn(Xn("Nd",{negate:l}),t));else if(u!=="dot")if(u==="text_segment"){if(r==="strict")throw new Error(te`Use of "\X" requires non-strict accuracy`);const d="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",p=te`\p{RI}{2}|${d}(?:\u200D${d})*`;n(ke(Ht(te`(?>\r\n|${i?te`\p{RGI_Emoji}`:p}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(u==="hex")n(tn(Xn("AHex",{negate:l}),t));else if(u==="newline")n(ke(Ht(l?`[^
280
280
  ]`:`(?>\r
281
281
  ?|[
282
- \v\f…\u2028\u2029])`),t));else if(u==="posix")if(!i&&(c==="graph"||c==="print")){if(r==="strict")throw new Error(`POSIX class "${c}" requires min target ES2024 or non-strict accuracy`);let d={graph:"!-~",print:" -~"}[c];l&&(d=`\0-${ve(d.codePointAt(0)-1)}${ve(d.codePointAt(2)+1)}-􏿿`),n(ke(Ht(`[${d}]`),t))}else n(ke(wa(Ht(XL.get(c)),l),t));else if(u==="property")Su.has(Ps(c))||(e.key="sc");else if(u==="space")n(tn(Xn("space",{negate:l}),t));else if(u==="word")n(ke(wa(Ht(Ft),l),t));else throw new Error(`Unexpected character set kind "${u}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:s,removeAllNextSiblings:a}){const{kind:o,flags:u}=e;if(o==="flags")if(!u.enable&&!u.disable)r();else{const l=Tt({flags:u});l.body[0].body=a(),i(ke(l,t),{traverse:!0})}else if(o==="keep"){const l=n.body[0],d=n.body.length===1&&Am(l,{type:"Group"})&&l.body[0].body.length===1?l.body[0]:n;if(t.parent!==d||d.body.length>1)throw new Error(te`Uses "\K" in a way that's unsupported`);const p=kn({behind:!0});p.body[0].body=s(),i(ke(p,t))}else throw new Error(`Unexpected directive kind "${o}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t!=null&&t.extended&&delete t.extended,n!=null&&n.extended&&delete n.extended,t!=null&&t.dotAll&&(n!=null&&n.dotAll)&&delete t.dotAll,t!=null&&t.ignoreCase&&(n!=null&&n.ignoreCase)&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:r}=e;if(r==="fail")n(ke(kn({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=Tt();t.body[0].body.push(e.body),e.body=ke(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,i=!1;for(const s of e.body)if(s.body.length===1&&s.body[0].kind==="search_start")s.body.pop();else{const a=Um(s.body);a?(r=!0,Array.isArray(a)?n.push(...a):n.push(a)):i=!0}r&&!i&&n.forEach(s=>t.add(s))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(te`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Ca(n)&&(n=Aa(n,t),e.ref=n)}},tR={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:s})=>s)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:s,multiplexCapturesToLeftByRef:a,openRefs:o,reffedNodesByReferencer:u}){const l=i.get(e);if(l&&o.has(e.number)){const d=tn(ld(e.number),t);u.set(d,o.get(e.number)),n(d);return}o.set(e.number,e),a.set(e.number,[]),e.name&&ni(a,e.name,[]);const c=a.get(e.name??e.number);for(let d=0;d<c.length;d++){const p=c[d];if(l===p.node||l&&l===p.origin||e===p.origin){c.splice(d,1);break}}if(a.get(e.number).push({node:e,origin:l}),e.name&&a.get(e.name).push({node:e,origin:l}),e.name){const d=ni(s,e.name,new Map);let p=!1;if(l)p=!0;else for(const f of d.values())if(!f.hasDuplicateNameToRemove){p=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:p})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=cs(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:i,ref:s}=e;if(i){let c=t;for(;(c=c.parent)&&!(c.type==="CapturingGroup"&&(c.name===s||c.number===s)););r.reffedNodesByReferencer.set(e,c);return}const a=r.subroutineRefMap.get(s),o=s===0,u=o?ld(0):Bm(a,r.groupOriginByCopy,null);let l=u;if(!o){const c=Fm(sR(a,p=>p.type==="Group"&&!!p.flags)),d=c?cs(r.globalFlags,c):r.globalFlags;rR(d,r.currentFlags)||(l=Tt({flags:aR(d)}),l.body[0].body.push(u))}n(ke(l,t),{traverse:!o})}},nR={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const s=r.reffedNodesByReferencer.get(e).filter(a=>iR(a,e));if(!s.length)n(ke(kn({negate:!0}),t));else if(s.length>1){const a=Tt({atomic:!0,body:s.reverse().map(o=>Pn({body:[po(o.number)]}))});n(ke(a,t))}else e.ref=s[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r<n;r++){const i=wm();e.body.at(-1).body.push(i)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function Mm(e){Wr(e,{"*"({node:t,parent:n}){t.parent=n}})}function rR(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function iR(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=Hm(n.parent);for(const i of r){if(i===n)break;if(i===e||$m(i,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function Bm(e,t,n,r){const i=Array.isArray(e)?[]:{};for(const[s,a]of Object.entries(e))s==="parent"?i.parent=Array.isArray(n)?r:n:a&&typeof a=="object"?i[s]=Bm(a,t,i,n):(s==="type"&&a==="CapturingGroup"&&t.set(i,t.get(e)??e),i[s]=a);return i}function ld(e){const t=Sm(e);return t.isRecursive=!0,t}function sR(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Aa(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function Fm(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(i=>{var s,a;(s=r.enable)!=null&&s[i]&&(delete n.disable[i],n.enable[i]=!0),(a=r.disable)!=null&&a[i]&&(n.disable[i]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function aR({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function Hm(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function Um(e){const t=e.find(n=>n.kind==="search_start"||lR(n,{negate:!1})||!oR(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const r of t.body){const i=Um(r.body);if(!i)return null;Array.isArray(i)?n.push(...i):n.push(i)}return n}return null}function $m(e,t){const n=Hm(e)??[];for(const r of n)if(r===t||$m(r,t))return!0;return!1}function oR({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function uR(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function lR(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&Am(e.body[0],{type:"Assertion",kind:"search_start"})}function Ca(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Ht(e,t){const r=Cm(e,{...t,unicodePropertyMap:Su}).body;return r.length>1||r[0].body.length>1?Tt({body:r}):r[0].body[0]}function wa(e,t){return e.negate=t,e}function tn(e,t){return e.parent=t,e}function ke(e,t){return Mm(e),e.parent=t,e}function cR(e,t){const n=Om(t),r=bo(n.target,"ES2024"),i=bo(n.target,"ES2025"),s=n.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let a=null,o=null;if(!i){const f=[e.flags.ignoreCase];Wr(e,dR,{getCurrentModI:()=>f.at(-1),popModI(){f.pop()},pushModI(m){f.push(m)},setHasCasedChar(){f.at(-1)?a=!0:o=!0}})}const u={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||a)&&!o)};let l=e;const c={accuracy:n.accuracy,appliedGlobalFlags:u,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!i&&a&&o),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(f){return c.lastNode=l,l=f,zL(hR[f.type],`Unexpected node type "${f.type}"`)(f,c,d)}const p={pattern:e.body.map(d).join("|"),flags:d(e.flags),options:{...e.options}};return r||(delete p.options.force.v,p.options.disable.v=!0,p.options.unicodeSetsPlugin=null),p._captureTransfers=new Map,p._hiddenCaptures=[],c.captureMap.forEach((f,m)=>{f.hidden&&p._hiddenCaptures.push(m),f.transferTo&&ni(p._captureTransfers,f.transferTo,[]).push(m)}),p}var dR={"*":{enter({node:e},t){if(dd(e)){const n=t.getCurrentModI();t.pushModI(e.flags?cs({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){dd(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){Nu(ve(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),jm(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&Dm.has(e.value)&&t.setHasCasedChar()}},hR={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?te`\B`:te`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:r,name:i,number:s}=e,a={ignoreCase:t.currentFlags.ignoreCase},o=t.originMap.get(e);return o&&(a.hidden=!0,s>o.number&&(a.transferTo=o.number)),t.captureMap.set(s,a),`(${i?`?<${i}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=ve(e),r=qn(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Nu(n)){const i=Pm(n);return t.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:i,parent:s}=e;let{body:a}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");xt.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&a.some(hd)&&(a=[Os(45),...a.filter(l=>!hd(l))]);const o=()=>`[${i?"^":""}${a.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||xt.bugNestedClassIgnoresNegation)&&!i){const c=a.filter(d=>d.type==="CharacterClass"&&d.kind==="union"&&d.negate);if(c.length){const d=Tt(),p=d.body[0];return d.parent=s,p.parent=d,a=a.filter(f=>!c.includes(f)),e.body=a,a.length?(e.parent=p,p.body.push(e)):d.body.pop(),c.forEach(f=>{const m=Pn({body:[f]});f.parent=m,m.parent=d,d.body.push(m)}),n(d)}}t.inCharClass=!0;const l=o();return t.inCharClass=!1,l}const u=a[0];if(r==="union"&&!i&&u&&((!t.useFlagV||!t.verbose)&&s.kind==="union"&&!(xt.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&s.kind==="intersection"&&a.length===1&&u.type!=="CharacterClassRange"))return a.map(n).join("");if(!t.useFlagV&&s.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return o()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=qn(n,i),a=qn(r,i),o=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const u=jm(e);bR(u).forEach(c=>{o.add(Array.isArray(c)?`${qn(c[0],i)}-${qn(c[1],i)}`:qn(c,i))})}return`${s}-${a}${[...o].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":te`[^\n]`;if(e==="digit")return t?te`\D`:te`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&Dm.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?te`\P`:te`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?te`\W`:te`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},i,s){const a=i.currentFlags;n&&(i.currentFlags=cs(a,n));const o=t.map(s).join("|"),u=!i.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!i.useFlagMods||!n)?o:`(?${ER(e,n,i.useFlagMods)}${o})`;return i.currentFlags=a,u},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(i).join("|")})`},Quantifier(e,t,n){return n(e.body)+_R(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:te`\g<${t}&R=${r}>`}},fR=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),pR=new Set(["-","\\","]","^","["]),mR=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),cd=new Map([[9,te`\t`],[10,te`\n`],[11,te`\v`],[12,te`\f`],[13,te`\r`],[8232,te`\u2028`],[8233,te`\u2029`],[65279,te`\uFEFF`]]),gR=new RegExp("^\\p{Cased}$","u");function Nu(e){return gR.test(e)}function jm(e,t){const n=!!(t!=null&&t.firstOnly),r=e.min.value,i=e.max.value,s=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return s;for(let a=r;a<=i;a++){const o=ve(a);if(!Nu(o))continue;const u=Pm(o).filter(l=>{const c=l.codePointAt(0);return c<r||c>i});if(u.length&&(s.push(...u),n))break}return s}function qn(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(cd.has(e))return cd.get(e);if(e<32||e>126&&e<160||e>262143||t&&TR(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=n?r?mR:pR:fR,s=ve(e);return(i.has(s)?"\\":"")+s}function bR(e){const t=e.map(i=>i.codePointAt(0)).sort((i,s)=>i-s),n=[];let r=null;for(let i=0;i<t.length;i++)t[i+1]===t[i]+1?r??(r=t[i]):r===null?n.push(t[i]):(n.push([r,t[i]]),r=null);return n}function ER(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:i,disable:s}=t;r=(i!=null&&i.ignoreCase?"i":"")+(i!=null&&i.dotAll?"s":"")+(s?"-":"")+(s!=null&&s.ignoreCase?"i":"")+(s!=null&&s.dotAll?"s":"")}return`${r}:`}function _R({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function dd({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function TR(e){return e>47&&e<58}function hd({type:e,value:t}){return e==="Character"&&t===45}var rn,Ut,Sn,sn,Nn,ri,Eo,un,yR=(un=class extends RegExp{constructor(n,r,i){var t=(...ZO)=>(super(...ZO),gn(this,ri),gn(this,rn,new Map),gn(this,Ut,null),gn(this,Sn),gn(this,sn,null),gn(this,Nn,null),O(this,"rawOptions",{}),this);const s=!!(i!=null&&i.lazyCompile);if(n instanceof RegExp){if(i)throw new Error("Cannot provide options when copying a regexp");const a=n;t(a,r),Et(this,Sn,a.source),a instanceof un&&(Et(this,rn,We(a,rn)),Et(this,sn,We(a,sn)),Et(this,Nn,We(a,Nn)),this.rawOptions=a.rawOptions)}else{const a={hiddenCaptures:[],strategy:null,transfers:[],...i};t(s?"":n,r),Et(this,Sn,n),Et(this,rn,kR(a.hiddenCaptures,a.transfers)),Et(this,Nn,a.strategy),this.rawOptions=i??{}}s||Et(this,Ut,this)}get source(){return We(this,Sn)||"(?:)"}exec(n){if(!We(this,Ut)){const{lazyCompile:s,...a}=this.rawOptions;Et(this,Ut,new un(We(this,Sn),this.flags,a))}const r=this.global||this.sticky,i=this.lastIndex;if(We(this,Nn)==="clip_search"&&r&&i){this.lastIndex=0;const s=js(this,ri,Eo).call(this,n.slice(i));return s&&(xR(s,i,n,this.hasIndices),this.lastIndex+=i),s}return js(this,ri,Eo).call(this,n)}},rn=new WeakMap,Ut=new WeakMap,Sn=new WeakMap,sn=new WeakMap,Nn=new WeakMap,ri=new WeakSet,Eo=function(n){We(this,Ut).lastIndex=this.lastIndex;const r=Du(un.prototype,this,"exec").call(We(this,Ut),n);if(this.lastIndex=We(this,Ut).lastIndex,!r||!We(this,rn).size)return r;const i=[...r];r.length=1;let s;this.hasIndices&&(s=[...r.indices],r.indices.length=1);const a=[0];for(let o=1;o<i.length;o++){const{hidden:u,transferTo:l}=We(this,rn).get(o)??{};if(u?a.push(null):(a.push(r.length),r.push(i[o]),this.hasIndices&&r.indices.push(s[o])),l&&i[o]!==void 0){const c=a[l];if(!c)throw new Error(`Invalid capture transfer to "${c}"`);if(r[c]=i[o],this.hasIndices&&(r.indices[c]=s[o]),r.groups){We(this,sn)||Et(this,sn,AR(this.source));const d=We(this,sn).get(l);d&&(r.groups[d]=i[o],this.hasIndices&&(r.indices.groups[d]=s[o]))}}}return r},un);function xR(e,t,n,r){if(e.index+=t,e.input=n,r){const i=e.indices;for(let a=0;a<i.length;a++){const o=i[a];o&&(i[a]=[o[0]+t,o[1]+t])}const s=i.groups;s&&Object.keys(s).forEach(a=>{const o=s[a];o&&(s[a]=[o[0]+t,o[1]+t])})}}function kR(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,i]of t)for(const s of i)ni(n,s,{}).transferTo=r;return n}function AR(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,i=0,s;for(;s=t.exec(e);){const{0:a,groups:{capture:o,name:u}}=s;a==="["?r++:r?a==="]"&&r--:o&&(i++,u&&n.set(i,u))}return n}function CR(e,t){const n=wR(e,t);return n.options?new yR(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function wR(e,t){const n=Om(t),r=Cm(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:Su}),i=JL(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),s=cR(i,n),a=jL(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),o=UL(a.pattern),u=HL(o.pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),l={pattern:u.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const c=u.hiddenCaptures.sort((m,b)=>m-b),d=Array.from(u.captureTransfers),p=i._strategy,f=l.pattern.length>=n.lazyCompileLength;(c.length||d.length||p||f)&&(l.options={...c.length&&{hiddenCaptures:c},...d.length&&{transfers:d},...p&&{strategy:p},...f&&{lazyCompile:f}})}return l}const fd=4294967295;class IR{constructor(t,n={}){O(this,"regexps");this.patterns=t,this.options=n;const{forgiving:r=!1,cache:i,regexConstructor:s}=n;if(!s)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(a=>{if(typeof a!="string")return a;const o=i==null?void 0:i.get(a);if(o){if(o instanceof RegExp)return o;if(r)return null;throw o}try{const u=s(a);return i==null||i.set(a,u),u}catch(u){if(i==null||i.set(a,u),r)return null;throw u}})}findNextMatchSync(t,n,r){const i=typeof t=="string"?t:t.content,s=[];function a(o,u,l=0){return{index:o,captureIndices:u.indices.map(c=>c==null?{start:fd,end:fd,length:0}:{start:c[0]+l,end:c[1]+l,length:c[1]-c[0]})}}for(let o=0;o<this.regexps.length;o++){const u=this.regexps[o];if(u)try{u.lastIndex=n;const l=u.exec(i);if(!l)continue;if(l.index===n)return a(o,l,0);s.push([o,l,0])}catch(l){if(this.options.forgiving)continue;throw l}}if(s.length){const o=Math.min(...s.map(u=>u[1].index));for(const[u,l,c]of s)if(l.index===o)return a(u,l,c)}return null}}function SR(e,t){return CR(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function NR(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||(t.regexConstructor=n=>SR(n,{target:t.target})),{createScanner(n){return new IR(n,t)},createString(n){return{content:n}}}}var LR=NR({forgiving:!0}),RR=Object.fromEntries(ku.flatMap(e=>{var t;return((t=e.aliases)!=null?t:[]).map(n=>[n,e.id])})),Ui=new Set(Object.keys(bm)),pd=e=>{let t=e.trim().toLowerCase();return RR[t]||(Ui.has(t),t)},Ia=new Map,Sa=new Map,Yn=new Map,ds=e=>{var t;return typeof e=="string"?e:(t=e.name)!=null?t:"custom"},vR=(e,t)=>`${e}-${ds(t[0])}-${ds(t[1])}`,OR=(e,t,n)=>{let r=e.slice(0,100),i=e.length>100?e.slice(-100):"";return`${t}:${n[0]}:${n[1]}:${e.length}:${r}:${i}`},PR=(e,t)=>{let n=vR(e,t);if(Ia.has(n))return Ia.get(n);let r=VN({themes:t,langs:[e],engine:LR});return Ia.set(n,r),r};function DR(e={}){var t;let n=(t=e.themes)!=null?t:["github-light","github-dark"];return{name:"shiki",type:"code-highlighter",supportsLanguage(r){let i=pd(r);return Ui.has(i)},getSupportedLanguages(){return Array.from(Ui)},getThemes(){return n},highlight({code:r,language:i,themes:s},a){let o=pd(i),u=[ds(s[0]),ds(s[1])],l=OR(r,o,u);if(Sa.has(l))return Sa.get(l);a&&(Yn.has(l)||Yn.set(l,new Set),Yn.get(l).add(a));let c=Ui.has(o)?o:"text";return PR(c,s).then(d=>{let p=d.getLoadedLanguages().includes(o)?o:"text",f=d.codeToTokens(r,{lang:p,themes:{light:u[0],dark:u[1]}});Sa.set(l,f);let m=Yn.get(l);if(m){for(let b of m)b(f);Yn.delete(l)}}).catch(d=>{console.error("[Streamdown Code] Failed to highlight code:",d),Yn.delete(l)}),null}}}var MR=DR();const BR=k.memo(function({url:t,onClose:n,onConfirm:r}){return k.useEffect(()=>{const i=s=>{s.key==="Enter"&&(s.preventDefault(),r())};return window.addEventListener("keydown",i,!0),()=>window.removeEventListener("keydown",i,!0)},[r]),E.jsxs(H0,{open:!0,title:"External Link",onClose:n,width:600,children:[E.jsx("div",{className:"text-body-sm text-[var(--color-brand-default)] break-all bg-[var(--color-surface-canvas)] rounded-[4px] px-3.5 py-2.5 border border-[var(--color-border-subtle)]",children:t}),E.jsxs("div",{className:"flex justify-end gap-2.5 mt-4",children:[E.jsx("button",{onClick:n,className:"bg-transparent border border-[var(--color-border-default)] rounded-[4px] px-5 py-2 text-[var(--color-text-secondary)] text-body-sm cursor-pointer transition-colors duration-base ease-out hover:bg-white/5 focus-visible:bg-white/5",children:"Cancel"}),E.jsx("button",{onClick:r,className:"bg-[var(--color-brand-subtle)] border border-[var(--color-brand-soft)] rounded-[4px] px-5 py-2 text-[var(--color-brand-default)] text-body-sm-medium cursor-pointer transition-colors duration-base ease-out hover:bg-[var(--color-brand-soft)] focus-visible:bg-[var(--color-brand-soft)]",children:"Open in new tab"})]})]})});function FR({children:e}){const[t,n]=k.useState(()=>new Map),r=k.useCallback(a=>t.get(a),[t]),i=k.useCallback(a=>{for(const o of t.values())if(a(o))return o},[t]),s=k.useCallback((a,o)=>{n(u=>{if(u.get(a)===o)return u;const l=new Map(u);return l.set(a,o),l})},[]);return E.jsx(U0.Provider,{value:{get:r,find:i,set:s},children:e})}const Vm={ema:{kind:"overlay",label:"EMA",color:"#f5c842"},bb:{kind:"overlay",label:"Bollinger Bands",color:"#7c4dff"},ichimoku:{kind:"overlay",label:"Ichimoku Cloud",color:"var(--color-success-default)"},keltner:{kind:"overlay",label:"Keltner Channel",color:"#ff7043"},rsi:{kind:"subpane",label:"RSI",color:"#ab47bc"},macd:{kind:"subpane",label:"MACD",color:"#42a5f5"},adx:{kind:"subpane",label:"ADX",color:"#ffa726"},stochrsi:{kind:"subpane",label:"StochRSI",color:"#ba68c8"},obv:{kind:"subpane",label:"OBV",color:"#4fc3f7"},williamsr:{kind:"subpane",label:"WilliamsR",color:"#ec407a"},cci:{kind:"subpane",label:"CCI",color:"#9ccc65"},atr:{kind:"subpane",label:"ATR",color:"#ffd54f"},vwap:{kind:"overlay",label:"VWAP",color:"#80deea"}},HR=new Set(Object.keys(Vm));function UR(e){return Vm[e.toLowerCase()]}function mt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function zm(e,t=[]){let n=[];function r(s,a){const o=k.createContext(a),u=n.length;n=[...n,a];const l=d=>{var g;const{scope:p,children:f,...m}=d,b=((g=p==null?void 0:p[e])==null?void 0:g[u])||o,y=k.useMemo(()=>m,Object.values(m));return E.jsx(b.Provider,{value:y,children:f})};l.displayName=s+"Provider";function c(d,p){var b;const f=((b=p==null?void 0:p[e])==null?void 0:b[u])||o,m=k.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[l,c]}const i=()=>{const s=n.map(a=>k.createContext(a));return function(o){const u=(o==null?void 0:o[e])||s;return k.useMemo(()=>({[`__scope${e}`]:{...o,[e]:u}}),[o,u])}};return i.scopeName=e,[r,$R(i,...t)]}function $R(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=r.reduce((o,{useScope:u,scopeName:l})=>{const d=u(s)[`__scope${l}`];return{...o,...d}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Dn=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},jR=S0[" useInsertionEffect ".trim().toString()]||Dn;function VR({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,a]=zR({defaultProp:t,onChange:n}),o=e!==void 0,u=o?e:i;{const c=k.useRef(e!==void 0);k.useEffect(()=>{const d=c.current;d!==o&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=o},[o,r])}const l=k.useCallback(c=>{var d;if(o){const p=GR(c)?c(e):c;p!==e&&((d=a.current)==null||d.call(a,p))}else s(c)},[o,e,s,a]);return[u,l]}function zR({defaultProp:e,onChange:t}){const[n,r]=k.useState(e),i=k.useRef(n),s=k.useRef(t);return jR(()=>{s.current=t},[t]),k.useEffect(()=>{var a;i.current!==n&&((a=s.current)==null||a.call(s,n),i.current=n)},[n,i]),[n,r,s]}function GR(e){return typeof e=="function"}function md(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Gm(...e){return t=>{let n=!1;const r=e.map(i=>{const s=md(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():md(e[i],null)}}}}function Er(...e){return k.useCallback(Gm(...e),e)}function WR(e){const t=qR(e),n=k.forwardRef((r,i)=>{const{children:s,...a}=r,o=k.Children.toArray(s),u=o.find(QR);if(u){const l=u.props.children,c=o.map(d=>d===u?k.Children.count(l)>1?k.Children.only(null):k.isValidElement(l)?l.props.children:null:d);return E.jsx(t,{...a,ref:i,children:k.isValidElement(l)?k.cloneElement(l,void 0,c):null})}return E.jsx(t,{...a,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}function qR(e){const t=k.forwardRef((n,r)=>{const{children:i,...s}=n;if(k.isValidElement(i)){const a=XR(i),o=KR(s,i.props);return i.type!==k.Fragment&&(o.ref=r?Gm(r,a):a),k.cloneElement(i,o)}return k.Children.count(i)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var YR=Symbol("radix.slottable");function QR(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===YR}function KR(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...o)=>{const u=s(...o);return i(...o),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function XR(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ZR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$n=ZR.reduce((e,t)=>{const n=WR(`Primitive.${t}`),r=k.forwardRef((i,s)=>{const{asChild:a,...o}=i,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(u,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function JR(e,t){e&&yo.flushSync(()=>e.dispatchEvent(t))}var ev="Arrow",Wm=k.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return E.jsx($n.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});Wm.displayName=ev;var tv=Wm;function Bs(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function nv(e){const[t,n]=k.useState(void 0);return Dn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,o;if("borderBoxSize"in s){const u=s.borderBoxSize,l=Array.isArray(u)?u[0]:u;a=l.inlineSize,o=l.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Lu="Popper",[qm,Ym]=zm(Lu),[rv,Qm]=qm(Lu),Km=e=>{const{__scopePopper:t,children:n}=e,[r,i]=k.useState(null);return E.jsx(rv,{scope:t,anchor:r,onAnchorChange:i,children:n})};Km.displayName=Lu;var Xm="PopperAnchor",Zm=k.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=Qm(Xm,n),a=k.useRef(null),o=Er(t,a),u=k.useRef(null);return k.useEffect(()=>{const l=u.current;u.current=(r==null?void 0:r.current)||a.current,l!==u.current&&s.onAnchorChange(u.current)}),r?null:E.jsx($n.div,{...i,ref:o})});Zm.displayName=Xm;var Ru="PopperContent",[iv,sv]=qm(Ru),Jm=k.forwardRef((e,t)=>{var ze,Pe,de,Ge,Xe,ot;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:f="optimized",onPlaced:m,...b}=e,y=Qm(Ru,n),[g,I]=k.useState(null),C=Er(t,Ze=>I(Ze)),[v,P]=k.useState(null),N=nv(v),B=(N==null?void 0:N.width)??0,M=(N==null?void 0:N.height)??0,z=r+(s!=="center"?"-"+s:""),L=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},V=Array.isArray(l)?l:[l],G=V.length>0,Z={padding:L,boundary:V.filter(ov),altBoundary:G},{refs:Y,floatingStyles:$,placement:W,isPositioned:J,middlewareData:me}=N0({strategy:"fixed",placement:z,whileElementsMounted:(...Ze)=>M0(...Ze,{animationFrame:f==="always"}),elements:{reference:y.anchor},middleware:[L0({mainAxis:i+M,alignmentAxis:a}),u&&R0({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?B0():void 0,...Z}),u&&v0({...Z}),O0({...Z,apply:({elements:Ze,rects:ut,availableWidth:fn,availableHeight:Yt})=>{const{width:jn,height:se}=ut.reference,pe=Ze.floating.style;pe.setProperty("--radix-popper-available-width",`${fn}px`),pe.setProperty("--radix-popper-available-height",`${Yt}px`),pe.setProperty("--radix-popper-anchor-width",`${jn}px`),pe.setProperty("--radix-popper-anchor-height",`${se}px`)}}),v&&P0({element:v,padding:o}),uv({arrowWidth:B,arrowHeight:M}),p&&D0({strategy:"referenceHidden",...Z})]}),[Ce,A]=n0(W),Te=Bs(m);Dn(()=>{J&&(Te==null||Te())},[J,Te]);const we=(ze=me.arrow)==null?void 0:ze.x,S=(Pe=me.arrow)==null?void 0:Pe.y,Ie=((de=me.arrow)==null?void 0:de.centerOffset)!==0,[le,ie]=k.useState();return Dn(()=>{g&&ie(window.getComputedStyle(g).zIndex)},[g]),E.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:J?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:le,"--radix-popper-transform-origin":[(Ge=me.transformOrigin)==null?void 0:Ge.x,(Xe=me.transformOrigin)==null?void 0:Xe.y].join(" "),...((ot=me.hide)==null?void 0:ot.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(iv,{scope:n,placedSide:Ce,onArrowChange:P,arrowX:we,arrowY:S,shouldHideArrow:Ie,children:E.jsx($n.div,{"data-side":Ce,"data-align":A,...b,ref:C,style:{...b.style,animation:J?void 0:"none"}})})})});Jm.displayName=Ru;var e0="PopperArrow",av={top:"bottom",right:"left",bottom:"top",left:"right"},t0=k.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=sv(e0,r),a=av[s.placedSide];return E.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:E.jsx(tv,{...i,ref:n,style:{...i.style,display:"block"}})})});t0.displayName=e0;function ov(e){return e!==null}var uv=e=>({name:"transformOrigin",options:e,fn(t){var y,g,I;const{placement:n,rects:r,middlewareData:i}=t,a=((y=i.arrow)==null?void 0:y.centerOffset)!==0,o=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,c]=n0(n),d={start:"0%",center:"50%",end:"100%"}[c],p=(((g=i.arrow)==null?void 0:g.x)??0)+o/2,f=(((I=i.arrow)==null?void 0:I.y)??0)+u/2;let m="",b="";return l==="bottom"?(m=a?d:`${p}px`,b=`${-u}px`):l==="top"?(m=a?d:`${p}px`,b=`${r.floating.height+u}px`):l==="right"?(m=`${-u}px`,b=a?d:`${f}px`):l==="left"&&(m=`${r.floating.width+u}px`,b=a?d:`${f}px`),{data:{x:m,y:b}}}});function n0(e){const[t,n="center"]=e.split("-");return[t,n]}var lv=Km,cv=Zm,dv=Jm,hv=t0,fv="Portal",r0=k.forwardRef((e,t)=>{var o;const{container:n,...r}=e,[i,s]=k.useState(!1);Dn(()=>s(!0),[]);const a=n||i&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?F0.createPortal(E.jsx($n.div,{...r,ref:t}),a):null});r0.displayName=fv;function pv(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var vu=e=>{const{present:t,children:n}=e,r=mv(t),i=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),s=Er(r.ref,gv(i));return typeof n=="function"||r.isPresent?k.cloneElement(i,{ref:s}):null};vu.displayName="Presence";function mv(e){const[t,n]=k.useState(),r=k.useRef(null),i=k.useRef(e),s=k.useRef("none"),a=e?"mounted":"unmounted",[o,u]=pv(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const l=Ri(r.current);s.current=o==="mounted"?l:"none"},[o]),Dn(()=>{const l=r.current,c=i.current;if(c!==e){const p=s.current,f=Ri(l);e?u("MOUNT"):f==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&p!==f?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),Dn(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,d=f=>{const b=Ri(r.current).includes(CSS.escape(f.animationName));if(f.target===t&&b&&(u("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},p=f=>{f.target===t&&(s.current=Ri(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:k.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function Ri(e){return(e==null?void 0:e.animationName)||"none"}function gv(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function bv(e,t=globalThis==null?void 0:globalThis.document){const n=Bs(e);k.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Ev="DismissableLayer",_o="dismissableLayer.update",_v="dismissableLayer.pointerDownOutside",Tv="dismissableLayer.focusOutside",gd,i0=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),s0=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:o,...u}=e,l=k.useContext(i0),[c,d]=k.useState(null),p=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=k.useState({}),m=Er(t,B=>d(B)),b=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=b.indexOf(y),I=c?b.indexOf(c):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,v=I>=g,P=kv(B=>{const M=B.target,z=[...l.branches].some(L=>L.contains(M));!v||z||(i==null||i(B),a==null||a(B),B.defaultPrevented||o==null||o())},p),N=Av(B=>{const M=B.target;[...l.branches].some(L=>L.contains(M))||(s==null||s(B),a==null||a(B),B.defaultPrevented||o==null||o())},p);return bv(B=>{I===l.layers.size-1&&(r==null||r(B),!B.defaultPrevented&&o&&(B.preventDefault(),o()))},p),k.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(gd=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),bd(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=gd)}},[c,p,n,l]),k.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),bd())},[c,l]),k.useEffect(()=>{const B=()=>f({});return document.addEventListener(_o,B),()=>document.removeEventListener(_o,B)},[]),E.jsx($n.div,{...u,ref:m,style:{pointerEvents:C?v?"auto":"none":void 0,...e.style},onFocusCapture:mt(e.onFocusCapture,N.onFocusCapture),onBlurCapture:mt(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:mt(e.onPointerDownCapture,P.onPointerDownCapture)})});s0.displayName=Ev;var yv="DismissableLayerBranch",xv=k.forwardRef((e,t)=>{const n=k.useContext(i0),r=k.useRef(null),i=Er(t,r);return k.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),E.jsx($n.div,{...e,ref:i})});xv.displayName=yv;function kv(e,t=globalThis==null?void 0:globalThis.document){const n=Bs(e),r=k.useRef(!1),i=k.useRef(()=>{});return k.useEffect(()=>{const s=o=>{if(o.target&&!r.current){let u=function(){a0(_v,n,l,{discrete:!0})};const l={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Av(e,t=globalThis==null?void 0:globalThis.document){const n=Bs(e),r=k.useRef(!1);return k.useEffect(()=>{const i=s=>{s.target&&!r.current&&a0(Tv,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bd(){const e=new CustomEvent(_o);document.dispatchEvent(e)}function a0(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?JR(i,s):i.dispatchEvent(s)}var Na,Fs="HoverCard",[o0]=zm(Fs,[Ym]),Hs=Ym(),[Cv,Us]=o0(Fs),u0=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:s,openDelay:a=700,closeDelay:o=300}=e,u=Hs(t),l=k.useRef(0),c=k.useRef(0),d=k.useRef(!1),p=k.useRef(!1),[f,m]=VR({prop:r,defaultProp:i??!1,onChange:s,caller:Fs}),b=k.useCallback(()=>{clearTimeout(c.current),l.current=window.setTimeout(()=>m(!0),a)},[a,m]),y=k.useCallback(()=>{clearTimeout(l.current),!d.current&&!p.current&&(c.current=window.setTimeout(()=>m(!1),o))},[o,m]),g=k.useCallback(()=>m(!1),[m]);return k.useEffect(()=>()=>{clearTimeout(l.current),clearTimeout(c.current)},[]),E.jsx(Cv,{scope:t,open:f,onOpenChange:m,onOpen:b,onClose:y,onDismiss:g,hasSelectionRef:d,isPointerDownOnContentRef:p,children:E.jsx(lv,{...u,children:n})})};u0.displayName=Fs;var l0="HoverCardTrigger",c0=k.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,i=Us(l0,n),s=Hs(n);return E.jsx(cv,{asChild:!0,...s,children:E.jsx($n.a,{"data-state":i.open?"open":"closed",...r,ref:t,onPointerEnter:mt(e.onPointerEnter,fs(i.onOpen)),onPointerLeave:mt(e.onPointerLeave,fs(i.onClose)),onFocus:mt(e.onFocus,i.onOpen),onBlur:mt(e.onBlur,i.onClose),onTouchStart:mt(e.onTouchStart,a=>a.preventDefault())})})});c0.displayName=l0;var Ou="HoverCardPortal",[wv,Iv]=o0(Ou,{forceMount:void 0}),d0=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,s=Us(Ou,t);return E.jsx(wv,{scope:t,forceMount:n,children:E.jsx(vu,{present:n||s.open,children:E.jsx(r0,{asChild:!0,container:i,children:r})})})};d0.displayName=Ou;var hs="HoverCardContent",h0=k.forwardRef((e,t)=>{const n=Iv(hs,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,s=Us(hs,e.__scopeHoverCard);return E.jsx(vu,{present:r||s.open,children:E.jsx(Sv,{"data-state":s.open?"open":"closed",...i,onPointerEnter:mt(e.onPointerEnter,fs(s.onOpen)),onPointerLeave:mt(e.onPointerLeave,fs(s.onClose)),ref:t})})});h0.displayName=hs;var Sv=k.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,...o}=e,u=Us(hs,n),l=Hs(n),c=k.useRef(null),d=Er(t,c),[p,f]=k.useState(!1);return k.useEffect(()=>{if(p){const m=document.body;return Na=m.style.userSelect||m.style.webkitUserSelect,m.style.userSelect="none",m.style.webkitUserSelect="none",()=>{m.style.userSelect=Na,m.style.webkitUserSelect=Na}}},[p]),k.useEffect(()=>{if(c.current){const m=()=>{f(!1),u.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var y;((y=document.getSelection())==null?void 0:y.toString())!==""&&(u.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",m),()=>{document.removeEventListener("pointerup",m),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}},[u.isPointerDownOnContentRef,u.hasSelectionRef]),k.useEffect(()=>{c.current&&Rv(c.current).forEach(b=>b.setAttribute("tabindex","-1"))}),E.jsx(s0,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:mt(s,m=>{m.preventDefault()}),onDismiss:u.onDismiss,children:E.jsx(dv,{...l,...o,onPointerDown:mt(o.onPointerDown,m=>{m.currentTarget.contains(m.target)&&f(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0}),ref:d,style:{...o.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Nv="HoverCardArrow",Lv=k.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,i=Hs(n);return E.jsx(hv,{...i,...r,ref:t})});Lv.displayName=Nv;function fs(e){return t=>t.pointerType==="touch"?void 0:e()}function Rv(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var f0=u0,p0=c0,m0=d0,g0=h0;const b0=300,E0=180,vv=300,_0=140,Ov=_0+yd+4;function To(e,t){return{height:e,width:b0,layout:{background:{type:Id.Solid,color:Cd},textColor:Ad,fontFamily:kd,fontSize:xd},grid:{vertLines:{color:$i},horzLines:{color:$i}},crosshair:{mode:wd.Normal},rightPriceScale:{borderColor:qr,scaleMargins:{top:.05,bottom:.05}},timeScale:{borderColor:qr,timeVisible:!0,secondsVisible:!1,visible:t},handleScroll:{vertTouchDrag:!1}}}function Pv(e){return e.startsWith("rgba(")||e.startsWith("#")?e:e.startsWith("rgb(")?e.replace("rgb(","rgba(").replace(")",", 0.5)"):e}function Ed(e,t,n){const r=ji(e,To(E0,!0));r.addSeries(Ao,{upColor:zt,downColor:Gt,borderDownColor:Gt,borderUpColor:zt,wickDownColor:Gt,wickUpColor:zt}).setData(t.candles);const s=n.toLowerCase();if(s==="ema")for(const u of t.lineOverlays)u.label.toLowerCase().startsWith("ema")&&r.addSeries(An,{color:u.color,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(u.data);else{const u=t.lineOverlays.find(l=>l.label.toLowerCase()===s);u&&r.addSeries(An,{color:u.color,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(u.data);for(const l of t.bandOverlays)if(l.label.toLowerCase()===s){const c=Pv(l.color);r.addSeries(An,{color:c,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(l.upperData),r.addSeries(An,{color:c,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(l.lowerData)}}const a=t.candles.length,o=Math.min(50,a);return r.timeScale().setVisibleLogicalRange({from:a-o,to:a-1}),r}function Dv(e,t,n,r){const i=ji(e,To(_0,!1));i.addSeries(Ao,{upColor:zt,downColor:Gt,borderDownColor:Gt,borderUpColor:zt,wickDownColor:Gt,wickUpColor:zt}).setData(n.candles);const a=ji(t,{...To(yd,!0),rightPriceScale:{borderColor:qr,scaleMargins:{top:.1,bottom:.1}}});r.type==="macd"?(r.histogramData&&r.histogramData.length>0&&a.addSeries(V0,{priceFormat:{type:"price",precision:2,minMove:.01},priceLineVisible:!1,lastValueVisible:!1}).setData(r.histogramData),r.data.length>0&&a.addSeries(An,{color:r.color,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(r.data),r.signalData&&r.signalData.length>0&&a.addSeries(An,{color:"#ff9800",lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(r.signalData)):a.addSeries(An,{color:r.color,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(r.data);const o=n.candles.length,u=Math.min(50,o),l={from:o-u,to:o-1};return i.timeScale().setVisibleLogicalRange(l),a.timeScale().setVisibleLogicalRange(l),[i,a]}const Mv=k.memo(function({data:t,indicatorName:n,indicatorKind:r}){const i=k.useRef(null),s=k.useRef(null);k.useEffect(()=>{const l=i.current;if(!l||t.candles.length===0)return;if(r==="overlay"){const b=Ed(l,t,n);return()=>{b.remove()}}const c=n.toLowerCase(),d=t.subPanes.find(b=>b.label.toLowerCase()===c);if(!d){const b=Ed(l,t,n);return()=>{b.remove()}}const p=s.current;if(!p)return;const[f,m]=Dv(l,p,t,d);return()=>{f.remove(),m.remove()}},[t,n,r]);const a=r==="subpane",o=a?vv:b0,u=a?Ov:E0;return E.jsxs("div",{className:"overflow-hidden rounded-[4px] bg-[var(--color-surface-canvas)]",style:{width:o,height:u},children:[E.jsx("div",{ref:i,style:{width:o}}),a&&E.jsx("div",{ref:s,className:"mt-1",style:{width:o}})]})});function Bv({data:e,indicatorName:t,indicatorKind:n,children:r}){return E.jsxs(f0,{openDelay:300,closeDelay:100,children:[E.jsx(p0,{asChild:!0,children:r}),E.jsx(m0,{children:E.jsx(g0,{side:"top",align:"center",sideOffset:6,className:"z-[9998] overflow-hidden rounded-[2px] border border-[rgba(121,121,121,0.15)] bg-[var(--color-surface-canvas)] shadow-[0_8px_32px_rgba(0,0,0,0.6)]",children:E.jsx(Mv,{data:e,indicatorName:t,indicatorKind:n})})})]})}const Fv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAE/UlEQVR4nO1YW0xcRRj+Zs5eD8uyuyDXUiMVsUCJpl7iJVobKyleaIi3mvCoibExjTEhfZDoqokxXtBAok9GqalJjSkt+KA0VoigPogCQg0SJIRyv+yye/Z6zphzoJRl4ezuWVhe9ksmm/n239n/m5n/n38GSCONNNJIIwkQtS8HBwcNglFwAqyegBQKXi/4jIwIm93iGNg1gLTyAb6xsrIyuJ2POjUBfqPgpIQ0XNdJCFHaRuwWR0AKATT4jQIDcGY7H6maABBSvz7gHjVQUq/mouoKcJQr3Dw7lERq3m0uLKFIswBB8EYNnkqOMaC5ywfNAiyWzIi+1+tBRoYlZdwXvSvoHAlrF0CxxfKmiOsYFPD1716QTVssIQGpyjgbIfd/Gw+i6YobiOF8HAKiZ2e3uZE5hje/d0FkVMneZXl6zGkV4PG5NynaXW7KzeDsDCAgKuqQl0nxxjE9qrUKyMqwRfTdggtWPmtXOJdPgvPHRSz7iOK81UTxUZ0D++26JLbQFgGmlWv9Q0Tb4BwO5ulx9FYTHjpghG7NzhdieP2iCxMuCaAUJh3BByccuNmuV3U+pgC6RYBp4abcIs7/JUFiBH2TYfRNetDU7UV5HsFjZT70/BfAP3OiEg8cAd4+bkNlviGm8zEF7FR2uTDohySvyAYzkQED03JbO8jWgvml+zg8WGKKy/mYAtx+V5RjiXIhEbg4FFp38EQFxdgiw8AMgyRF/t8Ld1LUVnJR42kWYOcdEf1l3xJsZntCXMdVP9xBOacDRVkcGo5mgxJgySehY3gJPeMcRubCqK0w4ZX7LXD5o8fb0y307YB/ffbrDmWAk70H4OA5PFnOof6wPeZ4alA96uQMsbHJs6h8MoqmbgFHPl9Ecy+DKG1td3VGwvCspASnUU9RW27e0o7E4jQL2KZGb/nVh3P9AfjCBJeGCV6+4IIrwKLszv+9NvuE4sgBCpuZ03YnUIHqt/0Tf8q3oQi0DQHNPdG2RVbgnWpg39pZ5QkAz58DAmvFZHMtUHYTNKGq+A6iKQayzZH/+M3APFp6lTVWUJrD4d95EbLKyRXgtXaKj5/IxD7bMn4esyAgehXbijwdbs8NwWHKiRhv0T8fF7cjW6h7PIQPf6FgchBSgsPFBpx91o7GRwlMBqpwS0GGF9vcuDxK8N2QX+Hk9lyVOblrZbIncf9MGGd+ECAxKpcpKM3m8EmNVTnyHy6R+1k43eHBgk+Sr4B4r2v193LwZpkIjt9mwkrIo/lkTyoLjS4ynGoX4BPlrUNRbNPhs6eyYDVyq1mCEFTlGdD6tA23OHTrQXu91ZXzMHKrdpuzC4mTU/dRBZdHhtir7RwWhNW+3czw6ePieqBuhicINHZy6JtaHVbeQWefCaMg8maaMA7mVxBNAu5uGWVKhQgg00jQVBPCvQWRgT0fmEWOMXe9HxIZ3upaxE9jOpysNOLUPaYt7RLhcmw52rLQhHzXkA8hHdBSY8H+7IXooFLK9xucQUdw+gER7x7NUbVLiEumlJDL2/eP8birSI+5QOpe5uJFzDux8xEe1SWGlL9KxAtVqc4ro+zkIfV3mVSgNLtMWxC7Pe6IUmI2OI1cQz5SzVktVm1BTAiZIiAFe/k2ysCm1XxU3WwU9KtkSoCdaBT0SzUfVVeA5/lGwS/IQ8lP3AWpyDjkBneNgbXyZr5Rzcc00kgjjTSQDP4H+Yvkqb5uHfkAAAAASUVORK5CYII=";function T0({size:e=18}){return E.jsx("img",{src:Fv,width:e,height:e,alt:"","aria-hidden":"true"})}function Hv(e,t){const n=t.toLowerCase();return n==="ema"?e.lineOverlays.some(r=>r.label.toLowerCase().startsWith("ema")):e.lineOverlays.some(r=>r.label.toLowerCase()===n)||e.bandOverlays.some(r=>r.label.toLowerCase()===n)||e.subPanes.some(r=>r.label.toLowerCase()===n)}function Uv({name:e,children:t}){const n=xo(),r=ko(),i=(e==null?void 0:e.toLowerCase().trim().replace(/^user-content-/,""))??"",s=UR(i);if(!HR.has(i)||!s)return E.jsx(E.Fragment,{children:t});let a;if(n&&(a=n.find(u=>Hv(u,i))),!a)return E.jsx(E.Fragment,{children:t});const o=()=>{!r||!a||r.open({symbol:a.symbol,interval:a.interval,focus:{kind:"indicator",name:i}})};return E.jsxs("span",{className:"inline-flex items-center gap-1",children:[E.jsx("span",{className:"font-semibold text-[#42a5f5]",children:t}),E.jsx(Bv,{data:a,indicatorName:i,indicatorKind:s.kind,children:E.jsx("span",{onClick:o,className:"cursor-pointer",children:E.jsx(T0,{})})})]})}const La=300,_d=180,$v="#ffeb3b",jv=k.memo(function({data:t,price:n,side:r}){const i=k.useRef(null);return k.useEffect(()=>{const s=i.current;if(!s||t.candles.length===0)return;const a=ji(s,{height:_d,width:La,layout:{background:{type:Id.Solid,color:Cd},textColor:Ad,fontFamily:kd,fontSize:xd},grid:{vertLines:{color:$i},horzLines:{color:$i}},crosshair:{mode:wd.Normal},rightPriceScale:{borderColor:qr,scaleMargins:{top:.05,bottom:.05}},timeScale:{borderColor:qr,timeVisible:!0,secondsVisible:!1},handleScroll:{vertTouchDrag:!1}}),o=a.addSeries(Ao,{upColor:zt,downColor:Gt,borderDownColor:Gt,borderUpColor:zt,wickDownColor:Gt,wickUpColor:zt});o.setData(t.candles);const u=t.candles.length,l=Math.min(50,u),c=u-l,d=u-1;a.timeScale().setVisibleLogicalRange({from:c,to:d});const p=t.candles.slice(c,d+1),f=Math.min(...p.map(I=>I.low)),m=Math.max(...p.map(I=>I.high)),b=m-f||m*.01;if((n>m?n-m:n<f?f-n:0)>0){const I=b*.08,C=Math.min(f,n)-I,v=Math.max(m,n)+I;o.applyOptions({autoscaleInfoProvider:()=>({priceRange:{minValue:C,maxValue:v}})})}const g=r==="support"?Mu:r==="resistance"?Bu:$v;o.createPriceLine({price:n,color:g,lineWidth:2,lineStyle:Fu.Solid,axisLabelVisible:!0,title:""});for(const I of t.levels){if(Math.abs(I.price-n)<1e-4)continue;const C=I.side==="support"?Mu:Bu;o.createPriceLine({price:I.price,color:C+"55",lineWidth:1,lineStyle:Fu.Dashed,axisLabelVisible:!1,title:""})}return()=>{a.remove()}},[t,n,r]),E.jsx("div",{className:"overflow-hidden rounded-[4px] bg-[var(--color-surface-canvas)]",style:{width:La,height:_d},children:E.jsx("div",{ref:i,style:{width:La}})})});function Vv({data:e,price:t,side:n,children:r}){return E.jsxs(f0,{openDelay:300,closeDelay:100,children:[E.jsx(p0,{asChild:!0,children:r}),E.jsx(m0,{children:E.jsx(g0,{side:"top",align:"center",sideOffset:6,className:"z-[9998] overflow-hidden rounded-[2px] border border-[rgba(121,121,121,0.15)] bg-[var(--color-surface-canvas)] shadow-[0_8px_32px_rgba(0,0,0,0.6)]",children:E.jsx(jv,{data:e,price:t,side:n})})})]})}const zv=.005;function Gv(e){if(!e)return null;const t=e.replace(/[,_\s$]/g,""),n=Number.parseFloat(t);return Number.isFinite(n)?n:null}function Wv(e,t){const n=t*zv,r=e.find(s=>s.levels.some(a=>Math.abs(a.price-t)<=n));if(r){const s=r.levels.find(a=>Math.abs(a.price-t)<=n);return{data:r,level:s}}const i=e.find(s=>{if(s.candles.length===0)return!1;const a=s.candles.flatMap(l=>[l.low,l.high]),o=Math.min(...a),u=Math.max(...a);return t>=o*.9&&t<=u*1.1});return i?{data:i}:null}function qv({price:e,children:t}){var u;const n=xo(),r=ko(),i=Gv(e);if(i===null||!n)return E.jsx(E.Fragment,{children:t});const s=Wv(n,i);if(!s)return E.jsx(E.Fragment,{children:t});const a=(u=s.level)==null?void 0:u.side,o=()=>{r&&r.open({symbol:s.data.symbol,interval:s.data.interval,focus:{kind:"level",price:i}})};return E.jsxs("span",{className:"inline-flex items-center gap-1",children:[E.jsx("span",{className:"font-semibold text-[#42a5f5]",children:t}),E.jsx(Vv,{data:s.data,price:i,side:a,children:E.jsx("span",{onClick:o,className:"cursor-pointer",children:E.jsx(T0,{})})})]})}function Yv({symbol:e,interval:t,indicators:n,children:r}){const{data:i,loading:s,error:a}=$0(e,t,n),o=xo(),u=ko();k.useEffect(()=>{i&&o&&o.set(j0(e,t,n),i)},[i,o,e,t,n]);const l=t?`${e.toUpperCase()} · ${t}`:e.toUpperCase(),c=()=>{i&&u&&u.open({symbol:i.symbol,interval:i.interval})},d=!i||s||!!a,p=E.jsxs("button",{type:"button",onClick:c,disabled:d,"aria-label":`Open ${l} chart`,className:"my-1.5 inline-flex items-center gap-1.5 px-2 py-1 rounded-[4px] bg-[var(--color-surface-base)] border border-[var(--color-border-default)] text-footnote transition-colors duration-fast ease-out "+(d?"text-[var(--color-text-secondary)] cursor-default opacity-70":"text-[var(--color-text-primary)] cursor-pointer hover:border-[var(--color-brand-default)] hover:text-[var(--color-brand-default)] focus-visible:border-[var(--color-brand-default)] focus-visible:text-[var(--color-brand-default)]"),children:[E.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[E.jsx("path",{d:"M3 3v18h18"}),E.jsx("path",{d:"M7 14l4-4 4 4 5-5"})]}),E.jsx("span",{children:s?"Loading chart…":a?`${l} (unavailable)`:l}),!d&&E.jsx("span",{"aria-hidden":"true",children:"→"})]});return E.jsxs(E.Fragment,{children:[r,p]})}const Qv={pct:["dir"],price:[],pnl:["dir"],lev:[],side:["dir"],tag:["type"],risk:["level"],verdict:["type"],chart:["symbol","interval","indicators","levels","focus-time","focus-price"],ind:["name"],lvl:["price"]},Kv={pct:({dir:e,children:t})=>E.jsx("span",{className:e==="up"?"trade-pct-up":"trade-pct-down",children:t}),price:({children:e})=>E.jsx("span",{className:"trade-price",children:e}),pnl:({dir:e,children:t})=>E.jsx("span",{className:e==="up"?"trade-pnl-up":"trade-pnl-down",children:t}),lev:({children:e})=>E.jsx("span",{className:"trade-leverage",children:e}),side:({dir:e,children:t})=>E.jsx("span",{className:e==="long"?"trade-long":"trade-short",children:t}),tag:({type:e,children:t})=>E.jsx("span",{className:`trade-tag trade-tag-${e??"entry"}`,children:t}),risk:({level:e,children:t})=>E.jsx("span",{className:`trade-risk trade-risk-${e??"medium"}`,children:t}),verdict:({type:e,children:t})=>E.jsx("span",{className:`trade-verdict trade-verdict-${e??"neutral"}`,children:t}),ind:({name:e,children:t})=>E.jsx(Uv,{name:e,children:t}),lvl:({price:e,children:t})=>E.jsx(qv,{price:e,children:t}),chart:({children:e,...t})=>E.jsx(Yv,{symbol:String(t.symbol??""),interval:t.interval?String(t.interval):void 0,indicators:t.indicators?String(t.indicators):void 0,children:e})},Xv={table:({children:e})=>E.jsx("div",{className:"overflow-x-auto my-3",children:E.jsx("table",{className:"w-full border-collapse text-body-md border border-white/[0.08] rounded-[4px]",children:e})}),th:({children:e})=>E.jsx("th",{className:"px-3 py-1.5 text-left text-label-sm uppercase tracking-wider text-slate-400 border-b border-white/10 bg-white/5",children:e}),td:({children:e})=>E.jsx("td",{className:"px-3 py-1.5 text-left text-body-md tabular-nums border-b border-white/[0.06]",children:e})},Zv={code:MR},Jv={...Kv,...Xv},eO={enabled:!0,renderModal:({isOpen:e,onClose:t,onConfirm:n,url:r})=>e?E.jsx(BR,{url:r,onClose:t,onConfirm:n}):null},tO=["ind","lvl"];function nO({content:e,streaming:t}){return E.jsx(FR,{children:E.jsx("div",{className:"chat-md",children:E.jsx(Hp,{mode:t?"streaming":"static",components:Jv,allowedTags:Qv,literalTagContent:tO,plugins:Zv,linkSafety:eO,isAnimating:t,caret:"block",children:e})})})}const EO=Object.freeze(Object.defineProperty({__proto__:null,StreamingMarkdown:nO},Symbol.toStringTag,{value:"Module"})),rO=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:Up},Symbol.toStringTag,{value:"Module"}));export{Nw as A,pO as L,at as R,EO as S};
282
+ \v\f…\u2028\u2029])`),t));else if(u==="posix")if(!i&&(c==="graph"||c==="print")){if(r==="strict")throw new Error(`POSIX class "${c}" requires min target ES2024 or non-strict accuracy`);let d={graph:"!-~",print:" -~"}[c];l&&(d=`\0-${ve(d.codePointAt(0)-1)}${ve(d.codePointAt(2)+1)}-􏿿`),n(ke(Ht(`[${d}]`),t))}else n(ke(wa(Ht(XL.get(c)),l),t));else if(u==="property")Su.has(Ps(c))||(e.key="sc");else if(u==="space")n(tn(Xn("space",{negate:l}),t));else if(u==="word")n(ke(wa(Ht(Ft),l),t));else throw new Error(`Unexpected character set kind "${u}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:s,removeAllNextSiblings:a}){const{kind:o,flags:u}=e;if(o==="flags")if(!u.enable&&!u.disable)r();else{const l=Tt({flags:u});l.body[0].body=a(),i(ke(l,t),{traverse:!0})}else if(o==="keep"){const l=n.body[0],d=n.body.length===1&&Am(l,{type:"Group"})&&l.body[0].body.length===1?l.body[0]:n;if(t.parent!==d||d.body.length>1)throw new Error(te`Uses "\K" in a way that's unsupported`);const p=kn({behind:!0});p.body[0].body=s(),i(ke(p,t))}else throw new Error(`Unexpected directive kind "${o}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t!=null&&t.extended&&delete t.extended,n!=null&&n.extended&&delete n.extended,t!=null&&t.dotAll&&(n!=null&&n.dotAll)&&delete t.dotAll,t!=null&&t.ignoreCase&&(n!=null&&n.ignoreCase)&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:r}=e;if(r==="fail")n(ke(kn({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=Tt();t.body[0].body.push(e.body),e.body=ke(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,i=!1;for(const s of e.body)if(s.body.length===1&&s.body[0].kind==="search_start")s.body.pop();else{const a=Um(s.body);a?(r=!0,Array.isArray(a)?n.push(...a):n.push(a)):i=!0}r&&!i&&n.forEach(s=>t.add(s))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(te`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Ca(n)&&(n=Aa(n,t),e.ref=n)}},tR={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:s})=>s)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:s,multiplexCapturesToLeftByRef:a,openRefs:o,reffedNodesByReferencer:u}){const l=i.get(e);if(l&&o.has(e.number)){const d=tn(ld(e.number),t);u.set(d,o.get(e.number)),n(d);return}o.set(e.number,e),a.set(e.number,[]),e.name&&ni(a,e.name,[]);const c=a.get(e.name??e.number);for(let d=0;d<c.length;d++){const p=c[d];if(l===p.node||l&&l===p.origin||e===p.origin){c.splice(d,1);break}}if(a.get(e.number).push({node:e,origin:l}),e.name&&a.get(e.name).push({node:e,origin:l}),e.name){const d=ni(s,e.name,new Map);let p=!1;if(l)p=!0;else for(const f of d.values())if(!f.hasDuplicateNameToRemove){p=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:p})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=cs(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:i,ref:s}=e;if(i){let c=t;for(;(c=c.parent)&&!(c.type==="CapturingGroup"&&(c.name===s||c.number===s)););r.reffedNodesByReferencer.set(e,c);return}const a=r.subroutineRefMap.get(s),o=s===0,u=o?ld(0):Bm(a,r.groupOriginByCopy,null);let l=u;if(!o){const c=Fm(sR(a,p=>p.type==="Group"&&!!p.flags)),d=c?cs(r.globalFlags,c):r.globalFlags;rR(d,r.currentFlags)||(l=Tt({flags:aR(d)}),l.body[0].body.push(u))}n(ke(l,t),{traverse:!o})}},nR={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const s=r.reffedNodesByReferencer.get(e).filter(a=>iR(a,e));if(!s.length)n(ke(kn({negate:!0}),t));else if(s.length>1){const a=Tt({atomic:!0,body:s.reverse().map(o=>Pn({body:[po(o.number)]}))});n(ke(a,t))}else e.ref=s[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r<n;r++){const i=wm();e.body.at(-1).body.push(i)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function Mm(e){Wr(e,{"*"({node:t,parent:n}){t.parent=n}})}function rR(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function iR(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=Hm(n.parent);for(const i of r){if(i===n)break;if(i===e||$m(i,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function Bm(e,t,n,r){const i=Array.isArray(e)?[]:{};for(const[s,a]of Object.entries(e))s==="parent"?i.parent=Array.isArray(n)?r:n:a&&typeof a=="object"?i[s]=Bm(a,t,i,n):(s==="type"&&a==="CapturingGroup"&&t.set(i,t.get(e)??e),i[s]=a);return i}function ld(e){const t=Sm(e);return t.isRecursive=!0,t}function sR(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Aa(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function Fm(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(i=>{var s,a;(s=r.enable)!=null&&s[i]&&(delete n.disable[i],n.enable[i]=!0),(a=r.disable)!=null&&a[i]&&(n.disable[i]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function aR({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function Hm(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function Um(e){const t=e.find(n=>n.kind==="search_start"||lR(n,{negate:!1})||!oR(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const r of t.body){const i=Um(r.body);if(!i)return null;Array.isArray(i)?n.push(...i):n.push(i)}return n}return null}function $m(e,t){const n=Hm(e)??[];for(const r of n)if(r===t||$m(r,t))return!0;return!1}function oR({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function uR(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function lR(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&Am(e.body[0],{type:"Assertion",kind:"search_start"})}function Ca(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Ht(e,t){const r=Cm(e,{...t,unicodePropertyMap:Su}).body;return r.length>1||r[0].body.length>1?Tt({body:r}):r[0].body[0]}function wa(e,t){return e.negate=t,e}function tn(e,t){return e.parent=t,e}function ke(e,t){return Mm(e),e.parent=t,e}function cR(e,t){const n=Om(t),r=bo(n.target,"ES2024"),i=bo(n.target,"ES2025"),s=n.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let a=null,o=null;if(!i){const f=[e.flags.ignoreCase];Wr(e,dR,{getCurrentModI:()=>f.at(-1),popModI(){f.pop()},pushModI(m){f.push(m)},setHasCasedChar(){f.at(-1)?a=!0:o=!0}})}const u={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||a)&&!o)};let l=e;const c={accuracy:n.accuracy,appliedGlobalFlags:u,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!i&&a&&o),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(f){return c.lastNode=l,l=f,zL(hR[f.type],`Unexpected node type "${f.type}"`)(f,c,d)}const p={pattern:e.body.map(d).join("|"),flags:d(e.flags),options:{...e.options}};return r||(delete p.options.force.v,p.options.disable.v=!0,p.options.unicodeSetsPlugin=null),p._captureTransfers=new Map,p._hiddenCaptures=[],c.captureMap.forEach((f,m)=>{f.hidden&&p._hiddenCaptures.push(m),f.transferTo&&ni(p._captureTransfers,f.transferTo,[]).push(m)}),p}var dR={"*":{enter({node:e},t){if(dd(e)){const n=t.getCurrentModI();t.pushModI(e.flags?cs({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){dd(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){Nu(ve(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),jm(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&Dm.has(e.value)&&t.setHasCasedChar()}},hR={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?te`\B`:te`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:r,name:i,number:s}=e,a={ignoreCase:t.currentFlags.ignoreCase},o=t.originMap.get(e);return o&&(a.hidden=!0,s>o.number&&(a.transferTo=o.number)),t.captureMap.set(s,a),`(${i?`?<${i}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=ve(e),r=qn(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Nu(n)){const i=Pm(n);return t.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:i,parent:s}=e;let{body:a}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");xt.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&a.some(hd)&&(a=[Os(45),...a.filter(l=>!hd(l))]);const o=()=>`[${i?"^":""}${a.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||xt.bugNestedClassIgnoresNegation)&&!i){const c=a.filter(d=>d.type==="CharacterClass"&&d.kind==="union"&&d.negate);if(c.length){const d=Tt(),p=d.body[0];return d.parent=s,p.parent=d,a=a.filter(f=>!c.includes(f)),e.body=a,a.length?(e.parent=p,p.body.push(e)):d.body.pop(),c.forEach(f=>{const m=Pn({body:[f]});f.parent=m,m.parent=d,d.body.push(m)}),n(d)}}t.inCharClass=!0;const l=o();return t.inCharClass=!1,l}const u=a[0];if(r==="union"&&!i&&u&&((!t.useFlagV||!t.verbose)&&s.kind==="union"&&!(xt.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&s.kind==="intersection"&&a.length===1&&u.type!=="CharacterClassRange"))return a.map(n).join("");if(!t.useFlagV&&s.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return o()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=qn(n,i),a=qn(r,i),o=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const u=jm(e);bR(u).forEach(c=>{o.add(Array.isArray(c)?`${qn(c[0],i)}-${qn(c[1],i)}`:qn(c,i))})}return`${s}-${a}${[...o].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":te`[^\n]`;if(e==="digit")return t?te`\D`:te`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&Dm.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?te`\P`:te`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?te`\W`:te`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},i,s){const a=i.currentFlags;n&&(i.currentFlags=cs(a,n));const o=t.map(s).join("|"),u=!i.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!i.useFlagMods||!n)?o:`(?${ER(e,n,i.useFlagMods)}${o})`;return i.currentFlags=a,u},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(i).join("|")})`},Quantifier(e,t,n){return n(e.body)+_R(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:te`\g<${t}&R=${r}>`}},fR=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),pR=new Set(["-","\\","]","^","["]),mR=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),cd=new Map([[9,te`\t`],[10,te`\n`],[11,te`\v`],[12,te`\f`],[13,te`\r`],[8232,te`\u2028`],[8233,te`\u2029`],[65279,te`\uFEFF`]]),gR=new RegExp("^\\p{Cased}$","u");function Nu(e){return gR.test(e)}function jm(e,t){const n=!!(t!=null&&t.firstOnly),r=e.min.value,i=e.max.value,s=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return s;for(let a=r;a<=i;a++){const o=ve(a);if(!Nu(o))continue;const u=Pm(o).filter(l=>{const c=l.codePointAt(0);return c<r||c>i});if(u.length&&(s.push(...u),n))break}return s}function qn(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(cd.has(e))return cd.get(e);if(e<32||e>126&&e<160||e>262143||t&&TR(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=n?r?mR:pR:fR,s=ve(e);return(i.has(s)?"\\":"")+s}function bR(e){const t=e.map(i=>i.codePointAt(0)).sort((i,s)=>i-s),n=[];let r=null;for(let i=0;i<t.length;i++)t[i+1]===t[i]+1?r??(r=t[i]):r===null?n.push(t[i]):(n.push([r,t[i]]),r=null);return n}function ER(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:i,disable:s}=t;r=(i!=null&&i.ignoreCase?"i":"")+(i!=null&&i.dotAll?"s":"")+(s?"-":"")+(s!=null&&s.ignoreCase?"i":"")+(s!=null&&s.dotAll?"s":"")}return`${r}:`}function _R({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function dd({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function TR(e){return e>47&&e<58}function hd({type:e,value:t}){return e==="Character"&&t===45}var rn,Ut,Sn,sn,Nn,ri,Eo,un,yR=(un=class extends RegExp{constructor(n,r,i){var t=(...JO)=>(super(...JO),gn(this,ri),gn(this,rn,new Map),gn(this,Ut,null),gn(this,Sn),gn(this,sn,null),gn(this,Nn,null),O(this,"rawOptions",{}),this);const s=!!(i!=null&&i.lazyCompile);if(n instanceof RegExp){if(i)throw new Error("Cannot provide options when copying a regexp");const a=n;t(a,r),Et(this,Sn,a.source),a instanceof un&&(Et(this,rn,We(a,rn)),Et(this,sn,We(a,sn)),Et(this,Nn,We(a,Nn)),this.rawOptions=a.rawOptions)}else{const a={hiddenCaptures:[],strategy:null,transfers:[],...i};t(s?"":n,r),Et(this,Sn,n),Et(this,rn,kR(a.hiddenCaptures,a.transfers)),Et(this,Nn,a.strategy),this.rawOptions=i??{}}s||Et(this,Ut,this)}get source(){return We(this,Sn)||"(?:)"}exec(n){if(!We(this,Ut)){const{lazyCompile:s,...a}=this.rawOptions;Et(this,Ut,new un(We(this,Sn),this.flags,a))}const r=this.global||this.sticky,i=this.lastIndex;if(We(this,Nn)==="clip_search"&&r&&i){this.lastIndex=0;const s=js(this,ri,Eo).call(this,n.slice(i));return s&&(xR(s,i,n,this.hasIndices),this.lastIndex+=i),s}return js(this,ri,Eo).call(this,n)}},rn=new WeakMap,Ut=new WeakMap,Sn=new WeakMap,sn=new WeakMap,Nn=new WeakMap,ri=new WeakSet,Eo=function(n){We(this,Ut).lastIndex=this.lastIndex;const r=Du(un.prototype,this,"exec").call(We(this,Ut),n);if(this.lastIndex=We(this,Ut).lastIndex,!r||!We(this,rn).size)return r;const i=[...r];r.length=1;let s;this.hasIndices&&(s=[...r.indices],r.indices.length=1);const a=[0];for(let o=1;o<i.length;o++){const{hidden:u,transferTo:l}=We(this,rn).get(o)??{};if(u?a.push(null):(a.push(r.length),r.push(i[o]),this.hasIndices&&r.indices.push(s[o])),l&&i[o]!==void 0){const c=a[l];if(!c)throw new Error(`Invalid capture transfer to "${c}"`);if(r[c]=i[o],this.hasIndices&&(r.indices[c]=s[o]),r.groups){We(this,sn)||Et(this,sn,AR(this.source));const d=We(this,sn).get(l);d&&(r.groups[d]=i[o],this.hasIndices&&(r.indices.groups[d]=s[o]))}}}return r},un);function xR(e,t,n,r){if(e.index+=t,e.input=n,r){const i=e.indices;for(let a=0;a<i.length;a++){const o=i[a];o&&(i[a]=[o[0]+t,o[1]+t])}const s=i.groups;s&&Object.keys(s).forEach(a=>{const o=s[a];o&&(s[a]=[o[0]+t,o[1]+t])})}}function kR(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,i]of t)for(const s of i)ni(n,s,{}).transferTo=r;return n}function AR(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,i=0,s;for(;s=t.exec(e);){const{0:a,groups:{capture:o,name:u}}=s;a==="["?r++:r?a==="]"&&r--:o&&(i++,u&&n.set(i,u))}return n}function CR(e,t){const n=wR(e,t);return n.options?new yR(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function wR(e,t){const n=Om(t),r=Cm(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:Su}),i=JL(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),s=cR(i,n),a=jL(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),o=UL(a.pattern),u=HL(o.pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),l={pattern:u.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const c=u.hiddenCaptures.sort((m,b)=>m-b),d=Array.from(u.captureTransfers),p=i._strategy,f=l.pattern.length>=n.lazyCompileLength;(c.length||d.length||p||f)&&(l.options={...c.length&&{hiddenCaptures:c},...d.length&&{transfers:d},...p&&{strategy:p},...f&&{lazyCompile:f}})}return l}const fd=4294967295;class IR{constructor(t,n={}){O(this,"regexps");this.patterns=t,this.options=n;const{forgiving:r=!1,cache:i,regexConstructor:s}=n;if(!s)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(a=>{if(typeof a!="string")return a;const o=i==null?void 0:i.get(a);if(o){if(o instanceof RegExp)return o;if(r)return null;throw o}try{const u=s(a);return i==null||i.set(a,u),u}catch(u){if(i==null||i.set(a,u),r)return null;throw u}})}findNextMatchSync(t,n,r){const i=typeof t=="string"?t:t.content,s=[];function a(o,u,l=0){return{index:o,captureIndices:u.indices.map(c=>c==null?{start:fd,end:fd,length:0}:{start:c[0]+l,end:c[1]+l,length:c[1]-c[0]})}}for(let o=0;o<this.regexps.length;o++){const u=this.regexps[o];if(u)try{u.lastIndex=n;const l=u.exec(i);if(!l)continue;if(l.index===n)return a(o,l,0);s.push([o,l,0])}catch(l){if(this.options.forgiving)continue;throw l}}if(s.length){const o=Math.min(...s.map(u=>u[1].index));for(const[u,l,c]of s)if(l.index===o)return a(u,l,c)}return null}}function SR(e,t){return CR(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function NR(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||(t.regexConstructor=n=>SR(n,{target:t.target})),{createScanner(n){return new IR(n,t)},createString(n){return{content:n}}}}var LR=NR({forgiving:!0}),RR=Object.fromEntries(ku.flatMap(e=>{var t;return((t=e.aliases)!=null?t:[]).map(n=>[n,e.id])})),Ui=new Set(Object.keys(bm)),pd=e=>{let t=e.trim().toLowerCase();return RR[t]||(Ui.has(t),t)},Ia=new Map,Sa=new Map,Yn=new Map,ds=e=>{var t;return typeof e=="string"?e:(t=e.name)!=null?t:"custom"},vR=(e,t)=>`${e}-${ds(t[0])}-${ds(t[1])}`,OR=(e,t,n)=>{let r=e.slice(0,100),i=e.length>100?e.slice(-100):"";return`${t}:${n[0]}:${n[1]}:${e.length}:${r}:${i}`},PR=(e,t)=>{let n=vR(e,t);if(Ia.has(n))return Ia.get(n);let r=VN({themes:t,langs:[e],engine:LR});return Ia.set(n,r),r};function DR(e={}){var t;let n=(t=e.themes)!=null?t:["github-light","github-dark"];return{name:"shiki",type:"code-highlighter",supportsLanguage(r){let i=pd(r);return Ui.has(i)},getSupportedLanguages(){return Array.from(Ui)},getThemes(){return n},highlight({code:r,language:i,themes:s},a){let o=pd(i),u=[ds(s[0]),ds(s[1])],l=OR(r,o,u);if(Sa.has(l))return Sa.get(l);a&&(Yn.has(l)||Yn.set(l,new Set),Yn.get(l).add(a));let c=Ui.has(o)?o:"text";return PR(c,s).then(d=>{let p=d.getLoadedLanguages().includes(o)?o:"text",f=d.codeToTokens(r,{lang:p,themes:{light:u[0],dark:u[1]}});Sa.set(l,f);let m=Yn.get(l);if(m){for(let b of m)b(f);Yn.delete(l)}}).catch(d=>{console.error("[Streamdown Code] Failed to highlight code:",d),Yn.delete(l)}),null}}}var MR=DR();const BR=k.memo(function({url:t,onClose:n,onConfirm:r}){return k.useEffect(()=>{const i=s=>{s.key==="Enter"&&(s.preventDefault(),r())};return window.addEventListener("keydown",i,!0),()=>window.removeEventListener("keydown",i,!0)},[r]),E.jsxs(H0,{open:!0,title:"External Link",onClose:n,width:600,children:[E.jsx("div",{className:"text-body-sm text-[var(--color-brand-default)] break-all bg-[var(--color-surface-canvas)] rounded-[4px] px-3.5 py-2.5 border border-[var(--color-border-subtle)]",children:t}),E.jsxs("div",{className:"flex justify-end gap-2.5 mt-4",children:[E.jsx("button",{onClick:n,className:"bg-transparent border border-[var(--color-border-default)] rounded-[4px] px-5 py-2 text-[var(--color-text-secondary)] text-body-sm cursor-pointer transition-colors duration-base ease-out hover:bg-white/5 focus-visible:bg-white/5",children:"Cancel"}),E.jsx("button",{onClick:r,className:"bg-[var(--color-brand-subtle)] border border-[var(--color-brand-soft)] rounded-[4px] px-5 py-2 text-[var(--color-brand-default)] text-body-sm-medium cursor-pointer transition-colors duration-base ease-out hover:bg-[var(--color-brand-soft)] focus-visible:bg-[var(--color-brand-soft)]",children:"Open in new tab"})]})]})});function FR({children:e}){const[t,n]=k.useState(()=>new Map),r=k.useCallback(a=>t.get(a),[t]),i=k.useCallback(a=>{for(const o of t.values())if(a(o))return o},[t]),s=k.useCallback((a,o)=>{n(u=>{if(u.get(a)===o)return u;const l=new Map(u);return l.set(a,o),l})},[]);return E.jsx(U0.Provider,{value:{get:r,find:i,set:s},children:e})}const Vm={ema:{kind:"overlay",label:"EMA",color:"#f5c842"},bb:{kind:"overlay",label:"Bollinger Bands",color:"#7c4dff"},ichimoku:{kind:"overlay",label:"Ichimoku Cloud",color:"var(--color-success-default)"},keltner:{kind:"overlay",label:"Keltner Channel",color:"#ff7043"},rsi:{kind:"subpane",label:"RSI",color:"#ab47bc"},macd:{kind:"subpane",label:"MACD",color:"#42a5f5"},adx:{kind:"subpane",label:"ADX",color:"#ffa726"},stochrsi:{kind:"subpane",label:"StochRSI",color:"#ba68c8"},obv:{kind:"subpane",label:"OBV",color:"#4fc3f7"},williamsr:{kind:"subpane",label:"WilliamsR",color:"#ec407a"},cci:{kind:"subpane",label:"CCI",color:"#9ccc65"},atr:{kind:"subpane",label:"ATR",color:"#ffd54f"},vwap:{kind:"overlay",label:"VWAP",color:"#80deea"}},HR=new Set(Object.keys(Vm));function UR(e){return Vm[e.toLowerCase()]}function mt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function zm(e,t=[]){let n=[];function r(s,a){const o=k.createContext(a),u=n.length;n=[...n,a];const l=d=>{var g;const{scope:p,children:f,...m}=d,b=((g=p==null?void 0:p[e])==null?void 0:g[u])||o,y=k.useMemo(()=>m,Object.values(m));return E.jsx(b.Provider,{value:y,children:f})};l.displayName=s+"Provider";function c(d,p){var b;const f=((b=p==null?void 0:p[e])==null?void 0:b[u])||o,m=k.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[l,c]}const i=()=>{const s=n.map(a=>k.createContext(a));return function(o){const u=(o==null?void 0:o[e])||s;return k.useMemo(()=>({[`__scope${e}`]:{...o,[e]:u}}),[o,u])}};return i.scopeName=e,[r,$R(i,...t)]}function $R(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=r.reduce((o,{useScope:u,scopeName:l})=>{const d=u(s)[`__scope${l}`];return{...o,...d}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Dn=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},jR=S0[" useInsertionEffect ".trim().toString()]||Dn;function VR({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,a]=zR({defaultProp:t,onChange:n}),o=e!==void 0,u=o?e:i;{const c=k.useRef(e!==void 0);k.useEffect(()=>{const d=c.current;d!==o&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=o},[o,r])}const l=k.useCallback(c=>{var d;if(o){const p=GR(c)?c(e):c;p!==e&&((d=a.current)==null||d.call(a,p))}else s(c)},[o,e,s,a]);return[u,l]}function zR({defaultProp:e,onChange:t}){const[n,r]=k.useState(e),i=k.useRef(n),s=k.useRef(t);return jR(()=>{s.current=t},[t]),k.useEffect(()=>{var a;i.current!==n&&((a=s.current)==null||a.call(s,n),i.current=n)},[n,i]),[n,r,s]}function GR(e){return typeof e=="function"}function md(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Gm(...e){return t=>{let n=!1;const r=e.map(i=>{const s=md(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():md(e[i],null)}}}}function Er(...e){return k.useCallback(Gm(...e),e)}function WR(e){const t=qR(e),n=k.forwardRef((r,i)=>{const{children:s,...a}=r,o=k.Children.toArray(s),u=o.find(QR);if(u){const l=u.props.children,c=o.map(d=>d===u?k.Children.count(l)>1?k.Children.only(null):k.isValidElement(l)?l.props.children:null:d);return E.jsx(t,{...a,ref:i,children:k.isValidElement(l)?k.cloneElement(l,void 0,c):null})}return E.jsx(t,{...a,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}function qR(e){const t=k.forwardRef((n,r)=>{const{children:i,...s}=n;if(k.isValidElement(i)){const a=XR(i),o=KR(s,i.props);return i.type!==k.Fragment&&(o.ref=r?Gm(r,a):a),k.cloneElement(i,o)}return k.Children.count(i)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var YR=Symbol("radix.slottable");function QR(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===YR}function KR(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...o)=>{const u=s(...o);return i(...o),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function XR(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ZR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$n=ZR.reduce((e,t)=>{const n=WR(`Primitive.${t}`),r=k.forwardRef((i,s)=>{const{asChild:a,...o}=i,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(u,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function JR(e,t){e&&yo.flushSync(()=>e.dispatchEvent(t))}var ev="Arrow",Wm=k.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return E.jsx($n.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});Wm.displayName=ev;var tv=Wm;function Bs(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function nv(e){const[t,n]=k.useState(void 0);return Dn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,o;if("borderBoxSize"in s){const u=s.borderBoxSize,l=Array.isArray(u)?u[0]:u;a=l.inlineSize,o=l.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Lu="Popper",[qm,Ym]=zm(Lu),[rv,Qm]=qm(Lu),Km=e=>{const{__scopePopper:t,children:n}=e,[r,i]=k.useState(null);return E.jsx(rv,{scope:t,anchor:r,onAnchorChange:i,children:n})};Km.displayName=Lu;var Xm="PopperAnchor",Zm=k.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=Qm(Xm,n),a=k.useRef(null),o=Er(t,a),u=k.useRef(null);return k.useEffect(()=>{const l=u.current;u.current=(r==null?void 0:r.current)||a.current,l!==u.current&&s.onAnchorChange(u.current)}),r?null:E.jsx($n.div,{...i,ref:o})});Zm.displayName=Xm;var Ru="PopperContent",[iv,sv]=qm(Ru),Jm=k.forwardRef((e,t)=>{var ze,Pe,de,Ge,Xe,ot;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:f="optimized",onPlaced:m,...b}=e,y=Qm(Ru,n),[g,I]=k.useState(null),C=Er(t,Ze=>I(Ze)),[v,P]=k.useState(null),N=nv(v),B=(N==null?void 0:N.width)??0,M=(N==null?void 0:N.height)??0,z=r+(s!=="center"?"-"+s:""),L=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},V=Array.isArray(l)?l:[l],G=V.length>0,Z={padding:L,boundary:V.filter(ov),altBoundary:G},{refs:Y,floatingStyles:$,placement:W,isPositioned:J,middlewareData:me}=N0({strategy:"fixed",placement:z,whileElementsMounted:(...Ze)=>M0(...Ze,{animationFrame:f==="always"}),elements:{reference:y.anchor},middleware:[L0({mainAxis:i+M,alignmentAxis:a}),u&&R0({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?B0():void 0,...Z}),u&&v0({...Z}),O0({...Z,apply:({elements:Ze,rects:ut,availableWidth:fn,availableHeight:Yt})=>{const{width:jn,height:se}=ut.reference,pe=Ze.floating.style;pe.setProperty("--radix-popper-available-width",`${fn}px`),pe.setProperty("--radix-popper-available-height",`${Yt}px`),pe.setProperty("--radix-popper-anchor-width",`${jn}px`),pe.setProperty("--radix-popper-anchor-height",`${se}px`)}}),v&&P0({element:v,padding:o}),uv({arrowWidth:B,arrowHeight:M}),p&&D0({strategy:"referenceHidden",...Z})]}),[Ce,A]=n0(W),Te=Bs(m);Dn(()=>{J&&(Te==null||Te())},[J,Te]);const we=(ze=me.arrow)==null?void 0:ze.x,S=(Pe=me.arrow)==null?void 0:Pe.y,Ie=((de=me.arrow)==null?void 0:de.centerOffset)!==0,[le,ie]=k.useState();return Dn(()=>{g&&ie(window.getComputedStyle(g).zIndex)},[g]),E.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:J?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:le,"--radix-popper-transform-origin":[(Ge=me.transformOrigin)==null?void 0:Ge.x,(Xe=me.transformOrigin)==null?void 0:Xe.y].join(" "),...((ot=me.hide)==null?void 0:ot.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(iv,{scope:n,placedSide:Ce,onArrowChange:P,arrowX:we,arrowY:S,shouldHideArrow:Ie,children:E.jsx($n.div,{"data-side":Ce,"data-align":A,...b,ref:C,style:{...b.style,animation:J?void 0:"none"}})})})});Jm.displayName=Ru;var e0="PopperArrow",av={top:"bottom",right:"left",bottom:"top",left:"right"},t0=k.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=sv(e0,r),a=av[s.placedSide];return E.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:E.jsx(tv,{...i,ref:n,style:{...i.style,display:"block"}})})});t0.displayName=e0;function ov(e){return e!==null}var uv=e=>({name:"transformOrigin",options:e,fn(t){var y,g,I;const{placement:n,rects:r,middlewareData:i}=t,a=((y=i.arrow)==null?void 0:y.centerOffset)!==0,o=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,c]=n0(n),d={start:"0%",center:"50%",end:"100%"}[c],p=(((g=i.arrow)==null?void 0:g.x)??0)+o/2,f=(((I=i.arrow)==null?void 0:I.y)??0)+u/2;let m="",b="";return l==="bottom"?(m=a?d:`${p}px`,b=`${-u}px`):l==="top"?(m=a?d:`${p}px`,b=`${r.floating.height+u}px`):l==="right"?(m=`${-u}px`,b=a?d:`${f}px`):l==="left"&&(m=`${r.floating.width+u}px`,b=a?d:`${f}px`),{data:{x:m,y:b}}}});function n0(e){const[t,n="center"]=e.split("-");return[t,n]}var lv=Km,cv=Zm,dv=Jm,hv=t0,fv="Portal",r0=k.forwardRef((e,t)=>{var o;const{container:n,...r}=e,[i,s]=k.useState(!1);Dn(()=>s(!0),[]);const a=n||i&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?F0.createPortal(E.jsx($n.div,{...r,ref:t}),a):null});r0.displayName=fv;function pv(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var vu=e=>{const{present:t,children:n}=e,r=mv(t),i=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),s=Er(r.ref,gv(i));return typeof n=="function"||r.isPresent?k.cloneElement(i,{ref:s}):null};vu.displayName="Presence";function mv(e){const[t,n]=k.useState(),r=k.useRef(null),i=k.useRef(e),s=k.useRef("none"),a=e?"mounted":"unmounted",[o,u]=pv(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const l=Ri(r.current);s.current=o==="mounted"?l:"none"},[o]),Dn(()=>{const l=r.current,c=i.current;if(c!==e){const p=s.current,f=Ri(l);e?u("MOUNT"):f==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&p!==f?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),Dn(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,d=f=>{const b=Ri(r.current).includes(CSS.escape(f.animationName));if(f.target===t&&b&&(u("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},p=f=>{f.target===t&&(s.current=Ri(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:k.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function Ri(e){return(e==null?void 0:e.animationName)||"none"}function gv(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function bv(e,t=globalThis==null?void 0:globalThis.document){const n=Bs(e);k.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Ev="DismissableLayer",_o="dismissableLayer.update",_v="dismissableLayer.pointerDownOutside",Tv="dismissableLayer.focusOutside",gd,i0=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),s0=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:o,...u}=e,l=k.useContext(i0),[c,d]=k.useState(null),p=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=k.useState({}),m=Er(t,B=>d(B)),b=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=b.indexOf(y),I=c?b.indexOf(c):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,v=I>=g,P=kv(B=>{const M=B.target,z=[...l.branches].some(L=>L.contains(M));!v||z||(i==null||i(B),a==null||a(B),B.defaultPrevented||o==null||o())},p),N=Av(B=>{const M=B.target;[...l.branches].some(L=>L.contains(M))||(s==null||s(B),a==null||a(B),B.defaultPrevented||o==null||o())},p);return bv(B=>{I===l.layers.size-1&&(r==null||r(B),!B.defaultPrevented&&o&&(B.preventDefault(),o()))},p),k.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(gd=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),bd(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=gd)}},[c,p,n,l]),k.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),bd())},[c,l]),k.useEffect(()=>{const B=()=>f({});return document.addEventListener(_o,B),()=>document.removeEventListener(_o,B)},[]),E.jsx($n.div,{...u,ref:m,style:{pointerEvents:C?v?"auto":"none":void 0,...e.style},onFocusCapture:mt(e.onFocusCapture,N.onFocusCapture),onBlurCapture:mt(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:mt(e.onPointerDownCapture,P.onPointerDownCapture)})});s0.displayName=Ev;var yv="DismissableLayerBranch",xv=k.forwardRef((e,t)=>{const n=k.useContext(i0),r=k.useRef(null),i=Er(t,r);return k.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),E.jsx($n.div,{...e,ref:i})});xv.displayName=yv;function kv(e,t=globalThis==null?void 0:globalThis.document){const n=Bs(e),r=k.useRef(!1),i=k.useRef(()=>{});return k.useEffect(()=>{const s=o=>{if(o.target&&!r.current){let u=function(){a0(_v,n,l,{discrete:!0})};const l={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Av(e,t=globalThis==null?void 0:globalThis.document){const n=Bs(e),r=k.useRef(!1);return k.useEffect(()=>{const i=s=>{s.target&&!r.current&&a0(Tv,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bd(){const e=new CustomEvent(_o);document.dispatchEvent(e)}function a0(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?JR(i,s):i.dispatchEvent(s)}var Na,Fs="HoverCard",[o0]=zm(Fs,[Ym]),Hs=Ym(),[Cv,Us]=o0(Fs),u0=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:s,openDelay:a=700,closeDelay:o=300}=e,u=Hs(t),l=k.useRef(0),c=k.useRef(0),d=k.useRef(!1),p=k.useRef(!1),[f,m]=VR({prop:r,defaultProp:i??!1,onChange:s,caller:Fs}),b=k.useCallback(()=>{clearTimeout(c.current),l.current=window.setTimeout(()=>m(!0),a)},[a,m]),y=k.useCallback(()=>{clearTimeout(l.current),!d.current&&!p.current&&(c.current=window.setTimeout(()=>m(!1),o))},[o,m]),g=k.useCallback(()=>m(!1),[m]);return k.useEffect(()=>()=>{clearTimeout(l.current),clearTimeout(c.current)},[]),E.jsx(Cv,{scope:t,open:f,onOpenChange:m,onOpen:b,onClose:y,onDismiss:g,hasSelectionRef:d,isPointerDownOnContentRef:p,children:E.jsx(lv,{...u,children:n})})};u0.displayName=Fs;var l0="HoverCardTrigger",c0=k.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,i=Us(l0,n),s=Hs(n);return E.jsx(cv,{asChild:!0,...s,children:E.jsx($n.a,{"data-state":i.open?"open":"closed",...r,ref:t,onPointerEnter:mt(e.onPointerEnter,fs(i.onOpen)),onPointerLeave:mt(e.onPointerLeave,fs(i.onClose)),onFocus:mt(e.onFocus,i.onOpen),onBlur:mt(e.onBlur,i.onClose),onTouchStart:mt(e.onTouchStart,a=>a.preventDefault())})})});c0.displayName=l0;var Ou="HoverCardPortal",[wv,Iv]=o0(Ou,{forceMount:void 0}),d0=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,s=Us(Ou,t);return E.jsx(wv,{scope:t,forceMount:n,children:E.jsx(vu,{present:n||s.open,children:E.jsx(r0,{asChild:!0,container:i,children:r})})})};d0.displayName=Ou;var hs="HoverCardContent",h0=k.forwardRef((e,t)=>{const n=Iv(hs,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,s=Us(hs,e.__scopeHoverCard);return E.jsx(vu,{present:r||s.open,children:E.jsx(Sv,{"data-state":s.open?"open":"closed",...i,onPointerEnter:mt(e.onPointerEnter,fs(s.onOpen)),onPointerLeave:mt(e.onPointerLeave,fs(s.onClose)),ref:t})})});h0.displayName=hs;var Sv=k.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,...o}=e,u=Us(hs,n),l=Hs(n),c=k.useRef(null),d=Er(t,c),[p,f]=k.useState(!1);return k.useEffect(()=>{if(p){const m=document.body;return Na=m.style.userSelect||m.style.webkitUserSelect,m.style.userSelect="none",m.style.webkitUserSelect="none",()=>{m.style.userSelect=Na,m.style.webkitUserSelect=Na}}},[p]),k.useEffect(()=>{if(c.current){const m=()=>{f(!1),u.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var y;((y=document.getSelection())==null?void 0:y.toString())!==""&&(u.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",m),()=>{document.removeEventListener("pointerup",m),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}},[u.isPointerDownOnContentRef,u.hasSelectionRef]),k.useEffect(()=>{c.current&&Rv(c.current).forEach(b=>b.setAttribute("tabindex","-1"))}),E.jsx(s0,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:mt(s,m=>{m.preventDefault()}),onDismiss:u.onDismiss,children:E.jsx(dv,{...l,...o,onPointerDown:mt(o.onPointerDown,m=>{m.currentTarget.contains(m.target)&&f(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0}),ref:d,style:{...o.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Nv="HoverCardArrow",Lv=k.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,i=Hs(n);return E.jsx(hv,{...i,...r,ref:t})});Lv.displayName=Nv;function fs(e){return t=>t.pointerType==="touch"?void 0:e()}function Rv(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var f0=u0,p0=c0,m0=d0,g0=h0;const b0=300,E0=180,vv=300,_0=140,Ov=_0+yd+4;function To(e,t){return{height:e,width:b0,layout:{background:{type:Id.Solid,color:Cd},textColor:Ad,fontFamily:kd,fontSize:xd},grid:{vertLines:{color:$i},horzLines:{color:$i}},crosshair:{mode:wd.Normal},rightPriceScale:{borderColor:qr,scaleMargins:{top:.05,bottom:.05}},timeScale:{borderColor:qr,timeVisible:!0,secondsVisible:!1,visible:t},handleScroll:{vertTouchDrag:!1}}}function Pv(e){return e.startsWith("rgba(")||e.startsWith("#")?e:e.startsWith("rgb(")?e.replace("rgb(","rgba(").replace(")",", 0.5)"):e}function Ed(e,t,n){const r=ji(e,To(E0,!0));r.addSeries(Ao,{upColor:zt,downColor:Gt,borderDownColor:Gt,borderUpColor:zt,wickDownColor:Gt,wickUpColor:zt}).setData(t.candles);const s=n.toLowerCase();if(s==="ema")for(const u of t.lineOverlays)u.label.toLowerCase().startsWith("ema")&&r.addSeries(An,{color:u.color,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(u.data);else{const u=t.lineOverlays.find(l=>l.label.toLowerCase()===s);u&&r.addSeries(An,{color:u.color,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(u.data);for(const l of t.bandOverlays)if(l.label.toLowerCase()===s){const c=Pv(l.color);r.addSeries(An,{color:c,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(l.upperData),r.addSeries(An,{color:c,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(l.lowerData)}}const a=t.candles.length,o=Math.min(50,a);return r.timeScale().setVisibleLogicalRange({from:a-o,to:a-1}),r}function Dv(e,t,n,r){const i=ji(e,To(_0,!1));i.addSeries(Ao,{upColor:zt,downColor:Gt,borderDownColor:Gt,borderUpColor:zt,wickDownColor:Gt,wickUpColor:zt}).setData(n.candles);const a=ji(t,{...To(yd,!0),rightPriceScale:{borderColor:qr,scaleMargins:{top:.1,bottom:.1}}});r.type==="macd"?(r.histogramData&&r.histogramData.length>0&&a.addSeries(V0,{priceFormat:{type:"price",precision:2,minMove:.01},priceLineVisible:!1,lastValueVisible:!1}).setData(r.histogramData),r.data.length>0&&a.addSeries(An,{color:r.color,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(r.data),r.signalData&&r.signalData.length>0&&a.addSeries(An,{color:"#ff9800",lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(r.signalData)):a.addSeries(An,{color:r.color,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(r.data);const o=n.candles.length,u=Math.min(50,o),l={from:o-u,to:o-1};return i.timeScale().setVisibleLogicalRange(l),a.timeScale().setVisibleLogicalRange(l),[i,a]}const Mv=k.memo(function({data:t,indicatorName:n,indicatorKind:r}){const i=k.useRef(null),s=k.useRef(null);k.useEffect(()=>{const l=i.current;if(!l||t.candles.length===0)return;if(r==="overlay"){const b=Ed(l,t,n);return()=>{b.remove()}}const c=n.toLowerCase(),d=t.subPanes.find(b=>b.label.toLowerCase()===c);if(!d){const b=Ed(l,t,n);return()=>{b.remove()}}const p=s.current;if(!p)return;const[f,m]=Dv(l,p,t,d);return()=>{f.remove(),m.remove()}},[t,n,r]);const a=r==="subpane",o=a?vv:b0,u=a?Ov:E0;return E.jsxs("div",{className:"overflow-hidden rounded-[4px] bg-[var(--color-surface-canvas)]",style:{width:o,height:u},children:[E.jsx("div",{ref:i,style:{width:o}}),a&&E.jsx("div",{ref:s,className:"mt-1",style:{width:o}})]})});function Bv({data:e,indicatorName:t,indicatorKind:n,children:r}){return E.jsxs(f0,{openDelay:300,closeDelay:100,children:[E.jsx(p0,{asChild:!0,children:r}),E.jsx(m0,{children:E.jsx(g0,{side:"top",align:"center",sideOffset:6,className:"z-[9998] overflow-hidden rounded-[2px] border border-[rgba(121,121,121,0.15)] bg-[var(--color-surface-canvas)] shadow-[0_8px_32px_rgba(0,0,0,0.6)]",children:E.jsx(Mv,{data:e,indicatorName:t,indicatorKind:n})})})]})}const Fv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAE/UlEQVR4nO1YW0xcRRj+Zs5eD8uyuyDXUiMVsUCJpl7iJVobKyleaIi3mvCoibExjTEhfZDoqokxXtBAok9GqalJjSkt+KA0VoigPogCQg0SJIRyv+yye/Z6zphzoJRl4ezuWVhe9ksmm/n239n/m5n/n38GSCONNNJIIwkQtS8HBwcNglFwAqyegBQKXi/4jIwIm93iGNg1gLTyAb6xsrIyuJ2POjUBfqPgpIQ0XNdJCFHaRuwWR0AKATT4jQIDcGY7H6maABBSvz7gHjVQUq/mouoKcJQr3Dw7lERq3m0uLKFIswBB8EYNnkqOMaC5ywfNAiyWzIi+1+tBRoYlZdwXvSvoHAlrF0CxxfKmiOsYFPD1716QTVssIQGpyjgbIfd/Gw+i6YobiOF8HAKiZ2e3uZE5hje/d0FkVMneZXl6zGkV4PG5NynaXW7KzeDsDCAgKuqQl0nxxjE9qrUKyMqwRfTdggtWPmtXOJdPgvPHRSz7iOK81UTxUZ0D++26JLbQFgGmlWv9Q0Tb4BwO5ulx9FYTHjpghG7NzhdieP2iCxMuCaAUJh3BByccuNmuV3U+pgC6RYBp4abcIs7/JUFiBH2TYfRNetDU7UV5HsFjZT70/BfAP3OiEg8cAd4+bkNlviGm8zEF7FR2uTDohySvyAYzkQED03JbO8jWgvml+zg8WGKKy/mYAtx+V5RjiXIhEbg4FFp38EQFxdgiw8AMgyRF/t8Ld1LUVnJR42kWYOcdEf1l3xJsZntCXMdVP9xBOacDRVkcGo5mgxJgySehY3gJPeMcRubCqK0w4ZX7LXD5o8fb0y307YB/ffbrDmWAk70H4OA5PFnOof6wPeZ4alA96uQMsbHJs6h8MoqmbgFHPl9Ecy+DKG1td3VGwvCspASnUU9RW27e0o7E4jQL2KZGb/nVh3P9AfjCBJeGCV6+4IIrwKLszv+9NvuE4sgBCpuZ03YnUIHqt/0Tf8q3oQi0DQHNPdG2RVbgnWpg39pZ5QkAz58DAmvFZHMtUHYTNKGq+A6iKQayzZH/+M3APFp6lTVWUJrD4d95EbLKyRXgtXaKj5/IxD7bMn4esyAgehXbijwdbs8NwWHKiRhv0T8fF7cjW6h7PIQPf6FgchBSgsPFBpx91o7GRwlMBqpwS0GGF9vcuDxK8N2QX+Hk9lyVOblrZbIncf9MGGd+ECAxKpcpKM3m8EmNVTnyHy6R+1k43eHBgk+Sr4B4r2v193LwZpkIjt9mwkrIo/lkTyoLjS4ynGoX4BPlrUNRbNPhs6eyYDVyq1mCEFTlGdD6tA23OHTrQXu91ZXzMHKrdpuzC4mTU/dRBZdHhtir7RwWhNW+3czw6ePieqBuhicINHZy6JtaHVbeQWefCaMg8maaMA7mVxBNAu5uGWVKhQgg00jQVBPCvQWRgT0fmEWOMXe9HxIZ3upaxE9jOpysNOLUPaYt7RLhcmw52rLQhHzXkA8hHdBSY8H+7IXooFLK9xucQUdw+gER7x7NUbVLiEumlJDL2/eP8birSI+5QOpe5uJFzDux8xEe1SWGlL9KxAtVqc4ro+zkIfV3mVSgNLtMWxC7Pe6IUmI2OI1cQz5SzVktVm1BTAiZIiAFe/k2ysCm1XxU3WwU9KtkSoCdaBT0SzUfVVeA5/lGwS/IQ8lP3AWpyDjkBneNgbXyZr5Rzcc00kgjjTSQDP4H+Yvkqb5uHfkAAAAASUVORK5CYII=";function T0({size:e=18}){return E.jsx("img",{src:Fv,width:e,height:e,alt:"","aria-hidden":"true"})}function Hv(e,t){const n=t.toLowerCase();return n==="ema"?e.lineOverlays.some(r=>r.label.toLowerCase().startsWith("ema")):e.lineOverlays.some(r=>r.label.toLowerCase()===n)||e.bandOverlays.some(r=>r.label.toLowerCase()===n)||e.subPanes.some(r=>r.label.toLowerCase()===n)}function Uv({name:e,children:t}){const n=xo(),r=ko(),i=(e==null?void 0:e.toLowerCase().trim().replace(/^user-content-/,""))??"",s=UR(i);if(!HR.has(i)||!s)return E.jsx(E.Fragment,{children:t});let a;if(n&&(a=n.find(u=>Hv(u,i))),!a)return E.jsx(E.Fragment,{children:t});const o=()=>{!r||!a||r.open({symbol:a.symbol,interval:a.interval,focus:{kind:"indicator",name:i}})};return E.jsxs("span",{className:"inline-flex items-center gap-1",children:[E.jsx("span",{className:"font-semibold text-[#42a5f5]",children:t}),E.jsx(Bv,{data:a,indicatorName:i,indicatorKind:s.kind,children:E.jsx("span",{onClick:o,className:"cursor-pointer",children:E.jsx(T0,{})})})]})}const La=300,_d=180,$v="#ffeb3b",jv=k.memo(function({data:t,price:n,side:r}){const i=k.useRef(null);return k.useEffect(()=>{const s=i.current;if(!s||t.candles.length===0)return;const a=ji(s,{height:_d,width:La,layout:{background:{type:Id.Solid,color:Cd},textColor:Ad,fontFamily:kd,fontSize:xd},grid:{vertLines:{color:$i},horzLines:{color:$i}},crosshair:{mode:wd.Normal},rightPriceScale:{borderColor:qr,scaleMargins:{top:.05,bottom:.05}},timeScale:{borderColor:qr,timeVisible:!0,secondsVisible:!1},handleScroll:{vertTouchDrag:!1}}),o=a.addSeries(Ao,{upColor:zt,downColor:Gt,borderDownColor:Gt,borderUpColor:zt,wickDownColor:Gt,wickUpColor:zt});o.setData(t.candles);const u=t.candles.length,l=Math.min(50,u),c=u-l,d=u-1;a.timeScale().setVisibleLogicalRange({from:c,to:d});const p=t.candles.slice(c,d+1),f=Math.min(...p.map(I=>I.low)),m=Math.max(...p.map(I=>I.high)),b=m-f||m*.01;if((n>m?n-m:n<f?f-n:0)>0){const I=b*.08,C=Math.min(f,n)-I,v=Math.max(m,n)+I;o.applyOptions({autoscaleInfoProvider:()=>({priceRange:{minValue:C,maxValue:v}})})}const g=r==="support"?Mu:r==="resistance"?Bu:$v;o.createPriceLine({price:n,color:g,lineWidth:2,lineStyle:Fu.Solid,axisLabelVisible:!0,title:""});for(const I of t.levels){if(Math.abs(I.price-n)<1e-4)continue;const C=I.side==="support"?Mu:Bu;o.createPriceLine({price:I.price,color:C+"55",lineWidth:1,lineStyle:Fu.Dashed,axisLabelVisible:!1,title:""})}return()=>{a.remove()}},[t,n,r]),E.jsx("div",{className:"overflow-hidden rounded-[4px] bg-[var(--color-surface-canvas)]",style:{width:La,height:_d},children:E.jsx("div",{ref:i,style:{width:La}})})});function Vv({data:e,price:t,side:n,children:r}){return E.jsxs(f0,{openDelay:300,closeDelay:100,children:[E.jsx(p0,{asChild:!0,children:r}),E.jsx(m0,{children:E.jsx(g0,{side:"top",align:"center",sideOffset:6,className:"z-[9998] overflow-hidden rounded-[2px] border border-[rgba(121,121,121,0.15)] bg-[var(--color-surface-canvas)] shadow-[0_8px_32px_rgba(0,0,0,0.6)]",children:E.jsx(jv,{data:e,price:t,side:n})})})]})}const zv=.005;function Gv(e){if(!e)return null;const t=e.replace(/[,_\s$]/g,""),n=Number.parseFloat(t);return Number.isFinite(n)?n:null}function Wv(e,t){const n=t*zv,r=e.find(s=>s.levels.some(a=>Math.abs(a.price-t)<=n));if(r){const s=r.levels.find(a=>Math.abs(a.price-t)<=n);return{data:r,level:s}}const i=e.find(s=>{if(s.candles.length===0)return!1;const a=s.candles.flatMap(l=>[l.low,l.high]),o=Math.min(...a),u=Math.max(...a);return t>=o*.9&&t<=u*1.1});return i?{data:i}:null}function qv({price:e,children:t}){var u;const n=xo(),r=ko(),i=Gv(e);if(i===null||!n)return E.jsx(E.Fragment,{children:t});const s=Wv(n,i);if(!s)return E.jsx(E.Fragment,{children:t});const a=(u=s.level)==null?void 0:u.side,o=()=>{r&&r.open({symbol:s.data.symbol,interval:s.data.interval,focus:{kind:"level",price:i}})};return E.jsxs("span",{className:"inline-flex items-center gap-1",children:[E.jsx("span",{className:"font-semibold text-[#42a5f5]",children:t}),E.jsx(Vv,{data:s.data,price:i,side:a,children:E.jsx("span",{onClick:o,className:"cursor-pointer",children:E.jsx(T0,{})})})]})}function Yv({symbol:e,interval:t,indicators:n,children:r}){const{data:i,loading:s,error:a}=$0(e,t,n),o=xo(),u=ko();k.useEffect(()=>{i&&o&&o.set(j0(e,t,n),i)},[i,o,e,t,n]);const l=t?`${e.toUpperCase()} · ${t}`:e.toUpperCase(),c=()=>{i&&u&&u.open({symbol:i.symbol,interval:i.interval})},d=!i||s||!!a,p=E.jsxs("button",{type:"button",onClick:c,disabled:d,"aria-label":`Open ${l} chart`,className:"my-1.5 inline-flex items-center gap-1.5 px-2 py-1 rounded-[4px] bg-[var(--color-surface-base)] border border-[var(--color-border-default)] text-footnote transition-colors duration-fast ease-out "+(d?"text-[var(--color-text-secondary)] cursor-default opacity-70":"text-[var(--color-text-primary)] cursor-pointer hover:border-[var(--color-brand-default)] hover:text-[var(--color-brand-default)] focus-visible:border-[var(--color-brand-default)] focus-visible:text-[var(--color-brand-default)]"),children:[E.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[E.jsx("path",{d:"M3 3v18h18"}),E.jsx("path",{d:"M7 14l4-4 4 4 5-5"})]}),E.jsx("span",{children:s?"Loading chart…":a?`${l} (unavailable)`:l}),!d&&E.jsx("span",{"aria-hidden":"true",children:"→"})]});return E.jsxs(E.Fragment,{children:[r,p]})}const Qv={pct:["dir"],price:[],pnl:["dir"],lev:[],side:["dir"],tag:["type"],risk:["level"],verdict:["type"],chart:["symbol","interval","indicators","levels","focus-time","focus-price"],ind:["name"],lvl:["price"],asks:[],question:[],title:[],options:[],option:[]},Kv={pct:({dir:e,children:t})=>E.jsx("span",{className:e==="up"?"trade-pct-up":"trade-pct-down",children:t}),price:({children:e})=>E.jsx("span",{className:"trade-price",children:e}),pnl:({dir:e,children:t})=>E.jsx("span",{className:e==="up"?"trade-pnl-up":"trade-pnl-down",children:t}),lev:({children:e})=>E.jsx("span",{className:"trade-leverage",children:e}),side:({dir:e,children:t})=>E.jsx("span",{className:e==="long"?"trade-long":"trade-short",children:t}),tag:({type:e,children:t})=>E.jsx("span",{className:`trade-tag trade-tag-${e??"entry"}`,children:t}),risk:({level:e,children:t})=>E.jsx("span",{className:`trade-risk trade-risk-${e??"medium"}`,children:t}),verdict:({type:e,children:t})=>E.jsx("span",{className:`trade-verdict trade-verdict-${e??"neutral"}`,children:t}),ind:({name:e,children:t})=>E.jsx(Uv,{name:e,children:t}),lvl:({price:e,children:t})=>E.jsx(qv,{price:e,children:t}),chart:({children:e,...t})=>E.jsx(Yv,{symbol:String(t.symbol??""),interval:t.interval?String(t.interval):void 0,indicators:t.indicators?String(t.indicators):void 0,children:e})},Xv={asks:({children:e})=>E.jsx(E.Fragment,{children:e}),question:({children:e})=>E.jsx(E.Fragment,{children:e}),title:({children:e})=>E.jsx(E.Fragment,{children:e}),options:()=>null,option:()=>null},Zv={table:({children:e})=>E.jsx("div",{className:"overflow-x-auto my-3",children:E.jsx("table",{className:"w-full border-collapse text-body-md border border-white/[0.08] rounded-[4px]",children:e})}),th:({children:e})=>E.jsx("th",{className:"px-3 py-1.5 text-left text-label-sm uppercase tracking-wider text-slate-400 border-b border-white/10 bg-white/5",children:e}),td:({children:e})=>E.jsx("td",{className:"px-3 py-1.5 text-left text-body-md tabular-nums border-b border-white/[0.06]",children:e})},Jv={code:MR},eO={...Kv,...Xv,...Zv},tO={enabled:!0,renderModal:({isOpen:e,onClose:t,onConfirm:n,url:r})=>e?E.jsx(BR,{url:r,onClose:t,onConfirm:n}):null},nO=["ind","lvl"];function rO({content:e,streaming:t}){return E.jsx(FR,{children:E.jsx("div",{className:"chat-md",children:E.jsx(Hp,{mode:t?"streaming":"static",components:eO,allowedTags:Qv,literalTagContent:nO,plugins:Jv,linkSafety:tO,isAnimating:t,caret:"block",children:e})})})}const _O=Object.freeze(Object.defineProperty({__proto__:null,StreamingMarkdown:rO},Symbol.toStringTag,{value:"Module"})),iO=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:Up},Symbol.toStringTag,{value:"Module"}));export{Nw as A,mO as L,at as R,_O as S};