db-studio 1.10.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +29 -27
- package/dist/index.js.map +1 -1
- package/dist/web-dist/assets/_pathlessLayout-C6coCMpi.js +1 -0
- package/dist/web-dist/assets/{_pathlessLayout-CEv6uosT.js.map → _pathlessLayout-C6coCMpi.js.map} +1 -1
- package/dist/web-dist/assets/_pathlessLayout-DoBLI2ja.js +132 -0
- package/dist/web-dist/assets/_pathlessLayout-DoBLI2ja.js.map +1 -0
- package/dist/web-dist/assets/_queryId-Chj34V6b.js +1 -0
- package/dist/web-dist/assets/{_queryId-Bq64AuuI.js.map → _queryId-Chj34V6b.js.map} +1 -1
- package/dist/web-dist/assets/{_table-Bt9of1on.js → _table-Bg4NvAi4.js} +1 -1
- package/dist/web-dist/assets/{_table-Bt9of1on.js.map → _table-Bg4NvAi4.js.map} +1 -1
- package/dist/web-dist/assets/_table-CHFe8v3q.js +1 -0
- package/dist/web-dist/assets/{_table-CQhKMAcZ.js.map → _table-CHFe8v3q.js.map} +1 -1
- package/dist/web-dist/assets/ai-assistant-D2oc4TtC.js +1 -0
- package/dist/web-dist/assets/ai-assistant-D2oc4TtC.js.map +1 -0
- package/dist/web-dist/assets/browser-B3ZulIJb.js +1 -0
- package/dist/web-dist/assets/{browser-CFsrLhq1.js.map → browser-B3ZulIJb.js.map} +1 -1
- package/dist/web-dist/assets/code-editor-q3FlZk-L.js +9 -0
- package/dist/web-dist/assets/code-editor-q3FlZk-L.js.map +1 -0
- package/dist/web-dist/assets/database.store-O79u8Fhj.js +1 -0
- package/dist/web-dist/assets/database.store-O79u8Fhj.js.map +1 -0
- package/dist/web-dist/assets/{dist-B90HBock.js → dist-DBHqGKiG.js} +1 -1
- package/dist/web-dist/assets/{dist-B90HBock.js.map → dist-DBHqGKiG.js.map} +1 -1
- package/dist/web-dist/assets/{highlighted-body-OFNGDK62-BGFI1Y6G.js → highlighted-body-OFNGDK62-CFFJC4SW.js} +1 -1
- package/dist/web-dist/assets/{highlighted-body-OFNGDK62-BGFI1Y6G.js.map → highlighted-body-OFNGDK62-CFFJC4SW.js.map} +1 -1
- package/dist/web-dist/assets/icons-CtpwLWUI.js +1 -0
- package/dist/web-dist/assets/icons-CtpwLWUI.js.map +1 -0
- package/dist/web-dist/assets/index-Cyl_0l9I.css +2 -0
- package/dist/web-dist/assets/index-XoXxezo4.js +35 -0
- package/dist/web-dist/assets/index-XoXxezo4.js.map +1 -0
- package/dist/web-dist/assets/{indexes-BKOZUa9Z.js → indexes-C9QqJKhp.js} +1 -1
- package/dist/web-dist/assets/{indexes-BKOZUa9Z.js.map → indexes-C9QqJKhp.js.map} +1 -1
- package/dist/web-dist/assets/{logs-DHha3vDy.js → logs-B8ah8F7D.js} +1 -1
- package/dist/web-dist/assets/{logs-DHha3vDy.js.map → logs-B8ah8F7D.js.map} +1 -1
- package/dist/web-dist/assets/mermaid-GHXKKRXX-TpVEoP0K.js +1 -0
- package/dist/web-dist/assets/middleware-CCyr6cvp.js +1 -0
- package/dist/web-dist/assets/middleware-CCyr6cvp.js.map +1 -0
- package/dist/web-dist/assets/popover-wbdw6Hmx.js +1 -0
- package/dist/web-dist/assets/popover-wbdw6Hmx.js.map +1 -0
- package/dist/web-dist/assets/queries.store-CoJVGJKk.js +1 -0
- package/dist/web-dist/assets/queries.store-CoJVGJKk.js.map +1 -0
- package/dist/web-dist/assets/query-runner-Bgs0j50a.js +17 -0
- package/dist/web-dist/assets/query-runner-Bgs0j50a.js.map +1 -0
- package/dist/web-dist/assets/radix-ui-CgJOuzDv.js +51 -0
- package/dist/web-dist/assets/radix-ui-CgJOuzDv.js.map +1 -0
- package/dist/web-dist/assets/react-Cxb6eTZp.js +1 -0
- package/dist/web-dist/assets/react-Cxb6eTZp.js.map +1 -0
- package/dist/web-dist/assets/{react-dom-0lXVP1OR.js → react-dom-yg5bT29P.js} +1 -1
- package/dist/web-dist/assets/{react-dom-0lXVP1OR.js.map → react-dom-yg5bT29P.js.map} +1 -1
- package/dist/web-dist/assets/redis-value-COa6YzFD.js +1 -0
- package/dist/web-dist/assets/{redis-value-CJoRCZun.js.map → redis-value-COa6YzFD.js.map} +1 -1
- package/dist/web-dist/assets/runner-DW5iXMmq.js +1 -0
- package/dist/web-dist/assets/{runner-CZKDzRoU.js.map → runner-DW5iXMmq.js.map} +1 -1
- package/dist/web-dist/assets/schema-CtOicTEt.js +64 -0
- package/dist/web-dist/assets/schema-CtOicTEt.js.map +1 -0
- package/dist/web-dist/assets/{schema-0sozVL-z.js → schema-oy5o_4bt.js} +1 -1
- package/dist/web-dist/assets/{schema-0sozVL-z.js.map → schema-oy5o_4bt.js.map} +1 -1
- package/dist/web-dist/assets/{table-CPQhgD-a.js → table-CN9ZTCOi.js} +1 -1
- package/dist/web-dist/assets/{table-CPQhgD-a.js.map → table-CN9ZTCOi.js.map} +1 -1
- package/dist/web-dist/assets/tanstack-g1w0v_rJ.js +10 -0
- package/dist/web-dist/assets/tanstack-g1w0v_rJ.js.map +1 -0
- package/dist/web-dist/assets/tooltip-B7gM8xl3.js +9 -0
- package/dist/web-dist/assets/tooltip-B7gM8xl3.js.map +1 -0
- package/dist/web-dist/assets/{visualizer-DTPn0ywW.js → visualizer-DcEwqmuY.js} +1 -1
- package/dist/web-dist/assets/{visualizer-DTPn0ywW.js.map → visualizer-DcEwqmuY.js.map} +1 -1
- package/dist/web-dist/index.html +13 -11
- package/package.json +1 -1
- package/dist/web-dist/assets/_pathlessLayout-CEv6uosT.js +0 -1
- package/dist/web-dist/assets/_pathlessLayout-eo6iLvBo.js +0 -132
- package/dist/web-dist/assets/_pathlessLayout-eo6iLvBo.js.map +0 -1
- package/dist/web-dist/assets/_queryId-Bq64AuuI.js +0 -1
- package/dist/web-dist/assets/_table-CQhKMAcZ.js +0 -1
- package/dist/web-dist/assets/browser-CFsrLhq1.js +0 -1
- package/dist/web-dist/assets/code-editor-DQ86aZkm.js +0 -9
- package/dist/web-dist/assets/code-editor-DQ86aZkm.js.map +0 -1
- package/dist/web-dist/assets/database.store-KDHkiedw.js +0 -1
- package/dist/web-dist/assets/database.store-KDHkiedw.js.map +0 -1
- package/dist/web-dist/assets/icons-Bm7rSZLJ.js +0 -1
- package/dist/web-dist/assets/icons-Bm7rSZLJ.js.map +0 -1
- package/dist/web-dist/assets/index-BtqHnOp0.js +0 -23
- package/dist/web-dist/assets/index-BtqHnOp0.js.map +0 -1
- package/dist/web-dist/assets/index-ktDWx_UP.css +0 -2
- package/dist/web-dist/assets/mermaid-GHXKKRXX-DjR37lQN.js +0 -1
- package/dist/web-dist/assets/popover-Cm3PsrMh.js +0 -1
- package/dist/web-dist/assets/popover-Cm3PsrMh.js.map +0 -1
- package/dist/web-dist/assets/query-runner-6BhVPaC9.js +0 -9
- package/dist/web-dist/assets/query-runner-6BhVPaC9.js.map +0 -1
- package/dist/web-dist/assets/radix-ui-BUv2Nuc1.js +0 -51
- package/dist/web-dist/assets/radix-ui-BUv2Nuc1.js.map +0 -1
- package/dist/web-dist/assets/redis-value-CJoRCZun.js +0 -1
- package/dist/web-dist/assets/runner-CZKDzRoU.js +0 -1
- package/dist/web-dist/assets/schema-cZHeTHA0.js +0 -64
- package/dist/web-dist/assets/schema-cZHeTHA0.js.map +0 -1
- package/dist/web-dist/assets/tanstack-D6l4LIt3.js +0 -10
- package/dist/web-dist/assets/tanstack-D6l4LIt3.js.map +0 -1
- package/dist/web-dist/assets/toggle-group-BRWnLosM.js +0 -1
- package/dist/web-dist/assets/toggle-group-BRWnLosM.js.map +0 -1
- package/dist/web-dist/assets/tooltip-DinwklI8.js +0 -9
- package/dist/web-dist/assets/tooltip-DinwklI8.js.map +0 -1
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-OFNGDK62-CFFJC4SW.js","assets/rolldown-runtime-CXHxssQy.js","assets/icons-CtpwLWUI.js","assets/radix-ui-CgJOuzDv.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as Xi,r as Dr,t as qn}from"./rolldown-runtime-CXHxssQy.js";import{C as fh,b as Yn,c as ph,d as Pr,m as gh,o as Zi,s as Eh,t as Th,v as $o,w as bh,x as qo,y as Hs}from"./tanstack-g1w0v_rJ.js";import{$ as Yo,A as xh,B as kh,C as Us,D as yh,F as Ch,G as Ah,H as _h,L as vh,N as Nh,P as Vo,R as Sh,T as Ih,V as wh,Z as zs,_ as tn,a as Ji,b as es,d as Lh,et as Jr,f as Rh,g as Wo,it as Oh,l as $s,lt as Dh,m as ts,n as Ph,nt as Mh,p as Bh,rt as Fh,u as jh,ut as Hh,v as Uh,w as qs,x as zh,y as $h}from"./icons-CtpwLWUI.js";import{Et as qh,Ot as Yh,St as Ys,a as Vh,c as Wh,i as Qh,kt as Gh,l as Kh,n as Xh,o as Zh,r as Jh,s as ed,t as td}from"./radix-ui-CgJOuzDv.js";import{r as nd}from"./monitoring-B_X9D1H-.js";import{n as Ze}from"./dist-DBHqGKiG.js";import{n as Qo,t as Go}from"./bundle-mjs-BC_8HrWA.js";import{F as rd,H as id,L as sd,N as ad,R as Ht,U as te,a as ct,g as od,i as Rt,n as Ot,s as ld,t as Dt,z as oe}from"./tooltip-B7gM8xl3.js";import{a as cd,d as xt,o as ud}from"./popover-wbdw6Hmx.js";import{A as Vs,D as Ko,E as Xo,M as hd,N as dd,O as md,P as Zo,S as On,_ as Dn,at as fd,b as Pn,ct as pd,f as gd,h as Ed,j as Td,k as Xe,m as bd,nt as Jo,p as xd,rt as kd,v as Mn,x as Bn,y as Fn}from"./schema-CtOicTEt.js";import{t as nt}from"./database.store-O79u8Fhj.js";import{a as el}from"./monaco-editor-CaQyRcyX.js";import{A as yd,B as ut,C as Cd,D as tl,E as Ad,H as Vn,I as _d,L as ns,M as rs,N as Mr,O as et,R as Wn,T as nl,U as vd,V as Qn,W as yr,_ as Nd,a as Sd,b as Id,c as wd,d as Ld,f as Rd,g as Od,h as Dd,i as Pd,k as Md,l as Qt,m as Bd,o as Gt,p as Fd,s as Ws,v as jd,w as jn,z as Gn}from"./index-XoXxezo4.js";import{t as Hd}from"./ai-assistant-D2oc4TtC.js";import{t as Br}from"./queries.store-CoJVGJKk.js";import{i as Ud,n as ei,o as zd,r as $d,s as qd}from"./redis-value-COa6YzFD.js";var Yd=["Show me all tables in my database","What columns are in the users table?","Write a query to find all active users","How many orders were placed last month?","Find top 5 customers by total spend","Write a JOIN between users and orders","Users who haven't made any purchase yet","Generate monthly revenue summary query","Suggest useful indexes for better performance","Show schema of the products / inventory table","Latest 20 orders with customer names","Help me write a safe UPDATE query"],Qs={AUTHOR:"Hüsam 🥑 <devhsmq@gmail.com>",AUTHOR_NAME:"Hüsam",AUTHOR_AVATAR:"/avocado.png",AUTHOR_USERNAME:"husamql3",AUTHOR_GITHUB_LINK:"https://github.com/husamql3",SITE_DESCRIPTION:"The modern pgAdmin alternative that works with every database.",SITE_KEYWORDS:["pgadmin alternative","database client","database gui","database browser","sql editor","postgresql client","mysql client","table editor","ai sql","er diagram"],SITE_TITLE:"db-studio",SITE_NAME:"dbstudio.sh",SITE_URL:"https://dbstudio.sh",SITE_X_LINK:"https://x.com/dbstudio_sh",SITE_GITHUB_LINK:"https://github.com/husamql3/db-studio",SITE_GITHUB_NEW_ISSUE_LINK:"https://github.com/husamql3/db-studio/issues/new/choose",SITE_DOCS_LINK:"https://dbstudio.sh/docs",SITE_CHANGELOG_LINK:"https://dbstudio.sh/changelog",SITE_ROADMAP_LINK:"https://dbstudio.sh/roadmap",SITE_IMAGE:"https://dbstudio.sh/og-image.png",SITE_IMAGE_WIDTH:"1200",SITE_IMAGE_HEIGHT:"630",SITE_IMAGE_ALT:"dbstudio.sh – Modern database management studio",SITE_COLOR:"#1447e6"},Fr=(function(e){if(e==null)return Gd;if(typeof e=="function")return jr(e);if(typeof e=="object")return Array.isArray(e)?Vd(e):Wd(e);if(typeof e=="string")return Qd(e);throw new Error("Expected function, string, or object as test")});function Vd(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Fr(e[n]);return jr(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function Wd(e){const t=e;return jr(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function Qd(e){return jr(t);function t(n){return n&&n.type===e}}function jr(e){return t;function t(n,r,i){return!!(Kd(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Gd(){return!0}function Kd(e){return e!==null&&typeof e=="object"&&"type"in e}var rl=[];var kn="skip";function is(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=Fr(i),a=r?-1:1;o(e,void 0,[])();function o(l,h,m){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=rl,g,_,A;if((!t||s(l,h,m[m.length-1]||void 0))&&(p=Xd(n(l,m)),p[0]===!1))return p;if("children"in l&&l.children){const b=l;if(b.children&&p[0]!=="skip")for(_=(r?b.children.length:-1)+a,A=m.concat(b);_>-1&&_<b.children.length;){const v=b.children[_];if(g=o(v,_,A)(),g[0]===!1)return g;_=typeof g[1]=="number"?g[1]:_+a}}return p}}}function Xd(e){return Array.isArray(e)?e:typeof e=="number"?[!0,e]:e==null?rl:[e]}function tt(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),is(e,s,o,i);function o(l,h){const m=h[h.length-1],d=m?m.children.indexOf(l):void 0;return a(l,d,m)}}var E=Dr(Hh(),1),u=Gh(),nn={indicator:"indicator",textOnly:"text-only",remove:"remove"};function Zd({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=nn.indicator,imageBlockPolicy:l=nn.indicator}){const h=t.length&&!t.every(d=>d==="*"),m=n.length&&!n.every(d=>d==="*");if(!e&&(h||m))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return d=>{const f=im(e,t,n,r,i,s,a,o,l);il(d),tt(d,f)}}function Gs(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 Jd(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}var em=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),tm=new Set(["javascript:","data:","file:","vbscript:"]);function Ks(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 l=e.substring(5);if(l&&l.length>0&&l!=="invalid")return e}}catch{return null}return null}const a=Gs(e,n);if(!a||tm.has(a.protocol)||!(em.has(a.protocol)||s.includes(a.protocol)||s.includes("*")))return null;if(a.protocol==="mailto:"||!a.protocol.match(/^https?:$/))return a.href;const o=Jd(e);return a&&t.some(l=>{const h=Gs(l,n);return!h||h.origin!==a.origin?!1:a.href.startsWith(h.href)})?o?a.pathname+a.search+a.hash:a.href:t.includes("*")?a.protocol!=="https:"&&a.protocol!=="http:"?null:o?a.pathname+a.search+a.hash:a.href:null}function il(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)il(t)}}var ti=Symbol("node-seen");function nm(e,t,n){return t===nn.remove?{type:"remove"}:t===nn.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 rm(e,t,n){if(t===nn.remove)return{type:"remove"};if(t===nn.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")+"]"}]}}}var im=(e,t,n,r,i,s,a,o,l)=>{const h=(m,d,f)=>{if(m.type!=="element"||m[ti])return!0;if(m.tagName==="a"){const p=Ks(m.properties.href,t,e,!1,!1,i);if(p===null){if(m[ti]=!0,tt(m,h),f&&typeof d=="number"){const g=nm(m,o,a);if(g.type==="remove")return f.children.splice(d,1),[kn,d];f.children[d]=g.element}return kn}else return m.properties.href=p,m.properties.target="_blank",m.properties.rel="noopener noreferrer",!0}if(m.tagName==="img"){const p=Ks(m.properties.src,n,e,r,!0,i);if(p===null){if(m[ti]=!0,tt(m,h),f&&typeof d=="number"){const g=rm(m,l,s);if(g.type==="remove")return f.children.splice(d,1),[kn,d];f.children[d]=g.element}return kn}else return m.properties.src=p,!0}return!0};return h},Xs=typeof self=="object"?self:globalThis,sm=(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 0:case-1:return n(a,i);case 1:{const o=n([],i);for(const l of a)o.push(r(l));return o}case 2:{const o=n({},i);for(const[l,h]of a)o[r(l)]=r(h);return o}case 3:return n(new Date(a),i);case 4:{const{source:o,flags:l}=a;return n(new RegExp(o,l),i)}case 5:{const o=n(new Map,i);for(const[l,h]of a)o.set(r(l),r(h));return o}case 6:{const o=n(new Set,i);for(const l of a)o.add(r(l));return o}case 7:{const{name:o,message:l}=a;return n(new Xs[o](l),i)}case 8: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 Xs[s](a),i)};return r},Zs=e=>sm(new Map,e)(0),Kt="",{toString:am}={},{keys:om}=Object,pn=e=>{const t=typeof e;if(t!=="object"||!e)return[0,t];const n=am.call(e).slice(8,-1);switch(n){case"Array":return[1,Kt];case"Object":return[2,Kt];case"Date":return[3,Kt];case"RegExp":return[4,Kt];case"Map":return[5,Kt];case"Set":return[6,Kt];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},cr=([e,t])=>e===0&&(t==="function"||t==="symbol"),lm=(e,t,n,r)=>{const i=(a,o)=>{const l=r.push(a)-1;return n.set(o,l),l},s=a=>{if(n.has(a))return n.get(a);let[o,l]=pn(a);switch(o){case 0:{let m=a;switch(l){case"bigint":o=8,m=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);m=null;break;case"undefined":return i([-1],a)}return i([o,m],a)}case 1:{if(l){let f=a;return l==="DataView"?f=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(f=new Uint8Array(a)),i([l,[...f]],a)}const m=[],d=i([o,m],a);for(const f of a)m.push(s(f));return d}case 2:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const m=[],d=i([o,m],a);for(const f of om(a))(e||!cr(pn(a[f])))&&m.push([s(f),s(a[f])]);return d}case 3:return i([o,a.toISOString()],a);case 4:{const{source:m,flags:d}=a;return i([o,{source:m,flags:d}],a)}case 5:{const m=[],d=i([o,m],a);for(const[f,p]of a)(e||!(cr(pn(f))||cr(pn(p))))&&m.push([s(f),s(p)]);return d}case 6:{const m=[],d=i([o,m],a);for(const f of a)(e||!cr(pn(f)))&&m.push(s(f));return d}}const{message:h}=a;return i([o,{name:l,message:h}],a)};return s},Js=(e,{json:t,lossy:n}={})=>{const r=[];return lm(!(t||n),!!t,new Map,r)(e),r},Bt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Zs(Js(e,t)):structuredClone(e):(e,t)=>Zs(Js(e,t));var Kn=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Kn.prototype.normal={};Kn.prototype.property={};Kn.prototype.space=void 0;function sl(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Kn(n,r,t)}function Hn(e){return e.toLowerCase()}var Oe=class{constructor(e,t){this.attribute=t,this.property=e}};Oe.prototype.attribute="";Oe.prototype.booleanish=!1;Oe.prototype.boolean=!1;Oe.prototype.commaOrSpaceSeparated=!1;Oe.prototype.commaSeparated=!1;Oe.prototype.defined=!1;Oe.prototype.mustUseProperty=!1;Oe.prototype.number=!1;Oe.prototype.overloadedBoolean=!1;Oe.prototype.property="";Oe.prototype.spaceSeparated=!1;Oe.prototype.space=void 0;var vi=Xi({boolean:()=>ee,booleanish:()=>xe,commaOrSpaceSeparated:()=>Be,commaSeparated:()=>Jt,number:()=>H,overloadedBoolean:()=>Ni,spaceSeparated:()=>me}),cm=0,ee=Ut(),xe=Ut(),Ni=Ut(),H=Ut(),me=Ut(),Jt=Ut(),Be=Ut();function Ut(){return 2**++cm}var ni=Object.keys(vi),ss=class extends Oe{constructor(e,t,n,r){let i=-1;if(super(e,t),ea(this,"space",r),typeof n=="number")for(;++i<ni.length;){const s=ni[i];ea(this,ni[i],(n&vi[s])===vi[s])}}};ss.prototype.defined=!0;function ea(e,t,n){n&&(e[t]=n)}function an(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new ss(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Hn(r)]=r,n[Hn(s.attribute)]=r}return new Kn(t,n,e.space)}var al=an({properties:{ariaActiveDescendant:null,ariaAtomic:xe,ariaAutoComplete:null,ariaBusy:xe,ariaChecked:xe,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:me,ariaCurrent:null,ariaDescribedBy:me,ariaDetails:null,ariaDisabled:xe,ariaDropEffect:me,ariaErrorMessage:null,ariaExpanded:xe,ariaFlowTo:me,ariaGrabbed:xe,ariaHasPopup:null,ariaHidden:xe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:me,ariaLevel:H,ariaLive:null,ariaModal:xe,ariaMultiLine:xe,ariaMultiSelectable:xe,ariaOrientation:null,ariaOwns:me,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:xe,ariaReadOnly:xe,ariaRelevant:null,ariaRequired:xe,ariaRoleDescription:me,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:xe,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ol(e,t){return t in e?e[t]:t}function ll(e,t){return ol(e,t.toLowerCase())}var um=an({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Jt,acceptCharset:me,accessKey:me,action:null,allow:null,allowFullScreen:ee,allowPaymentRequest:ee,allowUserMedia:ee,alt:null,as:null,async:ee,autoCapitalize:null,autoComplete:me,autoFocus:ee,autoPlay:ee,blocking:me,capture:null,charSet:null,checked:ee,cite:null,className:me,cols:H,colSpan:null,content:null,contentEditable:xe,controls:ee,controlsList:me,coords:H|Jt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ee,defer:ee,dir:null,dirName:null,disabled:ee,download:Ni,draggable:xe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ee,formTarget:null,headers:me,height:H,hidden:Ni,high:H,href:null,hrefLang:null,htmlFor:me,httpEquiv:me,id:null,imageSizes:null,imageSrcSet:null,inert:ee,inputMode:null,integrity:null,is:null,isMap:ee,itemId:null,itemProp:me,itemRef:me,itemScope:ee,itemType:me,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ee,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:ee,muted:ee,name:null,nonce:null,noModule:ee,noValidate:ee,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:ee,optimum:H,pattern:null,ping:me,placeholder:null,playsInline:ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ee,referrerPolicy:null,rel:me,required:ee,reversed:ee,rows:H,rowSpan:H,sandbox:me,scope:null,scoped:ee,seamless:ee,selected:ee,shadowRootClonable:ee,shadowRootDelegatesFocus:ee,shadowRootMode:null,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:xe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:ee,useMap:null,value:xe,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:me,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ee,declare:ee,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:ee,noHref:ee,noShade:ee,noWrap:ee,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:xe,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ee,disableRemotePlayback:ee,prefix:null,property:null,results:H,security:null,unselectable:null},space:"html",transform:ll}),hm=an({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:Be,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:me,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:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,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:Jt,g2:Jt,glyphName:Jt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:Be,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,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:H,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:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:me,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Be,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Be,rev:Be,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Be,requiredFeatures:Be,requiredFonts:Be,requiredFormats:Be,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:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:Be,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Be,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Be,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ol}),cl=an({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()}}),ul=an({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ll}),hl=an({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),dm={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"},mm=/[A-Z]/g,ta=/-[a-z]/g,fm=/^data[-\w.:]+$/i;function Hr(e,t){const n=Hn(t);let r=t,i=Oe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&fm.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(ta,gm);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!ta.test(s)){let a=s.replace(mm,pm);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=ss}return new i(r,t)}function pm(e){return"-"+e.toLowerCase()}function gm(e){return e.charAt(1).toUpperCase()}var Xn=sl([al,um,cl,ul,hl],"html"),Ct=sl([al,hm,cl,ul,hl],"svg");function na(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 dl(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var ra=/[#.]/g;function Em(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){ra.lastIndex=i;const o=ra.exec(n),l=n.slice(i,o?o.index:n.length);l&&(s?s==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:a=l,i+=l.length),o&&(s=o[0],i++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function ia(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function ml(e){return e.join(" ").trim()}function fl(e,t,n){const r=n?km(n):void 0;function i(s,a,...o){let l;if(s==null){l={type:"root",children:[]};const h=a;o.unshift(h)}else{l=Em(s,t);const h=l.tagName.toLowerCase(),m=r?r.get(h):void 0;if(l.tagName=m||h,Tm(a))o.unshift(a);else for(const[d,f]of Object.entries(a))bm(e,l.properties,d,f)}for(const h of o)Si(l.children,h);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function Tm(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 bm(e,t,n,r){const i=Hr(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=ia(r):i.commaSeparated?s=na(r):i.commaOrSpaceSeparated?s=ia(na(r).join(" ")):s=sa(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?xm(r):String(r);if(Array.isArray(s)){const a=[];for(const o of s)a.push(sa(i,i.property,o));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function Si(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)Si(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Si(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function sa(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Hn(n)===Hn(t)))return!0}return n}function xm(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function km(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}var ym=["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"],Cm=fl(Xn,"div"),Am=fl(Ct,"g",ym);function _m(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 l=aa(t,n[a-1]);o=l===-1?t.length+1:l+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],l=aa(t,o),h=l===-1?t.length+1:l+1;if(o===h)break;n.push(h)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function aa(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
3
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var Pt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},pl={}.hasOwnProperty,vm=Object.prototype;function Nm(e,t){const n=t||{};return as({file:n.file||void 0,location:!1,schema:n.space==="svg"?Ct:Xn,verbose:n.verbose||!1},e)}function as(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Tr(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:gl(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),a=_m(s),o=a.toPoint(0),l=a.toPoint(s.length);n.position={start:o,end:l}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Tr(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Tr(e,r,n),n}default:return n=Sm(e,t),n}}function gl(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=as(e,t[n]);r.push(i)}return r}function Sm(e,t){const n=e.schema;e.schema=t.namespaceURI===Pt.svg?Ct:Xn;let r=-1;const i={};for(;++r<t.attrs.length;){const a=t.attrs[r],o=(a.prefix?a.prefix+":":"")+a.name;pl.call(vm,o)||(i[o]=a.value)}const s=(e.schema.space==="svg"?Am:Cm)(t.tagName,i,gl(e,t.childNodes));if(Tr(e,t,s),s.tagName==="template"){const a=t,o=a.sourceCodeLocation,l=o&&o.startTag&&Zt(o.startTag),h=o&&o.endTag&&Zt(o.endTag),m=as(e,a.content);l&&h&&e.file&&(m.position={start:l.end,end:h.start}),s.content=m}return e.schema=n,s}function Tr(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Im(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Im(e,t,n){const r=Zt(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)pl.call(n.attrs,a)&&(s[Hr(e.schema,a).property]=Zt(n.attrs[a]));n.startTag;const o=Zt(n.startTag),l=n.endTag?Zt(n.endTag):void 0,h={opening:o};l&&(h.closing=l),h.properties=s,t.data={position:h}}}return r}function Zt(e){const t=oa({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=oa({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function oa(e){return e.line&&e.column?e:void 0}var la={}.hasOwnProperty;function El(e,t){const n=t||{};function r(i,...s){let a=r.invalid;const o=r.handlers;if(i&&la.call(i,e)){const l=String(i[e]);a=la.call(o,l)?o[l]:r.unknown}if(a)return a.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var wm={},Lm={}.hasOwnProperty,Tl=El("type",{handlers:{root:Om,element:Fm,text:Mm,comment:Bm,doctype:Pm}});function Rm(e,t){const n=(t||wm).space;return Tl(e,n==="svg"?Ct:Xn)}function Om(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=os(e.children,n,t),on(e,n),n}function Dm(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=os(e.children,n,t),on(e,n),n}function Pm(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return on(e,t),t}function Mm(e){const t={nodeName:"#text",value:e.value,parentNode:null};return on(e,t),t}function Bm(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return on(e,t),t}function Fm(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Ct);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&Lm.call(e.properties,s)){const l=jm(r,s,e.properties[s]);l&&i.push(l)}}const a=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Pt[a],childNodes:[],parentNode:null};return o.childNodes=os(e.children,o,r),on(e,o),e.tagName==="template"&&e.content&&(o.content=Dm(e.content,r)),o}function jm(e,t,n){const r=Hr(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?dl(n):ml(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=Pt[r.space]}return i}function os(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=Tl(e[r],n);s.parentNode=t,i.push(s)}return i}function on(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})}var Hm=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Um=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]);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={}));var Le={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function bl(e){return e>=55296&&e<=57343}function zm(e){return e>=56320&&e<=57343}function $m(e,t){return(e-55296)*1024+9216+t}function xl(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function kl(e){return e>=64976&&e<=65007||Um.has(e)}var R;(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"})(R||(R={}));var qm=65536,Ym=class{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=qm,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(e,t){const{line:n,col:r,offset:i}=this,s=r+t,a=i+t;return{code:e,startLine:n,endLine:n,startCol:s,endCol:s,startOffset:a,endOffset:a}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(zm(t))return this.pos++,this._addGap(),$m(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,T.EOF;return this._err(R.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let n=0;n<e.length;n++)if((this.html.charCodeAt(this.pos+n)|32)!==e.charCodeAt(n))return!1;return!0}peek(e){const t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,T.EOF;const n=this.html.charCodeAt(t);return n===T.CARRIAGE_RETURN?T.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,T.EOF;let e=this.html.charCodeAt(this.pos);return e===T.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,T.LINE_FEED):e===T.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,bl(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===T.LINE_FEED||e===T.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){xl(e)?this._err(R.controlCharacterInInputStream):kl(e)&&this._err(R.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},ne;(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"})(ne||(ne={}));function yl(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var Vm=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),ri,Wm=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]]),Uv=(ri=String.fromCodePoint)!==null&&ri!==void 0?ri:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Qm(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Wm.get(e))!==null&&t!==void 0?t:e}var ye;(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"})(ye||(ye={}));var Gm=32,bt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(bt||(bt={}));function Ii(e){return e>=ye.ZERO&&e<=ye.NINE}function Km(e){return e>=ye.UPPER_A&&e<=ye.UPPER_F||e>=ye.LOWER_A&&e<=ye.LOWER_F}function Xm(e){return e>=ye.UPPER_A&&e<=ye.UPPER_Z||e>=ye.LOWER_A&&e<=ye.LOWER_Z||Ii(e)}function Zm(e){return e===ye.EQUALS||Xm(e)}var ke;(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"})(ke||(ke={}));var lt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(lt||(lt={}));var Jm=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=ke.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=lt.Strict}startEntity(e){this.decodeMode=e,this.state=ke.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case ke.EntityStart:return e.charCodeAt(t)===ye.NUM?(this.state=ke.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=ke.NamedEntity,this.stateNamedEntity(e,t));case ke.NumericStart:return this.stateNumericStart(e,t);case ke.NumericDecimal:return this.stateNumericDecimal(e,t);case ke.NumericHex:return this.stateNumericHex(e,t);case ke.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Gm)===ye.LOWER_X?(this.state=ke.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=ke.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){const i=n-t;this.result=this.result*Math.pow(r,i)+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(Ii(r)||Km(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(Ii(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===ye.SEMI)this.consumed+=1;else if(this.decodeMode===lt.Strict)return 0;return this.emitCodePoint(Qm(this.result),this.consumed),this.errors&&(e!==ye.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let r=n[this.treeIndex],i=(r&bt.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const s=e.charCodeAt(t);if(this.treeIndex=ef(n,r,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===lt.Attribute&&(i===0||Zm(s))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&bt.VALUE_LENGTH)>>14,i!==0){if(s===ye.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==lt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,r=(n[t]&bt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~bt.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case ke.NamedEntity:return this.result!==0&&(this.decodeMode!==lt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ke.NumericDecimal:return this.emitNumericEntity(0,2);case ke.NumericHex:return this.emitNumericEntity(0,3);case ke.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ke.EntityStart:return 0}}};function ef(e,t,n,r){const i=(t&bt.BRANCH_LENGTH)>>7,s=t&bt.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const l=r-s;return l<0||l>=i?-1:e[n+l]-1}let a=n,o=a+i-1;for(;a<=o;){const l=a+o>>>1,h=e[l];if(h<r)a=l+1;else if(h>r)o=l-1;else return e[l+i]}return-1}var M;(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/"})(M||(M={}));var Mt;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Mt||(Mt={}));var Ue;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ue||(Ue={}));var w;(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"})(w||(w={}));var c;(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"})(c||(c={}));var tf=new Map([[w.A,c.A],[w.ADDRESS,c.ADDRESS],[w.ANNOTATION_XML,c.ANNOTATION_XML],[w.APPLET,c.APPLET],[w.AREA,c.AREA],[w.ARTICLE,c.ARTICLE],[w.ASIDE,c.ASIDE],[w.B,c.B],[w.BASE,c.BASE],[w.BASEFONT,c.BASEFONT],[w.BGSOUND,c.BGSOUND],[w.BIG,c.BIG],[w.BLOCKQUOTE,c.BLOCKQUOTE],[w.BODY,c.BODY],[w.BR,c.BR],[w.BUTTON,c.BUTTON],[w.CAPTION,c.CAPTION],[w.CENTER,c.CENTER],[w.CODE,c.CODE],[w.COL,c.COL],[w.COLGROUP,c.COLGROUP],[w.DD,c.DD],[w.DESC,c.DESC],[w.DETAILS,c.DETAILS],[w.DIALOG,c.DIALOG],[w.DIR,c.DIR],[w.DIV,c.DIV],[w.DL,c.DL],[w.DT,c.DT],[w.EM,c.EM],[w.EMBED,c.EMBED],[w.FIELDSET,c.FIELDSET],[w.FIGCAPTION,c.FIGCAPTION],[w.FIGURE,c.FIGURE],[w.FONT,c.FONT],[w.FOOTER,c.FOOTER],[w.FOREIGN_OBJECT,c.FOREIGN_OBJECT],[w.FORM,c.FORM],[w.FRAME,c.FRAME],[w.FRAMESET,c.FRAMESET],[w.H1,c.H1],[w.H2,c.H2],[w.H3,c.H3],[w.H4,c.H4],[w.H5,c.H5],[w.H6,c.H6],[w.HEAD,c.HEAD],[w.HEADER,c.HEADER],[w.HGROUP,c.HGROUP],[w.HR,c.HR],[w.HTML,c.HTML],[w.I,c.I],[w.IMG,c.IMG],[w.IMAGE,c.IMAGE],[w.INPUT,c.INPUT],[w.IFRAME,c.IFRAME],[w.KEYGEN,c.KEYGEN],[w.LABEL,c.LABEL],[w.LI,c.LI],[w.LINK,c.LINK],[w.LISTING,c.LISTING],[w.MAIN,c.MAIN],[w.MALIGNMARK,c.MALIGNMARK],[w.MARQUEE,c.MARQUEE],[w.MATH,c.MATH],[w.MENU,c.MENU],[w.META,c.META],[w.MGLYPH,c.MGLYPH],[w.MI,c.MI],[w.MO,c.MO],[w.MN,c.MN],[w.MS,c.MS],[w.MTEXT,c.MTEXT],[w.NAV,c.NAV],[w.NOBR,c.NOBR],[w.NOFRAMES,c.NOFRAMES],[w.NOEMBED,c.NOEMBED],[w.NOSCRIPT,c.NOSCRIPT],[w.OBJECT,c.OBJECT],[w.OL,c.OL],[w.OPTGROUP,c.OPTGROUP],[w.OPTION,c.OPTION],[w.P,c.P],[w.PARAM,c.PARAM],[w.PLAINTEXT,c.PLAINTEXT],[w.PRE,c.PRE],[w.RB,c.RB],[w.RP,c.RP],[w.RT,c.RT],[w.RTC,c.RTC],[w.RUBY,c.RUBY],[w.S,c.S],[w.SCRIPT,c.SCRIPT],[w.SEARCH,c.SEARCH],[w.SECTION,c.SECTION],[w.SELECT,c.SELECT],[w.SOURCE,c.SOURCE],[w.SMALL,c.SMALL],[w.SPAN,c.SPAN],[w.STRIKE,c.STRIKE],[w.STRONG,c.STRONG],[w.STYLE,c.STYLE],[w.SUB,c.SUB],[w.SUMMARY,c.SUMMARY],[w.SUP,c.SUP],[w.TABLE,c.TABLE],[w.TBODY,c.TBODY],[w.TEMPLATE,c.TEMPLATE],[w.TEXTAREA,c.TEXTAREA],[w.TFOOT,c.TFOOT],[w.TD,c.TD],[w.TH,c.TH],[w.THEAD,c.THEAD],[w.TITLE,c.TITLE],[w.TR,c.TR],[w.TRACK,c.TRACK],[w.TT,c.TT],[w.U,c.U],[w.UL,c.UL],[w.SVG,c.SVG],[w.VAR,c.VAR],[w.WBR,c.WBR],[w.XMP,c.XMP]]);function ln(e){var t;return(t=tf.get(e))!==null&&t!==void 0?t:c.UNKNOWN}var F=c,nf={[M.HTML]:new Set([F.ADDRESS,F.APPLET,F.AREA,F.ARTICLE,F.ASIDE,F.BASE,F.BASEFONT,F.BGSOUND,F.BLOCKQUOTE,F.BODY,F.BR,F.BUTTON,F.CAPTION,F.CENTER,F.COL,F.COLGROUP,F.DD,F.DETAILS,F.DIR,F.DIV,F.DL,F.DT,F.EMBED,F.FIELDSET,F.FIGCAPTION,F.FIGURE,F.FOOTER,F.FORM,F.FRAME,F.FRAMESET,F.H1,F.H2,F.H3,F.H4,F.H5,F.H6,F.HEAD,F.HEADER,F.HGROUP,F.HR,F.HTML,F.IFRAME,F.IMG,F.INPUT,F.LI,F.LINK,F.LISTING,F.MAIN,F.MARQUEE,F.MENU,F.META,F.NAV,F.NOEMBED,F.NOFRAMES,F.NOSCRIPT,F.OBJECT,F.OL,F.P,F.PARAM,F.PLAINTEXT,F.PRE,F.SCRIPT,F.SECTION,F.SELECT,F.SOURCE,F.STYLE,F.SUMMARY,F.TABLE,F.TBODY,F.TD,F.TEMPLATE,F.TEXTAREA,F.TFOOT,F.TH,F.THEAD,F.TITLE,F.TR,F.TRACK,F.UL,F.WBR,F.XMP]),[M.MATHML]:new Set([F.MI,F.MO,F.MN,F.MS,F.MTEXT,F.ANNOTATION_XML]),[M.SVG]:new Set([F.TITLE,F.FOREIGN_OBJECT,F.DESC]),[M.XLINK]:new Set,[M.XML]:new Set,[M.XMLNS]:new Set},wi=new Set([F.H1,F.H2,F.H3,F.H4,F.H5,F.H6]),zv=new Set([w.STYLE,w.SCRIPT,w.XMP,w.IFRAME,w.NOEMBED,w.NOFRAMES,w.PLAINTEXT]),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={}));var be={DATA:x.DATA,RCDATA:x.RCDATA,RAWTEXT:x.RAWTEXT,SCRIPT_DATA:x.SCRIPT_DATA,PLAINTEXT:x.PLAINTEXT,CDATA_SECTION:x.CDATA_SECTION};function rf(e){return e>=T.DIGIT_0&&e<=T.DIGIT_9}function yn(e){return e>=T.LATIN_CAPITAL_A&&e<=T.LATIN_CAPITAL_Z}function sf(e){return e>=T.LATIN_SMALL_A&&e<=T.LATIN_SMALL_Z}function pt(e){return sf(e)||yn(e)}function ca(e){return pt(e)||rf(e)}function ur(e){return e+32}function Cl(e){return e===T.SPACE||e===T.LINE_FEED||e===T.TABULATION||e===T.FORM_FEED}function ua(e){return Cl(e)||e===T.SOLIDUS||e===T.GREATER_THAN_SIGN}function af(e){return e===T.NULL?R.nullCharacterReference:e>1114111?R.characterReferenceOutsideUnicodeRange:bl(e)?R.surrogateCharacterReference:kl(e)?R.noncharacterCharacterReference:xl(e)||e===T.CARRIAGE_RETURN?R.controlCharacterReference:null}var of=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=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 Ym(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Jm(Vm,(n,r)=>{this.preprocessor.pos=this.entityStartPos+r-1,this._flushCodePointConsumedAsCharacterReference(n)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(R.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err(R.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{const r=af(n);r&&this._err(r,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)===null||r===void 0||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ne.START_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ne.END_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:ne.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:ne.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;const n=this.currentToken;if(yl(n,this.currentAttr.name)===null){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){const r=(e=(t=n.location).attrs)!==null&&e!==void 0?e:t.attrs=Object.create(null);r[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(R.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const e=this.currentToken;this.prepareToken(e),e.tagID=ln(e.tagName),e.type===ne.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(R.endTagWithAttributes),e.selfClosing&&this._err(R.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case ne.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case ne.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case ne.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:ne.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){const t=Cl(e)?ne.WHITESPACE_CHARACTER:e===T.NULL?ne.NULL_CHARACTER:ne.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(ne.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=x.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?lt.Attribute:lt.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===x.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===x.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===x.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case x.DATA:this._stateData(e);break;case x.RCDATA:this._stateRcdata(e);break;case x.RAWTEXT:this._stateRawtext(e);break;case x.SCRIPT_DATA:this._stateScriptData(e);break;case x.PLAINTEXT:this._statePlaintext(e);break;case x.TAG_OPEN:this._stateTagOpen(e);break;case x.END_TAG_OPEN:this._stateEndTagOpen(e);break;case x.TAG_NAME:this._stateTagName(e);break;case x.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case x.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case x.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case x.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case x.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case x.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case x.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case x.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case x.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case x.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case x.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case x.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case x.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case x.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case x.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case x.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case x.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case x.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case x.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case x.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case x.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case x.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case x.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case x.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case x.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case x.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case x.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case x.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case x.BOGUS_COMMENT:this._stateBogusComment(e);break;case x.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case x.COMMENT_START:this._stateCommentStart(e);break;case x.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case x.COMMENT:this._stateComment(e);break;case x.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case x.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case x.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case x.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case x.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case x.COMMENT_END:this._stateCommentEnd(e);break;case x.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case x.DOCTYPE:this._stateDoctype(e);break;case x.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case x.DOCTYPE_NAME:this._stateDoctypeName(e);break;case x.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case x.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case x.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case x.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case x.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case x.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case x.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case x.CDATA_SECTION:this._stateCdataSection(e);break;case x.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case x.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case x.CHARACTER_REFERENCE:this._stateCharacterReference();break;case x.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case T.LESS_THAN_SIGN:this.state=x.TAG_OPEN;break;case T.AMPERSAND:this._startCharacterReference();break;case T.NULL:this._err(R.unexpectedNullCharacter),this._emitCodePoint(e);break;case T.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case T.AMPERSAND:this._startCharacterReference();break;case T.LESS_THAN_SIGN:this.state=x.RCDATA_LESS_THAN_SIGN;break;case T.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case T.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case T.LESS_THAN_SIGN:this.state=x.RAWTEXT_LESS_THAN_SIGN;break;case T.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case T.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case T.LESS_THAN_SIGN:this.state=x.SCRIPT_DATA_LESS_THAN_SIGN;break;case T.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case T.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case T.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case T.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(pt(e))this._createStartTagToken(),this.state=x.TAG_NAME,this._stateTagName(e);else switch(e){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(R.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=x.BOGUS_COMMENT,this._stateBogusComment(e);break;case T.EOF:this._err(R.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(R.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=x.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(pt(e))this._createEndTagToken(),this.state=x.TAG_NAME,this._stateTagName(e);else switch(e){case T.GREATER_THAN_SIGN:this._err(R.missingEndTagName),this.state=x.DATA;break;case T.EOF:this._err(R.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(R.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=x.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const t=this.currentToken;switch(e){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(R.unexpectedNullCharacter),t.tagName+="�";break;case T.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(yn(e)?ur(e):e)}}_stateRcdataLessThanSign(e){e===T.SOLIDUS?this.state=x.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=x.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){pt(e)?(this.state=x.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=x.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const t=this.currentToken;switch(t.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(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=x.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===T.SOLIDUS?this.state=x.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=x.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){pt(e)?(this.state=x.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=x.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=x.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){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(e)}}_stateScriptDataEndTagOpen(e){pt(e)?(this.state=x.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=x.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=x.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===T.HYPHEN_MINUS?(this.state=x.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=x.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===T.HYPHEN_MINUS?(this.state=x.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=x.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){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(R.unexpectedNullCharacter),this._emitChars("�");break;case T.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){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(R.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case T.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=x.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){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(R.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case T.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=x.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===T.SOLIDUS?this.state=x.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:pt(e)?(this._emitChars("<"),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){pt(e)?(this.state=x.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Le.SCRIPT,!1)&&ua(this.preprocessor.peek(Le.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t<Le.SCRIPT.length;t++)this._emitCodePoint(this._consume());this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){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(R.unexpectedNullCharacter),this._emitChars("�");break;case T.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){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(R.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case T.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){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(R.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case T.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===T.SOLIDUS?(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Le.SCRIPT,!1)&&ua(this.preprocessor.peek(Le.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t<Le.SCRIPT.length;t++)this._emitCodePoint(this._consume());this.state=x.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){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(e);break;case T.EQUALS_SIGN:this._err(R.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=x.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=x.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){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(e);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(R.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case T.NULL:this._err(R.unexpectedNullCharacter),this.currentAttr.name+="�";break;default:this.currentAttr.name+=String.fromCodePoint(yn(e)?ur(e):e)}}_stateAfterAttributeName(e){switch(e){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(R.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=x.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){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(R.missingAttributeValue),this.state=x.DATA,this.emitCurrentTagToken();break;default:this.state=x.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case T.QUOTATION_MARK:this.state=x.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case T.AMPERSAND:this._startCharacterReference();break;case T.NULL:this._err(R.unexpectedNullCharacter),this.currentAttr.value+="�";break;case T.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case T.APOSTROPHE:this.state=x.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case T.AMPERSAND:this._startCharacterReference();break;case T.NULL:this._err(R.unexpectedNullCharacter),this.currentAttr.value+="�";break;case T.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){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(R.unexpectedNullCharacter),this.currentAttr.value+="�";break;case T.QUOTATION_MARK:case T.APOSTROPHE:case T.LESS_THAN_SIGN:case T.EQUALS_SIGN:case T.GRAVE_ACCENT:this._err(R.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case T.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){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(R.eofInTag),this._emitEOFToken();break;default:this._err(R.missingWhitespaceBetweenAttributes),this.state=x.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case T.GREATER_THAN_SIGN:{const t=this.currentToken;t.selfClosing=!0,this.state=x.DATA,this.emitCurrentTagToken();break}case T.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this._err(R.unexpectedSolidusInTag),this.state=x.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const t=this.currentToken;switch(e){case T.GREATER_THAN_SIGN:this.state=x.DATA,this.emitCurrentComment(t);break;case T.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case T.NULL:this._err(R.unexpectedNullCharacter),t.data+="�";break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Le.DASH_DASH,!0)?(this._createCommentToken(Le.DASH_DASH.length+1),this.state=x.COMMENT_START):this._consumeSequenceIfMatch(Le.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Le.DOCTYPE.length+1),this.state=x.DOCTYPE):this._consumeSequenceIfMatch(Le.CDATA_START,!0)?this.inForeignNode?this.state=x.CDATA_SECTION:(this._err(R.cdataInHtmlContent),this._createCommentToken(Le.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=x.BOGUS_COMMENT):this._ensureHibernation()||(this._err(R.incorrectlyOpenedComment),this._createCommentToken(2),this.state=x.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case T.HYPHEN_MINUS:this.state=x.COMMENT_START_DASH;break;case T.GREATER_THAN_SIGN:{this._err(R.abruptClosingOfEmptyComment),this.state=x.DATA;const t=this.currentToken;this.emitCurrentComment(t);break}default:this.state=x.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const t=this.currentToken;switch(e){case T.HYPHEN_MINUS:this.state=x.COMMENT_END;break;case T.GREATER_THAN_SIGN:this._err(R.abruptClosingOfEmptyComment),this.state=x.DATA,this.emitCurrentComment(t);break;case T.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=x.COMMENT,this._stateComment(e)}}_stateComment(e){const t=this.currentToken;switch(e){case T.HYPHEN_MINUS:this.state=x.COMMENT_END_DASH;break;case T.LESS_THAN_SIGN:t.data+="<",this.state=x.COMMENT_LESS_THAN_SIGN;break;case T.NULL:this._err(R.unexpectedNullCharacter),t.data+="�";break;case T.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const t=this.currentToken;switch(e){case T.EXCLAMATION_MARK:t.data+="!",this.state=x.COMMENT_LESS_THAN_SIGN_BANG;break;case T.LESS_THAN_SIGN:t.data+="<";break;default:this.state=x.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===T.HYPHEN_MINUS?this.state=x.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=x.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===T.HYPHEN_MINUS?this.state=x.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=x.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==T.GREATER_THAN_SIGN&&e!==T.EOF&&this._err(R.nestedComment),this.state=x.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const t=this.currentToken;switch(e){case T.HYPHEN_MINUS:this.state=x.COMMENT_END;break;case T.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=x.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const t=this.currentToken;switch(e){case T.GREATER_THAN_SIGN:this.state=x.DATA,this.emitCurrentComment(t);break;case T.EXCLAMATION_MARK:this.state=x.COMMENT_END_BANG;break;case T.HYPHEN_MINUS:t.data+="-";break;case T.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=x.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const t=this.currentToken;switch(e){case T.HYPHEN_MINUS:t.data+="--!",this.state=x.COMMENT_END_DASH;break;case T.GREATER_THAN_SIGN:this._err(R.incorrectlyClosedComment),this.state=x.DATA,this.emitCurrentComment(t);break;case T.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=x.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){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(e);break;case T.EOF:{this._err(R.eofInDoctype),this._createDoctypeToken(null);const t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(R.missingWhitespaceBeforeDoctypeName),this.state=x.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(yn(e))this._createDoctypeToken(String.fromCharCode(ur(e))),this.state=x.DOCTYPE_NAME;else switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.NULL:this._err(R.unexpectedNullCharacter),this._createDoctypeToken("�"),this.state=x.DOCTYPE_NAME;break;case T.GREATER_THAN_SIGN:{this._err(R.missingDoctypeName),this._createDoctypeToken(null);const t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=x.DATA;break}case T.EOF:{this._err(R.eofInDoctype),this._createDoctypeToken(null);const t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=x.DOCTYPE_NAME}}_stateDoctypeName(e){const t=this.currentToken;switch(e){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(t);break;case T.NULL:this._err(R.unexpectedNullCharacter),t.name+="�";break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(yn(e)?ur(e):e)}}_stateAfterDoctypeName(e){const t=this.currentToken;switch(e){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(t);break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(Le.PUBLIC,!1)?this.state=x.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Le.SYSTEM,!1)?this.state=x.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(R.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const t=this.currentToken;switch(e){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(R.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case T.APOSTROPHE:this._err(R.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case T.GREATER_THAN_SIGN:this._err(R.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(t);break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:t.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case T.APOSTROPHE:t.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case T.GREATER_THAN_SIGN:this._err(R.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(t);break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case T.QUOTATION_MARK:this.state=x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case T.NULL:this._err(R.unexpectedNullCharacter),t.publicId+="�";break;case T.GREATER_THAN_SIGN:this._err(R.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case T.APOSTROPHE:this.state=x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case T.NULL:this._err(R.unexpectedNullCharacter),t.publicId+="�";break;case T.GREATER_THAN_SIGN:this._err(R.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){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(t);break;case T.QUOTATION_MARK:this._err(R.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case T.APOSTROPHE:this._err(R.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.QUOTATION_MARK:t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case T.APOSTROPHE:t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const t=this.currentToken;switch(e){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(R.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case T.APOSTROPHE:this._err(R.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case T.GREATER_THAN_SIGN:this._err(R.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(t);break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case T.APOSTROPHE:t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case T.GREATER_THAN_SIGN:this._err(R.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(t);break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case T.QUOTATION_MARK:this.state=x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case T.NULL:this._err(R.unexpectedNullCharacter),t.systemId+="�";break;case T.GREATER_THAN_SIGN:this._err(R.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case T.APOSTROPHE:this.state=x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case T.NULL:this._err(R.unexpectedNullCharacter),t.systemId+="�";break;case T.GREATER_THAN_SIGN:this._err(R.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const t=this.currentToken;switch(e){case T.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.NULL:this._err(R.unexpectedNullCharacter);break;case T.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case T.RIGHT_SQUARE_BRACKET:this.state=x.CDATA_SECTION_BRACKET;break;case T.EOF:this._err(R.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===T.RIGHT_SQUARE_BRACKET?this.state=x.CDATA_SECTION_END:(this._emitChars("]"),this.state=x.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){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(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(T.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&ca(this.preprocessor.peek(1))?x.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){ca(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===T.SEMICOLON&&this._err(R.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},Al=new Set([c.DD,c.DT,c.LI,c.OPTGROUP,c.OPTION,c.P,c.RB,c.RP,c.RT,c.RTC]),ha=new Set([...Al,c.CAPTION,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]),Cr=new Set([c.APPLET,c.CAPTION,c.HTML,c.MARQUEE,c.OBJECT,c.TABLE,c.TD,c.TEMPLATE,c.TH]),lf=new Set([...Cr,c.OL,c.UL]),cf=new Set([...Cr,c.BUTTON]),da=new Set([c.ANNOTATION_XML,c.MI,c.MN,c.MO,c.MS,c.MTEXT]),ma=new Set([c.DESC,c.FOREIGN_OBJECT,c.TITLE]),uf=new Set([c.TR,c.TEMPLATE,c.HTML]),hf=new Set([c.TBODY,c.TFOOT,c.THEAD,c.TEMPLATE,c.HTML]),df=new Set([c.TABLE,c.TEMPLATE,c.HTML]),mf=new Set([c.TD,c.TH]),ff=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=c.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===c.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===M.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){const r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==M.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){const t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(wi,M.HTML)}popUntilTableCellPopped(){this.popUntilPopped(mf,M.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(df,M.HTML)}clearBackToTableBodyContext(){this.clearBackTo(hf,M.HTML)}clearBackToTableRowContext(){this.clearBackTo(uf,M.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===c.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===c.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){const r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case M.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case M.SVG:if(ma.has(r))return!1;break;case M.MATHML:if(da.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Cr)}hasInListItemScope(e){return this.hasInDynamicScope(e,lf)}hasInButtonScope(e){return this.hasInDynamicScope(e,cf)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case M.HTML:if(wi.has(t))return!0;if(Cr.has(t))return!1;break;case M.SVG:if(ma.has(t))return!1;break;case M.MATHML:if(da.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===M.HTML)switch(this.tagIDs[t]){case e:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===M.HTML)switch(this.tagIDs[e]){case c.TBODY:case c.THEAD:case c.TFOOT:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===M.HTML)switch(this.tagIDs[t]){case e:return!0;case c.OPTION:case c.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Al.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&ha.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&ha.has(this.currentTagId);)this.pop()}},ii=3,Je;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Je||(Je={}));var fa={type:Je.Marker},pf=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const n=[],r=t.length,i=this.treeAdapter.getTagName(e),s=this.treeAdapter.getNamespaceURI(e);for(let a=0;a<this.entries.length;a++){const o=this.entries[a];if(o.type===Je.Marker)break;const{element:l}=o;if(this.treeAdapter.getTagName(l)===i&&this.treeAdapter.getNamespaceURI(l)===s){const h=this.treeAdapter.getAttrList(l);h.length===r&&n.push({idx:a,attrs:h})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<ii)return;const t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<ii)return;const r=new Map(t.map(s=>[s.name,s.value]));let i=0;for(let s=0;s<n.length;s++){const a=n[s];a.attrs.every(o=>r.get(o.name)===o.value)&&(i+=1,i>=ii&&this.entries.splice(a.idx,1))}}insertMarker(){this.entries.unshift(fa)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:Je.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Je.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(fa);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const t=this.entries.find(n=>n.type===Je.Marker||this.treeAdapter.getTagName(n.element)===e);return t&&t.type===Je.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===Je.Element&&t.element===e)}},gt={createDocument(){return{nodeName:"#document",mode:Ue.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};gt.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(gt.isTextNode(n)){n.value+=t;return}}gt.appendChild(e,gt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&>.isTextNode(r)?r.value+=t:gt.insertBefore(e,gt.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}}},_l="html",gf="about:legacy-compat",Ef="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",vl=["+//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//"],Tf=[...vl,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],bf=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Nl=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],xf=[...Nl,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function pa(e,t){return t.some(n=>e.startsWith(n))}function kf(e){return e.name===_l&&e.publicId===null&&(e.systemId===null||e.systemId===gf)}function yf(e){if(e.name!==_l)return Ue.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Ef)return Ue.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),bf.has(n))return Ue.QUIRKS;let r=t===null?Tf:vl;if(pa(n,r))return Ue.QUIRKS;if(r=t===null?Nl:xf,pa(n,r))return Ue.LIMITED_QUIRKS}return Ue.NO_QUIRKS}var ga={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Cf="definitionurl",Af="definitionURL",_f=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])),vf=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:M.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:M.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:M.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:M.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:M.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:M.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:M.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:M.XML}],["xml:space",{prefix:"xml",name:"space",namespace:M.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:M.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:M.XMLNS}]]),Nf=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])),Sf=new Set([c.B,c.BIG,c.BLOCKQUOTE,c.BODY,c.BR,c.CENTER,c.CODE,c.DD,c.DIV,c.DL,c.DT,c.EM,c.EMBED,c.H1,c.H2,c.H3,c.H4,c.H5,c.H6,c.HEAD,c.HR,c.I,c.IMG,c.LI,c.LISTING,c.MENU,c.META,c.NOBR,c.OL,c.P,c.PRE,c.RUBY,c.S,c.SMALL,c.SPAN,c.STRONG,c.STRIKE,c.SUB,c.SUP,c.TABLE,c.TT,c.U,c.UL,c.VAR]);function If(e){const t=e.tagID;return t===c.FONT&&e.attrs.some(({name:n})=>n===Mt.COLOR||n===Mt.SIZE||n===Mt.FACE)||Sf.has(t)}function Sl(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Cf){e.attrs[t].name=Af;break}}function Il(e){for(let t=0;t<e.attrs.length;t++){const n=_f.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function ls(e){for(let t=0;t<e.attrs.length;t++){const n=vf.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 wf(e){const t=Nf.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ln(e.tagName))}function Lf(e,t){return t===M.MATHML&&(e===c.MI||e===c.MO||e===c.MN||e===c.MS||e===c.MTEXT)}function Rf(e,t,n){if(t===M.MATHML&&e===c.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Mt.ENCODING){const i=n[r].value.toLowerCase();return i===ga.TEXT_HTML||i===ga.APPLICATION_XML}}return t===M.SVG&&(e===c.FOREIGN_OBJECT||e===c.DESC||e===c.TITLE)}function Of(e,t,n,r){return(!r||r===M.HTML)&&Rf(e,t,n)||(!r||r===M.MATHML)&&Lf(e,t)}var Df="hidden",Pf=8,Mf=3,k;(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"})(k||(k={}));var Bf={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},wl=new Set([c.TABLE,c.TBODY,c.TFOOT,c.THEAD,c.TR]),Ea={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:gt,onParseError:null},Ta=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=k.INITIAL,this.originalInsertionMode=k.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={...Ea,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new of(this.options,this),this.activeFormattingElements=new pf(this.treeAdapter),this.fragmentContextID=n?ln(this.treeAdapter.getTagName(n)):c.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new ff(this.document,this.treeAdapter,this)}static parse(e,t){const n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){const n={...Ea,...t};e!=null||(e=n.treeAdapter.createElement(w.TEMPLATE,M.HTML,[]));const r=n.treeAdapter.createElement("documentmock",M.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===c.TEMPLATE&&i.tmplInsertionModeStack.unshift(k.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){var r;if(!this.onParseError)return;const i=(r=e.location)!==null&&r!==void 0?r:Bf,s={code:t,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:n?i.startLine:i.endLine,endCol:n?i.startCol:i.endCol,endOffset:n?i.startOffset:i.endOffset};this.onParseError(s)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)===null||i===void 0||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)===null||r===void 0||r.call(n,e,this.openElements.current),t){let i,s;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,s=this.fragmentContextID):{current:i,currentTagId:s}=this.openElements,this._setContextModes(i,s)}}_setContextModes(e,t){const n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===M.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,M.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=k.TEXT}switchToPlaintextParsing(){this.insertionMode=k.TEXT,this.originalInsertionMode=k.IN_BODY,this.tokenizer.state=be.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===w.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==M.HTML))switch(this.fragmentContextID){case c.TITLE:case c.TEXTAREA:this.tokenizer.state=be.RCDATA;break;case c.STYLE:case c.XMP:case c.IFRAME:case c.NOEMBED:case c.NOFRAMES:case c.NOSCRIPT:this.tokenizer.state=be.RAWTEXT;break;case c.SCRIPT:this.tokenizer.state=be.SCRIPT_DATA;break;case c.PLAINTEXT:this.tokenizer.state=be.PLAINTEXT}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){const i=this.treeAdapter.getChildNodes(this.document).find(s=>this.treeAdapter.isDocumentTypeNode(s));i&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n??this.document,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){const n=this.treeAdapter.createElement(e,M.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,M.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(w.HTML,M.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,c.HTML)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){const{endLine:s,endCol:a,endOffset:o}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:s,endCol:a,endOffset:o})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===ne.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===c.SVG&&this.treeAdapter.getTagName(t)===w.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===M.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===c.MGLYPH||e.tagID===c.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,M.HTML)}_processToken(e){switch(e.type){case ne.CHARACTER:this.onCharacter(e);break;case ne.NULL_CHARACTER:this.onNullCharacter(e);break;case ne.COMMENT:this.onComment(e);break;case ne.DOCTYPE:this.onDoctype(e);break;case ne.START_TAG:this._processStartTag(e);break;case ne.END_TAG:this.onEndTag(e);break;case ne.EOF:this.onEof(e);break;case ne.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){const r=this.treeAdapter.getNamespaceURI(t),i=this.treeAdapter.getAttrList(t);return Of(e,r,i,n)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex(r=>r.type===Je.Marker||this.openElements.contains(r.element)),n=t===-1?e-1:t-1;for(let r=n;r>=0;r--){const i=this.activeFormattingElements.entries[r];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=k.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(c.P),this.openElements.popUntilTagNamePopped(c.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case c.TR:this.insertionMode=k.IN_ROW;return;case c.TBODY:case c.THEAD:case c.TFOOT:this.insertionMode=k.IN_TABLE_BODY;return;case c.CAPTION:this.insertionMode=k.IN_CAPTION;return;case c.COLGROUP:this.insertionMode=k.IN_COLUMN_GROUP;return;case c.TABLE:this.insertionMode=k.IN_TABLE;return;case c.BODY:this.insertionMode=k.IN_BODY;return;case c.FRAMESET:this.insertionMode=k.IN_FRAMESET;return;case c.SELECT:this._resetInsertionModeForSelect(e);return;case c.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case c.HTML:this.insertionMode=this.headElement?k.AFTER_HEAD:k.BEFORE_HEAD;return;case c.TD:case c.TH:if(e>0){this.insertionMode=k.IN_CELL;return}break;case c.HEAD:if(e>0){this.insertionMode=k.IN_HEAD;return}}this.insertionMode=k.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const n=this.openElements.tagIDs[t];if(n===c.TEMPLATE)break;if(n===c.TABLE){this.insertionMode=k.IN_SELECT_IN_TABLE;return}}this.insertionMode=k.IN_SELECT}_isElementCausesFosterParenting(e){return wl.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case c.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===M.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case c.TABLE:{const n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const n=this.treeAdapter.getNamespaceURI(e);return nf[n].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){mg(this,e);return}switch(this.insertionMode){case k.INITIAL:gn(this,e);break;case k.BEFORE_HTML:_n(this,e);break;case k.BEFORE_HEAD:vn(this,e);break;case k.IN_HEAD:Nn(this,e);break;case k.IN_HEAD_NO_SCRIPT:Sn(this,e);break;case k.AFTER_HEAD:In(this,e);break;case k.IN_BODY:case k.IN_CAPTION:case k.IN_CELL:case k.IN_TEMPLATE:Rl(this,e);break;case k.TEXT:case k.IN_SELECT:case k.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case k.IN_TABLE:case k.IN_TABLE_BODY:case k.IN_ROW:si(this,e);break;case k.IN_TABLE_TEXT:Fl(this,e);break;case k.IN_COLUMN_GROUP:Ar(this,e);break;case k.AFTER_BODY:_r(this,e);break;case k.AFTER_AFTER_BODY:br(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){dg(this,e);return}switch(this.insertionMode){case k.INITIAL:gn(this,e);break;case k.BEFORE_HTML:_n(this,e);break;case k.BEFORE_HEAD:vn(this,e);break;case k.IN_HEAD:Nn(this,e);break;case k.IN_HEAD_NO_SCRIPT:Sn(this,e);break;case k.AFTER_HEAD:In(this,e);break;case k.TEXT:this._insertCharacters(e);break;case k.IN_TABLE:case k.IN_TABLE_BODY:case k.IN_ROW:si(this,e);break;case k.IN_COLUMN_GROUP:Ar(this,e);break;case k.AFTER_BODY:_r(this,e);break;case k.AFTER_AFTER_BODY:br(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){Li(this,e);return}switch(this.insertionMode){case k.INITIAL:case k.BEFORE_HTML:case k.BEFORE_HEAD:case k.IN_HEAD:case k.IN_HEAD_NO_SCRIPT:case k.AFTER_HEAD:case k.IN_BODY:case k.IN_TABLE:case k.IN_CAPTION:case k.IN_COLUMN_GROUP:case k.IN_TABLE_BODY:case k.IN_ROW:case k.IN_CELL:case k.IN_SELECT:case k.IN_SELECT_IN_TABLE:case k.IN_TEMPLATE:case k.IN_FRAMESET:case k.AFTER_FRAMESET:Li(this,e);break;case k.IN_TABLE_TEXT:En(this,e);break;case k.AFTER_BODY:qf(this,e);break;case k.AFTER_AFTER_BODY:case k.AFTER_AFTER_FRAMESET:Yf(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case k.INITIAL:Vf(this,e);break;case k.BEFORE_HEAD:case k.IN_HEAD:case k.IN_HEAD_NO_SCRIPT:case k.AFTER_HEAD:this._err(e,R.misplacedDoctype);break;case k.IN_TABLE_TEXT:En(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,R.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?fg(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case k.INITIAL:gn(this,e);break;case k.BEFORE_HTML:Wf(this,e);break;case k.BEFORE_HEAD:Gf(this,e);break;case k.IN_HEAD:Ve(this,e);break;case k.IN_HEAD_NO_SCRIPT:Zf(this,e);break;case k.AFTER_HEAD:ep(this,e);break;case k.IN_BODY:Ae(this,e);break;case k.IN_TABLE:rn(this,e);break;case k.IN_TABLE_TEXT:En(this,e);break;case k.IN_CAPTION:Kp(this,e);break;case k.IN_COLUMN_GROUP:hs(this,e);break;case k.IN_TABLE_BODY:$r(this,e);break;case k.IN_ROW:qr(this,e);break;case k.IN_CELL:Jp(this,e);break;case k.IN_SELECT:Ul(this,e);break;case k.IN_SELECT_IN_TABLE:tg(this,e);break;case k.IN_TEMPLATE:rg(this,e);break;case k.AFTER_BODY:sg(this,e);break;case k.IN_FRAMESET:ag(this,e);break;case k.AFTER_FRAMESET:lg(this,e);break;case k.AFTER_AFTER_BODY:ug(this,e);break;case k.AFTER_AFTER_FRAMESET:hg(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?pg(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case k.INITIAL:gn(this,e);break;case k.BEFORE_HTML:Qf(this,e);break;case k.BEFORE_HEAD:Kf(this,e);break;case k.IN_HEAD:Xf(this,e);break;case k.IN_HEAD_NO_SCRIPT:Jf(this,e);break;case k.AFTER_HEAD:tp(this,e);break;case k.IN_BODY:zr(this,e);break;case k.TEXT:Hp(this,e);break;case k.IN_TABLE:Un(this,e);break;case k.IN_TABLE_TEXT:En(this,e);break;case k.IN_CAPTION:Xp(this,e);break;case k.IN_COLUMN_GROUP:Zp(this,e);break;case k.IN_TABLE_BODY:Ri(this,e);break;case k.IN_ROW:Hl(this,e);break;case k.IN_CELL:eg(this,e);break;case k.IN_SELECT:zl(this,e);break;case k.IN_SELECT_IN_TABLE:ng(this,e);break;case k.IN_TEMPLATE:ig(this,e);break;case k.AFTER_BODY:ql(this,e);break;case k.IN_FRAMESET:og(this,e);break;case k.AFTER_FRAMESET:cg(this,e);break;case k.AFTER_AFTER_BODY:br(this,e)}}onEof(e){switch(this.insertionMode){case k.INITIAL:gn(this,e);break;case k.BEFORE_HTML:_n(this,e);break;case k.BEFORE_HEAD:vn(this,e);break;case k.IN_HEAD:Nn(this,e);break;case k.IN_HEAD_NO_SCRIPT:Sn(this,e);break;case k.AFTER_HEAD:In(this,e);break;case k.IN_BODY:case k.IN_TABLE:case k.IN_CAPTION:case k.IN_COLUMN_GROUP:case k.IN_TABLE_BODY:case k.IN_ROW:case k.IN_CELL:case k.IN_SELECT:case k.IN_SELECT_IN_TABLE:Ml(this,e);break;case k.TEXT:Up(this,e);break;case k.IN_TABLE_TEXT:En(this,e);break;case k.IN_TEMPLATE:$l(this,e);break;case k.AFTER_BODY:case k.IN_FRAMESET:case k.AFTER_FRAMESET:case k.AFTER_AFTER_BODY:case k.AFTER_AFTER_FRAMESET:us(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===T.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case k.IN_HEAD:case k.IN_HEAD_NO_SCRIPT:case k.AFTER_HEAD:case k.TEXT:case k.IN_COLUMN_GROUP:case k.IN_SELECT:case k.IN_SELECT_IN_TABLE:case k.IN_FRAMESET:case k.AFTER_FRAMESET:this._insertCharacters(e);break;case k.IN_BODY:case k.IN_CAPTION:case k.IN_CELL:case k.IN_TEMPLATE:case k.AFTER_BODY:case k.AFTER_AFTER_BODY:case k.AFTER_AFTER_FRAMESET:Ll(this,e);break;case k.IN_TABLE:case k.IN_TABLE_BODY:case k.IN_ROW:si(this,e);break;case k.IN_TABLE_TEXT:Bl(this,e)}}};function Ff(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):Pl(e,t),n}function jf(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 Hf(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),l=o&&s>=Mf;!o||l?(l&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(a)):(a=Uf(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function Uf(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 zf(e,t,n){const r=e.treeAdapter.getTagName(t),i=ln(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);i===c.TEMPLATE&&s===M.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function $f(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 cs(e,t){for(let n=0;n<Pf;n++){const r=Ff(e,t);if(!r)break;const i=jf(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=Hf(e,i,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),a&&zf(e,a,s),$f(e,i,r)}}function Li(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function qf(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Yf(e,t){e._appendCommentNode(t,e.document)}function us(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 Vf(e,t){e._setDocumentType(t);const n=t.forceQuirks?Ue.QUIRKS:yf(t);kf(t)||e._err(t,R.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=k.BEFORE_HTML}function gn(e,t){e._err(t,R.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ue.QUIRKS),e.insertionMode=k.BEFORE_HTML,e._processToken(t)}function Wf(e,t){t.tagID===c.HTML?(e._insertElement(t,M.HTML),e.insertionMode=k.BEFORE_HEAD):_n(e,t)}function Qf(e,t){const n=t.tagID;(n===c.HTML||n===c.HEAD||n===c.BODY||n===c.BR)&&_n(e,t)}function _n(e,t){e._insertFakeRootElement(),e.insertionMode=k.BEFORE_HEAD,e._processToken(t)}function Gf(e,t){switch(t.tagID){case c.HTML:Ae(e,t);break;case c.HEAD:e._insertElement(t,M.HTML),e.headElement=e.openElements.current,e.insertionMode=k.IN_HEAD;break;default:vn(e,t)}}function Kf(e,t){const n=t.tagID;n===c.HEAD||n===c.BODY||n===c.HTML||n===c.BR?vn(e,t):e._err(t,R.endTagWithoutMatchingOpenElement)}function vn(e,t){e._insertFakeElement(w.HEAD,c.HEAD),e.headElement=e.openElements.current,e.insertionMode=k.IN_HEAD,e._processToken(t)}function Ve(e,t){switch(t.tagID){case c.HTML:Ae(e,t);break;case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break;case c.TITLE:e._switchToTextParsing(t,be.RCDATA);break;case c.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,be.RAWTEXT):(e._insertElement(t,M.HTML),e.insertionMode=k.IN_HEAD_NO_SCRIPT);break;case c.NOFRAMES:case c.STYLE:e._switchToTextParsing(t,be.RAWTEXT);break;case c.SCRIPT:e._switchToTextParsing(t,be.SCRIPT_DATA);break;case c.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=k.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(k.IN_TEMPLATE);break;case c.HEAD:e._err(t,R.misplacedStartTagForHeadElement);break;default:Nn(e,t)}}function Xf(e,t){switch(t.tagID){case c.HEAD:e.openElements.pop(),e.insertionMode=k.AFTER_HEAD;break;case c.BODY:case c.BR:case c.HTML:Nn(e,t);break;case c.TEMPLATE:zt(e,t);break;default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function zt(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==c.TEMPLATE&&e._err(t,R.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,R.endTagWithoutMatchingOpenElement)}function Nn(e,t){e.openElements.pop(),e.insertionMode=k.AFTER_HEAD,e._processToken(t)}function Zf(e,t){switch(t.tagID){case c.HTML:Ae(e,t);break;case c.BASEFONT:case c.BGSOUND:case c.HEAD:case c.LINK:case c.META:case c.NOFRAMES:case c.STYLE:Ve(e,t);break;case c.NOSCRIPT:e._err(t,R.nestedNoscriptInHead);break;default:Sn(e,t)}}function Jf(e,t){switch(t.tagID){case c.NOSCRIPT:e.openElements.pop(),e.insertionMode=k.IN_HEAD;break;case c.BR:Sn(e,t);break;default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function Sn(e,t){const n=t.type===ne.EOF?R.openElementsLeftAfterEof:R.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=k.IN_HEAD,e._processToken(t)}function ep(e,t){switch(t.tagID){case c.HTML:Ae(e,t);break;case c.BODY:e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=k.IN_BODY;break;case c.FRAMESET:e._insertElement(t,M.HTML),e.insertionMode=k.IN_FRAMESET;break;case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:e._err(t,R.abandonedHeadElementChild),e.openElements.push(e.headElement,c.HEAD),Ve(e,t),e.openElements.remove(e.headElement);break;case c.HEAD:e._err(t,R.misplacedStartTagForHeadElement);break;default:In(e,t)}}function tp(e,t){switch(t.tagID){case c.BODY:case c.HTML:case c.BR:In(e,t);break;case c.TEMPLATE:zt(e,t);break;default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function In(e,t){e._insertFakeElement(w.BODY,c.BODY),e.insertionMode=k.IN_BODY,Ur(e,t)}function Ur(e,t){switch(t.type){case ne.CHARACTER:Rl(e,t);break;case ne.WHITESPACE_CHARACTER:Ll(e,t);break;case ne.COMMENT:Li(e,t);break;case ne.START_TAG:Ae(e,t);break;case ne.END_TAG:zr(e,t);break;case ne.EOF:Ml(e,t)}}function Ll(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Rl(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function np(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function rp(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function ip(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,M.HTML),e.insertionMode=k.IN_FRAMESET)}function sp(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function ap(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&wi.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,M.HTML)}function op(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function lp(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),n||(e.formElement=e.openElements.current))}function cp(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===c.LI&&i===c.LI||(n===c.DD||n===c.DT)&&(i===c.DD||i===c.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==c.ADDRESS&&i!==c.DIV&&i!==c.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function up(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.tokenizer.state=be.PLAINTEXT}function hp(e,t){e.openElements.hasInScope(c.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1}function dp(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(w.A);n&&(cs(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function mp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function fp(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(c.NOBR)&&(cs(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function pp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function gp(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ue.QUIRKS&&e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=k.IN_TABLE}function Ol(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Dl(e){const t=yl(e,Mt.TYPE);return t!=null&&t.toLowerCase()===Df}function Ep(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),Dl(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Tp(e,t){e._appendElement(t,M.HTML),t.ackSelfClosing=!0}function bp(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function xp(e,t){t.tagName=w.IMG,t.tagID=c.IMG,Ol(e,t)}function kp(e,t){e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.tokenizer.state=be.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=k.TEXT}function yp(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,be.RAWTEXT)}function Cp(e,t){e.framesetOk=!1,e._switchToTextParsing(t,be.RAWTEXT)}function ba(e,t){e._switchToTextParsing(t,be.RAWTEXT)}function Ap(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===k.IN_TABLE||e.insertionMode===k.IN_CAPTION||e.insertionMode===k.IN_TABLE_BODY||e.insertionMode===k.IN_ROW||e.insertionMode===k.IN_CELL?k.IN_SELECT_IN_TABLE:k.IN_SELECT}function _p(e,t){e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function vp(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,M.HTML)}function Np(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(c.RTC),e._insertElement(t,M.HTML)}function Sp(e,t){e._reconstructActiveFormattingElements(),Sl(t),ls(t),t.selfClosing?e._appendElement(t,M.MATHML):e._insertElement(t,M.MATHML),t.ackSelfClosing=!0}function Ip(e,t){e._reconstructActiveFormattingElements(),Il(t),ls(t),t.selfClosing?e._appendElement(t,M.SVG):e._insertElement(t,M.SVG),t.ackSelfClosing=!0}function xa(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function Ae(e,t){switch(t.tagID){case c.I:case c.S:case c.B:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.SMALL:case c.STRIKE:case c.STRONG:mp(e,t);break;case c.A:dp(e,t);break;case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:ap(e,t);break;case c.P:case c.DL:case c.OL:case c.UL:case c.DIV:case c.DIR:case c.NAV:case c.MAIN:case c.MENU:case c.ASIDE:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.DETAILS:case c.ADDRESS:case c.ARTICLE:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:sp(e,t);break;case c.LI:case c.DD:case c.DT:cp(e,t);break;case c.BR:case c.IMG:case c.WBR:case c.AREA:case c.EMBED:case c.KEYGEN:Ol(e,t);break;case c.HR:bp(e,t);break;case c.RB:case c.RTC:vp(e,t);break;case c.RT:case c.RP:Np(e,t);break;case c.PRE:case c.LISTING:op(e,t);break;case c.XMP:yp(e,t);break;case c.SVG:Ip(e,t);break;case c.HTML:np(e,t);break;case c.BASE:case c.LINK:case c.META:case c.STYLE:case c.TITLE:case c.SCRIPT:case c.BGSOUND:case c.BASEFONT:case c.TEMPLATE:Ve(e,t);break;case c.BODY:rp(e,t);break;case c.FORM:lp(e,t);break;case c.NOBR:fp(e,t);break;case c.MATH:Sp(e,t);break;case c.TABLE:gp(e,t);break;case c.INPUT:Ep(e,t);break;case c.PARAM:case c.TRACK:case c.SOURCE:Tp(e,t);break;case c.IMAGE:xp(e,t);break;case c.BUTTON:hp(e,t);break;case c.APPLET:case c.OBJECT:case c.MARQUEE:pp(e,t);break;case c.IFRAME:Cp(e,t);break;case c.SELECT:Ap(e,t);break;case c.OPTION:case c.OPTGROUP:_p(e,t);break;case c.NOEMBED:case c.NOFRAMES:ba(e,t);break;case c.FRAMESET:ip(e,t);break;case c.TEXTAREA:kp(e,t);break;case c.NOSCRIPT:e.options.scriptingEnabled?ba(e,t):xa(e,t);break;case c.PLAINTEXT:up(e,t);break;case c.COL:case c.TH:case c.TD:case c.TR:case c.HEAD:case c.FRAME:case c.TBODY:case c.TFOOT:case c.THEAD:case c.CAPTION:case c.COLGROUP:break;default:xa(e,t)}}function wp(e,t){if(e.openElements.hasInScope(c.BODY)&&(e.insertionMode=k.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Lp(e,t){e.openElements.hasInScope(c.BODY)&&(e.insertionMode=k.AFTER_BODY,ql(e,t))}function Rp(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Op(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(c.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(c.FORM):n&&e.openElements.remove(n))}function Dp(e){e.openElements.hasInButtonScope(c.P)||e._insertFakeElement(w.P,c.P),e._closePElement()}function Pp(e){e.openElements.hasInListItemScope(c.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(c.LI),e.openElements.popUntilTagNamePopped(c.LI))}function Mp(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Bp(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Fp(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function jp(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(w.BR,c.BR),e.openElements.pop(),e.framesetOk=!1}function Pl(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!==c.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 zr(e,t){switch(t.tagID){case c.A:case c.B:case c.I:case c.S:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.NOBR:case c.SMALL:case c.STRIKE:case c.STRONG:cs(e,t);break;case c.P:Dp(e);break;case c.DL:case c.UL:case c.OL:case c.DIR:case c.DIV:case c.NAV:case c.PRE:case c.MAIN:case c.MENU:case c.ASIDE:case c.BUTTON:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.ADDRESS:case c.ARTICLE:case c.DETAILS:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.LISTING:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:Rp(e,t);break;case c.LI:Pp(e);break;case c.DD:case c.DT:Mp(e,t);break;case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:Bp(e);break;case c.BR:jp(e);break;case c.BODY:wp(e,t);break;case c.HTML:Lp(e,t);break;case c.FORM:Op(e);break;case c.APPLET:case c.OBJECT:case c.MARQUEE:Fp(e,t);break;case c.TEMPLATE:zt(e,t);break;default:Pl(e,t)}}function Ml(e,t){e.tmplInsertionModeStack.length>0?$l(e,t):us(e,t)}function Hp(e,t){var n;t.tagID===c.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Up(e,t){e._err(t,R.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function si(e,t){if(e.openElements.currentTagId!==void 0&&wl.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=k.IN_TABLE_TEXT,t.type){case ne.CHARACTER:Fl(e,t);break;case ne.WHITESPACE_CHARACTER:Bl(e,t)}else Zn(e,t)}function zp(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,M.HTML),e.insertionMode=k.IN_CAPTION}function $p(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=k.IN_COLUMN_GROUP}function qp(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(w.COLGROUP,c.COLGROUP),e.insertionMode=k.IN_COLUMN_GROUP,hs(e,t)}function Yp(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=k.IN_TABLE_BODY}function Vp(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(w.TBODY,c.TBODY),e.insertionMode=k.IN_TABLE_BODY,$r(e,t)}function Wp(e,t){e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Qp(e,t){Dl(t)?e._appendElement(t,M.HTML):Zn(e,t),t.ackSelfClosing=!0}function Gp(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,M.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function rn(e,t){switch(t.tagID){case c.TD:case c.TH:case c.TR:Vp(e,t);break;case c.STYLE:case c.SCRIPT:case c.TEMPLATE:Ve(e,t);break;case c.COL:qp(e,t);break;case c.FORM:Gp(e,t);break;case c.TABLE:Wp(e,t);break;case c.TBODY:case c.TFOOT:case c.THEAD:Yp(e,t);break;case c.INPUT:Qp(e,t);break;case c.CAPTION:zp(e,t);break;case c.COLGROUP:$p(e,t);break;default:Zn(e,t)}}function Un(e,t){switch(t.tagID){case c.TABLE:e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode());break;case c.TEMPLATE:zt(e,t);break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:Zn(e,t)}}function Zn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ur(e,t),e.fosterParentingEnabled=n}function Bl(e,t){e.pendingCharacterTokens.push(t)}function Fl(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function En(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Zn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var jl=new Set([c.CAPTION,c.COL,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]);function Kp(e,t){const n=t.tagID;jl.has(n)?e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=k.IN_TABLE,rn(e,t)):Ae(e,t)}function Xp(e,t){const n=t.tagID;switch(n){case c.CAPTION:case c.TABLE:e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=k.IN_TABLE,n===c.TABLE&&Un(e,t));break;case c.BODY:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:zr(e,t)}}function hs(e,t){switch(t.tagID){case c.HTML:Ae(e,t);break;case c.COL:e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break;case c.TEMPLATE:Ve(e,t);break;default:Ar(e,t)}}function Zp(e,t){switch(t.tagID){case c.COLGROUP:e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=k.IN_TABLE);break;case c.TEMPLATE:zt(e,t);break;case c.COL:break;default:Ar(e,t)}}function Ar(e,t){e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=k.IN_TABLE,e._processToken(t))}function $r(e,t){switch(t.tagID){case c.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,M.HTML),e.insertionMode=k.IN_ROW;break;case c.TH:case c.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(w.TR,c.TR),e.insertionMode=k.IN_ROW,qr(e,t);break;case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE,rn(e,t));break;default:rn(e,t)}}function Ri(e,t){const n=t.tagID;switch(t.tagID){case c.TBODY:case c.TFOOT:case c.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE);break;case c.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE,Un(e,t));break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:case c.TR:break;default:Un(e,t)}}function qr(e,t){switch(t.tagID){case c.TH:case c.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,M.HTML),e.insertionMode=k.IN_CELL,e.activeFormattingElements.insertMarker();break;case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE_BODY,$r(e,t));break;default:rn(e,t)}}function Hl(e,t){switch(t.tagID){case c.TR:e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE_BODY);break;case c.TABLE:e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE_BODY,Ri(e,t));break;case c.TBODY:case c.TFOOT:case c.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(c.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE_BODY,Ri(e,t));break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:break;default:Un(e,t)}}function Jp(e,t){const n=t.tagID;jl.has(n)?(e.openElements.hasInTableScope(c.TD)||e.openElements.hasInTableScope(c.TH))&&(e._closeTableCell(),qr(e,t)):Ae(e,t)}function eg(e,t){const n=t.tagID;switch(n){case c.TD:case c.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=k.IN_ROW);break;case c.TABLE:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Hl(e,t));break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:break;default:zr(e,t)}}function Ul(e,t){switch(t.tagID){case c.HTML:Ae(e,t);break;case c.OPTION:e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._insertElement(t,M.HTML);break;case c.OPTGROUP:e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._insertElement(t,M.HTML);break;case c.HR:e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break;case c.INPUT:case c.KEYGEN:case c.TEXTAREA:case c.SELECT:e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),t.tagID!==c.SELECT&&e._processStartTag(t));break;case c.SCRIPT:case c.TEMPLATE:Ve(e,t)}}function zl(e,t){switch(t.tagID){case c.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===c.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===c.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop();break;case c.OPTION:e.openElements.currentTagId===c.OPTION&&e.openElements.pop();break;case c.SELECT:e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode());break;case c.TEMPLATE:zt(e,t)}}function tg(e,t){const n=t.tagID;n===c.CAPTION||n===c.TABLE||n===c.TBODY||n===c.TFOOT||n===c.THEAD||n===c.TR||n===c.TD||n===c.TH?(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Ul(e,t)}function ng(e,t){const n=t.tagID;n===c.CAPTION||n===c.TABLE||n===c.TBODY||n===c.TFOOT||n===c.THEAD||n===c.TR||n===c.TD||n===c.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e.onEndTag(t)):zl(e,t)}function rg(e,t){switch(t.tagID){case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:Ve(e,t);break;case c.CAPTION:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:e.tmplInsertionModeStack[0]=k.IN_TABLE,e.insertionMode=k.IN_TABLE,rn(e,t);break;case c.COL:e.tmplInsertionModeStack[0]=k.IN_COLUMN_GROUP,e.insertionMode=k.IN_COLUMN_GROUP,hs(e,t);break;case c.TR:e.tmplInsertionModeStack[0]=k.IN_TABLE_BODY,e.insertionMode=k.IN_TABLE_BODY,$r(e,t);break;case c.TD:case c.TH:e.tmplInsertionModeStack[0]=k.IN_ROW,e.insertionMode=k.IN_ROW,qr(e,t);break;default:e.tmplInsertionModeStack[0]=k.IN_BODY,e.insertionMode=k.IN_BODY,Ae(e,t)}}function ig(e,t){t.tagID===c.TEMPLATE&&zt(e,t)}function $l(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):us(e,t)}function sg(e,t){t.tagID===c.HTML?Ae(e,t):_r(e,t)}function ql(e,t){var n;if(t.tagID===c.HTML){if(e.fragmentContext||(e.insertionMode=k.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===c.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 _r(e,t)}function _r(e,t){e.insertionMode=k.IN_BODY,Ur(e,t)}function ag(e,t){switch(t.tagID){case c.HTML:Ae(e,t);break;case c.FRAMESET:e._insertElement(t,M.HTML);break;case c.FRAME:e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break;case c.NOFRAMES:Ve(e,t)}}function og(e,t){t.tagID===c.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==c.FRAMESET&&(e.insertionMode=k.AFTER_FRAMESET))}function lg(e,t){switch(t.tagID){case c.HTML:Ae(e,t);break;case c.NOFRAMES:Ve(e,t)}}function cg(e,t){t.tagID===c.HTML&&(e.insertionMode=k.AFTER_AFTER_FRAMESET)}function ug(e,t){t.tagID===c.HTML?Ae(e,t):br(e,t)}function br(e,t){e.insertionMode=k.IN_BODY,Ur(e,t)}function hg(e,t){switch(t.tagID){case c.HTML:Ae(e,t);break;case c.NOFRAMES:Ve(e,t)}}function dg(e,t){t.chars="�",e._insertCharacters(t)}function mg(e,t){e._insertCharacters(t),e.framesetOk=!1}function Yl(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==M.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function fg(e,t){if(If(t))Yl(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===M.MATHML?Sl(t):r===M.SVG&&(wf(t),Il(t)),ls(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function pg(e,t){if(t.tagID===c.P||t.tagID===c.BR){Yl(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)===M.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}var $v=new Set([w.AREA,w.BASE,w.BASEFONT,w.BGSOUND,w.BR,w.COL,w.EMBED,w.FRAME,w.HR,w.IMG,w.INPUT,w.KEYGEN,w.LINK,w.META,w.PARAM,w.SOURCE,w.TRACK,w.WBR]),Yr=Vl("end"),rt=Vl("start");function Vl(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 Wl(e){const t=rt(e),n=Yr(e);if(t&&n)return{start:t,end:n}}var gg=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Eg=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),ka={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Ql(e,t){const n=Ng(e),r=El("type",{handlers:{root:Tg,element:bg,text:xg,comment:Kl,doctype:kg,raw:Cg},unknown:Ag}),i={parser:n?new Ta(ka):Ta.getFragmentParser(void 0,ka),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),cn(i,rt());const s=n?i.parser.document:i.parser.getFragment(),a=Nm(s,{file:i.options.file});return i.stitches&&tt(a,"comment",function(o,l,h){const m=o;if(m.value.stitch&&h&&l!==void 0){const d=h.children;return d[l]=m.value.stitch,l}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function Gl(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Tg(e,t){Gl(e.children,t)}function bg(e,t){_g(e,t),Gl(e.children,t),vg(e,t)}function xg(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ne.CHARACTER,chars:e.value,location:Jn(e)};cn(t,rt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function kg(e,t){const n={type:ne.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Jn(e)};cn(t,rt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function yg(e,t){t.stitches=!0;const n=Sg(e);"children"in e&&"children"in n&&(n.children=Ql({type:"root",children:e.children},t.options).children),Kl({type:"comment",value:{stitch:n}},t)}function Kl(e,t){const n=e.value,r={type:ne.COMMENT,data:n,location:Jn(e)};cn(t,rt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Cg(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,Xl(t,rt(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(gg,"<$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 Ag(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))yg(n,t);else{let r="";throw Eg.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 cn(e,t){Xl(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=be.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 Xl(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 _g(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===be.PLAINTEXT)return;cn(t,rt(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Pt.html;i===Pt.html&&n==="svg"&&(i=Pt.svg);const s=Rm({...e,children:[]},{space:i===Pt.svg?"svg":"html"}),a={type:ne.START_TAG,tagName:n,tagID:ln(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:Jn(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function vg(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Hm.includes(n)||t.parser.tokenizer.state===be.PLAINTEXT)return;cn(t,Yr(e));const r={type:ne.END_TAG,tagName:n,tagID:ln(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Jn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===be.RCDATA||t.parser.tokenizer.state===be.RAWTEXT||t.parser.tokenizer.state===be.SCRIPT_DATA)&&(t.parser.tokenizer.state=be.DATA)}function Ng(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Jn(e){const t=rt(e)||{line:void 0,column:void 0,offset:void 0},n=Yr(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 Sg(e){return"children"in e?Bt({...e,children:[]}):Bt(e)}function Oi(e){return function(t,n){return Ql(t,{...e,file:n})}}var Nt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],wt={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Nt,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Nt],h2:[["className","sr-only"]],img:[...Nt,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Nt,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Nt],table:[...Nt],ul:[...Nt,["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"]},Et={}.hasOwnProperty;function Ig(e,t){let n={type:"root",children:[]};const r=Zl({schema:t?{...wt,...t}:wt,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function Zl(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return wg(e,n);case"doctype":return Lg(e,n);case"element":return Rg(e,n);case"root":return Og(e,n);case"text":return Dg(e,n)}}}function wg(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),i={type:"comment",value:r<0?n:n.slice(0,r)};return er(i,t),i}}function Lg(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return er(n,t),n}}function Rg(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Jl(e,t.children),i=Pg(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&&Et.call(e.schema.ancestors,n))){const o=e.schema.ancestors[n];let l=-1;for(s=!1;++l<o.length;)e.stack.includes(o[l])&&(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 er(a,t),a}function Og(e,t){const n={type:"root",children:Jl(e,t.children)};return er(n,t),n}function Dg(e,t){const n={type:"text",value:typeof t.value=="string"?t.value:""};return er(n,t),n}function Jl(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const s=Zl(e,r[i]);s&&(Array.isArray(s)?n.push(...s):n.push(s))}}return n}function Pg(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,s=r&&Et.call(r,n)?r[n]:void 0,a=r&&Et.call(r,"*")?r["*"]:void 0,o=t&&typeof t=="object"?t:{},l={};let h;for(h in o)if(Et.call(o,h)){const m=o[h];let d=ya(e,Ca(s,h),h,m);d==null&&(d=ya(e,Ca(a,h),h,m)),d!=null&&(l[h]=d)}if(i&&Et.call(i,n)){const m=i[n];for(h in m)Et.call(m,h)&&!Et.call(l,h)&&(l[h]=m[h])}return l}function ya(e,t,n,r){return t?Array.isArray(r)?Mg(e,t,n,r):ec(e,t,n,r):void 0}function Mg(e,t,n,r){let i=-1;const s=[];for(;++i<r.length;){const a=ec(e,t,n,r[i]);(typeof a=="number"||typeof a=="string")&&s.push(a)}return s}function ec(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&Bg(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 Bg(e,t,n){const r=e.schema.protocols&&Et.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("#"),l=i.indexOf("/");if(s<0||l>-1&&s>l||a>-1&&s>a||o>-1&&s>o)return!0;let h=-1;for(;++h<r.length;){const m=r[h];if(s===m.length&&i.slice(0,m.length)===m)return!0}return!1}function er(e,t){const n=Wl(t);t.data&&(e.data=Bt(t.data)),n&&(e.position=n)}function Ca(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 tc(e){return function(t){return Ig(t,e)}}function Aa(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}var Ne=At(/[A-Za-z]/),Ce=At(/[\dA-Za-z]/),Fg=At(/[#-'*+\--9=?A-Z^-~]/);function vr(e){return e!==null&&(e<32||e===127)}var Di=At(/\d/),jg=At(/[\dA-Fa-f]/),Hg=At(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function he(e){return e!==null&&(e<0||e===32)}function ie(e){return e===-2||e===-1||e===32}var Vr=At(/\p{P}|\p{S}/u),Ft=At(/\s/);function At(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ug(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function zg(e,t,n){const r=Fr((n||{}).ignore||[]),i=$g(t);let s=-1;for(;++s<i.length;)is(e,"text",a);function a(l,h){let m=-1,d;for(;++m<h.length;){const f=h[m],p=d?d.children:void 0;if(r(f,p?p.indexOf(f):void 0,d))return;d=f}if(d)return o(l,h)}function o(l,h){const m=h[h.length-1],d=i[s][0],f=i[s][1];let p=0;const g=m.children.indexOf(l);let _=!1,A=[];d.lastIndex=0;let b=d.exec(l.value);for(;b;){const v=b.index,S={index:b.index,input:b.input,stack:[...h,l]};let L=f(...b,S);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?d.lastIndex=v+1:(p!==v&&A.push({type:"text",value:l.value.slice(p,v)}),Array.isArray(L)?A.push(...L):L&&A.push(L),p=v+b[0].length,_=!0),!d.global)break;b=d.exec(l.value)}return _?(p<l.value.length&&A.push({type:"text",value:l.value.slice(p)}),m.children.splice(g,1,...A)):A=[l],g+A.length}}function $g(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([qg(i[0]),Yg(i[1])])}return t}function qg(e){return typeof e=="string"?new RegExp(Ug(e),"g"):e}function Yg(e){return typeof e=="function"?e:function(){return e}}var ai="phrasing",oi=["autolink","link","image","label"];function Vg(){return{transforms:[Jg],enter:{literalAutolink:Qg,literalAutolinkEmail:li,literalAutolinkHttp:li,literalAutolinkWww:li},exit:{literalAutolink:Zg,literalAutolinkEmail:Xg,literalAutolinkHttp:Gg,literalAutolinkWww:Kg}}}function Wg(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ai,notInConstruct:oi},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ai,notInConstruct:oi},{character:":",before:"[ps]",after:"\\/",inConstruct:ai,notInConstruct:oi}]}}function Qg(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function li(e){this.config.enter.autolinkProtocol.call(this,e)}function Gg(e){this.config.exit.autolinkProtocol.call(this,e)}function Kg(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 Xg(e){this.config.exit.autolinkEmail.call(this,e)}function Zg(e){this.exit(e)}function Jg(e){zg(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,eE],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,tE]],{ignore:["link","linkReference"]})}function eE(e,t,n,r,i){let s="";if(!nc(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!nE(n)))return!1;const a=rE(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 tE(e,t,n,r){return!nc(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function nE(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 rE(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=Aa(e,"(");let s=Aa(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 nc(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ft(n)||Vr(n))&&(!t||n!==47)}function Ye(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}rc.peek=dE;function iE(){this.buffer()}function sE(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function aE(){this.buffer()}function oE(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function lE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ye(this.sliceSerialize(e)).toLowerCase(),n.label=t}function cE(e){this.exit(e)}function uE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ye(this.sliceSerialize(e)).toLowerCase(),n.label=t}function hE(e){this.exit(e)}function dE(){return"["}function rc(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 mE(){return{enter:{gfmFootnoteCallString:iE,gfmFootnoteCall:sE,gfmFootnoteDefinitionLabelString:aE,gfmFootnoteDefinition:oE},exit:{gfmFootnoteCallString:lE,gfmFootnoteCall:cE,gfmFootnoteDefinitionLabelString:uE,gfmFootnoteDefinition:hE}}}function fE(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:rc},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const o=s.createTracker(a);let l=o.move("[^");const h=s.enter("footnoteDefinition"),m=s.enter("label");return l+=o.move(s.safe(s.associationId(r),{before:l,after:"]"})),m(),l+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),l+=o.move((t?`
|
|
4
|
+
`:" ")+s.indentLines(s.containerFlow(r,o.current()),t?ic:pE))),h(),l}}function pE(e,t,n){return t===0?e:ic(e,t,n)}function ic(e,t,n){return(n?"":" ")+e}var gE=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];sc.peek=kE;function EE(){return{canContainEols:["delete"],enter:{strikethrough:bE},exit:{strikethrough:xE}}}function TE(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:gE}],handlers:{delete:sc}}}function bE(e){this.enter({type:"delete",children:[]},e)}function xE(e){this.exit(e)}function sc(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 kE(){return"~"}function yE(e){return e.length}function CE(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||yE,s=[],a=[],o=[],l=[];let h=0,m=-1;for(;++m<e.length;){const _=[],A=[];let b=-1;for(e[m].length>h&&(h=e[m].length);++b<e[m].length;){const v=AE(e[m][b]);if(n.alignDelimiters!==!1){const S=i(v);A[b]=S,(l[b]===void 0||S>l[b])&&(l[b]=S)}_.push(v)}a[m]=_,o[m]=A}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<h;)s[d]=_a(r[d]);else{const _=_a(r);for(;++d<h;)s[d]=_}d=-1;const f=[],p=[];for(;++d<h;){const _=s[d];let A="",b="";_===99?(A=":",b=":"):_===108?A=":":_===114&&(b=":");let v=n.alignDelimiters===!1?1:Math.max(1,l[d]-A.length-b.length);const S=A+"-".repeat(v)+b;n.alignDelimiters!==!1&&(v=A.length+v+b.length,v>l[d]&&(l[d]=v),p[d]=v),f[d]=S}a.splice(1,0,f),o.splice(1,0,p),m=-1;const g=[];for(;++m<a.length;){const _=a[m],A=o[m];d=-1;const b=[];for(;++d<h;){const v=_[d]||"";let S="",L="";if(n.alignDelimiters!==!1){const O=l[d]-(A[d]||0),N=s[d];N===114?S=" ".repeat(O):N===99?O%2?(S=" ".repeat(O/2+.5),L=" ".repeat(O/2-.5)):(S=" ".repeat(O/2),L=S):L=" ".repeat(O)}n.delimiterStart!==!1&&!d&&b.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&v==="")&&(n.delimiterStart!==!1||d)&&b.push(" "),n.alignDelimiters!==!1&&b.push(S),b.push(v),n.alignDelimiters!==!1&&b.push(L),n.padding!==!1&&b.push(" "),(n.delimiterEnd!==!1||d!==h-1)&&b.push("|")}g.push(n.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return g.join(`
|
|
5
|
+
`)}function AE(e){return e==null?"":String(e)}function _a(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 _E(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()),vE);return i(),a}function vE(e,t,n){return">"+(n?"":" ")+e}function NE(e,t){return va(e,t.inConstruct,!0)&&!va(e,t.notInConstruct,!1)}function va(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 Na(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
6
|
+
`&&NE(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
7
|
+
`}function SE(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function IE(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function wE(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function LE(e,t,n,r){const i=wE(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(IE(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(s,RE);return d(),f}const o=n.createTracker(r),l=i.repeat(Math.max(SE(s,i)+1,3)),h=n.enter("codeFenced");let m=o.move(l);if(e.lang){const d=n.enter(`codeFencedLang${a}`);m+=o.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...o.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${a}`);m+=o.move(" "),m+=o.move(n.safe(e.meta,{before:m,after:`
|
|
8
|
+
`,encode:["`"],...o.current()})),d()}return m+=o.move(`
|
|
9
|
+
`),s&&(m+=o.move(s+`
|
|
10
|
+
`)),m+=o.move(l),h(),m}function RE(e,t,n){return(n?"":" ")+e}function ds(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function OE(e,t,n,r){const i=ds(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let o=n.enter("label");const l=n.createTracker(r);let h=l.move("[");return h+=l.move(n.safe(n.associationId(e),{before:h,after:"]",...l.current()})),h+=l.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),h+=l.move("<"),h+=l.move(n.safe(e.url,{before:h,after:">",...l.current()})),h+=l.move(">")):(o=n.enter("destinationRaw"),h+=l.move(n.safe(e.url,{before:h,after:e.title?" ":`
|
|
11
|
+
`,...l.current()}))),o(),e.title&&(o=n.enter(`title${s}`),h+=l.move(" "+i),h+=l.move(n.safe(e.title,{before:h,after:i,...l.current()})),h+=l.move(i),o()),a(),h}function DE(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function zn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function sn(e){if(e===null||he(e)||Ft(e))return 1;if(Vr(e))return 2}function Nr(e,t,n){const r=sn(e),i=sn(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ac.peek=PE;function ac(e,t,n,r){const i=DE(n),s=n.enter("emphasis"),a=n.createTracker(r),o=a.move(i);let l=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const h=l.charCodeAt(0),m=Nr(r.before.charCodeAt(r.before.length-1),h,i);m.inside&&(l=zn(h)+l.slice(1));const d=l.charCodeAt(l.length-1),f=Nr(r.after.charCodeAt(0),d,i);f.inside&&(l=l.slice(0,-1)+zn(d));const p=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:f.outside,before:m.outside},o+l+p}function PE(e,t,n){return n.options.emphasis||"*"}var ME={};function ms(e,t){const n=t||ME;return oc(e,typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,typeof n.includeHtml=="boolean"?n.includeHtml:!0)}function oc(e,t,n){if(BE(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Sa(e.children,t,n)}return Array.isArray(e)?Sa(e,t,n):""}function Sa(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=oc(e[i],t,n);return r.join("")}function BE(e){return!!(e&&typeof e=="object")}function FE(e,t){let n=!1;return tt(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,!1}),!!((!e.depth||e.depth<3)&&ms(e)&&(t.options.setext||n))}function jE(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(FE(e,n)){const m=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...s.current(),before:`
|
|
12
|
+
`,after:`
|
|
13
|
+
`});return d(),m(),f+`
|
|
14
|
+
`+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
|
|
15
|
+
`))+1))}const a="#".repeat(i),o=n.enter("headingAtx"),l=n.enter("phrasing");s.move(a+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
|
|
16
|
+
`,...s.current()});return/^[\t ]/.test(h)&&(h=zn(h.charCodeAt(0))+h.slice(1)),h=h?a+" "+h:a,n.options.closeAtx&&(h+=" "+a),l(),o(),h}lc.peek=HE;function lc(e){return e.value||""}function HE(){return"<"}cc.peek=UE;function cc(e,t,n,r){const i=ds(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let o=n.enter("label");const l=n.createTracker(r);let h=l.move("![");return h+=l.move(n.safe(e.alt,{before:h,after:"]",...l.current()})),h+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),h+=l.move("<"),h+=l.move(n.safe(e.url,{before:h,after:">",...l.current()})),h+=l.move(">")):(o=n.enter("destinationRaw"),h+=l.move(n.safe(e.url,{before:h,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=n.enter(`title${s}`),h+=l.move(" "+i),h+=l.move(n.safe(e.title,{before:h,after:i,...l.current()})),h+=l.move(i),o()),h+=l.move(")"),a(),h}function UE(){return"!"}uc.peek=zE;function uc(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("![");const h=n.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(h+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=m,s(),i==="full"||!h||h!==d?l+=o.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function zE(){return"!"}hc.peek=$E;function hc(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const a=n.unsafe[s],o=n.compilePattern(a);let l;if(a.atBreak)for(;l=o.exec(r);){let h=l.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(l.index+1)}}return i+r+i}function $E(){return"`"}function dc(e,t){const n=ms(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}mc.peek=qE;function mc(e,t,n,r){const i=ds(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let o,l;if(dc(e,n)){const m=n.stack;n.stack=[],o=n.enter("autolink");let d=a.move("<");return d+=a.move(n.containerPhrasing(e,{before:d,after:">",...a.current()})),d+=a.move(">"),o(),n.stack=m,d}o=n.enter("link"),l=n.enter("label");let h=a.move("[");return h+=a.move(n.containerPhrasing(e,{before:h,after:"](",...a.current()})),h+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),h+=a.move("<"),h+=a.move(n.safe(e.url,{before:h,after:">",...a.current()})),h+=a.move(">")):(l=n.enter("destinationRaw"),h+=a.move(n.safe(e.url,{before:h,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${s}`),h+=a.move(" "+i),h+=a.move(n.safe(e.title,{before:h,after:i,...a.current()})),h+=a.move(i),l()),h+=a.move(")"),o(),h}function qE(e,t,n){return dc(e,n)?"<":"["}fc.peek=YE;function fc(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("[");const h=n.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(h+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=m,s(),i==="full"||!h||h!==d?l+=o.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function YE(){return"["}function fs(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function VE(e){const t=fs(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function WE(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function pc(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function QE(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?WE(n):fs(n);const o=e.ordered?a==="."?")":".":VE(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),pc(n)===a&&m){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=o),n.bulletCurrent=a;const h=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),h}function GE(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function KE(e,t,n,r){const i=GE(n);let s=n.bulletCurrent||fs(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=n.createTracker(r);o.move(s+" ".repeat(a-s.length)),o.shift(a);const l=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,o.current()),m);return l(),h;function m(d,f,p){return f?(p?"":" ".repeat(a))+d:(p?s:s+" ".repeat(a-s.length))+d}}function XE(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}var ZE=Fr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function JE(e,t,n,r){return(e.children.some(function(i){return ZE(i)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function eT(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}gc.peek=tT;function gc(e,t,n,r){const i=eT(n),s=n.enter("strong"),a=n.createTracker(r),o=a.move(i+i);let l=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const h=l.charCodeAt(0),m=Nr(r.before.charCodeAt(r.before.length-1),h,i);m.inside&&(l=zn(h)+l.slice(1));const d=l.charCodeAt(l.length-1),f=Nr(r.after.charCodeAt(0),d,i);f.inside&&(l=l.slice(0,-1)+zn(d));const p=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:f.outside,before:m.outside},o+l+p}function tT(e,t,n){return n.options.strong||"*"}function nT(e,t,n,r){return n.safe(e.value,r)}function rT(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function iT(e,t,n){const r=(pc(n)+(n.options.ruleSpaces?" ":"")).repeat(rT(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Ec={blockquote:_E,break:Na,code:LE,definition:OE,emphasis:ac,hardBreak:Na,heading:jE,html:lc,image:cc,imageReference:uc,inlineCode:hc,link:mc,linkReference:fc,list:QE,listItem:KE,paragraph:XE,root:JE,strong:gc,text:nT,thematicBreak:iT},Ia=document.createElement("i");function ps(e){const t="&"+e+";";Ia.innerHTML=t;const n=Ia.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Tc(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}var sT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function aT(e){return e.replace(sT,oT)}function oT(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const r=n.charCodeAt(1),i=r===120||r===88;return Tc(n.slice(i?2:1),i?16:10)}return ps(n)||e}function lT(){return{enter:{table:cT,tableData:wa,tableHeader:wa,tableRow:hT},exit:{codeText:dT,table:uT,tableData:ci,tableHeader:ci,tableRow:ci}}}function cT(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function uT(e){this.exit(e),this.data.inTable=void 0}function hT(e){this.enter({type:"tableRow",children:[]},e)}function ci(e){this.exit(e)}function wa(e){this.enter({type:"tableCell",children:[]},e)}function dT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,mT));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function mT(e,t){return t==="|"?t:e}function fT(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
17
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:a,tableCell:l,tableRow:o}};function a(p,g,_,A){return h(m(p,_,A),p.align)}function o(p,g,_,A){const b=h([d(p,_,A)]);return b.slice(0,b.indexOf(`
|
|
18
|
+
`))}function l(p,g,_,A){const b=_.enter("tableCell"),v=_.enter("phrasing"),S=_.containerPhrasing(p,{...A,before:s,after:s});return v(),b(),S}function h(p,g){return CE(p,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function m(p,g,_){const A=p.children;let b=-1;const v=[],S=g.enter("table");for(;++b<A.length;)v[b]=d(A[b],g,_);return S(),v}function d(p,g,_){const A=p.children;let b=-1;const v=[],S=g.enter("tableRow");for(;++b<A.length;)v[b]=l(A[b],p,g,_);return S(),v}function f(p,g,_){let A=Ec.inlineCode(p,g,_);return _.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function pT(){return{exit:{taskListCheckValueChecked:La,taskListCheckValueUnchecked:La,paragraph:ET}}}function gT(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:TT}}}function La(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ET(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,a;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){a=o;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function TT(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);s&&o.move(a);let l=Ec.listItem(e,t,n,{...r,...o.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),l;function h(m){return m+a}}function bT(){return[Vg(),mE(),EE(),lT(),pT()]}function xT(e){return{extensions:[Wg(),fE(e),TE(),fT(e),gT()]}}function Fe(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function ze(e,t){return e.length>0?(Fe(e,e.length,0,t),e):t}var Ra={}.hasOwnProperty;function bc(e){const t={};let n=-1;for(;++n<e.length;)kT(t,e[n]);return t}function kT(e,t){let n;for(n in t){const r=(Ra.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let s;if(i)for(s in i){Ra.call(r,s)||(r[s]=[]);const a=i[s];yT(r[s],Array.isArray(a)?a:a?[a]:[])}}}function yT(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Fe(e,0,0,r)}var CT={tokenize:IT,partial:!0},xc={tokenize:wT,partial:!0},kc={tokenize:LT,partial:!0},yc={tokenize:RT,partial:!0},AT={tokenize:OT,partial:!0},Cc={name:"wwwAutolink",tokenize:NT,previous:_c},Ac={name:"protocolAutolink",tokenize:ST,previous:vc},ht={name:"emailAutolink",tokenize:vT,previous:Nc},it={};function _T(){return{text:it}}var St=48;for(;St<123;)it[St]=ht,St++,St===58?St=65:St===91&&(St=97);it[43]=ht;it[45]=ht;it[46]=ht;it[95]=ht;it[72]=[ht,Ac];it[104]=[ht,Ac];it[87]=[ht,Cc];it[119]=[ht,Cc];function vT(e,t,n){const r=this;let i,s;return a;function a(d){return!Pi(d)||!Nc.call(r,r.previous)||gs(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(d))}function o(d){return Pi(d)?(e.consume(d),o):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(AT,m,h)(d):d===45||d===95||Ce(d)?(s=!0,e.consume(d),l):m(d)}function h(d){return e.consume(d),i=!0,l}function m(d){return s&&i&&Ne(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function NT(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!_c.call(r,r.previous)||gs(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(CT,e.attempt(xc,e.attempt(kc,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function ST(e,t,n){const r=this;let i="",s=!1;return a;function a(d){return(d===72||d===104)&&vc.call(r,r.previous)&&!gs(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),o):n(d)}function o(d){if(Ne(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),o;if(d===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),s?h:(s=!0,l)):n(d)}function h(d){return d===null||vr(d)||he(d)||Ft(d)||Vr(d)?n(d):e.attempt(xc,e.attempt(kc,m),n)(d)}function m(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function IT(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function wT(e,t,n){let r,i,s;return a;function a(h){return h===46||h===95?e.check(yc,l,o)(h):h===null||he(h)||Ft(h)||h!==45&&Vr(h)?l(h):(s=!0,e.consume(h),a)}function o(h){return h===95?r=!0:(i=r,r=void 0),e.consume(h),a}function l(h){return i||r||!s?n(h):t(h)}}function LT(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(yc,t,s)(a):a===null||he(a)||Ft(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function RT(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),s):o===93?(e.consume(o),i):o===60||o===null||he(o)||Ft(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||he(o)||Ft(o)?t(o):r(o)}function s(o){return Ne(o)?a(o):n(o)}function a(o){return o===59?(e.consume(o),r):Ne(o)?(e.consume(o),a):n(o)}}function OT(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return Ce(s)?n(s):t(s)}}function _c(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||he(e)}function vc(e){return!Ne(e)}function Nc(e){return!(e===47||Pi(e))}function Pi(e){return e===43||e===45||e===46||e===95||Ce(e)}function gs(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function un(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&Ce(e.charCodeAt(n+1))&&Ce(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const o=e.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Wr(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}var Mi={name:"attention",resolveAll:DT,tokenize:PT};function DT(e,t){let n=-1,r,i,s,a,o,l,h,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};Oa(d,-l),Oa(f,l),a={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[n][1].start={...o.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=ze(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=ze(h,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),h=ze(h,Wr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=ze(h,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=ze(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Fe(e,r-1,n-r+3,h),n=r+h.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function PT(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=sn(r);let s;return a;function a(l){return s=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===s)return e.consume(l),o;const h=e.exit("attentionSequence"),m=sn(l),d=!m||m===2&&i||n.includes(l),f=!i||i===2&&m||n.includes(r);return h._open=!!(s===42?d:d&&(i||!f)),h._close=!!(s===42?f:f&&(m||!d)),t(l)}}function Oa(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var MT={name:"autolink",tokenize:BT};function BT(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(p){return Ne(p)?(e.consume(p),a):p===64?n(p):h(p)}function a(p){return p===43||p===45||p===46||Ce(p)?(r=1,o(p)):h(p)}function o(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||Ce(p))&&r++<32?(e.consume(p),o):(r=0,h(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||vr(p)?n(p):(e.consume(p),l)}function h(p){return p===64?(e.consume(p),m):Fg(p)?(e.consume(p),h):n(p)}function m(p){return Ce(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,m):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||Ce(p))&&r++<63){const g=p===45?f:d;return e.consume(p),g}return n(p)}}function ae(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(l){return ie(l)?(e.enter(n),o(l)):t(l)}function o(l){return ie(l)&&s++<i?(e.consume(l),o):(e.exit(n),t(l))}}var tr={partial:!0,tokenize:FT};function FT(e,t,n){return r;function r(s){return ie(s)?ae(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||Q(s)?t(s):n(s)}}var Sc={continuation:{tokenize:HT},exit:UT,name:"blockQuote",tokenize:jT};function jT(e,t,n){const r=this;return i;function i(a){if(a===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return ie(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function HT(e,t,n){const r=this;return i;function i(a){return ie(a)?ae(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(Sc,t,n)(a)}}function UT(e){e.exit("blockQuote")}var Ic={name:"characterEscape",tokenize:zT};function zT(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return Hg(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}var wc={name:"characterReference",tokenize:$T};function $T(e,t,n){const r=this;let i=0,s,a;return o;function o(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),s=31,a=Ce,m(d))}function h(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=jg,m):(e.enter("characterReferenceValue"),s=7,a=Di,m(d))}function m(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return a===Ce&&!ps(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&i++<s?(e.consume(d),m):n(d)}}var Da={partial:!0,tokenize:YT},Pa={concrete:!0,name:"codeFenced",tokenize:qT};function qT(e,t,n){const r=this,i={partial:!0,tokenize:O};let s=0,a=0,o;return l;function l(N){return h(N)}function h(N){const B=r.events[r.events.length-1];return s=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,o=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(N)}function m(N){return N===o?(a++,e.consume(N),m):a<3?n(N):(e.exit("codeFencedFenceSequence"),ie(N)?ae(e,d,"whitespace")(N):d(N))}function d(N){return N===null||Q(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(Da,_,L)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(N))}function f(N){return N===null||Q(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(N)):ie(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ae(e,p,"whitespace")(N)):N===96&&N===o?n(N):(e.consume(N),f)}function p(N){return N===null||Q(N)?d(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(N))}function g(N){return N===null||Q(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(N)):N===96&&N===o?n(N):(e.consume(N),g)}function _(N){return e.attempt(i,L,A)(N)}function A(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),b}function b(N){return s>0&&ie(N)?ae(e,v,"linePrefix",s+1)(N):v(N)}function v(N){return N===null||Q(N)?e.check(Da,_,L)(N):(e.enter("codeFlowValue"),S(N))}function S(N){return N===null||Q(N)?(e.exit("codeFlowValue"),v(N)):(e.consume(N),S)}function L(N){return e.exit("codeFenced"),t(N)}function O(N,B,z){let Y=0;return I;function I(G){return N.enter("lineEnding"),N.consume(G),N.exit("lineEnding"),j}function j(G){return N.enter("codeFencedFence"),ie(G)?ae(N,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):q(G)}function q(G){return G===o?(N.enter("codeFencedFenceSequence"),V(G)):z(G)}function V(G){return G===o?(Y++,N.consume(G),V):Y>=a?(N.exit("codeFencedFenceSequence"),ie(G)?ae(N,J,"whitespace")(G):J(G)):z(G)}function J(G){return G===null||Q(G)?(N.exit("codeFencedFence"),B(G)):z(G)}}}function YT(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}var ui={name:"codeIndented",tokenize:WT},VT={partial:!0,tokenize:QT};function WT(e,t,n){const r=this;return i;function i(h){return e.enter("codeIndented"),ae(e,s,"linePrefix",5)(h)}function s(h){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?a(h):n(h)}function a(h){return h===null?l(h):Q(h)?e.attempt(VT,a,l)(h):(e.enter("codeFlowValue"),o(h))}function o(h){return h===null||Q(h)?(e.exit("codeFlowValue"),a(h)):(e.consume(h),o)}function l(h){return e.exit("codeIndented"),t(h)}}function QT(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Q(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):ae(e,s,"linePrefix",5)(a)}function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):Q(a)?i(a):n(a)}}var GT={name:"codeText",previous:XT,resolve:KT,tokenize:ZT};function KT(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function XT(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ZT(e,t,n){let r=0,i,s;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),o(d)}function o(d){return d===96?(e.consume(d),r++,o):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(s=e.enter("codeTextSequence"),i=0,m(d)):Q(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),h(d))}function h(d){return d===null||d===32||d===96||Q(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),h)}function m(d){return d===96?(e.consume(d),i++,m):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",h(d))}}var JT=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=t??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Tn(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Tn(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Tn(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);Tn(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Tn(this.left,t.reverse())}}};function Tn(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Lc(e){const t={};let n=-1,r,i,s,a,o,l,h;const m=new JT(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,eb(m,n)),n=t[n],h=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=m.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(m.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...m.get(i)[1].start},o=m.slice(i,n),o.unshift(r),m.splice(i,n-i+1,o))}}return Fe(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function eb(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,l=[],h={};let m,d,f=-1,p=n,g=0,_=0;const A=[_];for(;p;){for(;e.get(++i)[1]!==p;);s.push(i),p._tokenizer||(m=r.sliceStream(p),p.next||m.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(m),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<o.length;)o[f][0]==="exit"&&o[f-1][0]==="enter"&&o[f][1].type===o[f-1][1].type&&o[f][1].start.line!==o[f][1].end.line&&(_=f+1,A.push(_),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):A.pop(),f=A.length;f--;){const b=o.slice(A[f],A[f+1]),v=s.pop();l.push([v,v+b.length-1]),e.splice(v,2,b)}for(l.reverse(),f=-1;++f<l.length;)h[g+l[f][0]]=g+l[f][1],g+=l[f][1]-l[f][0]-1;return h}var tb={resolve:rb,tokenize:ib},nb={partial:!0,tokenize:sb};function rb(e){return Lc(e),e}function ib(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):Q(o)?e.check(nb,a,s)(o):(e.consume(o),i)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function sb(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ae(e,s,"linePrefix")}function s(a){if(a===null||Q(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Rc(e,t,n,r,i,s,a,o,l){const h=l||Number.POSITIVE_INFINITY;let m=0;return d;function d(b){return b===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(b),e.exit(s),f):b===null||b===32||b===41||vr(b)?n(b):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),_(b))}function f(b){return b===62?(e.enter(s),e.consume(b),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===62?(e.exit("chunkString"),e.exit(o),f(b)):b===null||b===60||Q(b)?n(b):(e.consume(b),b===92?g:p)}function g(b){return b===60||b===62||b===92?(e.consume(b),p):p(b)}function _(b){return!m&&(b===null||b===41||he(b))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(b)):m<h&&b===40?(e.consume(b),m++,_):b===41?(e.consume(b),m--,_):b===null||b===32||b===40||vr(b)?n(b):(e.consume(b),b===92?A:_)}function A(b){return b===40||b===41||b===92?(e.consume(b),_):_(b)}}function Oc(e,t,n,r,i,s){const a=this;let o=0,l;return h;function h(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(s),m}function m(p){return o>999||p===null||p===91||p===93&&!l||p===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(s),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):Q(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||Q(p)||o++>999?(e.exit("chunkString"),m(p)):(e.consume(p),l||(l=!ie(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),o++,d):d(p)}}function Dc(e,t,n,r,i,s){let a;return o;function o(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),a=f===40?41:f,l):n(f)}function l(f){return f===a?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(s),h(f))}function h(f){return f===a?(e.exit(s),l(a)):f===null?n(f):Q(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ae(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(f))}function m(f){return f===a||f===null||Q(f)?(e.exit("chunkString"),h(f)):(e.consume(f),f===92?d:m)}function d(f){return f===a||f===92?(e.consume(f),m):m(f)}}function wn(e,t){let n;return r;function r(i){return Q(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ie(i)?ae(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}var ab={name:"definition",tokenize:lb},ob={partial:!0,tokenize:cb};function lb(e,t,n){const r=this;let i;return s;function s(p){return e.enter("definition"),a(p)}function a(p){return Oc.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function o(p){return i=Ye(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return he(p)?wn(e,h)(p):h(p)}function h(p){return Rc(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function m(p){return e.attempt(ob,d,d)(p)}function d(p){return ie(p)?ae(e,f,"whitespace")(p):f(p)}function f(p){return p===null||Q(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function cb(e,t,n){return r;function r(o){return he(o)?wn(e,i)(o):n(o)}function i(o){return Dc(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return ie(o)?ae(e,a,"whitespace")(o):a(o)}function a(o){return o===null||Q(o)?t(o):n(o)}}var ub={name:"hardBreakEscape",tokenize:hb};function hb(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return Q(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}var db={name:"headingAtx",resolve:mb,tokenize:fb};function mb(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Fe(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function fb(e,t,n){let r=0;return i;function i(m){return e.enter("atxHeading"),s(m)}function s(m){return e.enter("atxHeadingSequence"),a(m)}function a(m){return m===35&&r++<6?(e.consume(m),a):m===null||he(m)?(e.exit("atxHeadingSequence"),o(m)):n(m)}function o(m){return m===35?(e.enter("atxHeadingSequence"),l(m)):m===null||Q(m)?(e.exit("atxHeading"),t(m)):ie(m)?ae(e,o,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function l(m){return m===35?(e.consume(m),l):(e.exit("atxHeadingSequence"),o(m))}function h(m){return m===null||m===35||he(m)?(e.exit("atxHeadingText"),o(m)):(e.consume(m),h)}}var pb=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ma=["pre","script","style","textarea"],gb={concrete:!0,name:"htmlFlow",resolveTo:bb,tokenize:xb},Eb={partial:!0,tokenize:yb},Tb={partial:!0,tokenize:kb};function bb(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function xb(e,t,n){const r=this;let i,s,a,o,l;return h;function h(C){return m(C)}function m(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),d}function d(C){return C===33?(e.consume(C),f):C===47?(e.consume(C),s=!0,_):C===63?(e.consume(C),i=3,r.interrupt?t:y):Ne(C)?(e.consume(C),a=String.fromCharCode(C),A):n(C)}function f(C){return C===45?(e.consume(C),i=2,p):C===91?(e.consume(C),i=5,o=0,g):Ne(C)?(e.consume(C),i=4,r.interrupt?t:y):n(C)}function p(C){return C===45?(e.consume(C),r.interrupt?t:y):n(C)}function g(C){return C==="CDATA[".charCodeAt(o++)?(e.consume(C),o===6?r.interrupt?t:q:g):n(C)}function _(C){return Ne(C)?(e.consume(C),a=String.fromCharCode(C),A):n(C)}function A(C){if(C===null||C===47||C===62||he(C)){const De=C===47,Te=a.toLowerCase();return!De&&!s&&Ma.includes(Te)?(i=1,r.interrupt?t(C):q(C)):pb.includes(a.toLowerCase())?(i=6,De?(e.consume(C),b):r.interrupt?t(C):q(C)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(C):s?v(C):S(C))}return C===45||Ce(C)?(e.consume(C),a+=String.fromCharCode(C),A):n(C)}function b(C){return C===62?(e.consume(C),r.interrupt?t:q):n(C)}function v(C){return ie(C)?(e.consume(C),v):I(C)}function S(C){return C===47?(e.consume(C),I):C===58||C===95||Ne(C)?(e.consume(C),L):ie(C)?(e.consume(C),S):I(C)}function L(C){return C===45||C===46||C===58||C===95||Ce(C)?(e.consume(C),L):O(C)}function O(C){return C===61?(e.consume(C),N):ie(C)?(e.consume(C),O):S(C)}function N(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),l=C,B):ie(C)?(e.consume(C),N):z(C)}function B(C){return C===l?(e.consume(C),l=null,Y):C===null||Q(C)?n(C):(e.consume(C),B)}function z(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||he(C)?O(C):(e.consume(C),z)}function Y(C){return C===47||C===62||ie(C)?S(C):n(C)}function I(C){return C===62?(e.consume(C),j):n(C)}function j(C){return C===null||Q(C)?q(C):ie(C)?(e.consume(C),j):n(C)}function q(C){return C===45&&i===2?(e.consume(C),U):C===60&&i===1?(e.consume(C),P):C===62&&i===4?(e.consume(C),ce):C===63&&i===3?(e.consume(C),y):C===93&&i===5?(e.consume(C),Z):Q(C)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Eb,K,V)(C)):C===null||Q(C)?(e.exit("htmlFlowData"),V(C)):(e.consume(C),q)}function V(C){return e.check(Tb,J,K)(C)}function J(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),G}function G(C){return C===null||Q(C)?V(C):(e.enter("htmlFlowData"),q(C))}function U(C){return C===45?(e.consume(C),y):q(C)}function P(C){return C===47?(e.consume(C),a="",W):q(C)}function W(C){if(C===62){const De=a.toLowerCase();return Ma.includes(De)?(e.consume(C),ce):q(C)}return Ne(C)&&a.length<8?(e.consume(C),a+=String.fromCharCode(C),W):q(C)}function Z(C){return C===93?(e.consume(C),y):q(C)}function y(C){return C===62?(e.consume(C),ce):C===45&&i===2?(e.consume(C),y):q(C)}function ce(C){return C===null||Q(C)?(e.exit("htmlFlowData"),K(C)):(e.consume(C),ce)}function K(C){return e.exit("htmlFlow"),t(C)}}function kb(e,t,n){const r=this;return i;function i(a){return Q(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function yb(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(tr,t,n)}}var Cb={name:"htmlText",tokenize:Ab};function Ab(e,t,n){const r=this;let i,s,a;return o;function o(y){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(y),l}function l(y){return y===33?(e.consume(y),h):y===47?(e.consume(y),O):y===63?(e.consume(y),S):Ne(y)?(e.consume(y),z):n(y)}function h(y){return y===45?(e.consume(y),m):y===91?(e.consume(y),s=0,g):Ne(y)?(e.consume(y),v):n(y)}function m(y){return y===45?(e.consume(y),p):n(y)}function d(y){return y===null?n(y):y===45?(e.consume(y),f):Q(y)?(a=d,P(y)):(e.consume(y),d)}function f(y){return y===45?(e.consume(y),p):d(y)}function p(y){return y===62?U(y):y===45?f(y):d(y)}function g(y){return y==="CDATA[".charCodeAt(s++)?(e.consume(y),s===6?_:g):n(y)}function _(y){return y===null?n(y):y===93?(e.consume(y),A):Q(y)?(a=_,P(y)):(e.consume(y),_)}function A(y){return y===93?(e.consume(y),b):_(y)}function b(y){return y===62?U(y):y===93?(e.consume(y),b):_(y)}function v(y){return y===null||y===62?U(y):Q(y)?(a=v,P(y)):(e.consume(y),v)}function S(y){return y===null?n(y):y===63?(e.consume(y),L):Q(y)?(a=S,P(y)):(e.consume(y),S)}function L(y){return y===62?U(y):S(y)}function O(y){return Ne(y)?(e.consume(y),N):n(y)}function N(y){return y===45||Ce(y)?(e.consume(y),N):B(y)}function B(y){return Q(y)?(a=B,P(y)):ie(y)?(e.consume(y),B):U(y)}function z(y){return y===45||Ce(y)?(e.consume(y),z):y===47||y===62||he(y)?Y(y):n(y)}function Y(y){return y===47?(e.consume(y),U):y===58||y===95||Ne(y)?(e.consume(y),I):Q(y)?(a=Y,P(y)):ie(y)?(e.consume(y),Y):U(y)}function I(y){return y===45||y===46||y===58||y===95||Ce(y)?(e.consume(y),I):j(y)}function j(y){return y===61?(e.consume(y),q):Q(y)?(a=j,P(y)):ie(y)?(e.consume(y),j):Y(y)}function q(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),i=y,V):Q(y)?(a=q,P(y)):ie(y)?(e.consume(y),q):(e.consume(y),J)}function V(y){return y===i?(e.consume(y),i=void 0,G):y===null?n(y):Q(y)?(a=V,P(y)):(e.consume(y),V)}function J(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||he(y)?Y(y):(e.consume(y),J)}function G(y){return y===47||y===62||he(y)?Y(y):n(y)}function U(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function P(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),W}function W(y){return ie(y)?ae(e,Z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):Z(y)}function Z(y){return e.enter("htmlTextData"),a(y)}}var Es={name:"labelEnd",resolveAll:Sb,resolveTo:Ib,tokenize:wb},_b={tokenize:Lb},vb={tokenize:Rb},Nb={tokenize:Ob};function Sb(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Fe(e,0,e.length,n),e}function Ib(e,t){let n=e.length,r=0,i,s,a,o;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},m={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",h,t]],o=ze(o,e.slice(s+1,s+r+3)),o=ze(o,[["enter",m,t]]),o=ze(o,Wr(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),o=ze(o,[["exit",m,t],e[a-2],e[a-1],["exit",h,t]]),o=ze(o,e.slice(a+1)),o=ze(o,[["exit",l,t]]),Fe(e,s,e.length,o),e}function wb(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return o;function o(f){return s?s._inactive?d(f):(a=r.parser.defined.includes(Ye(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):n(f)}function l(f){return f===40?e.attempt(_b,m,a?m:d)(f):f===91?e.attempt(vb,m,a?h:d)(f):a?m(f):d(f)}function h(f){return e.attempt(Nb,m,d)(f)}function m(f){return t(f)}function d(f){return s._balanced=!0,n(f)}}function Lb(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return he(d)?wn(e,s)(d):s(d)}function s(d){return d===41?m(d):Rc(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return he(d)?wn(e,l)(d):m(d)}function o(d){return n(d)}function l(d){return d===34||d===39||d===40?Dc(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):m(d)}function h(d){return he(d)?wn(e,m)(d):m(d)}function m(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function Rb(e,t,n){const r=this;return i;function i(o){return Oc.call(r,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(Ye(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function Ob(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}var Db={name:"labelStartImage",resolveAll:Es.resolveAll,tokenize:Pb};function Pb(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),s}function s(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):n(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}var Mb={name:"labelStartLink",resolveAll:Es.resolveAll,tokenize:Bb};function Bb(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}var hi={name:"lineEnding",tokenize:Fb};function Fb(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ae(e,t,"linePrefix")}}var xr={name:"thematicBreak",tokenize:jb};function jb(e,t,n){let r=0,i;return s;function s(h){return e.enter("thematicBreak"),a(h)}function a(h){return i=h,o(h)}function o(h){return h===i?(e.enter("thematicBreakSequence"),l(h)):r>=3&&(h===null||Q(h))?(e.exit("thematicBreak"),t(h)):n(h)}function l(h){return h===i?(e.consume(h),r++,l):(e.exit("thematicBreakSequence"),ie(h)?ae(e,o,"whitespace")(h):o(h))}}var Re={continuation:{tokenize:$b},exit:Yb,name:"list",tokenize:zb},Hb={partial:!0,tokenize:Vb},Ub={partial:!0,tokenize:qb};function zb(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Di(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(xr,n,h)(p):h(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return Di(p)&&++a<10?(e.consume(p),l):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),h(p)):n(p)}function h(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(tr,r.interrupt?n:m,e.attempt(Hb,f,d))}function m(p){return r.containerState.initialBlankLine=!0,s++,f(p)}function d(p){return ie(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function $b(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(tr,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ae(e,t,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!ie(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Ub,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,ae(e,e.attempt(Re,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function qb(e,t,n){const r=this;return ae(e,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function Yb(e){e.exit(this.containerState.type)}function Vb(e,t,n){const r=this;return ae(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!ie(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}var Ba={name:"setextUnderline",resolveTo:Wb,tokenize:Qb};function Wb(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function Qb(e,t,n){const r=this;let i;return s;function s(h){let m=r.events.length,d;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){d=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=h,a(h)):n(h)}function a(h){return e.enter("setextHeadingLineSequence"),o(h)}function o(h){return h===i?(e.consume(h),o):(e.exit("setextHeadingLineSequence"),ie(h)?ae(e,l,"lineSuffix")(h):l(h))}function l(h){return h===null||Q(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}var Gb={tokenize:r0,partial:!0};function Kb(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:e0,continuation:{tokenize:t0},exit:n0}},text:{91:{name:"gfmFootnoteCall",tokenize:Jb},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Xb,resolveTo:Zb}}}}function Xb(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!a||!a._balanced)return n(l);const h=Ye(r.sliceSerialize({start:a.end,end:r.now()}));return h.codePointAt(0)!==94||!s.includes(h.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function Zb(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function Jb(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return o;function o(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(d){if(s>999||d===93&&!a||d===null||d===91||he(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(Ye(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return he(d)||(a=!0),s++,e.consume(d),d===92?m:h}function m(d){return d===91||d===92||d===93?(e.consume(d),s++,h):h(d)}}function e0(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,o;return l;function l(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(g)}function m(g){if(a>999||g===93&&!o||g===null||g===91||he(g))return n(g);if(g===93){e.exit("chunkString");const _=e.exit("gfmFootnoteDefinitionLabelString");return s=Ye(r.sliceSerialize(_)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return he(g)||(o=!0),a++,e.consume(g),g===92?d:m}function d(g){return g===91||g===92||g===93?(e.consume(g),a++,m):m(g)}function f(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(s)||i.push(s),ae(e,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return t(g)}}function t0(e,t,n){return e.check(tr,t,e.attempt(Gb,t,n))}function n0(e){e.exit("gfmFootnoteDefinition")}function r0(e,t,n){const r=this;return ae(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function i0(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:i,resolveAll:r};return t==null&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(s,a){let o=-1;for(;++o<s.length;)if(s[o][0]==="enter"&&s[o][1].type==="strikethroughSequenceTemporary"&&s[o][1]._close){let l=o;for(;l--;)if(s[l][0]==="exit"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._open&&s[o][1].end.offset-s[o][1].start.offset===s[l][1].end.offset-s[l][1].start.offset){s[o][1].type="strikethroughSequence",s[l][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},s[l][1].start),end:Object.assign({},s[o][1].end)},m={type:"strikethroughText",start:Object.assign({},s[l][1].end),end:Object.assign({},s[o][1].start)},d=[["enter",h,a],["enter",s[l][1],a],["exit",s[l][1],a],["enter",m,a]],f=a.parser.constructs.insideSpan.null;f&&Fe(d,d.length,0,Wr(f,s.slice(l+1,o),a)),Fe(d,d.length,0,[["exit",m,a],["enter",s[o][1],a],["exit",s[o][1],a],["exit",h,a]]),Fe(s,l-1,o-l+3,d),o=l+d.length-2;break}}for(o=-1;++o<s.length;)s[o][1].type==="strikethroughSequenceTemporary"&&(s[o][1].type="data");return s}function i(s,a,o){const l=this.previous,h=this.events;let m=0;return d;function d(p){return l===126&&h[h.length-1][1].type!=="characterEscape"?o(p):(s.enter("strikethroughSequenceTemporary"),f(p))}function f(p){const g=sn(l);if(p===126)return m>1?o(p):(s.consume(p),m++,f);if(m<2&&!t)return o(p);const _=s.exit("strikethroughSequenceTemporary"),A=sn(p);return _._open=!A||A===2&&!!g,_._close=!g||g===2&&!!A,a(p)}}}var s0=class{constructor(){this.map=[]}add(e,t,n){a0(this,e,t,n)}consume(e){if(this.map.sort(function(i,s){return i[0]-s[0]}),this.map.length===0)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const i of r)e.push(i);r=n.pop()}this.map.length=0}};function a0(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function o0(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function l0(){return{flow:{null:{name:"table",tokenize:c0,resolveAll:u0}}}}function c0(e,t,n){const r=this;let i=0,s=0,a;return o;function o(I){let j=r.events.length-1;for(;j>-1;){const J=r.events[j][1].type;if(J==="lineEnding"||J==="linePrefix")j--;else break}const q=j>-1?r.events[j][1].type:null,V=q==="tableHead"||q==="tableRow"?N:l;return V===N&&r.parser.lazy[r.now().line]?n(I):V(I)}function l(I){return e.enter("tableHead"),e.enter("tableRow"),h(I)}function h(I){return I===124||(a=!0,s+=1),m(I)}function m(I){return I===null?n(I):Q(I)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),p):n(I):ie(I)?ae(e,m,"whitespace")(I):(s+=1,a&&(a=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),a=!0,m):(e.enter("data"),d(I)))}function d(I){return I===null||I===124||he(I)?(e.exit("data"),m(I)):(e.consume(I),I===92?f:d)}function f(I){return I===92||I===124?(e.consume(I),d):d(I)}function p(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),a=!1,ie(I)?ae(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):g(I))}function g(I){return I===45||I===58?A(I):I===124?(a=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),_):O(I)}function _(I){return ie(I)?ae(e,A,"whitespace")(I):A(I)}function A(I){return I===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),b):I===45?(s+=1,b(I)):I===null||Q(I)?L(I):O(I)}function b(I){return I===45?(e.enter("tableDelimiterFiller"),v(I)):O(I)}function v(I){return I===45?(e.consume(I),v):I===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(I))}function S(I){return ie(I)?ae(e,L,"whitespace")(I):L(I)}function L(I){return I===124?g(I):I===null||Q(I)?!a||i!==s?O(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):O(I)}function O(I){return n(I)}function N(I){return e.enter("tableRow"),B(I)}function B(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),B):I===null||Q(I)?(e.exit("tableRow"),t(I)):ie(I)?ae(e,B,"whitespace")(I):(e.enter("data"),z(I))}function z(I){return I===null||I===124||he(I)?(e.exit("data"),B(I)):(e.consume(I),I===92?Y:z)}function Y(I){return I===92||I===124?(e.consume(I),z):z(I)}}function u0(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,h,m,d;const f=new s0;for(;++n<e.length;){const p=e[n],g=p[1];p[0]==="enter"?g.type==="tableHead"?(o=!1,l!==0&&(Fa(f,t,l,h,m),m=void 0,l=0),h={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},f.add(n,0,[["enter",h,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,d=void 0,s=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,m={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},f.add(n,0,[["enter",m,t]])),i=g.type==="tableDelimiterRow"?2:m?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],d=hr(f,t,s,i,void 0,d),s=[0,0,0,0]),a[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],d=hr(f,t,s,i,void 0,d)),s=a,a=[s[1],n,0,0])):g.type==="tableHead"?(o=!0,l=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=n,s[1]!==0?(a[0]=a[1],d=hr(f,t,s,i,n,d)):a[1]!==0&&(d=hr(f,t,a,i,n,d)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&Fa(f,t,l,h,m),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=o0(t.events,n))}return e}function hr(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},Xt(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const l=Xt(t.events,n[1]);if(s={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const h=Xt(t.events,n[2]),m=Xt(t.events,n[3]),d={type:o,start:Object.assign({},h),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,_=n[3]-n[2]-1;e.add(g,_,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(s.end=Object.assign({},Xt(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function Fa(e,t,n,r,i){const s=[],a=Xt(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function Xt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}var h0={name:"tasklistCheck",tokenize:m0};function d0(){return{text:{91:h0}}}function m0(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return he(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(l)}function o(l){return Q(l)?t(l):ie(l)?e.check({tokenize:f0},t,n)(l):n(l)}}function f0(e,t,n){return ae(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function p0(e){return bc([_T(),Kb(),i0(e),l0(),d0()])}var g0={};function E0(e){const t=this,n=e||g0,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(p0(n)),s.push(bT()),a.push(xT(n))}var T0=Object.defineProperty,b0=Object.defineProperties,x0=Object.getOwnPropertyDescriptors,ja=Object.getOwnPropertySymbols,k0=Object.prototype.hasOwnProperty,y0=Object.prototype.propertyIsEnumerable,Ha=(e,t,n)=>t in e?T0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pc=(e,t)=>{for(var n in t||(t={}))k0.call(t,n)&&Ha(e,n,t[n]);if(ja)for(var n of ja(t))y0.call(t,n)&&Ha(e,n,t[n]);return e},Mc=(e,t)=>b0(e,x0(t)),Ie=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},C0=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},A0=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!C0(e,n)&&(t+=1)}return t},kt=(e,t)=>{let n=!1,r=!1,i=-1;for(let s=0;s<e.length;s+=1){if(e[s]==="\\"&&s+1<e.length&&e[s+1]==="`"){s+=1;continue}if(e.substring(s,s+3)==="```"){r=!r,s+=2;continue}if(!r&&e[s]==="`")if(n){if(i<t&&t<s)return!0;n=!1,i=-1}else n=!0,i=s}return!1},_0=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,v0=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(_0,(t,n,r,i)=>Ie(e,i)?t:`${n}\\>${r}`),N0=/(\*\*)([^*]*\*?)$/,S0=/(__)([^_]*?)$/,I0=/(\*\*\*)([^*]*?)$/,w0=/(\*)([^*]*?)$/,L0=/(_)([^_]*?)$/,R0=/(`)([^`]*?)$/,O0=/(~~)([^~]*?)$/,$t=/^[\s_~*`]*$/,Bc=/^[\s]*[-*+][\s]+$/,D0=/[\p{L}\p{N}_]/u,P0=/^```[^`\n]*```?$/,M0=/^\*{4,}$/,B0=/(__)([^_]+)_$/,F0=/(~~)([^~]+)~$/,Ua=/~~/g,yt=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:D0.test(e)},j0=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},Fc=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},Qr=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},H0=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
|
|
19
|
+
`)return!1}return!1},jc=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?H0(e,t):!1;if(e[n]===`
|
|
20
|
+
`)return!1}return!1},U0=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let r=n+1<e.length?e[n+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[n]===`
|
|
21
|
+
`)return!1}return!1},Ts=(e,t,n)=>{let r=0;for(let l=t-1;l>=0;l-=1)if(e[l]===`
|
|
22
|
+
`){r=l+1;break}let i=e.length;for(let l=t;l<e.length;l+=1)if(e[l]===`
|
|
23
|
+
`){i=l;break}let s=e.substring(r,i),a=0,o=!1;for(let l of s)if(l===n)a+=1;else if(l!==" "&&l!==" "){o=!0;break}return a>=3&&!o},z0=(e,t,n,r)=>n==="\\"||e.includes("$")&&Qr(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&yt(n)&&yt(r)||(!n||n===" "||n===" "||n===`
|
|
24
|
+
`)&&(!r||r===" "||r===" "||r===`
|
|
25
|
+
`)),Hc=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="*")continue;let s=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";z0(e,i,s,a)||(t+=1)}return t},$0=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&Qr(e,t)||jc(e,t)||U0(e,t)||n==="_"||r==="_"||n&&r&&yt(n)&&yt(r)),q0=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="_")continue;let s=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";$0(e,i,s,a)||(t+=1)}return t},Y0=e=>{let t=0,n=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},bs=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(t+=1,r+=1)}return t},za=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(t+=1,r+=1)}return t},V0=(e,t,n)=>{if(!t||$t.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
26
|
+
`),i=r===-1?0:r+1,s=e.substring(i,n);return Bc.test(s)&&t.includes(`
|
|
27
|
+
`)?!0:Ts(e,n,"*")},W0=e=>{let t=e.match(N0);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Ie(e,r)||kt(e,r)||V0(e,n,r)?e:bs(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},Q0=(e,t,n)=>{if(!t||$t.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
28
|
+
`),i=r===-1?0:r+1,s=e.substring(i,n);return Bc.test(s)&&t.includes(`
|
|
29
|
+
`)?!0:Ts(e,n,"_")},G0=e=>{let t=e.match(S0);if(!t){let i=e.match(B0);if(i){let s=e.lastIndexOf(i[1]);if(!(Ie(e,s)||kt(e,s))&&za(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return Ie(e,r)||kt(e,r)||Q0(e,n,r)?e:za(e)%2===1?`${e}__`:e},K0=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!Qr(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if((!r||r===" "||r===" "||r===`
|
|
30
|
+
`)&&(!i||i===" "||i===" "||i===`
|
|
31
|
+
`)||r&&i&&yt(r)&&yt(i))continue;return n}}return-1},X0=e=>{if(!e.match(w0))return e;let t=K0(e);if(t===-1||Ie(e,t)||kt(e,t))return e;let n=e.substring(t+1);return!n||$t.test(n)?e:Hc(e)%2===1?`${e}*`:e},Uc=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!Qr(e,n)&&!jc(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if(r&&i&&yt(r)&&yt(i))continue;return n}}return-1},Z0=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
32
|
+
`;)t-=1;return t<e.length?`${e.slice(0,t)}_${e.slice(t)}`:`${e}_`},J0=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(bs(t)%2!==1)return null;let n=t.indexOf("**"),r=Uc(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},ex=e=>{if(!e.match(L0))return e;let t=Uc(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||$t.test(n)||Ie(e,t)||kt(e,t))return e;if(q0(e)%2===1){let r=J0(e);return r!==null?r:Z0(e)}return e},tx=e=>{let t=bs(e),n=Hc(e);return t%2===0&&n%2===0},nx=(e,t,n)=>!t||$t.test(t)||Ie(e,n)||kt(e,n)?!0:Ts(e,n,"*"),rx=e=>{if(M0.test(e))return e;let t=e.match(I0);if(!t)return e;let n=t[2];return nx(e,n,e.lastIndexOf(t[1]))?e:Y0(e)%2===1?tx(e)?e:`${e}***`:e},ix=/<[a-zA-Z/][^>]*$/,sx=e=>{let t=e.match(ix);return!t||t.index===void 0||Ie(e,t.index)?e:e.substring(0,t.index).trimEnd()},ax=e=>!e.match(P0)||e.includes(`
|
|
33
|
+
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,ox=e=>(e.match(/```/g)||[]).length%2===1,lx=e=>{let t=ax(e);if(t!==null)return t;let n=e.match(R0);if(n&&!ox(e)){let r=n[2];if(!r||$t.test(r))return e;if(A0(e)%2===1)return`${e}\``}return e},zc=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",cx=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!zc(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},ux=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"){r+=1;continue}if(e[r]==="`"&&!zc(e,r)){n=!n;continue}!n&&e[r]==="$"&&(r+1<e.length&&e[r+1]==="$"?r+=1:t+=1)}return t},hx=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
34
|
+
`,t)!==-1&&!e.endsWith(`
|
|
35
|
+
`)?`${e}
|
|
36
|
+
$$`:`${e}$$`},dx=e=>cx(e)%2===0?e:hx(e),mx=e=>ux(e)%2===1?`${e}$`:e,fx=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=j0(e,t);if(r===-1||Ie(e,r))return null;let i=r>0&&e[r-1]==="!",s=i?r-1:r,a=e.substring(0,s);if(i)return a;let o=e.substring(r+1,t);return n==="text-only"?`${a}${o}`:`${a}[${o}](streamdown:incomplete-link)`},$a=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!Ie(e,n)){if(n>0&&e[n-1]==="!")continue;let r=Fc(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(n=i)}}return t},px=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t;if(!e.substring(t+1).includes("]")){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let a=$a(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}if(Fc(e,t)===-1){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let a=$a(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}return null},$c=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!Ie(e,n)){let r=fx(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!Ie(e,r)){let i=px(e,r,t);if(i!==null)return i}return e},gx=/^-{1,2}$/,Ex=/^[\s]*-{1,2}[\s]+$/,Tx=/^={1,2}$/,bx=/^[\s]*={1,2}[\s]+$/,xx=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
37
|
+
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(gx.test(i)&&!n.match(Ex)){let s=r.split(`
|
|
38
|
+
`).at(-1);if(s&&s.trim().length>0)return`${e}`}if(Tx.test(i)&&!n.match(bx)){let s=r.split(`
|
|
39
|
+
`).at(-1);if(s&&s.trim().length>0)return`${e}`}return e},kx=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),yx=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(kx,(t,n)=>Ie(e,n)?t:"\\~"),Cx=e=>{var t,n;let r=e.match(O0);if(r){let i=r[2];if(!i||$t.test(i))return e;let s=e.lastIndexOf(r[1]);if(Ie(e,s)||kt(e,s))return e;if(((t=e.match(Ua))==null?void 0:t.length)%2===1)return`${e}~~`}else{let i=e.match(F0);if(i){let s=e.lastIndexOf(i[0].slice(0,2));if(Ie(e,s)||kt(e,s))return e;if(((n=e.match(Ua))==null?void 0:n.length)%2===1)return`${e}~`}}return e},di=e=>e!==!1,Ax=e=>e===!0,ve={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},_x=[{handler:{name:"singleTilde",handle:yx,priority:ve.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:v0,priority:ve.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:sx,priority:ve.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:xx,priority:ve.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:$c,priority:ve.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:rx,priority:ve.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:W0,priority:ve.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:G0,priority:ve.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:X0,priority:ve.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:ex,priority:ve.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:lx,priority:ve.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:Cx,priority:ve.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:dx,priority:ve.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:mx,priority:ve.INLINE_KATEX},optionKey:"inlineKatex"}],vx=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return _x.filter(({handler:r,optionKey:i})=>r.name==="links"?di(e?.links)||di(e?.images):r.name==="inlineKatex"?Ax(e?.inlineKatex):di(e?.[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:Mc(Pc({},r),{handle:s=>$c(s,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},Nx=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=vx(t),s=((n=t?.handlers)!=null?n:[]).map(o=>{var l;return{handler:Mc(Pc({},o),{priority:(l=o.priority)!=null?l:ve.DEFAULT}),earlyReturn:void 0}}),a=[...i,...s].sort((o,l)=>{var h,m;return((h=o.handler.priority)!=null?h:0)-((m=l.handler.priority)!=null?m:0)});for(let{handler:o,earlyReturn:l}of a)if(r=o.handle(r),l!=null&&l(r))return r;return r},Sx=Nx,Ix=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wx=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Lx={};function qa(e,t){return((t||Lx).jsx?wx:Ix).test(e)}var Rx=/[ \t\n\f\r]/g;function Ox(e){return typeof e=="object"?e.type==="text"?Ya(e.value):!1:Ya(e)}function Ya(e){return e.replace(Rx,"")===""}var Dx=qn(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,h=/^\s+|\s+$/g,m=`
|
|
40
|
+
`,d="/",f="*",p="",g="comment",_="declaration";function A(v,S){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];S=S||{};var L=1,O=1;function N(U){var P=U.match(r);P&&(L+=P.length);var W=U.lastIndexOf(m);O=~W?U.length-W:O+U.length}function B(){var U={line:L,column:O};return function(P){return P.position=new z(U),j(),P}}function z(U){this.start=U,this.end={line:L,column:O},this.source=S.source}z.prototype.content=v;function Y(U){var P=new Error(S.source+":"+L+":"+O+": "+U);if(P.reason=U,P.filename=S.source,P.line=L,P.column=O,P.source=v,!S.silent)throw P}function I(U){var P=U.exec(v);if(P){var W=P[0];return N(W),v=v.slice(W.length),P}}function j(){I(i)}function q(U){var P;for(U=U||[];P=V();)P!==!1&&U.push(P);return U}function V(){var U=B();if(!(d!=v.charAt(0)||f!=v.charAt(1))){for(var P=2;p!=v.charAt(P)&&(f!=v.charAt(P)||d!=v.charAt(P+1));)++P;if(P+=2,p===v.charAt(P-1))return Y("End of comment missing");var W=v.slice(2,P-2);return O+=2,N(W),v=v.slice(P),O+=2,U({type:g,comment:W})}}function J(){var U=B(),P=I(s);if(P){if(V(),!I(a))return Y("property missing ':'");var W=I(o),Z=U({type:_,property:b(P[0].replace(n,p)),value:W?b(W[0].replace(n,p)):p});return I(l),Z}}function G(){var U=[];q(U);for(var P;P=J();)P!==!1&&(U.push(P),q(U));return U}return j(),G()}function b(v){return v?v.replace(h,p):p}t.exports=A})),Px=qn((e=>{var t=e&&e.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(Dx());function r(i,s){let a=null;if(!i||typeof i!="string")return a;const o=(0,n.default)(i),l=typeof s=="function";return o.forEach(h=>{if(h.type!=="declaration")return;const{property:m,value:d}=h;l?s(m,d,h):d&&(a=a||{},a[m]=d)}),a}})),Mx=qn((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(m){return!m||r.test(m)||t.test(m)},o=function(m,d){return d.toUpperCase()},l=function(m,d){return"".concat(d,"-")},h=function(m,d){return d===void 0&&(d={}),a(m)?m:(m=m.toLowerCase(),d.reactCompat?m=m.replace(s,l):m=m.replace(i,l),m.replace(n,o))};e.camelCase=h})),Bx=qn(((e,t)=>{var n=(e&&e.__importDefault||function(s){return s&&s.__esModule?s:{default:s}})(Px()),r=Mx();function i(s,a){var o={};return!s||typeof s!="string"||(0,n.default)(s,function(l,h){l&&h&&(o[(0,r.camelCase)(l,a)]=h)}),o}i.default=i,t.exports=i}));function Ln(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Va(e.position):"start"in e||"end"in e?Va(e):"line"in e||"column"in e?Bi(e):""}function Bi(e){return Wa(e&&e.line)+":"+Wa(e&&e.column)}function Va(e){return Bi(e&&e.start)+"-"+Bi(e&&e.end)}function Wa(e){return e&&typeof e=="number"?e:1}var _e=class extends Error{constructor(e,t,n){super(),typeof t=="string"&&(n=t,t=void 0);let r="",i={},s=!1;if(t&&("line"in t&&"column"in t?i={place:t}:"start"in t&&"end"in t?i={place:t}:"type"in t?i={ancestors:[t],place:t.position}:i={...t}),typeof e=="string"?r=e:!i.cause&&e&&(s=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n=="string"){const o=n.indexOf(":");o===-1?i.ruleId=n:(i.source=n.slice(0,o),i.ruleId=n.slice(o+1))}if(!i.place&&i.ancestors&&i.ancestors){const o=i.ancestors[i.ancestors.length-1];o&&(i.place=o.position)}const a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=a?a.line:void 0,this.name=Ln(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};_e.prototype.file="";_e.prototype.name="";_e.prototype.reason="";_e.prototype.message="";_e.prototype.stack="";_e.prototype.column=void 0;_e.prototype.line=void 0;_e.prototype.ancestors=void 0;_e.prototype.cause=void 0;_e.prototype.fatal=void 0;_e.prototype.place=void 0;_e.prototype.ruleId=void 0;_e.prototype.source=void 0;var Fx=Dr(Bx(),1),xs={}.hasOwnProperty,jx=new Map,Hx=/[A-Z]/g,Ux=new Set(["table","tbody","thead","tfoot","tr"]),zx=new Set(["td","th"]),qc="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $x(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Xx(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Kx(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ct:Xn,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Yc(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Yc(e,t,n){if(t.type==="element")return qx(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Yx(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Wx(e,t,n);if(t.type==="mdxjsEsm")return Vx(e,t);if(t.type==="root")return Qx(e,t,n);if(t.type==="text")return Gx(e,t)}function qx(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Ct,e.schema=i),e.ancestors.push(t);const s=Wc(e,t.tagName,!1),a=Zx(e,t);let o=ys(e,t);return Ux.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!Ox(l):!0})),Vc(e,a,s,t),ks(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Yx(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}$n(e,t.position)}function Vx(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);$n(e,t.position)}function Wx(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Ct,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:Wc(e,t.name,!0),a=Jx(e,t),o=ys(e,t);return Vc(e,a,s,t),ks(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Qx(e,t,n){const r={};return ks(r,ys(e,t)),e.create(t,e.Fragment,r,n)}function Gx(e,t){return t.value}function Vc(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ks(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Kx(e,t,n){return r;function r(i,s,a,o){const l=Array.isArray(a.children)?n:t;return o?l(s,a,o):l(s,a)}}function Xx(e,t){return n;function n(r,i,s,a){const o=Array.isArray(s.children),l=rt(r);return t(i,s,a,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Zx(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&xs.call(t.properties,i)){const s=ek(e,i,t.properties[i]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&zx.has(t.tagName)?r=o:n[a]=o}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Jx(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const s=i.expression;s.type;const a=s.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else $n(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,s=e.evaluater.evaluateExpression(a.expression)}else $n(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function ys(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:jx;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const h=i.get(l)||0;a=l+"-"+h,i.set(l,h+1)}}const o=Yc(e,s,a);o!==void 0&&n.push(o)}return n}function ek(e,t,n){const r=Hr(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?dl(n):ml(n)),r.property==="style"){let i=typeof n=="object"?n:tk(e,String(n));return e.stylePropertyNameCase==="css"&&(i=nk(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?dm[r.property]||r.property:r.attribute,n]}}function tk(e,t){try{return(0,Fx.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new _e("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=qc+"#cannot-parse-style-attribute",i}}function Wc(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const o=qa(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}r=a}else r=qa(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return xs.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);$n(e)}function $n(e,t){const n=new _e("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=qc+"#cannot-handle-mdx-estrees-without-createevaluater",n}function nk(e){const t={};let n;for(n in e)xs.call(e,n)&&(t[rk(n)]=e[n]);return t}function rk(e){let t=e.replace(Hx,ik);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ik(e){return"-"+e.toLowerCase()}var mi={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},sk={tokenize:ak};function ak(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),ae(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return Q(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}var ok={tokenize:lk},Qa={tokenize:ck};function lk(e){const t=this,n=[];let r=0,i,s,a;return o;function o(S){if(r<n.length){const L=n[r];return t.containerState=L[1],e.attempt(L[0].continuation,l,h)(S)}return h(S)}function l(S){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();const L=t.events.length;let O=L,N;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){N=t.events[O][1].end;break}b(r);let B=L;for(;B<t.events.length;)t.events[B][1].end={...N},B++;return Fe(t.events,O+1,0,t.events.slice(L)),t.events.length=B,h(S)}return o(S)}function h(S){if(r===n.length){if(!i)return f(S);if(i.currentConstruct&&i.currentConstruct.concrete)return g(S);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Qa,m,d)(S)}function m(S){return i&&v(),b(r),f(S)}function d(S){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,g(S)}function f(S){return t.containerState={},e.attempt(Qa,p,g)(S)}function p(S){return r++,n.push([t.currentConstruct,t.containerState]),f(S)}function g(S){if(S===null){i&&v(),b(0),e.consume(S);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),_(S)}function _(S){if(S===null){A(e.exit("chunkFlow"),!0),b(0),e.consume(S);return}return Q(S)?(e.consume(S),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(S),_)}function A(S,L){const O=t.sliceStream(S);if(L&&O.push(null),S.previous=s,s&&(s.next=S),s=S,i.defineSkip(S.start),i.write(O),t.parser.lazy[S.start.line]){let N=i.events.length;for(;N--;)if(i.events[N][1].start.offset<a&&(!i.events[N][1].end||i.events[N][1].end.offset>a))return;const B=t.events.length;let z=B,Y,I;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){if(Y){I=t.events[z][1].end;break}Y=!0}for(b(r),N=B;N<t.events.length;)t.events[N][1].end={...I},N++;Fe(t.events,z+1,0,t.events.slice(B)),t.events.length=N}}function b(S){let L=n.length;for(;L-- >S;){const O=n[L];t.containerState=O[1],O[0].exit.call(t,e)}n.length=S}function v(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ck(e,t,n){return ae(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var uk={tokenize:hk};function hk(e){const t=this,n=e.attempt(tr,r,e.attempt(this.parser.constructs.flowInitial,i,ae(e,e.attempt(this.parser.constructs.flow,i,e.attempt(tb,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}var dk={resolveAll:Gc()},mk=Qc("string"),fk=Qc("text");function Qc(e){return{resolveAll:Gc(e==="text"?pk:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,o);return a;function a(m){return h(m)?s(m):o(m)}function o(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),l}function l(m){return h(m)?(n.exit("data"),s(m)):(n.consume(m),l)}function h(m){if(m===null)return!0;const d=i[m];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Gc(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function pk(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,a=-1,o=0,l;for(;s--;){const h=i[s];if(typeof h=="string"){for(a=h.length;h.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(h===-2)l=!0,o++;else if(h!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const h={type:n===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}var gk=Xi({attentionMarkers:()=>Ak,contentInitial:()=>Tk,disable:()=>_k,document:()=>Ek,flow:()=>xk,flowInitial:()=>bk,insideSpan:()=>Ck,string:()=>kk,text:()=>yk}),Ek={42:Re,43:Re,45:Re,48:Re,49:Re,50:Re,51:Re,52:Re,53:Re,54:Re,55:Re,56:Re,57:Re,62:Sc},Tk={91:ab},bk={[-2]:ui,[-1]:ui,32:ui},xk={35:db,42:xr,45:[Ba,xr],60:gb,61:Ba,95:xr,96:Pa,126:Pa},kk={38:wc,92:Ic},yk={[-5]:hi,[-4]:hi,[-3]:hi,33:Db,38:wc,42:Mi,60:[MT,Cb],91:Mb,92:[ub,Ic],93:Es,95:Mi,96:GT},Ck={null:[Mi,dk]},Ak={null:[42,95]},_k={null:[]};function vk(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let a=[],o=[];const l={attempt:B(O),check:B(N),consume:v,enter:S,exit:L,interrupt:B(N,{interrupt:!0})},h={code:null,containerState:{},defineSkip:_,events:[],now:g,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let m=t.tokenize.call(h,l);return t.resolveAll&&s.push(t),h;function d(j){return a=ze(a,j),A(),a[a.length-1]!==null?[]:(z(t,0),h.events=Wr(s,h.events,h),h.events)}function f(j,q){return Sk(p(j),q)}function p(j){return Nk(a,j)}function g(){const{_bufferIndex:j,_index:q,line:V,column:J,offset:G}=r;return{_bufferIndex:j,_index:q,line:V,column:J,offset:G}}function _(j){i[j.line]=j.column,I()}function A(){let j;for(;r._index<a.length;){const q=a[r._index];if(typeof q=="string")for(j=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===j&&r._bufferIndex<q.length;)b(q.charCodeAt(r._bufferIndex));else b(q)}}function b(j){m=m(j)}function v(j){Q(j)?(r.line++,r.column=1,r.offset+=j===-3?2:1,I()):j!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=j}function S(j,q){const V=q||{};return V.type=j,V.start=g(),h.events.push(["enter",V,h]),o.push(V),V}function L(j){const q=o.pop();return q.end=g(),h.events.push(["exit",q,h]),q}function O(j,q){z(j,q.from)}function N(j,q){q.restore()}function B(j,q){return V;function V(J,G,U){let P,W,Z,y;return Array.isArray(J)?K(J):"tokenize"in J?K([J]):ce(J);function ce(ge){return _t;function _t(Pe){const He=Pe!==null&&ge[Pe],st=Pe!==null&&ge.null;return K([...Array.isArray(He)?He:He?[He]:[],...Array.isArray(st)?st:st?[st]:[]])(Pe)}}function K(ge){return P=ge,W=0,ge.length===0?U:C(ge[W])}function C(ge){return _t;function _t(Pe){return y=Y(),Z=ge,ge.partial||(h.currentConstruct=ge),ge.name&&h.parser.constructs.disable.null.includes(ge.name)?Te(Pe):ge.tokenize.call(q?Object.assign(Object.create(h),q):h,l,De,Te)(Pe)}}function De(ge){return j(Z,y),G}function Te(ge){return y.restore(),++W<P.length?C(P[W]):U}}}function z(j,q){j.resolveAll&&!s.includes(j)&&s.push(j),j.resolve&&Fe(h.events,q,h.events.length-q,j.resolve(h.events.slice(q),h)),j.resolveTo&&(h.events=j.resolveTo(h.events,h))}function Y(){const j=g(),q=h.previous,V=h.currentConstruct,J=h.events.length,G=Array.from(o);return{from:J,restore:U};function U(){r=j,h.previous=q,h.currentConstruct=V,h.events.length=J,o=G,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Nk(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function Sk(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:a="\r";break;case-4:a=`
|
|
41
|
+
`;break;case-3:a=`\r
|
|
42
|
+
`;break;case-2:a=t?" ":" ";break;case-1:if(!t&&i)continue;a=" ";break;default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function Ik(e){const t={constructs:bc([gk,...(e||{}).extensions||[]]),content:n(sk),defined:[],document:n(ok),flow:n(uk),lazy:{},string:n(mk),text:n(fk)};return t;function n(r){return i;function i(s){return vk(t,r,s)}}}function wk(e){for(;!Lc(e););return e}var Ga=/[\0\t\n\r]/g;function Lk(){let e=1,t="",n=!0,r;return i;function i(s,a,o){const l=[];let h,m,d,f,p;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),d=0,t="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(Ga.lastIndex=d,h=Ga.exec(s),f=h&&h.index!==void 0?h.index:s.length,p=s.charCodeAt(f),!h){t=s.slice(d);break}if(p===10&&d===f&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<f&&(l.push(s.slice(d,f)),e+=f-d),p){case 0:l.push(65533),e++;break;case 9:for(m=Math.ceil(e/4)*4,l.push(-2);e++<m;)l.push(-1);break;case 10:l.push(-4),e=1;break;default:r=!0,e=1}d=f+1}return o&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}var Kc={}.hasOwnProperty;function Rk(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Ok(n)(wk(Ik(n).document().write(Lk()(e,t,!0))))}function Ok(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(de),autolinkProtocol:Y,autolinkEmail:Y,atxHeading:s(dn),blockQuote:s(st),characterEscape:Y,characterReference:Y,codeFenced:s(ir),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(ir,a),codeText:s(sr,a),codeTextData:Y,data:Y,codeFlowValue:Y,definition:s(ar),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(or),hardBreakEscape:s(Yt),hardBreakTrailing:s(Yt),htmlFlow:s(lr,a),htmlFlowData:Y,htmlText:s(lr,a),htmlTextData:Y,image:s(se),label:a,link:s(de),listItem:s(Qe),listItemValue:f,listOrdered:s(we,d),listUnordered:s(we),paragraph:s(vt),reference:C,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(dn),strong:s(hh),thematicBreak:s(mh)},exit:{atxHeading:l(),atxHeadingSequence:O,autolink:l(),autolinkEmail:He,autolinkProtocol:Pe,blockQuote:l(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:Te,characterReferenceMarkerNumeric:Te,characterReferenceValue:ge,characterReference:_t,codeFenced:l(A),codeFencedFence:_,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:I,codeIndented:l(b),codeText:l(G),codeTextData:I,data:I,definition:l(),definitionDestinationString:L,definitionLabelString:v,definitionTitleString:S,emphasis:l(),hardBreakEscape:l(q),hardBreakTrailing:l(q),htmlFlow:l(V),htmlFlowData:I,htmlText:l(J),htmlTextData:I,image:l(P),label:Z,labelText:W,lineEnding:j,link:l(U),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:De,resourceDestinationString:y,resourceTitleString:ce,resource:K,setextHeading:l(z),setextHeadingLineSequence:B,setextHeadingText:N,strong:l(),thematicBreak:l()}};Xc(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(D){let $={type:"root",children:[]};const X={stack:[$],tokenStack:[],config:t,enter:o,exit:h,buffer:a,resume:m,data:n},fe=[];let pe=-1;for(;++pe<D.length;)(D[pe][1].type==="listOrdered"||D[pe][1].type==="listUnordered")&&(D[pe][0]==="enter"?fe.push(pe):pe=i(D,fe.pop(),pe));for(pe=-1;++pe<D.length;){const mt=t[D[pe][0]];Kc.call(mt,D[pe][1].type)&&mt[D[pe][1].type].call(Object.assign({sliceSerialize:D[pe][2].sliceSerialize},X),D[pe][1])}if(X.tokenStack.length>0){const mt=X.tokenStack[X.tokenStack.length-1];(mt[1]||Ka).call(X,void 0,mt[0])}for($.position={start:ft(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:ft(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},pe=-1;++pe<t.transforms.length;)$=t.transforms[pe]($)||$;return $}function i(D,$,X){let fe=$-1,pe=-1,mt=!1,Vt,at,mn,fn;for(;++fe<=X;){const Me=D[fe];switch(Me[1].type){case"listUnordered":case"listOrdered":case"blockQuote":Me[0]==="enter"?pe++:pe--,fn=void 0;break;case"lineEndingBlank":Me[0]==="enter"&&(Vt&&!fn&&!pe&&!mn&&(mn=fe),fn=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:fn=void 0}if(!pe&&Me[0]==="enter"&&Me[1].type==="listItemPrefix"||pe===-1&&Me[0]==="exit"&&(Me[1].type==="listUnordered"||Me[1].type==="listOrdered")){if(Vt){let Wt=fe;for(at=void 0;Wt--;){const ot=D[Wt];if(ot[1].type==="lineEnding"||ot[1].type==="lineEndingBlank"){if(ot[0]==="exit")continue;at&&(D[at][1].type="lineEndingBlank",mt=!0),ot[1].type="lineEnding",at=Wt}else if(!(ot[1].type==="linePrefix"||ot[1].type==="blockQuotePrefix"||ot[1].type==="blockQuotePrefixWhitespace"||ot[1].type==="blockQuoteMarker"||ot[1].type==="listItemIndent"))break}mn&&(!at||mn<at)&&(Vt._spread=!0),Vt.end=Object.assign({},at?D[at][1].start:Me[1].end),D.splice(at||fe,0,["exit",Vt,Me[2]]),fe++,X++}if(Me[1].type==="listItemPrefix"){const Wt={type:"listItem",_spread:!1,start:Object.assign({},Me[1].start),end:void 0};Vt=Wt,D.splice(fe,0,["enter",Wt,Me[2]]),fe++,X++,mn=void 0,fn=!0}}}return D[$][1]._spread=mt,X}function s(D,$){return X;function X(fe){o.call(this,D(fe),fe),$&&$.call(this,fe)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(D,$,X){this.stack[this.stack.length-1].children.push(D),this.stack.push(D),this.tokenStack.push([$,X||void 0]),D.position={start:ft($.start),end:void 0}}function l(D){return $;function $(X){D&&D.call(this,X),h.call(this,X)}}function h(D,$){const X=this.stack.pop(),fe=this.tokenStack.pop();if(fe)fe[0].type!==D.type&&($?$.call(this,D,fe[0]):(fe[1]||Ka).call(this,D,fe[0]));else throw new Error("Cannot close `"+D.type+"` ("+Ln({start:D.start,end:D.end})+"): it’s not open");X.position.end=ft(D.end)}function m(){return ms(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(D){if(this.data.expectingFirstListItemValue){const $=this.stack[this.stack.length-2];$.start=Number.parseInt(this.sliceSerialize(D),10),this.data.expectingFirstListItemValue=void 0}}function p(){const D=this.resume(),$=this.stack[this.stack.length-1];$.lang=D}function g(){const D=this.resume(),$=this.stack[this.stack.length-1];$.meta=D}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const D=this.resume(),$=this.stack[this.stack.length-1];$.value=D.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const D=this.resume(),$=this.stack[this.stack.length-1];$.value=D.replace(/(\r?\n|\r)$/g,"")}function v(D){const $=this.resume(),X=this.stack[this.stack.length-1];X.label=$,X.identifier=Ye(this.sliceSerialize(D)).toLowerCase()}function S(){const D=this.resume(),$=this.stack[this.stack.length-1];$.title=D}function L(){const D=this.resume(),$=this.stack[this.stack.length-1];$.url=D}function O(D){const $=this.stack[this.stack.length-1];$.depth||($.depth=this.sliceSerialize(D).length)}function N(){this.data.setextHeadingSlurpLineEnding=!0}function B(D){const $=this.stack[this.stack.length-1];$.depth=this.sliceSerialize(D).codePointAt(0)===61?1:2}function z(){this.data.setextHeadingSlurpLineEnding=void 0}function Y(D){const $=this.stack[this.stack.length-1].children;let X=$[$.length-1];(!X||X.type!=="text")&&(X=dh(),X.position={start:ft(D.start),end:void 0},$.push(X)),this.stack.push(X)}function I(D){const $=this.stack.pop();$.value+=this.sliceSerialize(D),$.position.end=ft(D.end)}function j(D){const $=this.stack[this.stack.length-1];if(this.data.atHardBreak){const X=$.children[$.children.length-1];X.position.end=ft(D.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes($.type)&&(Y.call(this,D),I.call(this,D))}function q(){this.data.atHardBreak=!0}function V(){const D=this.resume(),$=this.stack[this.stack.length-1];$.value=D}function J(){const D=this.resume(),$=this.stack[this.stack.length-1];$.value=D}function G(){const D=this.resume(),$=this.stack[this.stack.length-1];$.value=D}function U(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const $=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=$,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function P(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const $=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=$,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function W(D){const $=this.sliceSerialize(D),X=this.stack[this.stack.length-2];X.label=aT($),X.identifier=Ye($).toLowerCase()}function Z(){const D=this.stack[this.stack.length-1],$=this.resume(),X=this.stack[this.stack.length-1];this.data.inReference=!0,X.type==="link"?X.children=D.children:X.alt=$}function y(){const D=this.resume(),$=this.stack[this.stack.length-1];$.url=D}function ce(){const D=this.resume(),$=this.stack[this.stack.length-1];$.title=D}function K(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function De(D){const $=this.resume(),X=this.stack[this.stack.length-1];X.label=$,X.identifier=Ye(this.sliceSerialize(D)).toLowerCase(),this.data.referenceType="full"}function Te(D){this.data.characterReferenceType=D.type}function ge(D){const $=this.sliceSerialize(D),X=this.data.characterReferenceType;let fe;X?(fe=Tc($,X==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):fe=ps($);const pe=this.stack[this.stack.length-1];pe.value+=fe}function _t(D){const $=this.stack.pop();$.position.end=ft(D.end)}function Pe(D){I.call(this,D);const $=this.stack[this.stack.length-1];$.url=this.sliceSerialize(D)}function He(D){I.call(this,D);const $=this.stack[this.stack.length-1];$.url="mailto:"+this.sliceSerialize(D)}function st(){return{type:"blockquote",children:[]}}function ir(){return{type:"code",lang:null,meta:null,value:""}}function sr(){return{type:"inlineCode",value:""}}function ar(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function or(){return{type:"emphasis",children:[]}}function dn(){return{type:"heading",depth:0,children:[]}}function Yt(){return{type:"break"}}function lr(){return{type:"html",value:""}}function se(){return{type:"image",title:null,url:"",alt:null}}function de(){return{type:"link",title:null,url:"",children:[]}}function we(D){return{type:"list",ordered:D.type==="listOrdered",start:null,spread:D._spread,children:[]}}function Qe(D){return{type:"listItem",spread:D._spread,checked:null,children:[]}}function vt(){return{type:"paragraph",children:[]}}function hh(){return{type:"strong",children:[]}}function dh(){return{type:"text",value:""}}function mh(){return{type:"thematicBreak"}}}function ft(e){return{line:e.line,column:e.column,offset:e.offset}}function Xc(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Xc(e,r):Dk(e,r)}}function Dk(e,t){let n;for(n in t)if(Kc.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Ka(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ln({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ln({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ln({start:t.start,end:t.end})+") is still open")}function Pk(e){const t=this;t.parser=n;function n(r){return Rk(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Mk(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Bk(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
43
|
+
`}]}function Fk(e,t){const n=t.value?t.value+`
|
|
44
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function jk(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Hk(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Uk(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=un(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,o+=1,e.footnoteCounts.set(r,o);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const h={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,h),e.applyData(t,h)}function zk(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $k(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Zc(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function qk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Zc(e,t);const i={src:un(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function Yk(e,t){const n={src:un(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Vk(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Wk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Zc(e,t);const i={href:un(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function Qk(e,t){const n={href:un(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Gk(e,t,n){const r=e.all(t),i=n?Kk(n):Jc(t),s={},a=[];if(typeof t.checked=="boolean"){const m=r[0];let d;m&&m.type==="element"&&m.tagName==="p"?d=m:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const m=r[o];(i||o!==0||m.type!=="element"||m.tagName!=="p")&&a.push({type:"text",value:`
|
|
45
|
+
`}),m.type==="element"&&m.tagName==="p"&&!i?a.push(...m.children):a.push(m)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
|
|
46
|
+
`});const h={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,h),e.applyData(t,h)}function Kk(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Jc(n[r])}return t}function Jc(e){const t=e.spread;return t??e.children.length>1}function Xk(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function Zk(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Jk(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ey(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ty(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=rt(t.children[1]),l=Yr(t.children[t.children.length-1]);o&&l&&(a.position={start:o,end:l}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function ny(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,a=s?s.length:t.children.length;let o=-1;const l=[];for(;++o<a;){const m=t.children[o],d={},f=s?s[o]:void 0;f&&(d.align=f);let p={type:"element",tagName:i,properties:d,children:[]};m&&(p.children=e.all(m),e.patch(m,p),p=e.applyData(m,p)),l.push(p)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,h),e.applyData(t,h)}function ry(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Xa=9,Za=32;function iy(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Ja(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Ja(t.slice(i),i>0,!1)),s.join("")}function Ja(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Xa||s===Za;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Xa||s===Za;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function sy(e,t){const n={type:"text",value:iy(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ay(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var oy={blockquote:Mk,break:Bk,code:Fk,delete:jk,emphasis:Hk,footnoteReference:Uk,heading:zk,html:$k,imageReference:qk,image:Yk,inlineCode:Vk,linkReference:Wk,link:Qk,listItem:Gk,list:Xk,paragraph:Zk,root:Jk,strong:ey,table:ty,tableCell:ry,tableRow:ny,text:sy,thematicBreak:ay,toml:dr,yaml:dr,definition:dr,footnoteDefinition:dr};function dr(){}function ly(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function cy(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function uy(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||ly,r=e.options.footnoteBackLabel||cy,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[l]);if(!h)continue;const m=e.all(h),d=String(h.identifier).toUpperCase(),f=un(d.toLowerCase());let p=0;const g=[],_=e.footnoteCounts.get(d);for(;_!==void 0&&++p<=_;){g.length>0&&g.push({type:"text",value:" "});let v=typeof n=="string"?n:n(l,p);typeof v=="string"&&(v={type:"text",value:v}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const A=m[m.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const v=A.children[A.children.length-1];v&&v.type==="text"?v.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...g)}else m.push(...g);const b={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(m,!0)};e.patch(h,b),o.push(b)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Bt(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
47
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
|
|
48
|
+
`}]}}var Fi={}.hasOwnProperty,hy={};function dy(e,t){const n=t||hy,r=new Map,i=new Map,s={all:o,applyData:fy,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...oy,...n.handlers},one:a,options:n,patch:my,wrap:gy};return tt(e,function(l){if(l.type==="definition"||l.type==="footnoteDefinition"){const h=l.type==="definition"?r:i,m=String(l.identifier).toUpperCase();h.has(m)||h.set(m,l)}}),s;function a(l,h){const m=l.type,d=s.handlers[m];if(Fi.call(s.handlers,m)&&d)return d(s,l,h);if(s.options.passThrough&&s.options.passThrough.includes(m)){if("children"in l){const{children:f,...p}=l,g=Bt(p);return g.children=s.all(l),g}return Bt(l)}return(s.options.unknownHandler||py)(s,l,h)}function o(l){const h=[];if("children"in l){const m=l.children;let d=-1;for(;++d<m.length;){const f=s.one(m[d],l);if(f){if(d&&m[d-1].type==="break"&&(!Array.isArray(f)&&f.type==="text"&&(f.value=eo(f.value)),!Array.isArray(f)&&f.type==="element")){const p=f.children[0];p&&p.type==="text"&&(p.value=eo(p.value))}Array.isArray(f)?h.push(...f):h.push(f)}}}return h}}function my(e,t){e.position&&(t.position=Wl(e))}function fy(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:"children"in n?n.children:[n]}),n.type==="element"&&s&&Object.assign(n.properties,Bt(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function py(e,t){const n=t.data||{},r="value"in t&&!(Fi.call(n,"hProperties")||Fi.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gy(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
49
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
50
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
51
|
+
`}),n}function eo(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function to(e,t){const n=dy(e,t),r=n.one(e,void 0),i=uy(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&("children"in s,s.children.push({type:"text",value:`
|
|
52
|
+
`},i)),s}function Ey(e,t){return e&&"run"in e?async function(n,r){const i=to(n,{file:r,...t});await e.run(i,r)}:function(n,r){return to(n,{file:r,...e||t})}}function no(e){if(e)throw e}var Ty=qn(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a=function(d){return typeof Array.isArray=="function"?Array.isArray(d):r.call(d)==="[object Array]"},o=function(d){if(!d||r.call(d)!=="[object Object]")return!1;var f=n.call(d,"constructor"),p=d.constructor&&d.constructor.prototype&&n.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!f&&!p)return!1;var g;for(g in d);return typeof g>"u"||n.call(d,g)},l=function(d,f){i&&f.name==="__proto__"?i(d,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):d[f.name]=f.newValue},h=function(d,f){if(f==="__proto__")if(n.call(d,f)){if(s)return s(d,f).value}else return;return d[f]};t.exports=function m(){var d,f,p,g,_,A,b=arguments[0],v=1,S=arguments.length,L=!1;for(typeof b=="boolean"&&(L=b,b=arguments[1]||{},v=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});v<S;++v)if(d=arguments[v],d!=null)for(f in d)p=h(b,f),g=h(d,f),b!==g&&(L&&g&&(o(g)||(_=a(g)))?(_?(_=!1,A=p&&a(p)?p:[]):A=p&&o(p)?p:{},l(b,{name:f,newValue:m(L,A,g)})):typeof g<"u"&&l(b,{name:f,newValue:g}));return b}}));function ji(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function by(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...i);function o(l,...h){const m=e[++s];let d=-1;if(l){a(l);return}for(;++d<i.length;)(h[d]===null||h[d]===void 0)&&(h[d]=i[d]);i=h,m?xy(m,o)(...h):a(null,...h)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function xy(e,t){let n;return r;function r(...a){const o=e.length>a.length;let l;o&&a.push(i);try{l=e.apply(this,a)}catch(h){const m=h;if(o&&n)throw m;return i(m)}o||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(a,...o){n||(n=!0,t(a,...o))}function s(a){i(null,a)}}var Ke={basename:ky,dirname:yy,extname:Cy,join:Ay,sep:"/"};function ky(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');nr(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function yy(e){if(nr(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Cy(e){nr(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Ay(...e){let t=-1,n;for(;++t<e.length;)nr(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":_y(n)}function _y(e){nr(e);const t=e.codePointAt(0)===47;let n=vy(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function vy(e,t){let n="",r=0,i=-1,s=0,a=-1,o,l;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else o===46&&s>-1?s++:s=-1}return n}function nr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var Ny={cwd:Sy};function Sy(){return"/"}function Hi(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Iy(e){if(typeof e=="string")e=new URL(e);else if(!Hi(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return wy(e)}function wy(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}var fi=["history","path","basename","stem","extname","dirname"],Ly=class{constructor(e){let t;e?Hi(e)?t={path:e}:typeof e=="string"||Ry(e)?t={value:e}:t=e:t={},this.cwd="cwd"in t?"":Ny.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<fi.length;){const i=fi[n];i in t&&t[i]!==void 0&&t[i]!==null&&(this[i]=i==="history"?[...t[i]]:t[i])}let r;for(r in t)fi.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path=="string"?Ke.basename(this.path):void 0}set basename(e){gi(e,"basename"),pi(e,"basename"),this.path=Ke.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Ke.dirname(this.path):void 0}set dirname(e){ro(this.basename,"dirname"),this.path=Ke.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Ke.extname(this.path):void 0}set extname(e){if(pi(e,"extname"),ro(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ke.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Hi(e)&&(e=Iy(e)),gi(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Ke.basename(this.path,this.extname):void 0}set stem(e){gi(e,"stem"),pi(e,"stem"),this.path=Ke.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new _e(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function pi(e,t){if(e&&e.includes(Ke.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ke.sep+"`")}function gi(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ro(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Ry(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Oy=(function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Ei=Dr(Ty(),1),Dy={}.hasOwnProperty,Py=class eu extends Oy{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=by()}copy(){const t=new eu;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data((0,Ei.default)(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(xi("data",this.frozen),this.namespace[t]=n,this):Dy.call(this.namespace,t)&&this.namespace[t]||void 0:t?(xi("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=mr(t),r=this.parser||this.Parser;return Ti("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ti("process",this.parser||this.Parser),bi("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const o=mr(t),l=r.parse(o);r.run(l,o,function(m,d,f){if(m||!d||!f)return h(m);const p=d,g=r.stringify(p,f);Fy(g)?f.value=g:f.result=g,h(m,f)});function h(m,d){m||!d?a(m):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Ti("processSync",this.parser||this.Parser),bi("processSync",this.compiler||this.Compiler),this.process(t,i),so("processSync","process",n),r;function i(s,a){n=!0,no(s),r=a}}run(t,n,r){io(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,o){const l=mr(n);i.run(t,l,h);function h(m,d,f){const p=d||t;m?o(m):a?a(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),so("runSync","run",r),i;function s(a,o){no(a),i=o,r=!0}}stringify(t,n){this.freeze();const r=mr(n),i=this.compiler||this.Compiler;return bi("stringify",i),io(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(xi("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(h){if(typeof h=="function")l(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...d]=h;l(m,d)}else a(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function a(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(h.plugins),h.settings&&(i.settings=(0,Ei.default)(!0,i.settings,h.settings))}function o(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const d=h[m];s(d)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function l(h,m){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===h){f=d;break}if(f===-1)r.push([h,...m]);else if(m.length>0){let[p,...g]=m;const _=r[f][1];ji(_)&&ji(p)&&(p=(0,Ei.default)(!0,_,p)),r[f]=[h,p,...g]}}}},My=new Py().freeze();function Ti(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function bi(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function xi(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function io(e){if(!ji(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function so(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function mr(e){return By(e)?e:new Ly(e)}function By(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Fy(e){return typeof e=="string"||jy(e)}function jy(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var tu=Dr(Yh(),1);function Cs(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var qt=Cs();function nu(e){qt=e}var Lt={exec:()=>null};function le(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(Se.caret,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,t)};return r}var Hy=(()=>{try{return!0}catch{return!1}})(),Se={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Uy=/^(?:[ \t]*(?:\n|$))+/,zy=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,$y=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,rr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,qy=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,As=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ru=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,iu=le(ru).replace(/bull/g,As).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Yy=le(ru).replace(/bull/g,As).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),_s=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Vy=/^[^\n]+/,vs=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Wy=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",vs).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Qy=le(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,As).getRegex(),Gr="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ns=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Gy=le("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ns).replace("tag",Gr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ao=le(_s).replace("hr",rr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Gr).getRegex(),Ss={blockquote:le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ao).getRegex(),code:zy,def:Wy,fences:$y,heading:qy,hr:rr,html:Gy,lheading:iu,list:Qy,newline:Uy,paragraph:ao,table:Lt,text:Vy},oo=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",rr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Gr).getRegex(),Ky={...Ss,lheading:Yy,table:oo,paragraph:le(_s).replace("hr",rr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",oo).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Gr).getRegex()},Xy={...Ss,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ns).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Lt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:le(_s).replace("hr",rr).replace("heading",` *#{1,6} *[^
|
|
53
|
+
]`).replace("lheading",iu).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Zy=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Jy=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,su=/^( {2,}|\\)\n(?!\s*$)/,eC=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,hn=/[\p{P}\p{S}]/u,Kr=/[\s\p{P}\p{S}]/u,Is=/[^\s\p{P}\p{S}]/u,tC=le(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Kr).getRegex(),au=/(?!~)[\p{P}\p{S}]/u,nC=/(?!~)[\s\p{P}\p{S}]/u,rC=/(?:[^\s\p{P}\p{S}]|~)/u,iC=le(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Hy?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ou=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,sC=le(ou,"u").replace(/punct/g,hn).getRegex(),aC=le(ou,"u").replace(/punct/g,au).getRegex(),lu="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",oC=le(lu,"gu").replace(/notPunctSpace/g,Is).replace(/punctSpace/g,Kr).replace(/punct/g,hn).getRegex(),lC=le(lu,"gu").replace(/notPunctSpace/g,rC).replace(/punctSpace/g,nC).replace(/punct/g,au).getRegex(),cC=le("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Is).replace(/punctSpace/g,Kr).replace(/punct/g,hn).getRegex(),uC=le(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,hn).getRegex(),hC=le("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,Is).replace(/punctSpace/g,Kr).replace(/punct/g,hn).getRegex(),dC=le(/\\(punct)/,"gu").replace(/punct/g,hn).getRegex(),mC=le(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),fC=le(Ns).replace("(?:-->|$)","-->").getRegex(),pC=le("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",fC).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Sr=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,gC=le(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Sr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),cu=le(/^!?\[(label)\]\[(ref)\]/).replace("label",Sr).replace("ref",vs).getRegex(),uu=le(/^!?\[(ref)\](?:\[\])?/).replace("ref",vs).getRegex(),EC=le("reflink|nolink(?!\\()","g").replace("reflink",cu).replace("nolink",uu).getRegex(),lo=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ws={_backpedal:Lt,anyPunctuation:dC,autolink:mC,blockSkip:iC,br:su,code:Jy,del:Lt,delLDelim:Lt,delRDelim:Lt,emStrongLDelim:sC,emStrongRDelimAst:oC,emStrongRDelimUnd:cC,escape:Zy,link:gC,nolink:uu,punctuation:tC,reflink:cu,reflinkSearch:EC,tag:pC,text:eC,url:Lt},TC={...ws,link:le(/^!?\[(label)\]\((.*?)\)/).replace("label",Sr).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Sr).getRegex()},Ui={...ws,emStrongRDelimAst:lC,emStrongLDelim:aC,delLDelim:uC,delRDelim:hC,url:le(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",lo).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:le(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",lo).getRegex()},bC={...Ui,br:le(su).replace("{2,}","*").getRegex(),text:le(Ui.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},fr={normal:Ss,gfm:Ky,pedantic:Xy},bn={normal:ws,gfm:Ui,breaks:bC,pedantic:TC},xC={"&":"&","<":"<",">":">",'"':""","'":"'"},co=e=>xC[e];function Ge(e,t){if(t){if(Se.escapeTest.test(e))return e.replace(Se.escapeReplace,co)}else if(Se.escapeTestNoEncode.test(e))return e.replace(Se.escapeReplaceNoEncode,co);return e}function uo(e){try{e=encodeURI(e).replace(Se.percentDecode,"%")}catch{return null}return e}function ho(e,t){let n=e.replace(Se.findPipe,(i,s,a)=>{let o=!1,l=s;for(;--l>=0&&a[l]==="\\";)o=!o;return o?"|":" |"}).split(Se.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(Se.slashPipe,"|");return n}function xn(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r;){let s=e.charAt(r-i-1);if(s===t&&!n)i++;else if(s!==t&&n)i++;else break}return e.slice(0,r-i)}function kC(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function yC(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let s=4-n%4;r+=" ".repeat(s),n+=s}else r+=i,n++;return r}function mo(e,t,n,r,i){let s=t.href,a=t.title||null,o=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:s,title:a,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,l}function CC(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
54
|
+
`).map(s=>{let a=s.match(n.other.beginningSpace);if(a===null)return s;let[o]=a;return o.length>=i.length?s.slice(i.length):s}).join(`
|
|
55
|
+
`)}var Ir=class{options;rules;lexer;constructor(e){this.options=e||qt}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:xn(n,`
|
|
56
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=CC(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=xn(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:xn(t[0],`
|
|
57
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=xn(t[0],`
|
|
58
|
+
`).split(`
|
|
59
|
+
`),r="",i="",s=[];for(;n.length>0;){let a=!1,o=[],l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))o.push(n[l]),a=!0;else if(!a)o.push(n[l]);else break;n=n.slice(l);let h=o.join(`
|
|
60
|
+
`),m=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|
61
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
62
|
+
${h}`:h,i=i?`${i}
|
|
63
|
+
${m}`:m;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,s,!0),this.lexer.state.top=d,n.length===0)break;let f=s.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let p=f,g=p.raw+`
|
|
64
|
+
`+n.join(`
|
|
65
|
+
`),_=this.blockquote(g);s[s.length-1]=_,r=r.substring(0,r.length-p.raw.length)+_.raw,i=i.substring(0,i.length-p.text.length)+_.text;break}else if(f?.type==="list"){let p=f,g=p.raw+`
|
|
66
|
+
`+n.join(`
|
|
67
|
+
`),_=this.list(g);s[s.length-1]=_,r=r.substring(0,r.length-f.raw.length)+_.raw,i=i.substring(0,i.length-p.raw.length)+_.raw,n=g.substring(s.at(-1).raw.length).split(`
|
|
68
|
+
`);continue}}return{type:"blockquote",raw:r,tokens:s,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let s=this.rules.other.listItemRegex(n),a=!1;for(;e;){let l=!1,h="",m="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;h=t[0],e=e.substring(h.length);let d=yC(t[2].split(`
|
|
69
|
+
`,1)[0],t[1].length),f=e.split(`
|
|
70
|
+
`,1)[0],p=!d.trim(),g=0;if(this.options.pedantic?(g=2,m=d.trimStart()):p?g=t[1].length+1:(g=d.search(this.rules.other.nonSpaceChar),g=g>4?1:g,m=d.slice(g),g+=t[1].length),p&&this.rules.other.blankLine.test(f)&&(h+=f+`
|
|
71
|
+
`,e=e.substring(f.length+1),l=!0),!l){let _=this.rules.other.nextBulletRegex(g),A=this.rules.other.hrRegex(g),b=this.rules.other.fencesBeginRegex(g),v=this.rules.other.headingBeginRegex(g),S=this.rules.other.htmlBeginRegex(g),L=this.rules.other.blockquoteBeginRegex(g);for(;e;){let O=e.split(`
|
|
72
|
+
`,1)[0],N;if(f=O,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),N=f):N=f.replace(this.rules.other.tabCharGlobal," "),b.test(f)||v.test(f)||S.test(f)||L.test(f)||_.test(f)||A.test(f))break;if(N.search(this.rules.other.nonSpaceChar)>=g||!f.trim())m+=`
|
|
73
|
+
`+N.slice(g);else{if(p||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||b.test(d)||v.test(d)||A.test(d))break;m+=`
|
|
74
|
+
`+f}p=!f.trim(),h+=O+`
|
|
75
|
+
`,e=e.substring(O.length+1),d=N.slice(g)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(a=!0)),i.items.push({type:"list_item",raw:h,task:!!this.options.gfm&&this.rules.other.listIsTask.test(m),loose:!1,text:m,tokens:[]}),i.raw+=h}let o=i.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l of i.items){if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),l.task){if(l.text=l.text.replace(this.rules.other.listReplaceTask,""),l.tokens[0]?.type==="text"||l.tokens[0]?.type==="paragraph"){l.tokens[0].raw=l.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),l.tokens[0].text=l.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let m=this.lexer.inlineQueue.length-1;m>=0;m--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[m].src)){this.lexer.inlineQueue[m].src=this.lexer.inlineQueue[m].src.replace(this.rules.other.listReplaceTask,"");break}}let h=this.rules.other.listTaskCheckbox.exec(l.raw);if(h){let m={type:"checkbox",raw:h[0]+" ",checked:h[0]!=="[ ]"};l.checked=m.checked,i.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=m.raw+l.tokens[0].raw,l.tokens[0].text=m.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(m)):l.tokens.unshift({type:"paragraph",raw:m.raw,text:m.raw,tokens:[m]}):l.tokens.unshift(m)}}if(!i.loose){let h=l.tokens.filter(m=>m.type==="space");i.loose=h.length>0&&h.some(m=>this.rules.other.anyLine.test(m.raw))}}if(i.loose)for(let l of i.items){l.loose=!0;for(let h of l.tokens)h.type==="text"&&(h.type="paragraph")}return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:i}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=ho(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
76
|
+
`):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let a of r)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a<n.length;a++)s.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:s.align[a]});for(let a of i)s.rows.push(ho(a,s.header.length).map((o,l)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:s.align[l]})));return s}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
|
77
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let s=xn(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=kC(t[2],"()");if(s===-2)return;if(s>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(r);s&&(r=s[1],i=s[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),mo(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!r){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return mo(n,r,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,s,a,o=i,l=0,h=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+i);(r=h.exec(t))!==null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(a=[...s].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&i%3&&!((i+a)%3)){l+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+l);let m=[...r[0]][0].length,d=e.slice(0,i+r.index+m+a);if(Math.min(i,a)%2){let p=d.slice(1,-1);return{type:"em",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,s,a,o=i,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+i);(r=l.exec(t))!==null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s||(a=[...s].length,a!==i))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let h=[...r[0]][0].length,m=e.slice(0,i+r.index+h+a),d=m.slice(i,-i);return{type:"del",raw:m,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,r;if(t[2]==="@")n=t[0],r="mailto:"+n;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(i!==t[0]);n=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},$e=class zi{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||qt,this.options.tokenizer=this.options.tokenizer||new Ir,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Se,block:fr.normal,inline:bn.normal};this.options.pedantic?(n.block=fr.pedantic,n.inline=bn.pedantic):this.options.gfm&&(n.block=fr.gfm,this.options.breaks?n.inline=bn.breaks:n.inline=bn.gfm),this.tokenizer.rules=n}static get rules(){return{block:fr,inline:bn}}static lex(t,n){return new zi(n).lex(t)}static lexInline(t,n){return new zi(n).inlineTokens(t)}lex(t){t=t.replace(Se.carriageReturn,`
|
|
78
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(Se.tabCharGlobal," ").replace(Se.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(a=>(i=a.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let a=n.at(-1);i.raw.length===1&&a!==void 0?a.raw+=`
|
|
79
|
+
`:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
80
|
+
`)?"":`
|
|
81
|
+
`)+i.raw,a.text+=`
|
|
82
|
+
`+i.text,this.inlineQueue.at(-1).src=a.text):n.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
83
|
+
`)?"":`
|
|
84
|
+
`)+i.raw,a.text+=`
|
|
85
|
+
`+i.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),n.push(i);continue}let s=t;if(this.options.extensions?.startBlock){let a=1/0,o=t.slice(1),l;this.options.extensions.startBlock.forEach(h=>{l=h.call({lexer:this},o),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(s=t.substring(0,a+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){let a=n.at(-1);r&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
|
|
86
|
+
`)?"":`
|
|
87
|
+
`)+i.raw,a.text+=`
|
|
88
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i),r=s.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let a=n.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
89
|
+
`)?"":`
|
|
90
|
+
`)+i.raw,a.text+=`
|
|
91
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){this.tokenizer.lexer=this;let r=t,i=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!==null;)l.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!==null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!==null;)s=i[2]?i[2].length:0,r=r.slice(0,i.index+s)+"["+"a".repeat(i[0].length-s-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let a=!1,o="";for(;t;){a||(o=""),a=!1;let l;if(this.options.extensions?.inline?.some(m=>(l=m.call({lexer:this},t,n))?(t=t.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let m=n.at(-1);l.type==="text"&&m?.type==="text"?(m.raw+=l.raw,m.text+=l.text):n.push(l);continue}if(l=this.tokenizer.emStrong(t,r,o)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.del(t,r,o)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),n.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),n.push(l);continue}let h=t;if(this.options.extensions?.startInline){let m=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(m=Math.min(m,f))}),m<1/0&&m>=0&&(h=t.substring(0,m+1))}if(l=this.tokenizer.inlineText(h)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),a=!0;let m=n.at(-1);m?.type==="text"?(m.raw+=l.raw,m.text+=l.text):n.push(l);continue}if(t){let m="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return n}},wr=class{options;parser;constructor(e){this.options=e||qt}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(Se.notSpaceStart)?.[0],i=e.replace(Se.endingNewline,"")+`
|
|
92
|
+
`;return r?'<pre><code class="language-'+Ge(r)+'">'+(n?i:Ge(i,!0))+`</code></pre>
|
|
93
|
+
`:"<pre><code>"+(n?i:Ge(i,!0))+`</code></pre>
|
|
94
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
95
|
+
${this.parser.parse(e)}</blockquote>
|
|
96
|
+
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
97
|
+
`}hr(e){return`<hr>
|
|
98
|
+
`}list(e){let t=e.ordered,n=e.start,r="";for(let a=0;a<e.items.length;a++){let o=e.items[a];r+=this.listitem(o)}let i=t?"ol":"ul",s=t&&n!==1?' start="'+n+'"':"";return"<"+i+s+`>
|
|
99
|
+
`+r+"</"+i+`>
|
|
100
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
101
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
102
|
+
`}table(e){let t="",n="";for(let i=0;i<e.header.length;i++)n+=this.tablecell(e.header[i]);t+=this.tablerow({text:n});let r="";for(let i=0;i<e.rows.length;i++){let s=e.rows[i];n="";for(let a=0;a<s.length;a++)n+=this.tablecell(s[a]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
|
103
|
+
<thead>
|
|
104
|
+
`+t+`</thead>
|
|
105
|
+
`+r+`</table>
|
|
106
|
+
`}tablerow({text:e}){return`<tr>
|
|
107
|
+
${e}</tr>
|
|
108
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
109
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Ge(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=uo(e);if(i===null)return r;e=i;let s='<a href="'+e+'"';return t&&(s+=' title="'+Ge(t)+'"'),s+=">"+r+"</a>",s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=uo(e);if(i===null)return Ge(n);e=i;let s=`<img src="${e}" alt="${Ge(n)}"`;return t&&(s+=` title="${Ge(t)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Ge(e.text)}},Ls=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},qe=class $i{options;renderer;textRenderer;constructor(t){this.options=t||qt,this.options.renderer=this.options.renderer||new wr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ls}static parse(t,n){return new $i(n).parse(t)}static parseInline(t,n){return new $i(n).parseInline(t)}parse(t){this.renderer.parser=this;let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let a=i,o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){n+=o||"";continue}}let s=i;switch(s.type){case"space":n+=this.renderer.space(s);break;case"hr":n+=this.renderer.hr(s);break;case"heading":n+=this.renderer.heading(s);break;case"code":n+=this.renderer.code(s);break;case"table":n+=this.renderer.table(s);break;case"blockquote":n+=this.renderer.blockquote(s);break;case"list":n+=this.renderer.list(s);break;case"checkbox":n+=this.renderer.checkbox(s);break;case"html":n+=this.renderer.html(s);break;case"def":n+=this.renderer.def(s);break;case"paragraph":n+=this.renderer.paragraph(s);break;case"text":n+=this.renderer.text(s);break;default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(t,n=this.renderer){this.renderer.parser=this;let r="";for(let i=0;i<t.length;i++){let s=t[i];if(this.options.extensions?.renderers?.[s.type]){let o=this.options.extensions.renderers[s.type].call({parser:this},s);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){r+=o||"";continue}}let a=s;switch(a.type){case"escape":r+=n.text(a);break;case"html":r+=n.html(a);break;case"link":r+=n.link(a);break;case"image":r+=n.image(a);break;case"checkbox":r+=n.checkbox(a);break;case"strong":r+=n.strong(a);break;case"em":r+=n.em(a);break;case"codespan":r+=n.codespan(a);break;case"br":r+=n.br(a);break;case"del":r+=n.del(a);break;case"text":r+=n.text(a);break;default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return r}},Cn=class{options;block;constructor(e){this.options=e||qt}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?$e.lex:$e.lexInline}provideParser(e=this.block){return e?qe.parse:qe.parseInline}},AC=class{defaults=Cs();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=qe;Renderer=wr;TextRenderer=Ls;Lexer=$e;Tokenizer=Ir;Hooks=Cn;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{let i=r;for(let s of i.header)n=n.concat(this.walkTokens(s.tokens,t));for(let s of i.rows)for(let a of s)n=n.concat(this.walkTokens(a.tokens,t));break}case"list":{let i=r;n=n.concat(this.walkTokens(i.items,t));break}default:{let i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(s=>{let a=i[s].flat(1/0);n=n.concat(this.walkTokens(a,t))}):i.tokens&&(n=n.concat(this.walkTokens(i.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=t.renderers[i.name];s?t.renderers[i.name]=function(...a){let o=i.renderer.apply(this,a);return o===!1&&(o=s.apply(this,a)),o}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=t[i.level];s?s.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),n.renderer){let i=this.defaults.renderer||new wr(this.defaults);for(let s in n.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,o=n.renderer[a],l=i[a];i[a]=(...h)=>{let m=o.apply(i,h);return m===!1&&(m=l.apply(i,h)),m||""}}r.renderer=i}if(n.tokenizer){let i=this.defaults.tokenizer||new Ir(this.defaults);for(let s in n.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,o=n.tokenizer[a],l=i[a];i[a]=(...h)=>{let m=o.apply(i,h);return m===!1&&(m=l.apply(i,h)),m}}r.tokenizer=i}if(n.hooks){let i=this.defaults.hooks||new Cn;for(let s in n.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,o=n.hooks[a],l=i[a];Cn.passThroughHooks.has(s)?i[a]=h=>{if(this.defaults.async&&Cn.passThroughHooksRespectAsync.has(s))return(async()=>{let d=await o.call(i,h);return l.call(i,d)})();let m=o.call(i,h);return l.call(i,m)}:i[a]=(...h)=>{if(this.defaults.async)return(async()=>{let d=await o.apply(i,h);return d===!1&&(d=await l.apply(i,h)),d})();let m=o.apply(i,h);return m===!1&&(m=l.apply(i,h)),m}}r.hooks=i}if(n.walkTokens){let i=this.defaults.walkTokens,s=n.walkTokens;r.walkTokens=function(a){let o=[];return o.push(s.call(this,a)),i&&(o=o.concat(i.call(this,a))),o}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return $e.lex(e,t??this.defaults)}parser(e,t){return qe.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return s(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 t>"u"||t===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let a=i.hooks?await i.hooks.preprocess(t):t,o=await(i.hooks?await i.hooks.provideLexer(e):e?$e.lex:$e.lexInline)(a,i),l=i.hooks?await i.hooks.processAllTokens(o):o;i.walkTokens&&await Promise.all(this.walkTokens(l,i.walkTokens));let h=await(i.hooks?await i.hooks.provideParser(e):e?qe.parse:qe.parseInline)(l,i);return i.hooks?await i.hooks.postprocess(h):h})().catch(s);try{i.hooks&&(t=i.hooks.preprocess(t));let a=(i.hooks?i.hooks.provideLexer(e):e?$e.lex:$e.lexInline)(t,i);i.hooks&&(a=i.hooks.processAllTokens(a)),i.walkTokens&&this.walkTokens(a,i.walkTokens);let o=(i.hooks?i.hooks.provideParser(e):e?qe.parse:qe.parseInline)(a,i);return i.hooks&&(o=i.hooks.postprocess(o)),o}catch(a){return s(a)}}}onError(e,t){return n=>{if(n.message+=`
|
|
110
|
+
Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+Ge(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},jt=new AC;function ue(e,t){return jt.parse(e,t)}ue.options=ue.setOptions=function(e){return jt.setOptions(e),ue.defaults=jt.defaults,nu(ue.defaults),ue};ue.getDefaults=Cs;ue.defaults=qt;ue.use=function(...e){return jt.use(...e),ue.defaults=jt.defaults,nu(ue.defaults),ue};ue.walkTokens=function(e,t){return jt.walkTokens(e,t)};ue.parseInline=jt.parseInline;ue.Parser=qe;ue.parser=qe.parse;ue.Renderer=wr;ue.TextRenderer=Ls;ue.Lexer=$e;ue.lexer=$e.lex;ue.Tokenizer=Ir;ue.Hooks=Cn;ue.parse=ue;var qv=ue.options,Yv=ue.setOptions,Vv=ue.use,Wv=ue.walkTokens,Qv=ue.parseInline,Gv=qe.parse,Kv=$e.lex,_C=300,vC="300px",NC=500;function SC(e={}){let{immediate:t=!1,debounceDelay:n=_C,rootMargin:r=vC,idleTimeout:i=NC}=e,[s,a]=(0,E.useState)(!1),o=(0,E.useRef)(null),l=(0,E.useRef)(null),h=(0,E.useRef)(null),m=(0,E.useMemo)(()=>p=>{let g=Date.now();return window.setTimeout(()=>{p({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-g))})},1)},[]),d=(0,E.useMemo)(()=>typeof window<"u"&&window.requestIdleCallback?(p,g)=>window.requestIdleCallback(p,g):m,[m]),f=(0,E.useMemo)(()=>typeof window<"u"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p)},[]);return(0,E.useEffect)(()=>{if(t){a(!0);return}let p=o.current;if(!p)return;l.current&&(clearTimeout(l.current),l.current=null),h.current&&(f(h.current),h.current=null);let g=()=>{l.current&&(clearTimeout(l.current),l.current=null),h.current&&(f(h.current),h.current=null)},_=S=>{h.current=d(L=>{L.timeRemaining()>0||L.didTimeout?(a(!0),S.disconnect()):h.current=d(()=>{a(!0),S.disconnect()},{timeout:i/2})},{timeout:i})},A=S=>{g(),l.current=window.setTimeout(()=>{var L,O;let N=S.takeRecords();(N.length===0||(O=(L=N.at(-1))==null?void 0:L.isIntersecting)!=null&&O)&&_(S)},n)},b=(S,L)=>{S.isIntersecting?A(L):g()},v=new IntersectionObserver(S=>{for(let L of S)b(L,v)},{rootMargin:r,threshold:0});return v.observe(p),()=>{l.current&&clearTimeout(l.current),h.current&&f(h.current),v.disconnect()}},[t,n,r,i,f,d]),{shouldRender:s,containerRef:o}}var hu=/\s/,IC=/^\s+$/,wC=new Set(["code","pre","svg","math","annotation"]),LC=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",RC=e=>e.some(t=>LC(t)&&wC.has(t.tagName)),OC=e=>{let t=[],n="",r=!1;for(let i of e){let s=hu.test(i);s!==r&&n&&(t.push(n),n=""),n+=i,r=s}return n&&t.push(n),t},DC=e=>{let t=[],n="";for(let r of e)hu.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},PC=(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}]}},MC=(e,t,n,r,i)=>{let s=t.at(-1);if(!(s&&"children"in s))return;if(RC(t))return kn;let a=s,o=a.children.indexOf(e);if(o===-1)return;let l=e.value;if(!l.trim()){i.count+=l.length;return}let h=n.sep==="char"?DC(l):OC(l),m=r.prevContentLength,d=h.map(f=>{let p=i.count;if(i.count+=f.length,IC.test(f))return{type:"text",value:f};let g=m>0&&p<m,_=g?0:i.newIndex++*n.stagger;return PC(f,n.animation,n.duration,n.easing,g,_)});return a.children.splice(o,1,...d),o+d.length},BC=0;function qi(e){var t,n,r,i,s;let a={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(n=e?.duration)!=null?n:150,easing:(r=e?.easing)!=null?r:"ease",sep:(i=e?.sep)!=null?i:"word",stagger:(s=e?.stagger)!=null?s:40},o={prevContentLength:0,lastRenderCharCount:0},l=BC++,h=()=>m=>{let d={count:0,newIndex:0};is(m,"text",(f,p)=>MC(f,p,a,o,d)),o.lastRenderCharCount=d.count,o.prevContentLength=0};return Object.defineProperty(h,"name",{value:`rehypeAnimate$${l}`}),{name:"animate",type:"animate",rehypePlugin:h,setPrevContentLength(m){o.prevContentLength=m},getLastRenderCharCount(){let m=o.lastRenderCharCount;return o.lastRenderCharCount=0,m}}}qi();var du=(0,E.createContext)(!1),FC=()=>(0,E.useContext)(du),Rs=(...e)=>Go(Qo(e)),jC=(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(" ")},HC=e=>e?(...t)=>jC(e,Go(Qo(t))):Rs,en=(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)},Yi=(0,E.createContext)(Rs),re=()=>(0,E.useContext)(Yi),UC=Rs("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"),zC=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},$C=(0,E.memo)(({children:e,result:t,language:n,className:r,startLine:i,lineNumbers:s=!0,...a})=>{let o=re(),l=(0,E.useMemo)(()=>o(UC),[o]),h=(0,E.useMemo)(()=>{let m={};return t.bg&&(m["--sdm-bg"]=t.bg),t.fg&&(m["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(m,zC(t.rootStyle)),m},[t.bg,t.fg,t.rootStyle]);return(0,u.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:(0,u.jsx)("pre",{className:o(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:h,children:(0,u.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((m,d)=>(0,u.jsx)("span",{className:s?l:void 0,children:m.length===0||m.length===1&&m[0].content===""?`
|
|
111
|
+
`:m.map((f,p)=>{let g={},_=!!f.bgColor;if(f.color&&(g["--sdm-c"]=f.color),f.bgColor&&(g["--sdm-tbg"]=f.bgColor),f.htmlStyle)for(let[A,b]of Object.entries(f.htmlStyle))A==="color"?g["--sdm-c"]=b:A==="background-color"?(g["--sdm-tbg"]=b,_=!0):g[A]=b;return(0,u.jsx)("span",{className:o("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",_&&"bg-[var(--sdm-tbg)]",_&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:g,...f.htmlAttrs,children:f.content},p)})},d))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),qC=({className:e,language:t,style:n,isIncomplete:r,...i})=>{let s=re();return(0,u.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})},mu=(0,E.createContext)({code:""}),fu=()=>(0,E.useContext)(mu),YC=({language:e})=>{let t=re();return(0,u.jsx)("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:(0,u.jsx)("span",{className:t("ml-1 font-mono lowercase"),children:e})})},VC=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
112
|
+
`;)t--;return e.slice(0,t)},WC=(0,E.lazy)(()=>el(()=>import("./highlighted-body-OFNGDK62-CFFJC4SW.js").then(e=>({default:e.HighlightedCodeBlockBody})),__vite__mapDeps([0,1,2,3]))),QC=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:s,lineNumbers:a,...o})=>{let l=re(),h=(0,E.useMemo)(()=>VC(e),[e]),m=(0,E.useMemo)(()=>({bg:"transparent",fg:"inherit",tokens:h.split(`
|
|
113
|
+
`).map(d=>[{content:d,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[h]);return(0,u.jsx)(mu.Provider,{value:{code:e},children:(0,u.jsxs)(qC,{isIncomplete:i,language:t,children:[(0,u.jsx)(YC,{language:t}),r?(0,u.jsx)("div",{className:l("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:(0,u.jsx)("div",{className:l("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,(0,u.jsx)(E.Suspense,{fallback:(0,u.jsx)($C,{className:n,language:t,lineNumbers:a,result:m,startLine:s,...o}),children:(0,u.jsx)(WC,{className:n,code:h,language:t,lineNumbers:a,raw:m,startLine:s,...o})})]})})},GC=e=>(0,u.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,u.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"})}),KC=e=>(0,u.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,u.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"})}),XC=e=>(0,u.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,u.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"})}),ZC=e=>(0,u.jsxs)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[(0,u.jsx)("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),(0,u.jsx)("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),(0,u.jsx)("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),(0,u.jsx)("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),(0,u.jsx)("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),(0,u.jsx)("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),(0,u.jsx)("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),(0,u.jsx)("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),(0,u.jsx)("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),(0,u.jsx)("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),JC=e=>(0,u.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,u.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"})}),eA=e=>(0,u.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,u.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"})}),tA=e=>(0,u.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,u.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"})}),nA=e=>(0,u.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,u.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"})}),rA=e=>(0,u.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,u.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"})}),iA=e=>(0,u.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,u.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"})}),An={CheckIcon:GC,CopyIcon:KC,DownloadIcon:XC,ExternalLinkIcon:nA,Loader2Icon:ZC,Maximize2Icon:JC,RotateCcwIcon:eA,XIcon:tA,ZoomInIcon:rA,ZoomOutIcon:iA},pu=(0,E.createContext)(An),sA=(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])},fo=({icons:e,children:t})=>{let n=(0,E.useRef)(e),r=(0,E.useRef)(e?{...An,...e}:An);sA(n.current,e)||(n.current=e,r.current=e?{...An,...e}:An);let i=r.current;return(0,u.jsx)(pu.Provider,{value:i,children:t})},We=()=>(0,E.useContext)(pu),gu={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"},Vi=(0,E.createContext)(gu),dt=()=>(0,E.useContext)(Vi),po=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:s,...a})=>{let o=re(),[l,h]=(0,E.useState)(!1),m=(0,E.useRef)(0),{code:d}=fu(),{isAnimating:f}=(0,E.useContext)(je),p=dt(),g=s??d,_=async()=>{var v;if(typeof window>"u"||!((v=navigator?.clipboard)!=null&&v.writeText)){t?.(new Error("Clipboard API not available"));return}try{l||(await navigator.clipboard.writeText(g),h(!0),e?.(),m.current=window.setTimeout(()=>h(!1),n))}catch(S){t?.(S)}};(0,E.useEffect)(()=>()=>{window.clearTimeout(m.current)},[]);let A=We(),b=l?A.CheckIcon:A.CopyIcon;return(0,u.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:f,onClick:_,title:p.copyCode,type:"button",...a,children:r??(0,u.jsx)(b,{size:14})})},go={"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"},aA=({onDownload:e,onError:t,language:n,children:r,className:i,code:s,...a})=>{let o=re(),{code:l}=fu(),{isAnimating:h}=(0,E.useContext)(je),m=dt(),d=We(),f=s??l,p=`file.${n&&n in go?go[n]:"txt"}`,g="text/plain",_=()=>{try{en(p,f,g),e?.()}catch(A){t?.(A)}};return(0,u.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:h,onClick:_,title:m.downloadFile,type:"button",...a,children:r??(0,u.jsx)(d.DownloadIcon,{size:14})})},Eo=()=>{let{Loader2Icon:e}=We(),t=re();return(0,u.jsxs)("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[(0,u.jsx)("div",{className:t("h-[46px] w-full bg-muted/80")}),(0,u.jsx)("div",{className:t("flex w-full items-center justify-center p-4"),children:(0,u.jsx)(e,{className:t("size-4 animate-spin")})})]})},oA=/\.[^/.]+$/,lA=({node:e,className:t,src:n,alt:r,onLoad:i,onError:s,...a})=>{let{DownloadIcon:o}=We(),l=re(),h=(0,E.useRef)(null),[m,d]=(0,E.useState)(!1),[f,p]=(0,E.useState)(!1),g=dt(),_=a.width!=null||a.height!=null,A=(m||_)&&!f,b=f&&!_;(0,E.useEffect)(()=>{let O=h.current;if(O!=null&&O.complete){let N=O.naturalWidth>0;d(N),p(!N)}},[]);let v=(0,E.useCallback)(O=>{d(!0),p(!1),i?.(O)},[i]),S=(0,E.useCallback)(O=>{d(!1),p(!0),s?.(O)},[s]),L=async()=>{if(n)try{let O=await(await fetch(n)).blob(),N=new URL(n,window.location.origin).pathname.split("/").pop()||"",B=N.split(".").pop(),z=N.includes(".")&&B!==void 0&&B.length<=4,Y="";if(z)Y=N;else{let I=O.type,j="png";I.includes("jpeg")||I.includes("jpg")?j="jpg":I.includes("png")?j="png":I.includes("svg")?j="svg":I.includes("gif")?j="gif":I.includes("webp")&&(j="webp"),Y=`${(r||N||"image").replace(oA,"")}.${j}`}en(Y,O,O.type)}catch{window.open(n,"_blank")}};return n?(0,u.jsxs)("div",{className:l("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[(0,u.jsx)("img",{alt:r,className:l("max-w-full rounded-lg",b&&"hidden",t),"data-streamdown":"image",onError:S,onLoad:v,ref:h,src:n,...a}),b&&(0,u.jsx)("span",{className:l("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:g.imageNotAvailable}),(0,u.jsx)("div",{className:l("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),A&&(0,u.jsx)("button",{className:l("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:L,title:g.downloadImage,type:"button",children:(0,u.jsx)(o,{size:14})})]}):null},Rn=0,Os=()=>{Rn+=1,Rn===1&&(document.body.style.overflow="hidden")},Ds=()=>{Rn=Math.max(0,Rn-1),Rn===0&&(document.body.style.overflow="")},cA=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:s,ExternalLinkIcon:a,XIcon:o}=We(),l=re(),[h,m]=(0,E.useState)(!1),d=dt(),f=(0,E.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),m(!0),setTimeout(()=>m(!1),2e3)}catch{}},[e]),p=(0,E.useCallback)(()=>{r(),n()},[r,n]);return(0,E.useEffect)(()=>{if(t){Os();let g=_=>{_.key==="Escape"&&n()};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g),Ds()}}},[t,n]),t?(0,u.jsx)("div",{className:l("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:g=>{g.key==="Escape"&&n()},role:"button",tabIndex:0,children:(0,u.jsxs)("div",{className:l("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:g=>g.stopPropagation(),onKeyDown:g=>g.stopPropagation(),role:"presentation",children:[(0,u.jsx)("button",{className:l("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:(0,u.jsx)(o,{size:16})}),(0,u.jsxs)("div",{className:l("flex flex-col gap-2"),children:[(0,u.jsxs)("div",{className:l("flex items-center gap-2 font-semibold text-lg"),children:[(0,u.jsx)(a,{size:20}),(0,u.jsx)("span",{children:d.openExternalLink})]}),(0,u.jsx)("p",{className:l("text-muted-foreground text-sm"),children:d.externalLinkWarning})]}),(0,u.jsx)("div",{className:l("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),(0,u.jsxs)("div",{className:l("flex gap-2"),children:[(0,u.jsx)("button",{className:l("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:f,type:"button",children:h?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(i,{size:14}),(0,u.jsx)("span",{children:d.copied})]}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(s,{size:14}),(0,u.jsx)("span",{children:d.copyLink})]})}),(0,u.jsxs)("button",{className:l("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:p,type:"button",children:[(0,u.jsx)(a,{size:14}),(0,u.jsx)("span",{children:d.openLink})]})]})]})}):null},Wi=(0,E.createContext)(null),Ps=()=>(0,E.useContext)(Wi),Xv=()=>{var e;let t=Ps();return(e=t?.code)!=null?e:null},Ms=()=>{var e;let t=Ps();return(e=t?.mermaid)!=null?e:null},uA=e=>{var t;let n=Ps();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},hA=(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 l=document.createElement("canvas"),h=o.width*r,m=o.height*r;l.width=h,l.height=m;let d=l.getContext("2d");if(!d){s(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(o,0,0,h,m),l.toBlob(f=>{if(!f){s(new Error("Failed to create PNG blob"));return}i(f)},"image/png")},o.onerror=()=>s(new Error("Failed to load SVG image")),o.src=a})},dA=({chart:e,children:t,className:n,onDownload:r,config:i,onError:s})=>{let a=re(),[o,l]=(0,E.useState)(!1),h=(0,E.useRef)(null),{isAnimating:m}=(0,E.useContext)(je),d=We(),f=Ms(),p=dt(),g=async _=>{try{if(_==="mmd"){en("diagram.mmd",e,"text/plain"),l(!1),r?.(_);return}if(!f){s?.(new Error("Mermaid plugin not available"));return}let A=f.getMermaid(i),b=e.split("").reduce((L,O)=>(L<<5)-L+O.charCodeAt(0)|0,0),v=`mermaid-${Math.abs(b)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:S}=await A.render(v,e);if(!S){s?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(_==="svg"){en("diagram.svg",S,"image/svg+xml"),l(!1),r?.(_);return}if(_==="png"){en("diagram.png",await hA(S),"image/png"),r?.(_),l(!1);return}}catch(A){s?.(A)}};return(0,E.useEffect)(()=>{let _=A=>{let b=A.composedPath();h.current&&!b.includes(h.current)&&l(!1)};return document.addEventListener("mousedown",_),()=>{document.removeEventListener("mousedown",_)}},[]),(0,u.jsxs)("div",{className:a("relative"),ref:h,children:[(0,u.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:m,onClick:()=>l(!o),title:p.downloadDiagram,type:"button",children:t??(0,u.jsx)(d.DownloadIcon,{size:14})}),o?(0,u.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:[(0,u.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("svg"),title:p.downloadDiagramAsSvg,type:"button",children:p.mermaidFormatSvg}),(0,u.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("png"),title:p.downloadDiagramAsPng,type:"button",children:p.mermaidFormatPng}),(0,u.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("mmd"),title:p.downloadDiagramAsMmd,type:"button",children:p.mermaidFormatMmd})]}):null]})},mA=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...s})=>{let{Maximize2Icon:a,XIcon:o}=We(),l=re(),[h,m]=(0,E.useState)(!1),{isAnimating:d,controls:f}=(0,E.useContext)(je),p=dt(),g=(()=>{if(typeof f=="boolean")return f;let A=f.mermaid;return A===!1?!1:A===!0||A===void 0?!0:A.panZoom!==!1})(),_=()=>{m(!h)};return(0,E.useEffect)(()=>{if(h){Os();let A=b=>{b.key==="Escape"&&m(!1)};return document.addEventListener("keydown",A),()=>{document.removeEventListener("keydown",A),Ds()}}},[h]),(0,E.useEffect)(()=>{h?n?.():r&&r()},[h,n,r]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:d,onClick:_,title:p.viewFullscreen,type:"button",...s,children:(0,u.jsx)(a,{size:14})}),h?(0,tu.createPortal)((0,u.jsxs)("div",{className:l("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:_,onKeyDown:A=>{A.key==="Escape"&&_()},role:"button",tabIndex:0,children:[(0,u.jsx)("button",{className:l("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:_,title:p.exitFullscreen,type:"button",children:(0,u.jsx)(o,{size:20})}),(0,u.jsx)("div",{className:l("flex size-full items-center justify-center p-4"),onClick:A=>A.stopPropagation(),onKeyDown:A=>A.stopPropagation(),role:"presentation",children:(0,u.jsx)(a_,{chart:e,className:l("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:g})})]}),document.body):null]})},Eu=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 l=[],h=o.querySelectorAll("td");for(let m of h)l.push(((n=m.textContent)==null?void 0:n.trim())||"");i.push(l)}return{headers:r,rows:i}},Tu=e=>{let{headers:t,rows:n}=e,r=o=>{let l=!1,h=!1;for(let m of o){if(m==='"'){l=!0,h=!0;break}(m===","||m===`
|
|
114
|
+
`)&&(l=!0)}return l?h?`"${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
|
+
`)},fA=e=>{let{headers:t,rows:n}=e,r=o=>{let l=!1;for(let m of o)if(m===" "||m===`
|
|
116
|
+
`||m==="\r"){l=!0;break}if(!l)return o;let h=[];for(let m of o)m===" "?h.push("\\t"):m===`
|
|
117
|
+
`?h.push("\\n"):m==="\r"?h.push("\\r"):h.push(m);return h.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
|
+
`)},ki=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("")},Qi=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=>ki(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 l=new Array(t.length);for(let h=0;h<t.length;h+=1)l[h]=h<o.length?ki(o[h]):"";r[i]=`| ${l.join(" | ")} |`,i+=1}else{let l=o.map(h=>ki(h));r[i]=`| ${l.join(" | ")} |`,i+=1}return r.join(`
|
|
119
|
+
`)},bu=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let s=re(),[a,o]=(0,E.useState)(!1),[l,h]=(0,E.useState)(!1),m=(0,E.useRef)(null),d=(0,E.useRef)(0),{isAnimating:f}=(0,E.useContext)(je),p=dt(),g=async b=>{var v,S;if(typeof window>"u"||!((v=navigator?.clipboard)!=null&&v.write)){r?.(new Error("Clipboard API not available"));return}try{let L=(S=m.current)==null?void 0:S.closest('[data-streamdown="table-wrapper"]'),O=L?.querySelector("table");if(!O){r?.(new Error("Table not found"));return}let N=Eu(O),B=({csv:Tu,tsv:fA,md:Qi}[b]||Qi)(N),z=new ClipboardItem({"text/plain":new Blob([B],{type:"text/plain"}),"text/html":new Blob([O.outerHTML],{type:"text/html"})});await navigator.clipboard.write([z]),h(!0),o(!1),n?.(b),d.current=window.setTimeout(()=>h(!1),i)}catch(L){r?.(L)}};(0,E.useEffect)(()=>{let b=v=>{let S=v.composedPath();m.current&&!S.includes(m.current)&&o(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b),window.clearTimeout(d.current)}},[]);let _=We(),A=l?_.CheckIcon:_.CopyIcon;return(0,u.jsxs)("div",{className:s("relative"),ref:m,children:[(0,u.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:f,onClick:()=>o(!a),title:p.copyTable,type:"button",children:e??(0,u.jsx)(A,{height:14,width:14})}),a?(0,u.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:[(0,u.jsx)("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("md"),title:p.copyTableAsMarkdown,type:"button",children:p.tableFormatMarkdown}),(0,u.jsx)("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("csv"),title:p.copyTableAsCsv,type:"button",children:p.tableFormatCsv}),(0,u.jsx)("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("tsv"),title:p.copyTableAsTsv,type:"button",children:p.tableFormatTsv})]}):null]})},xu=({children:e,className:t,onDownload:n,onError:r})=>{let i=re(),[s,a]=(0,E.useState)(!1),o=(0,E.useRef)(null),{isAnimating:l}=(0,E.useContext)(je),h=dt(),m=We(),d=f=>{var p;try{let g=(p=o.current)==null?void 0:p.closest('[data-streamdown="table-wrapper"]'),_=g?.querySelector("table");if(!_){r?.(new Error("Table not found"));return}let A=Eu(_),b=f==="csv"?Tu(A):Qi(A);en(`table.${f==="csv"?"csv":"md"}`,b,f==="csv"?"text/csv":"text/markdown"),a(!1),n?.(f)}catch(g){r?.(g)}};return(0,E.useEffect)(()=>{let f=p=>{let g=p.composedPath();o.current&&!g.includes(o.current)&&a(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),(0,u.jsxs)("div",{className:i("relative"),ref:o,children:[(0,u.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:l,onClick:()=>a(!s),title:h.downloadTable,type:"button",children:e??(0,u.jsx)(m.DownloadIcon,{size:14})}),s?(0,u.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:[(0,u.jsx)("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("csv"),title:h.downloadTableAsCsv,type:"button",children:h.tableFormatCsv}),(0,u.jsx)("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("markdown"),title:h.downloadTableAsMarkdown,type:"button",children:h.tableFormatMarkdown})]}):null]})},pA=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:s}=We(),a=re(),[o,l]=(0,E.useState)(!1),{isAnimating:h}=(0,E.useContext)(je),m=dt(),d=()=>{l(!0)},f=()=>{l(!1)};return(0,E.useEffect)(()=>{if(o){Os();let p=g=>{g.key==="Escape"&&l(!1)};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p),Ds()}}},[o]),(0,u.jsxs)(u.Fragment,{children:[(0,u.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:h,onClick:d,title:m.viewFullscreen,type:"button",children:(0,u.jsx)(i,{size:14})}),o?(0,tu.createPortal)((0,u.jsx)("div",{"aria-label":m.viewFullscreen,"aria-modal":"true",className:a("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:f,onKeyDown:p=>{p.key==="Escape"&&f()},role:"dialog",children:(0,u.jsxs)("div",{className:a("flex h-full flex-col"),onClick:p=>p.stopPropagation(),onKeyDown:p=>p.stopPropagation(),role:"presentation",children:[(0,u.jsxs)("div",{className:a("flex items-center justify-end gap-1 p-4"),children:[n?(0,u.jsx)(bu,{}):null,r?(0,u.jsx)(xu,{}):null,(0,u.jsx)("button",{className:a("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:f,title:m.exitFullscreen,type:"button",children:(0,u.jsx)(s,{size:20})})]}),(0,u.jsx)("div",{className:a("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:(0,u.jsx)("table",{className:a("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},gA=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:s=!0,...a})=>{let o=re(),l=n&&r,h=n&&i,m=n&&s,d=l||h||m;return(0,u.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?(0,u.jsxs)("div",{className:o("flex items-center justify-end gap-1"),children:[l?(0,u.jsx)(bu,{}):null,h?(0,u.jsx)(xu,{}):null,m?(0,u.jsx)(pA,{showCopy:l,showDownload:h,children:e}):null]}):null,(0,u.jsx)("div",{className:o("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:(0,u.jsx)("table",{className:o("w-full divide-y divide-border",t),"data-streamdown":"table",...a,children:e})})]})},EA=/startLine=(\d+)/,TA=/\bnoLineNumbers\b/,bA=(0,E.lazy)(()=>el(()=>import("./mermaid-GHXKKRXX-TpVEoP0K.js").then(e=>({default:e.Mermaid})),[])),xA=/language-([^\s]+)/;function Xr(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,s=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===s?.line&&i?.column===s?.column}function Ee(e,t){return e.className===t.className&&Xr(e.node,t.node)}var Gi=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,yi=(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},To=(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},pr=(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},Bs=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=re();return(0,u.jsx)("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e})},(e,t)=>Ee(e,t));Bs.displayName="MarkdownOl";var ku=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=re();return(0,u.jsx)("li",{className:i("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e})},(e,t)=>e.className===t.className&&Xr(e.node,t.node));ku.displayName="MarkdownLi";var yu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=re();return(0,u.jsx)("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e})},(e,t)=>Ee(e,t));yu.displayName="MarkdownUl";var Cu=(0,E.memo)(({className:e,node:t,...n})=>{let r=re();return(0,u.jsx)("hr",{className:r("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>Ee(e,t));Cu.displayName="MarkdownHr";var Au=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=re();return(0,u.jsx)("span",{className:i("font-semibold",t),"data-streamdown":"strong",...r,children:e})},(e,t)=>Ee(e,t));Au.displayName="MarkdownStrong";var kA=({children:e,className:t,href:n,node:r,...i})=>{let s=re(),{linkSafety:a}=(0,E.useContext)(je),[o,l]=(0,E.useState)(!1),h=n==="streamdown:incomplete-link",m=(0,E.useCallback)(async g=>{if(!(!(a!=null&&a.enabled&&n)||h)){if(g.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}l(!0)}},[a,n,h]),d=(0,E.useCallback)(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),f=(0,E.useCallback)(()=>{l(!1)},[]),p={url:n??"",isOpen:o,onClose:f,onConfirm:d};return a!=null&&a.enabled&&n?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("button",{className:s("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":h,"data-streamdown":"link",onClick:m,type:"button",children:e}),a.renderModal?a.renderModal(p):(0,u.jsx)(cA,{...p})]}):(0,u.jsx)("a",{className:s("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":h,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},_u=(0,E.memo)(kA,(e,t)=>Ee(e,t)&&e.href===t.href);_u.displayName="MarkdownA";var vu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=re();return(0,u.jsx)("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e})},(e,t)=>Ee(e,t));vu.displayName="MarkdownH1";var Nu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=re();return(0,u.jsx)("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e})},(e,t)=>Ee(e,t));Nu.displayName="MarkdownH2";var Su=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=re();return(0,u.jsx)("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e})},(e,t)=>Ee(e,t));Su.displayName="MarkdownH3";var Iu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=re();return(0,u.jsx)("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e})},(e,t)=>Ee(e,t));Iu.displayName="MarkdownH4";var wu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=re();return(0,u.jsx)("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e})},(e,t)=>Ee(e,t));wu.displayName="MarkdownH5";var Lu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=re();return(0,u.jsx)("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e})},(e,t)=>Ee(e,t));Lu.displayName="MarkdownH6";var Ru=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let{controls:i}=(0,E.useContext)(je),s=Gi(i,"table"),a=yi(i,"copy"),o=yi(i,"download"),l=yi(i,"fullscreen");return(0,u.jsx)(gA,{className:t,showControls:s,showCopy:a,showDownload:o,showFullscreen:l,...r,children:e})},(e,t)=>Ee(e,t));Ru.displayName="MarkdownTable";var Ou=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=re();return(0,u.jsx)("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e})},(e,t)=>Ee(e,t));Ou.displayName="MarkdownThead";var Du=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=re();return(0,u.jsx)("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e})},(e,t)=>Ee(e,t));Du.displayName="MarkdownTbody";var Pu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=re();return(0,u.jsx)("tr",{className:i("border-border",t),"data-streamdown":"table-row",...r,children:e})},(e,t)=>Ee(e,t));Pu.displayName="MarkdownTr";var Mu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=re();return(0,u.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)=>Ee(e,t));Mu.displayName="MarkdownTh";var Bu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=re();return(0,u.jsx)("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e})},(e,t)=>Ee(e,t));Bu.displayName="MarkdownTd";var Fu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=re();return(0,u.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)=>Ee(e,t));Fu.displayName="MarkdownBlockquote";var ju=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=re();return(0,u.jsx)("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...r,children:e})},(e,t)=>Ee(e,t));ju.displayName="MarkdownSup";var Hu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=re();return(0,u.jsx)("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...r,children:e})},(e,t)=>Ee(e,t));Hu.displayName="MarkdownSub";var Uu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=a=>{var o,l;if(!(0,E.isValidElement)(a))return!1;let h=Array.isArray(a.props.children)?a.props.children:[a.props.children],m=!1,d=!1;for(let f of h)if(f){if(typeof f=="string")f.trim()!==""&&(m=!0);else if((0,E.isValidElement)(f))if(((o=f.props)==null?void 0:o["data-footnote-backref"])!==void 0)d=!0;else{let p=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let g of p){if(typeof g=="string"&&g.trim()!==""){m=!0;break}if((0,E.isValidElement)(g)&&((l=g.props)==null?void 0:l["data-footnote-backref"])===void 0){m=!0;break}}}}return d&&!m},s=Array.isArray(e)?e.map(a=>{if(!(0,E.isValidElement)(a))return a;if(a.type===Bs){let o=(Array.isArray(a.props.children)?a.props.children:[a.props.children]).filter(l=>!i(l));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)?(0,u.jsx)("section",{className:t,...r,children:s}):null}return(0,u.jsx)("section",{className:t,...r,children:e})},(e,t)=>Ee(e,t));Uu.displayName="MarkdownSection";var yA=({node:e,className:t,children:n,...r})=>{var i,s;let a=re(),o=!("data-block"in r),{mermaid:l,controls:h,lineNumbers:m}=(0,E.useContext)(je),d=Ms(),f=FC(),p=t?.match(xA),g=(i=p?.at(1))!=null?i:"",_=uA(g);if(o)return(0,u.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 A=(s=e?.properties)==null?void 0:s.metastring,b=A?.match(EA),v=b?Number.parseInt(b[1],10):void 0,S=v!==void 0&&v>=1?v:void 0,L=!(A&&TA.test(A))&&m!==!1,O="";if((0,E.isValidElement)(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?O=n.props.children:typeof n=="string"&&(O=n),_){let Y=_.component;return(0,u.jsx)(E.Suspense,{fallback:(0,u.jsx)(Eo,{}),children:(0,u.jsx)(Y,{code:O,isIncomplete:f,language:g,meta:A})})}if(g==="mermaid"&&d){let Y=Gi(h,"mermaid"),I=pr(h,"download"),j=pr(h,"copy"),q=pr(h,"fullscreen"),V=pr(h,"panZoom"),J=Y&&(I||j||q);return(0,u.jsx)(E.Suspense,{fallback:(0,u.jsx)(Eo,{}),children:(0,u.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:[(0,u.jsx)("div",{className:a("flex h-8 items-center text-muted-foreground text-xs"),children:(0,u.jsx)("span",{className:a("ml-1 font-mono lowercase"),children:"mermaid"})}),J?(0,u.jsx)("div",{className:a("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:(0,u.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:[I?(0,u.jsx)(dA,{chart:O,config:l?.config}):null,j?(0,u.jsx)(po,{code:O}):null,q?(0,u.jsx)(mA,{chart:O,config:l?.config}):null]})}):null,(0,u.jsx)("div",{className:a("rounded-md border border-border bg-background"),children:(0,u.jsx)(bA,{chart:O,config:l?.config,showControls:V})})]})})}let N=Gi(h,"code"),B=To(h,"download"),z=To(h,"copy");return(0,u.jsx)(QC,{className:t,code:O,isIncomplete:f,language:g,lineNumbers:L,startLine:S,children:N?(0,u.jsxs)(u.Fragment,{children:[B?(0,u.jsx)(aA,{code:O,language:g}):null,z?(0,u.jsx)(po,{}):null]}):null})},zu=(0,E.memo)(yA,(e,t)=>e.className===t.className&&Xr(e.node,t.node));zu.displayName="MarkdownCode";var $u=(0,E.memo)(lA,(e,t)=>e.className===t.className&&Xr(e.node,t.node));$u.displayName="MarkdownImg";var qu=(0,E.memo)(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&(0,E.isValidElement)(r[0])){let i=r[0].props.node,s=i?.tagName;if(s==="img")return(0,u.jsx)(u.Fragment,{children:e});if(s==="code"&&"data-block"in r[0].props)return(0,u.jsx)(u.Fragment,{children:e})}return(0,u.jsx)("p",{...n,children:e})},(e,t)=>Ee(e,t));qu.displayName="MarkdownParagraph";var CA={ol:Bs,li:ku,ul:yu,hr:Cu,strong:Au,a:_u,h1:vu,h2:Nu,h3:Su,h4:Iu,h5:wu,h6:Lu,table:Ru,thead:Ou,tbody:Du,tr:Pu,th:Mu,td:Bu,blockquote:Fu,code:zu,img:$u,pre:({children:e})=>(0,E.isValidElement)(e)?(0,E.cloneElement)(e,{"data-block":"true"}):e,sup:ju,sub:Hu,p:qu,section:Uu},AA=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,_A=/\p{L}/u;function bo(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(AA.test(n))return"rtl";if(_A.test(n))return"ltr"}return"ltr"}var vA=/^[ \t]{0,3}(`{3,}|~{3,})/,NA=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,xo=e=>{let t=e.split(`
|
|
120
|
+
`),n=null,r=0;for(let i of t){let s=vA.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],l=a.length;o===n&&l>=r&&(n=null,r=0)}}return n!==null},SA=e=>{let t=e.split(`
|
|
121
|
+
`);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&NA.test(r))return!0}return!1},IA=()=>e=>{tt(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},ko=[],yo={allowDangerousHtml:!0},gr=new WeakMap,wA=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 l="default";return this.keyCache.set(e,l),l}let s=l=>{if(!l||l.length===0)return"";let h="";for(let m=0;m<l.length;m+=1){let d=l[m];if(m>0&&(h+=","),Array.isArray(d)){let[f,p]=d;if(typeof f=="function"){let g=gr.get(f);g||(g=f.name,gr.set(f,g)),h+=g}else h+=String(f);h+=":",h+=JSON.stringify(p)}else if(typeof d=="function"){let f=gr.get(d);f||(f=d.name,gr.set(d,f)),h+=f}else h+=String(d)}return h},a=s(n),o=`${s(r)}::${a}::${i?JSON.stringify(i):""}`;return this.keyCache.set(e,o),o}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()}},Co=new wA,Yu=e=>{let t=LA(e),n=e.children||"";return FA(t.runSync(t.parse(n),n),e)},LA=e=>{let t=Co.get(e);if(t)return t;let n=OA(e);return Co.set(e,n),n},RA=e=>e.some(t=>Array.isArray(t)?t[0]===Oi:t===Oi),OA=e=>{let t=e.rehypePlugins||ko,n=e.remarkPlugins||ko,r=RA(t)?n:[...n,IA],i=e.remarkRehypeOptions?{...yo,...e.remarkRehypeOptions}:yo;return My().use(Pk).use(r).use(Ey,i).use(t)},DA=e=>e,PA=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},MA=(e,t)=>{var n;for(let r in mi)if(Object.hasOwn(mi,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],s=mi[r];(s===null||s.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},BA=(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},FA=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:s,unwrapDisallowed:a,urlTransform:o}=t;if(n||r||i||s||o){let l=o||DA;tt(e,(h,m,d)=>{if(h.type==="raw"&&d&&typeof m=="number")return PA(d,m,s,h.value),m;if(h.type==="element"&&(MA(h,l),BA(h,m,d,r,i,n)&&d&&typeof m=="number"))return a&&h.children?d.children.splice(m,1,...h.children):d.children.splice(m,1),m})}return $x(e,{Fragment:u.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:u.jsx,jsxs:u.jsxs,passKeys:!0,passNode:!0})},jA=/\[\^[\w-]{1,200}\](?!:)/,HA=/\[\^[\w-]{1,200}\]:/,UA=/<(\w+)[\s>]/,zA=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ao=new Map,_o=new Map,$A=e=>{let t=e.toLowerCase(),n=Ao.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return Ao.set(t,r),r},qA=e=>{let t=e.toLowerCase(),n=_o.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return _o.set(t,r),r},vo=(e,t)=>{if(zA.has(t.toLowerCase()))return 0;let n=e.match($A(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},No=(e,t)=>{let n=e.match(qA(t));return n?n.length:0},YA=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},VA=e=>{let t=jA.test(e),n=HA.test(e);if(t||n)return[e];let r=$e.lex(e,{gfm:!0}),i=[],s=[],a=!1;for(let o of r){let l=o.raw,h=i.length;if(s.length>0){i[h-1]+=l;let m=s.at(-1),d=vo(l,m),f=No(l,m);for(let p=0;p<d;p+=1)s.push(m);for(let p=0;p<f;p+=1)s.length>0&&s.at(-1)===m&&s.pop();continue}if(o.type==="html"&&o.block){let m=l.match(UA);if(m){let d=m[1];vo(l,d)>No(l,d)&&s.push(d)}}if(h>0&&!a){let m=i[h-1];if(YA(m)%2===1){i[h-1]=m+l;continue}}i.push(l),o.type!=="space"&&(a=o.type==="code")}return i},WA=(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,l)=>{if(!o.includes(`
|
|
122
|
+
|
|
123
|
+
`))return a+o+l;let h=o.replace(/\n\n/g,`
|
|
124
|
+
<!---->
|
|
125
|
+
`);return`${a}${(h.startsWith(`
|
|
126
|
+
`)?"":`
|
|
127
|
+
`)+h+(h.endsWith(`
|
|
128
|
+
`)?"":`
|
|
129
|
+
`)}${l}
|
|
130
|
+
|
|
131
|
+
`})}return n},QA=/([\\`*_~[\]|])/g,GA=e=>e.replace(QA,"\\$1"),KA=(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,l)=>a+GA(o).replace(/\n\n/g," ")+l)}return n},Vu=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(Vu).join(""):"",XA=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(r=>r.toLowerCase()));tt(t,"element",r=>{if(n.has(r.tagName.toLowerCase())){let i=Vu(r);r.children=i?[{type:"text",value:i}]:[]}})},ZA=()=>e=>{tt(e,"code",t=>{var n,r;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(r=t.data.hProperties)!=null?r:{},metastring:t.meta})})},JA=/^[ \t]*<[\w!/?-]/,e_=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,t_=e=>typeof e!="string"||e.length===0||!JA.test(e)?e:e.replace(e_,"$1"),So,Io,wo,Lo,kr={...wt,protocols:{...wt.protocols,href:[...(Io=(So=wt.protocols)==null?void 0:So.href)!=null?Io:[],"tel"]},attributes:{...wt.attributes,code:[...(Lo=(wo=wt.attributes)==null?void 0:wo.code)!=null?Lo:[],"metastring"]}},Ki={raw:Oi,sanitize:[tc,kr],harden:[Zd,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},n_={gfm:[E0,{}],codeMeta:ZA},Ro=Object.values(Ki),r_=Object.values(n_),i_={block:" ▋",circle:" ●"},Wu=["github-light","github-dark"],Qu={enabled:!0},je=(0,E.createContext)({shikiTheme:Wu,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:Qu}),Gu=(0,E.memo)(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:s,animatePlugin:a,...o})=>{if(a){let m=a.getLastRenderCharCount();a.setPrevContentLength(m)}let l=typeof e=="string"&&n?t_(e):e,h=(0,u.jsx)(Yu,{...o,children:l});return(0,u.jsx)(du.Provider,{value:i,children:s?(0,u.jsx)("div",{dir:s,style:{display:"contents"},children:h}):h})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var s,a;return((s=e.components)==null?void 0:s[i])!==((a=t.components)==null?void 0:a[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});Gu.displayName="Block";var Fs=(0,E.memo)(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:s,rehypePlugins:a=Ro,remarkPlugins:o=r_,className:l,shikiTheme:h=Wu,mermaid:m,controls:d=!0,isAnimating:f=!1,animated:p,BlockComponent:g=Gu,parseMarkdownIntoBlocksFn:_=VA,caret:A,plugins:b,remend:v,linkSafety:S=Qu,lineNumbers:L=!0,allowedTags:O,literalTagContent:N,translations:B,icons:z,prefix:Y,onAnimationStart:I,onAnimationEnd:j,...q})=>{let V=(0,E.useId)(),[J,G]=(0,E.useTransition)(),U=(0,E.useMemo)(()=>HC(Y),[Y]),P=(0,E.useRef)(null),W=(0,E.useRef)(I),Z=(0,E.useRef)(j);W.current=I,Z.current=j,(0,E.useEffect)(()=>{var se,de,we;if(t==="static")return;let Qe=P.current;if(P.current=f,Qe===null){f&&((se=W.current)==null||se.call(W));return}f&&!Qe?(de=W.current)==null||de.call(W):!f&&Qe&&((we=Z.current)==null||we.call(Z))},[f,t]);let y=(0,E.useMemo)(()=>O?Object.keys(O):[],[O]),ce=(0,E.useMemo)(()=>{if(typeof e!="string")return"";let se=t==="streaming"&&r?Sx(e,v):e;return N&&N.length>0&&(se=KA(se,N)),y.length>0&&(se=WA(se,y)),se},[e,t,r,v,y,N]),K=(0,E.useMemo)(()=>_(ce),[ce,_]),[C,De]=(0,E.useState)(K);(0,E.useEffect)(()=>{t==="streaming"&&!He?G(()=>{De(K)}):De(K)},[K,t]);let Te=t==="streaming"?C:K,ge=(0,E.useMemo)(()=>n==="auto"?Te.map(bo):void 0,[Te,n]),_t=(0,E.useMemo)(()=>Te.map((se,de)=>`${V}-${de}`),[Te.length,V]),Pe=(0,E.useMemo)(()=>p===!0?"true":p?JSON.stringify(p):"",[p]),He=(0,E.useMemo)(()=>Pe?Pe==="true"?qi():qi(p):null,[Pe]),st=(0,E.useMemo)(()=>{var se,de;return{shikiTheme:(de=(se=b?.code)==null?void 0:se.getThemes())!=null?de:h,controls:d,isAnimating:f,lineNumbers:L,mode:t,mermaid:m,linkSafety:S}},[h,d,f,L,t,m,S,b?.code]),ir=(0,E.useMemo)(()=>B?JSON.stringify(B):"",[B]),sr=(0,E.useMemo)(()=>({...gu,...B}),[ir]),ar=(0,E.useMemo)(()=>{let{inlineCode:se,...de}=s??{},we={...CA,...de};if(se){let Qe=we.code;we.code=vt=>"data-block"in vt?Qe?(0,E.createElement)(Qe,vt):null:(0,E.createElement)(se,vt)}return we},[s]),or=(0,E.useMemo)(()=>{let se=[];return b!=null&&b.cjk&&(se=[...se,...b.cjk.remarkPluginsBefore]),se=[...se,...o],b!=null&&b.cjk&&(se=[...se,...b.cjk.remarkPluginsAfter]),b!=null&&b.math&&(se=[...se,b.math.remarkPlugin]),se},[o,b?.math,b?.cjk]),dn=(0,E.useMemo)(()=>{var se;let de=a;if(O&&Object.keys(O).length>0&&a===Ro){let we={...kr,tagNames:[...(se=kr.tagNames)!=null?se:[],...Object.keys(O)],attributes:{...kr.attributes,...O}};de=[Ki.raw,[tc,we],Ki.harden]}return N&&N.length>0&&(de=[...de,[XA,N]]),b!=null&&b.math&&(de=[...de,b.math.rehypePlugin]),He&&f&&(de=[...de,He.rehypePlugin]),de},[a,b?.math,He,f,O,N]),Yt=(0,E.useMemo)(()=>{if(!f||Te.length===0)return!1;let se=Te.at(-1);return xo(se)||SA(se)},[f,Te]),lr=(0,E.useMemo)(()=>A&&f&&!Yt?{"--streamdown-caret":`"${i_[A]}"`}:void 0,[A,f,Yt]);return t==="static"?(0,u.jsx)(Vi.Provider,{value:sr,children:(0,u.jsx)(Wi.Provider,{value:b??null,children:(0,u.jsx)(je.Provider,{value:st,children:(0,u.jsx)(fo,{icons:z,children:(0,u.jsx)(Yi.Provider,{value:U,children:(0,u.jsx)("div",{className:U("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",l),dir:n==="auto"?bo(ce):n,children:(0,u.jsx)(Yu,{components:ar,rehypePlugins:dn,remarkPlugins:or,...q,children:ce})})})})})})}):(0,u.jsx)(Vi.Provider,{value:sr,children:(0,u.jsx)(Wi.Provider,{value:b??null,children:(0,u.jsx)(je.Provider,{value:st,children:(0,u.jsx)(fo,{icons:z,children:(0,u.jsx)(Yi.Provider,{value:U,children:(0,u.jsxs)("div",{className:U("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",A&&!Yt?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,l),style:lr,children:[Te.length===0&&A&&f&&(0,u.jsx)("span",{}),Te.map((se,de)=>{var we;let Qe=de===Te.length-1,vt=f&&Qe&&xo(se);return(0,u.jsx)(g,{animatePlugin:He,components:ar,content:se,dir:(we=ge?.[de])!=null?we:n!=="auto"?n:void 0,index:de,isIncomplete:vt,rehypePlugins:dn,remarkPlugins:or,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...q},_t[de])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);Fs.displayName="Streamdown";var s_=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:s=!0,initialZoom:a=1,fullscreen:o=!1})=>{let{RotateCcwIcon:l,ZoomInIcon:h,ZoomOutIcon:m}=We(),d=re(),f=(0,E.useRef)(null),p=(0,E.useRef)(null),[g,_]=(0,E.useState)(a),[A,b]=(0,E.useState)({x:0,y:0}),[v,S]=(0,E.useState)(!1),[L,O]=(0,E.useState)({x:0,y:0}),[N,B]=(0,E.useState)({x:0,y:0}),z=(0,E.useCallback)(U=>{_(P=>Math.max(n,Math.min(r,P+U)))},[n,r]),Y=(0,E.useCallback)(()=>{z(i)},[z,i]),I=(0,E.useCallback)(()=>{z(-i)},[z,i]),j=(0,E.useCallback)(()=>{_(a),b({x:0,y:0})},[a]),q=(0,E.useCallback)(U=>{U.preventDefault();let P=U.deltaY>0?-i:i;z(P)},[z,i]),V=(0,E.useCallback)(U=>{if(U.button!==0||U.isPrimary===!1)return;S(!0),O({x:U.clientX,y:U.clientY}),B(A);let P=U.currentTarget;P instanceof HTMLElement&&P.setPointerCapture(U.pointerId)},[A]),J=(0,E.useCallback)(U=>{if(!v)return;U.preventDefault();let P=U.clientX-L.x,W=U.clientY-L.y;b({x:N.x+P,y:N.y+W})},[v,L,N]),G=(0,E.useCallback)(U=>{S(!1);let P=U.currentTarget;P instanceof HTMLElement&&P.releasePointerCapture(U.pointerId)},[]);return(0,E.useEffect)(()=>{let U=f.current;if(U)return U.addEventListener("wheel",q,{passive:!1}),()=>{U.removeEventListener("wheel",q)}},[q]),(0,E.useEffect)(()=>{let U=p.current;if(U&&v)return document.body.style.userSelect="none",U.addEventListener("pointermove",J,{passive:!1}),U.addEventListener("pointerup",G),U.addEventListener("pointercancel",G),()=>{document.body.style.userSelect="",U.removeEventListener("pointermove",J),U.removeEventListener("pointerup",G),U.removeEventListener("pointercancel",G)}},[v,J,G]),(0,u.jsxs)("div",{className:d("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",t),ref:f,style:{cursor:v?"grabbing":"grab"},children:[s?(0,u.jsxs)("div",{className:d("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",o?"bottom-4 left-4":"bottom-2 left-2"),children:[(0,u.jsx)("button",{className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:g>=r,onClick:Y,title:"Zoom in",type:"button",children:(0,u.jsx)(h,{size:16})}),(0,u.jsx)("button",{className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:g<=n,onClick:I,title:"Zoom out",type:"button",children:(0,u.jsx)(m,{size:16})}),(0,u.jsx)("button",{className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:j,title:"Reset zoom and pan",type:"button",children:(0,u.jsx)(l,{size:16})})]}):null,(0,u.jsx)("div",{className:d("flex-1 origin-center transition-transform duration-150 ease-out",o?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:V,ref:p,role:"application",style:{transform:`translate(${A.x}px, ${A.y}px) scale(${g})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},a_=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let s=re(),[a,o]=(0,E.useState)(null),[l,h]=(0,E.useState)(!1),[m,d]=(0,E.useState)(""),[f,p]=(0,E.useState)(""),[g,_]=(0,E.useState)(0),{mermaid:A}=(0,E.useContext)(je),b=Ms(),v=A?.errorComponent,{shouldRender:S,containerRef:L}=SC({immediate:r});if((0,E.useEffect)(()=>{if(S){if(!b){o("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{o(null),h(!0);let N=b.getMermaid(n),B=e.split("").reduce((I,j)=>(I<<5)-I+j.charCodeAt(0)|0,0),z=`mermaid-${Math.abs(B)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:Y}=await N.render(z,e);d(Y),p(Y)}catch(N){if(!(f||m)){let B=N instanceof Error?N.message:"Failed to render Mermaid chart";o(B)}}finally{h(!1)}})()}},[e,n,g,S,b]),!(S||m||f))return(0,u.jsx)("div",{className:s("my-4 min-h-[200px]",t),ref:L});if(l&&!m&&!f)return(0,u.jsx)("div",{className:s("my-4 flex justify-center p-4",t),ref:L,children:(0,u.jsxs)("div",{className:s("flex items-center space-x-2 text-muted-foreground"),children:[(0,u.jsx)("div",{className:s("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),(0,u.jsx)("span",{className:s("text-sm"),children:"Loading diagram..."})]})});if(a&&!m&&!f){let N=()=>_(B=>B+1);return v?(0,u.jsx)("div",{ref:L,children:(0,u.jsx)(v,{chart:e,error:a,retry:N})}):(0,u.jsxs)("div",{className:s("rounded-md bg-red-50 p-4",t),ref:L,children:[(0,u.jsxs)("p",{className:s("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",a]}),(0,u.jsxs)("details",{className:s("mt-2"),children:[(0,u.jsx)("summary",{className:s("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),(0,u.jsx)("pre",{className:s("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let O=m||f;return(0,u.jsx)("div",{className:s("size-full",t),"data-streamdown":"mermaid",ref:L,children:(0,u.jsx)(s_,{className:s(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:(0,u.jsx)("div",{"aria-label":"Mermaid chart",className:s("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:O},role:"img"})})})},Ku={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Oo=E.createContext&&E.createContext(Ku),o_=["attr","size","title"];function l_(e,t){if(e==null)return{};var n,r,i=c_(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function c_(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Lr(){return Lr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lr.apply(null,arguments)}function Do(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Rr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Do(Object(n),!0).forEach(function(r){u_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Do(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function u_(e,t,n){return(t=h_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h_(e){var t=d_(e,"string");return typeof t=="symbol"?t:t+""}function d_(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xu(e){return e&&e.map((t,n)=>E.createElement(t.tag,Rr({key:n},t.attr),Xu(t.child)))}function m_(e){return t=>E.createElement(f_,Lr({attr:Rr({},e.attr)},t),Xu(e.child))}function f_(e){var t=n=>{var{attr:r,size:i,title:s}=e,a=l_(e,o_),o=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),E.createElement("svg",Lr({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:l,style:Rr(Rr({color:e.color||n.color},n.style),e.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),s&&E.createElement("title",null,s),e.children)};return Oo!==void 0?E.createElement(Oo.Consumer,null,n=>t(n)):t(Ku)}function p_(e){return m_({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"},child:[]},{tag:"path",attr:{d:"M9 18c-4.51 2-5-2-7-2"},child:[]}]})(e)}var g_={damping:.7,stiffness:.05,mass:1.25},E_=70,T_=1e3/60,b_=350,Zr=!1;globalThis.document?.addEventListener("mousedown",()=>{Zr=!0});globalThis.document?.addEventListener("mouseup",()=>{Zr=!1});globalThis.document?.addEventListener("click",()=>{Zr=!1});var x_=(e={})=>{const[t,n]=(0,E.useState)(!1),[r,i]=(0,E.useState)(e.initial!==!1),[s,a]=(0,E.useState)(!1),o=(0,E.useRef)(null);o.current=e;const l=(0,E.useCallback)(()=>{if(!Zr)return!1;const v=window.getSelection();if(!v||!v.rangeCount)return!1;const S=v.getRangeAt(0);return S.commonAncestorContainer.contains(A.current)||A.current?.contains(S.commonAncestorContainer)},[]),h=(0,E.useCallback)(v=>{d.isAtBottom=v,i(v)},[]),m=(0,E.useCallback)(v=>{d.escapedFromLock=v,n(v)},[]),d=(0,E.useMemo)(()=>{let v;return{escapedFromLock:t,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return A.current?.scrollTop??0},set scrollTop(S){if(A.current){const{scrollBehavior:L}=getComputedStyle(A.current);L!=="auto"&&(A.current.style.scrollBehavior="auto"),A.current.scrollTop=S,d.ignoreScrollToTop=A.current.scrollTop,L!=="auto"&&(A.current.style.scrollBehavior=L)}},get targetScrollTop(){return!A.current||!b.current?0:A.current.scrollHeight-1-A.current.clientHeight},get calculatedTargetScrollTop(){if(!A.current||!b.current)return 0;const{targetScrollTop:S}=this;if(!e.targetScrollTop)return S;if(v?.targetScrollTop===S)return v.calculatedScrollTop;const L=Math.max(Math.min(e.targetScrollTop(S,{scrollElement:A.current,contentElement:b.current}),S),0);return v={targetScrollTop:S,calculatedScrollTop:L},requestAnimationFrame(()=>{v=void 0}),L},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=E_}}},[]),f=(0,E.useCallback)((v={})=>{typeof v=="string"&&(v={animation:v}),v.preserveScrollPosition||h(!0);const S=Date.now()+(Number(v.wait)||0),L=Ai(o.current,v.animation),{ignoreEscapes:O=!1}=v;let N,B=d.calculatedTargetScrollTop;v.duration instanceof Promise?v.duration.finally(()=>{N=Date.now()}):N=S+(v.duration??0);const z=async()=>{const Y=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:I}=d,j=performance.now(),q=(j-(d.lastTick??j))/T_;if(d.animation||(d.animation={behavior:L,promise:Y,ignoreEscapes:O}),d.animation.behavior===L&&(d.lastTick=j),l()||S>Date.now())return z();if(I<Math.min(B,d.calculatedTargetScrollTop)){if(d.animation?.behavior===L){if(L==="instant")return d.scrollTop=d.calculatedTargetScrollTop,z();d.velocity=(L.damping*d.velocity+L.stiffness*d.scrollDifference)/L.mass,d.accumulated+=d.velocity*q,d.scrollTop+=d.accumulated,d.scrollTop!==I&&(d.accumulated=0)}return z()}return N>Date.now()?(B=d.calculatedTargetScrollTop,z()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:Ai(o.current,o.current.resize),ignoreEscapes:O,duration:Math.max(0,N-Date.now())||void 0}):d.isAtBottom)});return Y.then(I=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),I))};return v.wait!==!0&&(d.animation=void 0),d.animation?.behavior===L?d.animation.promise:z()},[h,l,d]),p=(0,E.useCallback)(()=>{m(!0),h(!1)},[m,h]),g=(0,E.useCallback)(({target:v})=>{if(v!==A.current)return;const{scrollTop:S,ignoreScrollToTop:L}=d;let{lastScrollTop:O=S}=d;d.lastScrollTop=S,d.ignoreScrollToTop=void 0,L&&L>S&&(O=L),a(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||S===L)return;if(l()){m(!0),h(!1);return}const N=S>O,B=S<O;if(d.animation?.ignoreEscapes){d.scrollTop=O;return}B&&(m(!0),h(!1)),N&&m(!1),!d.escapedFromLock&&d.isNearBottom&&h(!0)},1)},[m,h,l,d]),_=(0,E.useCallback)(({target:v,deltaY:S})=>{let L=v;for(;!["scroll","auto"].includes(getComputedStyle(L).overflow);){if(!L.parentElement)return;L=L.parentElement}L===A.current&&S<0&&A.current.scrollHeight>A.current.clientHeight&&!d.animation?.ignoreEscapes&&(m(!0),h(!1))},[m,h,d]),A=Po(v=>{A.current?.removeEventListener("scroll",g),A.current?.removeEventListener("wheel",_),v?.addEventListener("scroll",g,{passive:!0}),v?.addEventListener("wheel",_,{passive:!0})},[]),b=Po(v=>{if(d.resizeObserver?.disconnect(),!v)return;let S;d.resizeObserver=new ResizeObserver(([L])=>{const{height:O}=L.contentRect,N=O-(S??O);if(d.resizeDifference=N,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),a(d.isNearBottom),N>=0){const B=Ai(o.current,S?o.current.resize:o.current.initial);f({animation:B,wait:!0,preserveScrollPosition:!0,duration:B==="instant"?void 0:b_})}else d.isNearBottom&&(m(!1),h(!0));S=O,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===N&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(v)},[]);return{contentRef:b,scrollRef:A,scrollToBottom:f,stopScroll:p,isAtBottom:r||s,isNearBottom:s,escapedFromLock:t,state:d}};function Po(e,t){const n=(0,E.useCallback)(r=>(n.current=r,e(r)),t);return n}var Ci=new Map;function Ai(...e){const t={...g_};let n=!1;for(const i of e){if(i==="instant"){n=!0;continue}typeof i=="object"&&(n=!1,t.damping=i.damping??t.damping,t.stiffness=i.stiffness??t.stiffness,t.mass=i.mass??t.mass)}const r=JSON.stringify(t);return Ci.has(r)||Ci.set(r,Object.freeze(t)),n?"instant":Ci.get(r)}var Zu=(0,E.createContext)(null),k_=typeof window<"u"?E.useLayoutEffect:E.useEffect;function Or({instance:e,children:t,resize:n,initial:r,mass:i,damping:s,stiffness:a,targetScrollTop:o,contextRef:l,...h}){const m=(0,E.useRef)(null),d=E.useCallback((O,N)=>(L?.targetScrollTop??o)?.(O,N)??O,[o]),f=x_({mass:i,damping:s,stiffness:a,resize:n,initial:r,targetScrollTop:d}),{scrollRef:p,contentRef:g,scrollToBottom:_,stopScroll:A,isAtBottom:b,escapedFromLock:v,state:S}=e??f,L=(0,E.useMemo)(()=>({scrollToBottom:_,stopScroll:A,scrollRef:p,isAtBottom:b,escapedFromLock:v,contentRef:g,state:S,get targetScrollTop(){return m.current},set targetScrollTop(O){m.current=O}}),[_,b,g,p,A,v,S]);return(0,E.useImperativeHandle)(l,()=>L,[L]),k_(()=>{p.current&&getComputedStyle(p.current).overflow==="visible"&&(p.current.style.overflow="auto")},[]),E.createElement(Zu.Provider,{value:L},E.createElement("div",{...h},typeof t=="function"?t(L):t))}(function(e){function t({children:n,scrollClassName:r,...i}){const s=Ju();return E.createElement("div",{ref:s.scrollRef,style:{height:"100%",width:"100%",scrollbarGutter:"stable both-edges"},className:r},E.createElement("div",{...i,ref:s.contentRef},typeof n=="function"?n(s):n))}e.Content=t})(Or||(Or={}));function Ju(){const e=(0,E.useContext)(Zu);if(!e)throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");return e}var y_=({className:e,...t})=>(0,u.jsx)(Or,{className:te("relative flex-1 overflow-y-hidden",e),initial:"smooth",resize:"smooth",role:"log",...t}),C_=({className:e,...t})=>(0,u.jsx)(Or.Content,{className:te("flex flex-col gap-8 p-4",e),...t}),A_=({className:e,...t})=>{const{isAtBottom:n,scrollToBottom:r}=Ju(),i=(0,E.useCallback)(()=>{r()},[r]);return!n&&(0,u.jsx)(oe,{className:te("absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full",e),onClick:i,size:"icon",type:"button",variant:"outline",...t,children:(0,u.jsx)(Dh,{className:"size-4"})})},Mo=[{variant:"shine",component:({children:e,className:t,...n})=>(0,u.jsx)("span",{...n,className:te("bg-[linear-gradient(110deg,#bfbfbf,35%,#000,50%,#bfbfbf,75%,#bfbfbf)] dark:bg-[linear-gradient(110deg,#404040,35%,#fff,50%,#404040,75%,#404040)]","bg-size-[200%_100%] bg-clip-text text-transparent","animate-shine",t),children:e})}];function __({variant:e="shine",className:t,...n}){const r=Mo.find(i=>i.variant===e)?.component||Mo[0].component;return(0,u.jsx)(qh,{className:te("font-medium text-sm"),children:(0,u.jsx)(r,{...n,className:t})})}var Bo=({className:e,from:t,...n})=>(0,u.jsx)("div",{className:te("group flex w-full max-w-[95%] flex-col gap-2",t==="user"?"is-user ml-auto justify-end":"is-assistant",e),...n}),Fo=({children:e,className:t,...n})=>(0,u.jsx)("div",{className:te("is-user:dark flex w-fit max-w-full min-w-0 flex-col gap-2 overflow-hidden text-sm","group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground","group-[.is-assistant]:text-foreground",t),...n,children:e}),eh=(0,E.createContext)(null),v_=()=>{const e=(0,E.use)(eh);if(!e)throw new Error("MessageBranch components must be used within MessageBranch");return e},jo=({defaultBranch:e=0,onBranchChange:t,className:n,...r})=>{const[i,s]=(0,E.useState)(e),[a,o]=(0,E.useState)([]),l=f=>{s(f),t?.(f)},h=()=>{const f=i>0?i-1:a.length-1;l(f)},m=()=>{const f=i<a.length-1?i+1:0;l(f)},d={currentBranch:i,totalBranches:a.length,goToPrevious:h,goToNext:m,branches:a,setBranches:o};return(0,u.jsx)(eh.Provider,{value:d,children:(0,u.jsx)("div",{className:te("grid w-full gap-2 [&>div]:pb-0",n),...r})})},Ho=({children:e,...t})=>{const{currentBranch:n,setBranches:r,branches:i}=v_(),s=Array.isArray(e)?e:[e];return(0,E.useEffect)(()=>{i.length!==s.length&&r(s)},[s,i,r]),s.map((a,o)=>(0,u.jsx)("div",{className:te("grid gap-2 overflow-hidden [&>div]:pb-0",o===n?"block":"hidden"),...t,children:a},a.key))},th=(0,E.memo)(({className:e,...t})=>(0,u.jsx)(Fs,{className:te("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);th.displayName="MessageResponse";var N_="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",S_=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=N_[n[e]&63];return t},I_=(0,E.createContext)(null),w_=(0,E.createContext)(null),nh=()=>(0,E.useContext)(I_),L_=()=>(0,E.useContext)(w_),rh=(0,E.createContext)(null),R_=()=>{const e=L_(),t=(0,E.use)(rh),n=e??t;if(!n)throw new Error("usePromptInputAttachments must be used within a PromptInput or PromptInputProvider");return n},O_=({className:e,accept:t,multiple:n,globalDrop:r,syncHiddenInput:i,maxFiles:s,maxFileSize:a,onError:o,onSubmit:l,children:h,...m})=>{const d=nh(),f=!!d,p=(0,E.useRef)(null),g=(0,E.useRef)(null),[_,A]=(0,E.useState)([]),b=f?d.attachments.files:_,v=(0,E.useRef)(b);v.current=b;const S=(0,E.useCallback)(()=>{p.current?.click()},[]),L=(0,E.useCallback)(P=>!t||t.trim()===""?!0:t.split(",").map(W=>W.trim()).filter(Boolean).some(W=>{if(W.endsWith("/*")){const Z=W.slice(0,-1);return P.type.startsWith(Z)}return P.type===W}),[t]),O=(0,E.useCallback)(P=>{const W=Array.from(P),Z=W.filter(K=>L(K));if(W.length&&Z.length===0){o?.({code:"accept",message:"No files match the accepted types."});return}const y=K=>a?K.size<=a:!0,ce=Z.filter(y);if(Z.length>0&&ce.length===0){o?.({code:"max_file_size",message:"All files exceed the maximum size."});return}A(K=>{const C=typeof s=="number"?Math.max(0,s-K.length):void 0,De=typeof C=="number"?ce.slice(0,C):ce;typeof C=="number"&&ce.length>C&&o?.({code:"max_files",message:"Too many files. Some were not added."});const Te=[];for(const ge of De)Te.push({id:S_(),type:"file",url:URL.createObjectURL(ge),mediaType:ge.type,filename:ge.name});return K.concat(Te)})},[L,s,a,o]),N=(0,E.useCallback)(P=>A(W=>{const Z=W.find(y=>y.id===P);return Z?.url&&URL.revokeObjectURL(Z.url),W.filter(y=>y.id!==P)}),[]),B=(0,E.useCallback)(()=>A(P=>{for(const W of P)W.url&&URL.revokeObjectURL(W.url);return[]}),[]),z=f?d.attachments.add:O,Y=f?d.attachments.remove:N,I=f?d.attachments.clear:B,j=f?d.attachments.openFileDialog:S;(0,E.useEffect)(()=>{f&&d.__registerFileInput(p,()=>p.current?.click())},[f,d]),(0,E.useEffect)(()=>{i&&p.current&&b.length===0&&(p.current.value="")},[b,i]),(0,E.useEffect)(()=>{const P=g.current;if(!P||r)return;const W=y=>{y.dataTransfer?.types?.includes("Files")&&y.preventDefault()},Z=y=>{y.dataTransfer?.types?.includes("Files")&&y.preventDefault(),y.dataTransfer?.files&&y.dataTransfer.files.length>0&&z(y.dataTransfer.files)};return P.addEventListener("dragover",W),P.addEventListener("drop",Z),()=>{P.removeEventListener("dragover",W),P.removeEventListener("drop",Z)}},[z,r]),(0,E.useEffect)(()=>{if(!r)return;const P=Z=>{Z.dataTransfer?.types?.includes("Files")&&Z.preventDefault()},W=Z=>{Z.dataTransfer?.types?.includes("Files")&&Z.preventDefault(),Z.dataTransfer?.files&&Z.dataTransfer.files.length>0&&z(Z.dataTransfer.files)};return document.addEventListener("dragover",P),document.addEventListener("drop",W),()=>{document.removeEventListener("dragover",P),document.removeEventListener("drop",W)}},[z,r]),(0,E.useEffect)(()=>()=>{if(!f)for(const P of v.current)P.url&&URL.revokeObjectURL(P.url)},[f]);const q=P=>{P.currentTarget.files&&z(P.currentTarget.files),P.currentTarget.value=""},V=async P=>{try{const W=await(await fetch(P)).blob();return new Promise(Z=>{const y=new FileReader;y.onloadend=()=>Z(y.result),y.onerror=()=>Z(null),y.readAsDataURL(W)})}catch{return null}},J=(0,E.useMemo)(()=>({files:b.map(P=>({...P,id:P.id})),add:z,remove:Y,clear:I,openFileDialog:j,fileInputRef:p}),[b,z,Y,I,j]),G=P=>{P.preventDefault();const W=P.currentTarget,Z=f?d.textInput.value:new FormData(W).get("message")||"";f||W.reset(),Promise.all(b.map(async({id:y,...ce})=>{if(ce.url?.startsWith("blob:")){const K=await V(ce.url);return{...ce,url:K??ce.url}}return ce})).then(y=>{try{const ce=l({text:Z,files:y},P);ce instanceof Promise?ce.then(()=>{I(),f&&d.textInput.clear()}).catch(()=>{}):(I(),f&&d.textInput.clear())}catch{}}).catch(()=>{})},U=(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("input",{accept:t,"aria-label":"Upload files",className:"hidden",multiple:n,onChange:q,ref:p,title:"Upload files",type:"file"}),(0,u.jsx)("form",{className:te("w-full",e),onSubmit:G,ref:g,...m,children:(0,u.jsx)(gd,{className:"overflow-hidden",children:h})})]});return f?U:(0,u.jsx)(rh.Provider,{value:J,children:U})},D_=({className:e,...t})=>(0,u.jsx)("div",{className:te("contents",e),...t}),P_=({onChange:e,className:t,placeholder:n="What would you like to know?",...r})=>{const i=nh(),s=R_(),[a,o]=(0,E.useState)(!1),l=d=>{if(d.key==="Enter"){if(a||d.nativeEvent.isComposing||d.shiftKey)return;d.preventDefault();const f=d.currentTarget.form;if(f?.querySelector('button[type="submit"]')?.disabled)return;f?.requestSubmit()}if(d.key==="Backspace"&&d.currentTarget.value===""&&s.files.length>0){d.preventDefault();const f=s.files.at(-1);f&&s.remove(f.id)}},h=d=>{const f=d.clipboardData?.items;if(!f)return;const p=[];for(const g of f)if(g.kind==="file"){const _=g.getAsFile();_&&p.push(_)}p.length>0&&(d.preventDefault(),s.add(p))},m=i?{value:i.textInput.value,onChange:d=>{i.textInput.setInput(d.currentTarget.value),e?.(d)}}:{onChange:e};return(0,u.jsx)(Ed,{className:te("field-sizing-content max-h-48 min-h-16",t),name:"message",onCompositionEnd:()=>o(!1),onCompositionStart:()=>o(!0),onKeyDown:l,onPaste:h,placeholder:n,...r,...m})},M_=({className:e,...t})=>(0,u.jsx)(xd,{align:"block-end",className:te("justify-between justify-end gap-1",e),...t}),B_=({className:e,variant:t="default",size:n="icon-sm",status:r,children:i,...s})=>{let a=(0,u.jsx)(wh,{className:"size-4"});return r==="submitted"?a=(0,u.jsx)(Ih,{className:"size-4 animate-spin"}):r==="streaming"?a=(0,u.jsx)(Lh,{className:"size-4"}):r==="error"&&(a=(0,u.jsx)(Ph,{className:"size-4"})),(0,u.jsx)(bd,{"aria-label":"Submit",className:te(e),size:n,type:"submit",variant:t,...s,children:i??a})};function F_({...e}){return(0,u.jsx)(Wh,{"data-slot":"collapsible",...e})}function j_({...e}){return(0,u.jsx)(Kh,{"data-slot":"collapsible-trigger",...e})}function H_({...e}){return(0,u.jsx)(ed,{"data-slot":"collapsible-content",...e})}var U_=({children:e,as:t="p",className:n,duration:r=2,spread:i=2})=>{const s=(0,E.useMemo)(()=>(e?.length??0)*i,[e,i]);return(0,u.jsx)(t,{className:te("relative inline-block bg-size-[250%_100%,auto] bg-clip-text text-transparent","[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]","animate-shimmer",n),style:{"--spread":`${s}px`,"--duration":`${r}s`,backgroundImage:"var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))"},children:e})},z_=(0,E.memo)(U_),ih=(0,E.createContext)(null),$_=()=>{const e=(0,E.use)(ih);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},q_=1e3,Y_=1e3,sh=(0,E.memo)(({className:e,isStreaming:t=!1,open:n,defaultOpen:r=!0,onOpenChange:i,duration:s,children:a,...o})=>{const[l,h]=Ys({prop:n,defaultProp:r,onChange:i}),[m,d]=Ys({prop:s,defaultProp:void 0}),[f,p]=(0,E.useState)(!1),[g,_]=(0,E.useState)(null);(0,E.useEffect)(()=>{t?g===null&&_(Date.now()):g!==null&&(d(Math.ceil((Date.now()-g)/Y_)),_(null))},[t,g,d]),(0,E.useEffect)(()=>{if(r&&!t&&l&&!f){const b=setTimeout(()=>{h(!1),p(!0)},q_);return()=>clearTimeout(b)}},[t,l,r,h,f]);const A=b=>{h(b)};return(0,u.jsx)(ih.Provider,{value:{isStreaming:t,isOpen:l,setIsOpen:h,duration:m},children:(0,u.jsx)(F_,{className:te("not-prose mb-4",e),onOpenChange:A,open:l,...o,children:a})})}),V_=(e,t)=>e||t===0?(0,u.jsx)(z_,{duration:1,children:"Thinking..."}):t===void 0?(0,u.jsx)("p",{children:"Thought for a few seconds"}):(0,u.jsxs)("p",{children:["Thought for ",t," seconds"]}),ah=(0,E.memo)(({className:e,children:t,getThinkingMessage:n=V_,...r})=>{const{isStreaming:i,isOpen:s,duration:a}=$_();return(0,u.jsx)(j_,{className:te("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...r,children:t??(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Fh,{className:"size-4"}),n(i,a),(0,u.jsx)(Yo,{className:te("size-4 transition-transform",s?"rotate-180":"rotate-0")})]})})}),oh=(0,E.memo)(({className:e,children:t,...n})=>(0,u.jsx)(H_,{className:te("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...n,children:(0,u.jsx)(Fs,{children:t})}));sh.displayName="Reasoning";ah.displayName="ReasoningTrigger";oh.displayName="ReasoningContent";var W_=({className:e,children:t,...n})=>(0,u.jsxs)(nl,{className:"w-full overflow-x-auto whitespace-nowrap",...n,children:[(0,u.jsx)("div",{className:te("flex w-max flex-nowrap items-center gap-2",e),children:t}),(0,u.jsx)(Ad,{className:"hidden",orientation:"horizontal"})]}),Q_=({suggestion:e,onClick:t,className:n,variant:r="outline",size:i="sm",children:s,...a})=>{const o=()=>{t?.(e)};return(0,u.jsx)(oe,{className:te("cursor-pointer rounded-full px-4",n),onClick:o,size:i,type:"button",variant:r,...a,children:s||e})},js=({enabled:e=!0}={})=>{const{data:t,isLoading:n,error:r,refetch:i}=bh({queryKey:ud.rateLimit(),queryFn:async()=>(await ad()).data,enabled:e});return{rateLimit:t,isLoadingRateLimit:n,errorRateLimit:r,refetchRateLimit:i}},G_=({db:e,onRateLimitRefetch:t,onControllerReady:n})=>{const[r,i]=(0,E.useState)(""),[s,a]=(0,E.useState)(null),{openOverlay:o}=Ht(),{pendingPrompt:l,consumePrompt:h}=Hd(),{includeSchemaInAiContext:m,provider:d,model:f}=ns(),p=Zi(yr),g=rs(),_=p.status[d],A=_?.state==="set"||_?.state==="locked",{rateLimit:b}=js({enabled:g&&d==="gemini"&&!A}),{remaining:v}=b??{remaining:0,limit:0},S=A||d==="gemini"&&v>0,{messages:L,sendMessage:O,isLoading:N,clear:B,stop:z}=Eh({connection:ph(`${rd()}${sd.API_PREFIX}/chat`),body:{db:e,includeSchema:m},byok:yr,forwardedProps:{provider:d,model:f},onError:V=>a(V.message),onFinish:()=>{d==="gemini"&&!A&&t()}});(0,E.useEffect)(()=>{!l||N||!g||!S||(h(),O(l))},[S,h,g,N,l,O]),(0,E.useEffect)(()=>{n({clear:()=>{B(),i(""),a(null)},isLoading:N})},[B,N,n]);const Y=V=>{const J=!!V.text,G=!!V.files?.length;!(J||G)||N||(a(null),O(V.text),i(""))},I=V=>{a(null),O(V),i("")},j=()=>{z(),i("")},q=N?"streaming":"ready";return(0,u.jsxs)("div",{className:"relative flex size-full flex-col divide-y overflow-hidden",children:[(0,u.jsxs)(y_,{children:[(0,u.jsx)(C_,{children:L.length===0?(0,u.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:(0,u.jsxs)("div",{className:"text-center space-y-2",children:[(0,u.jsx)("p",{className:"text-lg font-medium",children:"Start a new conversation"}),(0,u.jsx)("p",{className:"text-sm",children:"Ask me anything to get started"})]})}):(0,u.jsxs)(u.Fragment,{children:[L.map(V=>{const J=V.parts.filter(P=>P.type==="thinking"),G=V.parts.reduce((P,W)=>W.type==="text"?P+(W.content??""):P,""),U=J.length>0;return(0,u.jsx)(jo,{defaultBranch:0,children:(0,u.jsx)(Ho,{children:(0,u.jsx)(Bo,{from:V.role==="user"?"user":"assistant",children:(0,u.jsxs)("div",{children:[U&&V.role==="assistant"&&(0,u.jsxs)(sh,{duration:0,children:[(0,u.jsx)(ah,{}),(0,u.jsx)(oh,{children:J.map(P=>P.content).join(`
|
|
132
|
+
`)})]}),(0,u.jsx)(Fo,{children:(0,u.jsx)(th,{children:G})})]})})})},V.id)}),N&&(0,u.jsx)(jo,{defaultBranch:0,children:(0,u.jsx)(Ho,{children:(0,u.jsx)(Bo,{from:"assistant",children:(0,u.jsx)(Fo,{children:(0,u.jsx)(__,{children:"Thinking..."})})})})})]})}),(0,u.jsx)(A_,{})]}),(0,u.jsxs)("div",{className:"grid shrink-0 gap-4 pt-3",children:[s&&(0,u.jsx)("div",{className:"mx-4 rounded-lg border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:s}),!S&&(0,u.jsxs)("div",{className:"mx-4 rounded-lg border p-3 text-sm",children:[(0,u.jsx)("p",{className:"text-muted-foreground",children:d==="gemini"?"The hosted AI limit is exhausted. Add a personal Gemini key to continue.":`Add a ${d} API key to use this provider.`}),(0,u.jsx)(oe,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:()=>o("settings.app"),children:"Open settings"})]}),L.length===0&&S&&(0,u.jsx)(W_,{className:"px-4",children:Yd.map(V=>(0,u.jsx)(Q_,{onClick:()=>I(V),suggestion:V,size:"lg",children:V},V))}),(0,u.jsx)("div",{className:"w-full px-4 pb-4",children:(0,u.jsxs)(O_,{globalDrop:!0,multiple:!0,onSubmit:Y,children:[(0,u.jsx)(D_,{children:(0,u.jsx)(P_,{onChange:V=>i(V.target.value),value:r,placeholder:"Type a message..."})}),(0,u.jsx)(M_,{children:(0,u.jsx)(B_,{className:"h-8!",status:q,onClick:N?j:void 0,disabled:!S})})]})})]})]})},K_=()=>{const{isOverlayOpen:e,closeOverlay:t}=Ht(),{selectedDatabase:n}=nt(),{includeSchemaInAiContext:r,provider:i,model:s}=ns(),a=Zi(yr),o=rs(),l=a.status[i],h=l?.state==="set"||l?.state==="locked",{rateLimit:m,refetchRateLimit:d}=js({enabled:o&&i==="gemini"&&!h}),[f,p]=(0,E.useState)(null),g=(0,E.useRef)(_=>p(_));return(0,u.jsx)(Jo,{title:"AI Assistant",cta:(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[m&&!h&&(0,u.jsxs)(Dt,{children:[(0,u.jsx)(Rt,{asChild:!0,children:(0,u.jsxs)("span",{className:"text-xs px-2 py-1 cursor-default text-muted-foreground",children:[m.remaining,"/",m.limit]})}),(0,u.jsx)(Ot,{side:"bottom",children:(0,u.jsxs)("p",{children:[m.remaining," messages remaining"]})})]}),n&&f&&(0,u.jsxs)(oe,{type:"button",variant:"outline",size:"lg",onClick:f.clear,disabled:f.isLoading,children:[(0,u.jsx)(tn,{className:"size-4 mr-1"}),"New Chat"]})]}),closeButton:!1,open:e("chat.assistant"),size:"max-w-2xl!",contentClassName:"p-0 flex flex-col h-[calc(100vh-4rem)] flex-1",onOpenChange:_=>{_||t("chat.assistant")},children:n?(0,u.jsx)(G_,{db:n,onRateLimitRefetch:d,onControllerReady:g.current},`${n}:${r}:${i}:${s}`):(0,u.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground p-8",children:(0,u.jsxs)("div",{className:"text-center space-y-2",children:[(0,u.jsx)("p",{className:"text-lg font-medium",children:"No database selected"}),(0,u.jsx)("p",{className:"text-sm",children:"Select a database from the sidebar to start chatting."})]})})})},X_=()=>{const{openOverlay:e}=Ht(),{dbType:t}=nt(),{provider:n}=ns(),r=Zi(yr),i=rs(),s=r.status[n],a=s?.state==="set"||s?.state==="locked",{rateLimit:o,isLoadingRateLimit:l,errorRateLimit:h}=js({enabled:i&&n==="gemini"&&!a}),{remaining:m=0,limit:d=0}=o??{remaining:0,limit:0},p=a?"bg-emerald-500":l||h?"bg-zinc-500":n!=="gemini"||m===0?"bg-red-500":m<=5?"bg-yellow-500":"bg-emerald-500";return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(Dt,{children:[(0,u.jsx)(Rt,{asChild:!0,children:(0,u.jsxs)(oe,{variant:"ghost",className:"border-r-0 border-y-0 border-l border-border rounded-none h-full w-12 relative text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors",onClick:()=>{e("chat.assistant"),t&&nd.capture("chat_opened",{db_type:t})},children:[(0,u.jsx)(Rh,{className:"size-5"}),(0,u.jsx)("span",{"data-testid":"chat-status-indicator",className:te("absolute top-2 right-2 h-2 w-2 rounded-full ring-2 ring-background",p)})]})}),(0,u.jsx)(Ot,{side:"bottom",className:"text-xs",children:a?(0,u.jsxs)("p",{children:["AI Assistant · personal ",n," key"]}):!l&&!h?m>0?(0,u.jsxs)("p",{children:[m,"/",d," messages remaining"]}):(0,u.jsx)("p",{children:"AI Assistant"}):(0,u.jsx)("p",{children:"AI status unavailable"})})]}),(0,u.jsx)(K_,{})]})},Z_=()=>{const{pathname:e}=Pr(),t=e.split("/")[1]||"table",{dbType:n}=nt();return(0,u.jsx)("div",{className:"flex h-full items-center",children:(n==="redis"?["browser","runner"]:ld).map(r=>(0,u.jsx)($o,{to:`/${r}`,className:"h-full flex items-center",children:(0,u.jsx)(oe,{variant:"ghost",className:te("flex-1 px-4 border-l-0 border-y-0 border-r border-border h-full rounded-none capitalize text-xs font-medium transition-colors",t===r?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted/50"),children:r})},r))})},J_=()=>{const{sidebar:{isOpen:e,isPinned:t},setSidebarOpen:n,setSidebarPinned:r}=Mr(),i=()=>{n(!e),r(!t)};return(0,u.jsx)(oe,{variant:"ghost",onClick:i,className:"h-full aspect-square border-l-0 border-y-0 border-r border-border rounded-none text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors",children:(0,u.jsx)(zh,{className:"size-5"})})},ev=()=>{const{theme:e,isDark:t,setTheme:n}=Id(),{openOverlay:r}=Ht();return(0,u.jsxs)("div",{className:"border-b border-border w-full flex items-center justify-between bg-background text-foreground h-12",children:[(0,u.jsxs)("div",{className:"flex items-center h-full",children:[(0,u.jsx)(J_,{}),(0,u.jsx)(Z_,{})]}),(0,u.jsxs)("div",{className:"flex items-center h-full",children:[(0,u.jsx)(X_,{}),(0,u.jsxs)(Dt,{children:[(0,u.jsx)(Rt,{asChild:!0,children:(0,u.jsx)(oe,{type:"button",variant:"ghost",className:"border-r-0 border-y-0 border-l border-border rounded-none h-full w-12 text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors","aria-label":"Open settings",onClick:()=>r("settings.app"),children:(0,u.jsx)(Bh,{className:"size-5"})})}),(0,u.jsx)(Ot,{children:(0,u.jsx)("p",{children:"Settings"})})]}),(0,u.jsxs)(Xo,{children:[(0,u.jsxs)(Dt,{children:[(0,u.jsx)(Rt,{asChild:!0,children:(0,u.jsx)(Zo,{asChild:!0,children:(0,u.jsx)(oe,{variant:"ghost",className:"border-r-0 border-y-0 border-l border-border rounded-none h-full w-12 text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors","aria-label":`Theme: ${e}, switch theme`,children:e==="light"?(0,u.jsx)($s,{className:"size-5"}):e==="dark"?(0,u.jsx)(Us,{className:"size-5"}):(0,u.jsx)(qs,{className:"size-5"})})})}),(0,u.jsx)(Ot,{children:(0,u.jsx)("p",{children:t?"Switch to light mode":"Switch to dark mode"})})]}),(0,u.jsxs)(Ko,{align:"end",children:[(0,u.jsxs)(Xe,{onClick:()=>n("light"),children:[(0,u.jsx)($s,{}),"Light",e==="light"&&(0,u.jsx)(Jr,{className:"ml-auto"})]}),(0,u.jsxs)(Xe,{onClick:()=>n("dark"),children:[(0,u.jsx)(Us,{}),"Dark",e==="dark"&&(0,u.jsx)(Jr,{className:"ml-auto"})]}),(0,u.jsxs)(Xe,{onClick:()=>n("system"),children:[(0,u.jsx)(qs,{}),"System",e==="system"&&(0,u.jsx)(Jr,{className:"ml-auto"})]})]})]}),(0,u.jsxs)(Dt,{children:[(0,u.jsx)(Rt,{asChild:!0,children:(0,u.jsx)(oe,{variant:"ghost",className:"border-r-0 border-y-0 border-l border-border rounded-none h-full w-12 text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors",asChild:!0,children:(0,u.jsx)("a",{href:Qs.SITE_GITHUB_NEW_ISSUE_LINK,target:"_blank",rel:"noopener noreferrer","aria-label":"Create a new GitHub issue",children:(0,u.jsx)(Mh,{className:"size-5"})})})}),(0,u.jsx)(Ot,{children:(0,u.jsx)("p",{children:"Report a bug"})})]}),(0,u.jsxs)(Dt,{children:[(0,u.jsx)(Rt,{asChild:!0,children:(0,u.jsx)(oe,{variant:"ghost",className:"border-r-0 border-y-0 border-l border-border rounded-none h-full w-12 text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors",asChild:!0,children:(0,u.jsx)("a",{href:Qs.SITE_GITHUB_LINK,target:"_blank",rel:"noopener noreferrer","aria-label":"View the db-studio GitHub repository",children:(0,u.jsx)(p_,{className:"size-5"})})})}),(0,u.jsx)(Ot,{children:(0,u.jsx)("p",{children:"View on GitHub"})})]})]})]})};function lh({...e}){return(0,u.jsx)(Qh,{"data-slot":"context-menu",...e})}function ch({className:e,...t}){return(0,u.jsx)(Zh,{"data-slot":"context-menu-trigger",className:te("select-none",e),...t})}function uh({className:e,...t}){return(0,u.jsx)(Jh,{children:(0,u.jsx)(td,{"data-slot":"context-menu-content",className:te("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-lg p-1 shadow-md ring-1 duration-100 z-50 max-h-(--radix-context-menu-content-available-height) origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto",e),...t})})}function Tt({className:e,inset:t,variant:n="default",...r}){return(0,u.jsx)(Xh,{"data-slot":"context-menu-item","data-inset":t,"data-variant":n,className:te("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 group/context-menu-item relative flex cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...r})}function Uo({className:e,...t}){return(0,u.jsx)(Vh,{"data-slot":"context-menu-separator",className:te("bg-border/50 -mx-1 my-1 h-px",e),...t})}var _i=({folderId:e,isExpanded:t,onToggle:n,count:r,name:i,showContextMenu:s=!1})=>{const a=Yn(),{deleteFolder:o,getQueriesByFolder:l,addQuery:h,updateFolder:m}=Br(),[d,f]=(0,E.useState)(!1),[p,g]=(0,E.useState)(""),[_,A]=(0,E.useState)(!1),b=(0,E.useCallback)(()=>{if(e){if(l(e).length>0){A(!0);return}o(e)}},[o,e,l]),v=(0,E.useCallback)(()=>{e&&(o(e),A(!1))},[o,e]),S=(0,E.useCallback)(()=>{const N=h(void 0,e);a({to:"/runner/$queryId",params:{queryId:N}})},[h,e,a]),L=(0,E.useCallback)(()=>{g(i),f(!0)},[i]),O=(0,E.useCallback)(()=>{e&&p.trim()&&(m(e,{name:p.trim()}),f(!1),g(""))},[e,p,m]);return(0,u.jsxs)(u.Fragment,{children:[s?(0,u.jsxs)(lh,{children:[(0,u.jsx)(ch,{asChild:!0,children:(0,u.jsxs)("button",{type:"button",onClick:n,className:te("w-full flex gap-2 px-4 py-2 text-sm transition-colors text-left","hover:bg-sidebar-accent/50 hover:text-sidebar-foreground focus:outline-none focus:bg-sidebar-accent focus:text-sidebar-accent-foreground","text-sidebar-foreground/70 items-center"),children:[(0,u.jsx)(zs,{className:te("size-4 transition-transform duration-200",t?"rotate-90":"")}),(0,u.jsx)("span",{className:"flex-1",children:i}),(0,u.jsx)(jn,{children:r})]})}),(0,u.jsxs)(uh,{children:[(0,u.jsxs)(Tt,{onClick:S,children:[(0,u.jsx)(tn,{className:"size-4"}),"Add a new query"]}),(0,u.jsxs)(Tt,{onClick:L,children:[(0,u.jsx)(es,{className:"size-4"}),"Rename folder"]}),(0,u.jsxs)(Tt,{onClick:b,children:[(0,u.jsx)(Ji,{className:"size-4"}),"Delete folder"]})]})]}):(0,u.jsxs)("button",{type:"button",onClick:n,className:te("w-full flex gap-2 px-4 py-2 text-sm transition-colors text-left","hover:bg-sidebar-accent/50 hover:text-sidebar-foreground focus:outline-none focus:bg-sidebar-accent focus:text-sidebar-accent-foreground","text-sidebar-foreground/70 items-center"),children:[(0,u.jsx)(zs,{className:te("size-4 transition-transform duration-200",t?"rotate-90":"")}),(0,u.jsx)("span",{className:"flex-1",children:i}),(0,u.jsx)(jn,{children:r})]}),(0,u.jsx)(Dn,{open:d,onOpenChange:f,children:(0,u.jsxs)(Mn,{children:[(0,u.jsxs)(Bn,{children:[(0,u.jsx)(On,{children:"Rename Folder"}),(0,u.jsx)(Fn,{children:"Enter a new name for this folder."})]}),(0,u.jsx)(xt,{value:p,onChange:N=>g(N.target.value),placeholder:"Folder name",onKeyDown:N=>{N.key==="Enter"&&O()},autoFocus:!0}),(0,u.jsxs)(Pn,{children:[(0,u.jsx)(oe,{variant:"outline",onClick:()=>{f(!1),g("")},children:"Cancel"}),(0,u.jsx)(oe,{onClick:O,disabled:!p.trim(),children:"Rename"})]})]})}),(0,u.jsx)(Ld,{open:_,onOpenChange:A,children:(0,u.jsxs)(Bd,{children:[(0,u.jsxs)(Nd,{children:[(0,u.jsx)(jd,{children:"Delete Folder"}),(0,u.jsxs)(Dd,{children:["This folder contains ",r," ",r===1?"query":"queries",". Deleting this folder will also delete all queries inside it. This action cannot be undone."]})]}),(0,u.jsxs)(Od,{children:[(0,u.jsx)(Fd,{children:"Cancel"}),(0,u.jsx)(Rd,{onClick:v,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete Folder"})]})]})})]})},Er=({id:e,tableName:t,isNested:n=!1,showContextMenu:r=!0})=>{const i=Yn(),{deleteQuery:s,addQuery:a,getQuery:o,toggleFavorite:l,updateQuery:h,moveQuery:m,folders:d,addFolder:f}=Br(),{queryId:p}=qo({strict:!1}),g=p===e,_=o(e),A=_?.isFavorite??!1,[b,v]=(0,E.useState)(!1),[S,L]=(0,E.useState)(""),[O,N]=(0,E.useState)(!1),[B,z]=(0,E.useState)(void 0),[Y,I]=(0,E.useState)(!1),[j,q]=(0,E.useState)(""),V=(0,E.useCallback)(()=>{i({to:"/runner/$queryId",params:{queryId:e}})},[i,e]),J=(0,E.useCallback)(()=>{s(e),p===e&&i({to:"/runner"}),Ze.success("Query deleted successfully")},[s,e,i,p]),G=(0,E.useCallback)(()=>{const K=o(e),C=a(`${K?.name} (Copy)`);i({to:"/runner/$queryId",params:{queryId:C}}),Ze.success("Query duplicated successfully")},[a,o,i,e]),U=(0,E.useCallback)(()=>{l(e),Ze.success("Query favorited successfully")},[l,e]),P=(0,E.useCallback)(()=>{L(_?.name??""),v(!0)},[_?.name]),W=(0,E.useCallback)(()=>{S.trim()&&(h(e,{name:S.trim()}),v(!1),L(""),Ze.success("Query renamed successfully"))},[e,S,h]),Z=(0,E.useCallback)(()=>{z(_?.folderId),I(!1),q(""),N(!0)},[_?.folderId]),y=(0,E.useCallback)(K=>{K==="__create_new__"?(I(!0),z(void 0)):(I(!1),z(K==="__none__"?void 0:K))},[]),ce=(0,E.useCallback)(()=>{if(Y&&j.trim()){const K=Math.random().toString(36).substring(2,15);f({id:K,name:j.trim(),isExpanded:!0,isFavorite:!1}),m(e,K),Ze.success("Query moved to new folder successfully")}else Y||(m(e,B),Ze.success("Query moved to selected folder successfully"));N(!1),I(!1),q(""),z(void 0)},[Y,j,B,e,f,m]);return(0,u.jsxs)("li",{className:"relative",children:[r?(0,u.jsxs)(lh,{children:[(0,u.jsx)(ch,{asChild:!0,children:(0,u.jsxs)("button",{type:"button",onClick:V,className:te("w-full flex gap-2 py-2 text-sm transition-colors text-left justify-start items-center focus:outline-none",g?"text-sidebar-accent-foreground bg-sidebar-accent font-medium":"text-sidebar-foreground/70 hover:text-sidebar-foreground hover:bg-sidebar-accent/50 focus:bg-sidebar-accent focus:text-sidebar-accent-foreground",n?"px-4 pl-12":"px-4"),children:[g&&(0,u.jsx)("span",{className:"absolute left-0 top-0 bottom-0 w-1 bg-primary"}),(0,u.jsx)("span",{className:"flex-1",children:t})]})}),(0,u.jsxs)(uh,{children:[(0,u.jsxs)(Tt,{onClick:P,children:[(0,u.jsx)(es,{className:"size-4"}),"Rename query"]}),(0,u.jsxs)(Tt,{onClick:G,children:[(0,u.jsx)(_h,{className:"size-4"}),"Duplicate query"]}),(0,u.jsxs)(Tt,{onClick:U,children:[(0,u.jsx)(jh,{className:A?"size-4 fill-current":"size-4"}),A?"Remove from favorites":"Add to favorites"]}),(0,u.jsx)(Uo,{}),(0,u.jsxs)(Tt,{onClick:Z,children:[(0,u.jsx)(Nh,{className:"size-4"}),"Move to folder"]}),(0,u.jsx)(Uo,{}),(0,u.jsxs)(Tt,{onClick:J,children:[(0,u.jsx)(Ji,{className:"size-4"}),"Delete query"]})]})]}):(0,u.jsxs)("button",{type:"button",onClick:V,className:te("w-full flex gap-2 py-2 text-sm transition-colors text-left justify-start items-center focus:outline-none",g?"text-sidebar-accent-foreground bg-sidebar-accent font-medium":"text-sidebar-foreground/70 hover:text-sidebar-foreground hover:bg-sidebar-accent/50 focus:bg-sidebar-accent focus:text-sidebar-accent-foreground",n?"px-4 pl-12":"px-4"),children:[g&&(0,u.jsx)("span",{className:"absolute left-0 top-0 bottom-0 w-1 bg-primary"}),(0,u.jsx)("span",{className:"flex-1",children:t})]}),(0,u.jsx)(Dn,{open:b,onOpenChange:v,children:(0,u.jsxs)(Mn,{children:[(0,u.jsxs)(Bn,{children:[(0,u.jsx)(On,{children:"Rename Query"}),(0,u.jsx)(Fn,{children:"Enter a new name for this query."})]}),(0,u.jsx)(xt,{value:S,onChange:K=>L(K.target.value),placeholder:"Query name",onKeyDown:K=>{K.key==="Enter"&&W()},autoFocus:!0}),(0,u.jsxs)(Pn,{children:[(0,u.jsx)(oe,{variant:"outline",onClick:()=>{v(!1),L("")},children:"Cancel"}),(0,u.jsx)(oe,{onClick:W,disabled:!S.trim(),children:"Rename"})]})]})}),(0,u.jsx)(Dn,{open:O,onOpenChange:K=>{N(K),K||(I(!1),q(""),z(void 0))},children:(0,u.jsxs)(Mn,{children:[(0,u.jsxs)(Bn,{children:[(0,u.jsx)(On,{children:"Move to Folder"}),(0,u.jsx)(Fn,{children:"Select a folder to move this query to."})]}),(0,u.jsx)("div",{className:"space-y-4",children:Y?(0,u.jsx)(xt,{value:j,onChange:K=>q(K.target.value),placeholder:"Folder name",onKeyDown:K=>{K.key==="Enter"&&j.trim()&&ce(),K.key==="Escape"&&(I(!1),q(""))},autoFocus:!0}):(0,u.jsxs)(Wn,{value:B??"__none__",onValueChange:y,children:[(0,u.jsx)(Qn,{className:"w-full",children:(0,u.jsx)(Vn,{placeholder:"Select a folder"})}),(0,u.jsxs)(Gn,{children:[(0,u.jsx)(ut,{value:"__none__",children:"No folder"}),d.map(K=>(0,u.jsx)(ut,{value:K.id,children:K.name},K.id)),(0,u.jsx)(ut,{value:"__create_new__",children:(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsx)(Vo,{className:"size-4"}),"Create a new folder"]})})]})]})}),(0,u.jsxs)(Pn,{children:[(0,u.jsx)(oe,{variant:"outline",onClick:()=>{N(!1),I(!1),q(""),z(void 0)},children:"Cancel"}),(0,u.jsx)(oe,{onClick:ce,disabled:Y&&!j.trim(),children:Y?"Create & Move":"Move"})]})]})})]})},tv=()=>{const[e]=et(ct.SIDEBAR_SEARCH,{defaultValue:""}),{folders:t,queries:n,getFavoriteQueries:r,getQueriesByFolder:i,toggleFolder:s}=Br(),[a,o]=(0,E.useState)(!0),[l,h]=(0,E.useState)(!0),m=n.filter(g=>!g.isFavorite).length,d=r(),f=d.length,p=n.filter(g=>!g.folderId&&!g.isFavorite);if(e){const g=n.filter(_=>_.name.toLowerCase().includes(e.toLowerCase()));return g.length===0?(0,u.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:"No queries found matching"}):(0,u.jsx)("div",{className:"flex-1 overflow-y-auto",children:g.map(_=>(0,u.jsx)(Er,{id:_.id,tableName:_.name},_.id))})}return(0,u.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[(0,u.jsx)(_i,{name:"Favorites",isExpanded:a,onToggle:()=>o(!a),count:f}),a&&d.map(g=>(0,u.jsx)(Er,{id:g.id,tableName:g.name},g.id)),(0,u.jsx)(vd,{className:"bg-sidebar-border"}),(0,u.jsx)(_i,{name:"Queries",isExpanded:l,onToggle:()=>h(!l),count:m}),l&&(0,u.jsxs)(u.Fragment,{children:[t.map(g=>{const _=i(g.id),A=_.length;return(0,u.jsxs)("div",{children:[(0,u.jsx)(_i,{folderId:g.id,name:g.name,isExpanded:g.isExpanded,onToggle:()=>s(g.id),count:A,showContextMenu:!0}),g.isExpanded&&_.map(b=>(0,u.jsx)(Er,{id:b.id,tableName:b.name,isNested:!0,showContextMenu:!0},b.id))]},g.id)}),p.map(g=>(0,u.jsx)(Er,{id:g.id,tableName:g.name,showContextMenu:!0},g.id))]})]})},nv=()=>{const{addQuery:e,addFolder:t}=Br(),n=Yn(),r=(0,E.useRef)(null),[i,s]=et(ct.SIDEBAR_SEARCH,{defaultValue:""}),a=h=>{s(h.target.value)},o=()=>{const h=e();n({to:"/runner/$queryId",params:{queryId:h}})},l=()=>{const h=Math.random().toString(36).substring(2,15);t({id:h,name:"New Folder",isExpanded:!0,isFavorite:!1})};return(0,u.jsxs)("div",{className:"p-3 space-y-2 border-b border-sidebar-border",children:[(0,u.jsxs)("div",{className:"flex gap-2",children:[(0,u.jsxs)(oe,{className:"flex-1 justify-start h-8",onClick:o,children:[(0,u.jsx)(tn,{className:"size-4"}),"Add Query"]}),(0,u.jsxs)(oe,{className:"flex-1 justify-start h-8",onClick:l,children:[(0,u.jsx)(Vo,{className:"size-4"}),"Add Folder"]})]}),(0,u.jsxs)("div",{className:"relative",children:[(0,u.jsx)(ts,{className:"absolute left-2 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),(0,u.jsx)(xt,{ref:r,placeholder:"Search queries",value:i??"",onChange:a,className:"rounded-sm h-8 pl-8 pr-8"}),(0,u.jsx)(jn,{className:"absolute right-2 top-1/2 -translate-y-1/2 text-xs",children:"/"})]})]})},rv=()=>(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(nv,{}),(0,u.jsx)(tv,{})]}),iv=()=>{const{selectedDatabase:e}=nt(),{mutateAsync:t,isPending:n}=fh({mutationFn:async i=>{const s=(await od(i,e)).data.data.schema;return await navigator.clipboard.writeText(s),s}});return{copyTableSchema:async i=>Ze.promise(t(i),{loading:"Copying table schema...",success:"Table schema copied to clipboard",error:s=>s.message||"Failed to copy table schema"}),isCopyingSchema:n}},sv=({tableName:e})=>{const t=Yn(),{copyTableSchema:n,isCopyingSchema:r}=iv(),{exportFile:i,isExportingFile:s}=Md(),{deleteTable:a,forceDeleteTable:o,isDeletingTable:l}=yd(),[h,m]=(0,E.useState)(!1),[d,f]=(0,E.useState)(!1),[p,g]=(0,E.useState)([]),_=()=>{navigator.clipboard.writeText(e),Ze.success("Table name copied to clipboard")},A=async()=>{const S=await a(e);S.fkViolation?(g(S.relatedRecords),m(!1),f(!0)):(m(!1),t({to:"/"}))},b=async()=>{await o(e),f(!1),t({to:"/"})},v=()=>{f(!1),g([])};return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(Xo,{children:[(0,u.jsx)(Zo,{children:(0,u.jsx)(oe,{variant:"ghost",size:"icon-sm",children:(0,u.jsx)(vh,{})})}),(0,u.jsx)(Ko,{className:"w-56",align:"start",children:(0,u.jsxs)(md,{children:[(0,u.jsxs)(Xe,{onClick:_,children:[(0,u.jsx)(Ah,{className:"size-4"}),"Copy name"]}),(0,u.jsxs)(Xe,{onClick:()=>n(e),disabled:r,children:[(0,u.jsx)(Ch,{className:"size-4"}),"Copy table schema"]}),(0,u.jsx)(Vs,{}),(0,u.jsxs)(Xe,{onClick:()=>t({to:"/schema/$table",params:{table:e}}),children:[(0,u.jsx)(es,{className:"size-4"}),"Edit table"]}),(0,u.jsxs)(Td,{children:[(0,u.jsxs)(dd,{children:[(0,u.jsx)(Sh,{className:"size-4"}),"Export data"]}),(0,u.jsxs)(hd,{children:[(0,u.jsx)(Xe,{onClick:()=>i({tableName:e,format:"csv"}),disabled:s,children:"Export as CSV"}),(0,u.jsx)(Xe,{onClick:()=>i({tableName:e,format:"json"}),disabled:s,children:"Export as JSON"}),(0,u.jsx)(Xe,{onClick:()=>i({tableName:e,format:"xlsx"}),disabled:s,children:"Export as Excel"})]})]}),(0,u.jsx)(Vs,{}),(0,u.jsxs)(Xe,{variant:"destructive",onClick:()=>m(!0),children:[(0,u.jsx)(Ji,{className:"size-4"}),"Delete table"]})]})})]}),(0,u.jsx)(av,{isOpen:h,onOpenChange:m,tableName:e,onDelete:A,isDeleting:l}),(0,u.jsx)(ov,{isOpen:d,onOpenChange:f,tableName:e,relatedRecords:p,onForceDelete:b,onCancel:v,isDeleting:l})]})},av=({isOpen:e,onOpenChange:t,tableName:n,onDelete:r,isDeleting:i})=>(0,u.jsx)(Dn,{open:e,onOpenChange:t,children:(0,u.jsxs)(Mn,{className:"max-w-md",children:[(0,u.jsxs)(Bn,{children:[(0,u.jsx)(On,{children:"Delete Table"}),(0,u.jsxs)(Fn,{children:["Are you sure you want to delete the table"," ",(0,u.jsxs)("span",{className:"font-semibold text-foreground",children:['"',n,'"']}),"? This action cannot be undone and all data will be permanently lost."]})]}),(0,u.jsxs)(Pn,{className:"gap-2",children:[(0,u.jsx)(oe,{variant:"outline",onClick:()=>t(!1),disabled:i,children:"Cancel"}),(0,u.jsx)(oe,{variant:"destructive",onClick:r,disabled:i,children:i?"Deleting...":"Delete Table"})]})]})}),ov=({isOpen:e,onOpenChange:t,tableName:n,relatedRecords:r,onForceDelete:i,onCancel:s,isDeleting:a})=>(0,u.jsx)(Dn,{open:e,onOpenChange:t,children:(0,u.jsxs)(Mn,{className:"max-w-xl! max-h-[calc(100vh-1rem)]!",children:[(0,u.jsxs)(Bn,{children:[(0,u.jsx)(On,{children:"Cannot Delete - Foreign Key Constraint"}),(0,u.jsxs)(Fn,{children:["The table ",(0,u.jsxs)("span",{className:"font-semibold text-foreground",children:['"',n,'"']})," ","cannot be deleted because it is referenced by records in other tables. You can either cancel the operation or force delete, which will also delete all related records."]})]}),(0,u.jsx)("div",{className:"space-y-4 max-h-64 overflow-y-auto",children:r.map((o,l)=>(0,u.jsxs)("div",{className:"border border-border rounded-md p-3",children:[(0,u.jsxs)("div",{className:"font-medium text-sm mb-2",children:["Table: ",(0,u.jsx)("span",{className:"text-primary",children:o.tableName}),(0,u.jsxs)("span",{className:"text-muted-foreground ml-2",children:["(",o.records.length," record",o.records.length!==1?"s":"",")"]})]}),(0,u.jsxs)("div",{className:"text-xs text-muted-foreground mb-2",children:["References column: ",o.columnName]}),(0,u.jsx)("div",{className:"bg-muted rounded p-2 text-xs overflow-x-auto",children:(0,u.jsxs)("pre",{className:"whitespace-pre-wrap",children:[JSON.stringify(o.records.slice(0,5),null,2),o.records.length>5&&(0,u.jsxs)("div",{className:"text-muted-foreground mt-2",children:["... and ",o.records.length-5," more"]})]})})]},`${o.tableName}-${o.columnName}-${l}`))}),(0,u.jsxs)(Pn,{className:"gap-2",children:[(0,u.jsx)(oe,{variant:"outline",onClick:s,disabled:a,children:"Cancel"}),(0,u.jsx)(oe,{variant:"destructive",onClick:i,disabled:a,children:a?"Deleting...":"Force Delete All"})]})]})}),lv=({tableName:e,rowCount:t,schemaName:n})=>{const r=qo({strict:!1}),{pathname:i}=Pr(),s=r.table===e,a=i.startsWith("/schema")?"/schema/$table":"/table/$table";return(0,u.jsx)("li",{className:"relative",children:(0,u.jsxs)($o,{to:a,params:{table:e},className:te("w-full flex gap-0.5 px-4 py-1.5 text-sm transition-colors text-left justify-start items-center focus:outline-none",s?"text-sidebar-accent-foreground bg-sidebar-accent font-medium":"text-sidebar-foreground/70 hover:text-sidebar-foreground hover:bg-sidebar-accent/50 focus:bg-sidebar-accent focus:text-sidebar-accent-foreground"),children:[s&&(0,u.jsx)("span",{className:"absolute left-0 top-0 bottom-0 w-1 bg-primary"}),(0,u.jsxs)("span",{className:"flex-1 truncate",children:[n&&n!=="public"?`${n}.`:"",e]}),(0,u.jsxs)("div",{className:"flex items-center gap-1 h-5",children:[s&&(0,u.jsx)(sv,{tableName:e}),(0,u.jsx)(jn,{children:t})]})]})})},cv=()=>{const[e]=et(ct.SIDEBAR_SEARCH,{defaultValue:""}),[t,n]=et(ct.ACTIVE_SCHEMA,{defaultValue:"all"}),{dbType:r}=nt(),{tablesList:i=[],isLoadingTablesList:s,errorTablesList:a}=tl(),o=(0,E.useMemo)(()=>Array.from(new Set(i.reduce((m,d)=>(d.schemaName&&m.push(d.schemaName),m),[]))).sort(),[i]),l=r==="pg"&&o.length>1,h=i?.filter(m=>{const d=t==="all"||m.schemaName===t,f=m.tableName.toLowerCase().includes(e.toLowerCase());return d&&f});return(0,E.useEffect)(()=>{!l||t==="all"||o.includes(t)||n("all")},[o,t,n,l]),s?(0,u.jsx)("div",{className:"flex-1 h-full overflow-y-auto pb-3 flex items-center justify-center",children:(0,u.jsx)(id,{size:"size-6"})}):a?(0,u.jsxs)("div",{className:"flex-1 overflow-y-auto pb-3 h-full flex items-center justify-center",children:["Error: ",a.message]}):(0,u.jsx)("div",{className:"flex-1 overflow-y-auto pb-3",children:h&&h.length>0?(0,u.jsx)("ul",{children:h?.map(m=>(0,u.jsx)(lv,{schemaName:m.schemaName,tableName:m.tableName,rowCount:m.rowCount},m.schemaName?`${m.schemaName}.${m.tableName}`:m.tableName))}):e?(0,u.jsx)("div",{className:"flex-1 overflow-y-auto pb-3 h-full flex items-center justify-center",children:"No tables found matching"}):(0,u.jsx)("div",{className:"flex-1 overflow-y-auto pb-3 h-full flex items-center justify-center",children:"No tables available"})})},uv=()=>{const e=(0,E.useRef)(null),[t,n]=et(ct.SIDEBAR_SEARCH,{defaultValue:""}),{openOverlay:r}=Ht(),{dbType:i}=nt();return Cd("/",s=>{s.preventDefault(),e.current&&e.current.focus()},{preventDefault:!0}),(0,u.jsx)("div",{className:"px-3 pb-3 pt-2 space-y-2",children:(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,u.jsx)(ts,{className:"absolute left-2 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),(0,u.jsx)(xt,{ref:e,variant:"outline",placeholder:"Search tables",value:t??"",onChange:s=>n(s.target.value.trim()),className:"rounded-sm h-8 pl-8 pr-8"}),(0,u.jsx)(jn,{className:"absolute right-2 top-1/2 -translate-y-1/2 text-xs",children:"/"})]}),i!=="mongodb"&&(0,u.jsx)(oe,{size:"icon-lg",className:"shrink-0 rounded-sm",onClick:()=>r("table-builder.create-table"),"aria-label":"Add table",children:(0,u.jsx)(tn,{className:"size-4"})})]})})},hv=()=>{const[e,t]=et(ct.ACTIVE_SCHEMA,{defaultValue:"all"}),{dbType:n}=nt(),{tablesList:r=[]}=tl(),i=(0,E.useMemo)(()=>Array.from(new Set(r.reduce((s,a)=>(a.schemaName&&s.push(a.schemaName),s),[]))).sort(),[r]);return n==="pg"&&i.length>1?(0,u.jsx)("div",{className:"px-3 pt-3",children:(0,u.jsxs)(Wn,{value:e,onValueChange:t,children:[(0,u.jsx)(Qn,{variant:"outline",className:"h-8! w-full justify-between rounded-sm",children:(0,u.jsx)(Vn,{placeholder:"Select schema"})}),(0,u.jsxs)(Gn,{children:[(0,u.jsx)(ut,{value:"all",children:"All schemas"}),i.map(s=>(0,u.jsx)(ut,{value:s,children:s},s))]})]})}):null},zo=()=>(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(hv,{}),(0,u.jsx)(uv,{}),(0,u.jsx)(nl,{className:"flex-1 overflow-y-auto pb-3 block h-full w-full",children:(0,u.jsx)(cv,{})})]});function dv(){const{databases:e,isLoadingDatabases:t,refetchDatabases:n,isRefetchingDatabases:r}=Sd(),{connectionInfo:i,isLoadingConnectionInfo:s}=Pd(),{selectedDatabase:a,setSelectedDatabase:o,dbType:l}=nt(),h=Yn(),[m,d]=(0,E.useState)(!1),f=g=>{o(g),h({to:l==="redis"?"/browser":"/table",search:{}})},p=async()=>{await n(),Ze.success("Databases refreshed")};return(0,u.jsx)("div",{className:"mt-auto border-t border-sidebar-border bg-sidebar text-sidebar-foreground",children:(0,u.jsxs)("div",{className:"p-4 space-y-2",children:[(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)("div",{className:"flex items-center justify-between",children:[(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsx)(kh,{className:"size-4 text-muted-foreground"}),(0,u.jsx)("span",{className:"text-sm font-medium",children:"Database"})]}),(0,u.jsxs)(Dt,{children:[(0,u.jsx)(Rt,{asChild:!0,children:(0,u.jsx)(oe,{variant:"ghost",size:"icon",className:"size-6 hover:bg-accent",onClick:p,disabled:t||r,children:(0,u.jsx)(Wo,{className:te("size-3.5",(t||r)&&"animate-spin")})})}),(0,u.jsx)(Ot,{children:"Refresh databases"})]})]}),(0,u.jsxs)(Wn,{value:a||"",onValueChange:f,children:[(0,u.jsx)(Qn,{className:"h-9 text-xs font-mono w-full",disabled:t||r,children:(0,u.jsx)(Vn,{placeholder:"Select database..."})}),(0,u.jsx)(Gn,{children:e?.map(g=>(0,u.jsx)(ut,{value:g.name,className:"font-mono text-xs",children:g.name},g.name))})]})]}),(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)(oe,{variant:"ghost",className:"w-full hover:bg-accent flex items-center justify-between",onClick:()=>d(!m),disabled:s||r,children:[(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsx)("div",{className:"flex items-center justify-center",children:(0,u.jsxs)("div",{className:"relative flex size-2",children:[(0,u.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),(0,u.jsx)("span",{className:"relative inline-flex rounded-full size-2 bg-green-500"})]})}),(0,u.jsx)("span",{className:"text-xs font-medium text-green-600",children:"Connected"})]}),(0,u.jsx)(Yo,{className:te("size-3 text-muted-foreground transition-transform",m&&"rotate-180")})]}),m&&i&&(0,u.jsxs)("div",{className:"space-y-1.5 p-2 rounded-md bg-muted/30",children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)("span",{className:"text-xs text-muted-foreground",children:"Host"}),(0,u.jsxs)("span",{className:"text-xs font-mono text-foreground",children:[i.host,":",i.port]})]}),(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)("span",{className:"text-xs text-muted-foreground",children:"User"}),(0,u.jsx)("span",{className:"text-xs font-mono text-foreground",children:i.user})]}),(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)("span",{className:"text-xs text-muted-foreground",children:"Databases"}),(0,u.jsx)("span",{className:"text-xs font-mono font-medium text-foreground",children:e?.length||0})]})]})]})]})})}var mv=()=>{const{sidebar:{isPinned:e},toggleSidebarPinned:t}=Mr();return(0,u.jsx)("div",{className:"flex items-center justify-between h-9 border-b border-sidebar-border",children:(0,u.jsx)(oe,{variant:"ghost",size:"lg",onClick:t,className:"size-9 flex items-center justify-center transition hover:bg-transparent! focus-visible:ring-0 focus-visible:ring-offset-0",title:e?"Unpin sidebar":"Pin sidebar",children:e?(0,u.jsx)($h,{className:"size-4"}):(0,u.jsx)(Uh,{className:"size-4"})})})},fv=({children:e})=>{const{sidebar:{width:t,isOpen:n,isPinned:r},setSidebarWidth:i,setSidebarOpen:s}=Mr(),a=(0,E.useRef)(!1),o=(0,E.useRef)(0),l=(0,E.useRef)(0),h=(0,E.useRef)(null),m=(0,E.useRef)(null),d=(0,E.useRef)(B=>{}),f=(0,E.useRef)(()=>{}),p=(0,E.useRef)(B=>{}),g=(0,E.useRef)(()=>{}),_=(0,E.useRef)(()=>{}),A=(0,E.useCallback)(B=>{a.current&&requestAnimationFrame(()=>{const z=B.clientX-o.current,Y=l.current+z;i(Y)})},[i]),b=(0,E.useCallback)(()=>{a.current=!1,Object.assign(document.body.style,{cursor:"",userSelect:""});const B=document.getElementById("resize-overlay");B&&B.remove()},[]),v=(0,E.useCallback)(B=>{B.preventDefault(),a.current=!0,o.current=B.clientX,l.current=t,Object.assign(document.body.style,{cursor:"col-resize",userSelect:"none"});const z=document.createElement("div");z.id="resize-overlay",z.style.cssText="position:fixed;inset:0;z-index:9999;cursor:col-resize;",document.body.appendChild(z)},[t]),S=(0,E.useCallback)(()=>{r||s(!0)},[r,s]),L=(0,E.useCallback)(()=>{r||s(!1)},[r,s]),O=(0,E.useCallback)(B=>{r||n||a.current||(B.clientX<=ct.HOVER_ZONE?(h.current&&clearTimeout(h.current),h.current=window.setTimeout(()=>{s(!0)},ct.HOVER_DELAY)):B.clientX>ct.HOVER_ZONE+50&&h.current&&clearTimeout(h.current))},[r,n,s]);d.current=A,f.current=b,p.current=O,g.current=S,_.current=L;const N=B=>{r||s(B)};return(0,E.useEffect)(()=>{const B=I=>d.current(I),z=()=>f.current(),Y=I=>p.current(I);return document.addEventListener("mousemove",B),document.addEventListener("mouseup",z),document.addEventListener("mousemove",Y),()=>{document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",z),document.removeEventListener("mousemove",Y),h.current&&clearTimeout(h.current)}},[]),(0,E.useEffect)(()=>{const B=m.current;if(!B)return;const z=()=>g.current(),Y=()=>_.current();return B.addEventListener("mouseenter",z),B.addEventListener("mouseleave",Y),()=>{B.removeEventListener("mouseenter",z),B.removeEventListener("mouseleave",Y)}},[]),(0,u.jsxs)(kd,{open:n,onOpenChange:N,modal:!1,children:[(0,u.jsx)(pd,{className:"sr-only",children:"Open Sidebar"}),(0,u.jsx)(fd,{ref:m,side:"left",showCloseButton:!1,isPinned:r,className:te("bg-sidebar border-r border-sidebar-border text-sidebar-foreground p-0","transition-transform duration-300 ease-out"),style:{width:`${t}px`},onOpenAutoFocus:B=>B.preventDefault(),children:(0,u.jsxs)("div",{className:"relative h-full flex flex-col",children:[e,(0,u.jsx)("div",{role:"button",tabIndex:0,onMouseDown:v,className:te("absolute top-0 right-0 w-2 h-full cursor-col-resize z-50","hover:bg-blue-500/50 transition-colors group"),title:"Drag to resize",children:(0,u.jsx)("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-2 h-12 bg-blue-500 opacity-0 group-hover:opacity-100 transition-opacity rounded-full"})})]})})]})},pv=["string","hash","list","set","zset","stream"],It=Ud(""),gv=()=>{const{closeOverlay:e,isOverlayOpen:t}=Ht(),[n,r]=(0,E.useState)(It),[i,s]=(0,E.useState)("string"),[a,o]=(0,E.useState)(It),[l,h]=(0,E.useState)(It),[m,d]=(0,E.useState)("0"),[f,p]=(0,E.useState)(""),{createKey:g,isPending:_}=zd(),A=t("redis-browser.create-key"),b=i==="hash"||i==="stream",v=n===null||a===null||b&&l===null,S=async()=>{const L=b?l:It;if(n===null||a===null||L===null)return;let O;switch(i){case"string":O={kind:"string",value:a};break;case"hash":O={kind:"hash",entries:[{field:a,value:L}]};break;case"list":O={kind:"list",entries:[a]};break;case"set":O={kind:"set",members:[a]};break;case"zset":O={kind:"zset",entries:[{member:a,score:Number(m)}]};break;case"stream":O={kind:"stream",id:"*",fields:[{field:a,value:L}]}}await g({key:n,type:i,value:O,ttlMs:f?Number(f)*1e3:null}),r(It),s("string"),o(It),h(It),d("0"),p(""),e("redis-browser.create-key")};return(0,u.jsxs)(Jo,{title:"Create Redis key",description:"Creates the key atomically and never overwrites an existing key.",open:A,onOpenChange:L=>{L||e("redis-browser.create-key")},size:"sm:max-w-md!",headerClassName:"border-b border-border p-4",titleClassName:"text-sm font-medium",contentClassName:"space-y-4 px-4 py-4",children:[(0,u.jsxs)(wd,{className:"gap-4",children:[(0,u.jsxs)(Gt,{children:[(0,u.jsx)(Qt,{htmlFor:"redis-key-name",children:"Key"}),(0,u.jsx)(ei,{id:"redis-key-name",value:n,onChange:r,className:"h-8",placeholder:"cache:user:42"}),(0,u.jsx)(Ws,{children:"Text, hexadecimal, and Base64 keys are supported."})]}),(0,u.jsxs)(Gt,{children:[(0,u.jsx)(Qt,{htmlFor:"redis-key-type",children:"Type"}),(0,u.jsxs)(Wn,{value:i,onValueChange:L=>s(L),children:[(0,u.jsx)(Qn,{id:"redis-key-type",className:"h-8!",children:(0,u.jsx)(Vn,{})}),(0,u.jsx)(Gn,{children:pv.map(L=>(0,u.jsx)(ut,{value:L,children:L},L))})]})]}),(0,u.jsxs)(Gt,{children:[(0,u.jsx)(Qt,{htmlFor:"redis-key-first-value",children:i==="hash"||i==="stream"?"Initial field":i==="zset"?"Initial member":"Initial value"}),(0,u.jsx)(ei,{id:"redis-key-first-value",value:a,onChange:o})]}),(i==="hash"||i==="stream")&&(0,u.jsxs)(Gt,{children:[(0,u.jsx)(Qt,{htmlFor:"redis-key-second-value",children:"Initial value"}),(0,u.jsx)(ei,{id:"redis-key-second-value",value:l,onChange:h})]}),i==="zset"&&(0,u.jsxs)(Gt,{children:[(0,u.jsx)(Qt,{htmlFor:"redis-key-score",children:"Score"}),(0,u.jsx)(xt,{id:"redis-key-score",type:"number",value:m,onChange:L=>d(L.target.value),className:"font-mono"})]}),(0,u.jsxs)(Gt,{children:[(0,u.jsx)(Qt,{htmlFor:"redis-key-ttl",children:"TTL in seconds"}),(0,u.jsx)(xt,{id:"redis-key-ttl",type:"number",min:1,value:f,onChange:L=>p(L.target.value),placeholder:"Persistent",className:"font-mono h-8"}),(0,u.jsx)(Ws,{children:"Leave empty to create a persistent key."})]})]}),(0,u.jsxs)("div",{className:"flex justify-end gap-2 border-t border-border pt-4",children:[(0,u.jsx)(oe,{variant:"outline",onClick:()=>e("redis-browser.create-key"),children:"Cancel"}),(0,u.jsx)(oe,{disabled:_||v,onClick:S,children:"Create key"})]})]})},Ev=["string","hash","list","set","zset","stream"],Tv={string:"STR",hash:"HASH",list:"LIST",set:"SET",zset:"ZSET",stream:"XSTR"},bv=e=>e===-1?"∞":e<0?"gone":e<1e3?`${e}ms`:e<6e4?`${Math.ceil(e/1e3)}s`:e<36e5?`${Math.ceil(e/6e4)}m`:`${Math.ceil(e/36e5)}h`,xv=e=>e===null?"—":e<1024?`${e} B`:`${(e/1024).toFixed(1)} KiB`,kv=(e,t)=>t!==void 0?t||"(empty key)":`0x${Array.from($d(e),n=>n.toString(16).padStart(2,"0")).join("")}`,yv=()=>{const{openOverlay:e}=Ht(),[t,n]=et("key"),[r,i]=et("search",{defaultValue:""}),[s,a]=(0,E.useState)(r),[o,l]=et("type",{defaultValue:""}),[h,m]=et("glob",{defaultValue:"false"}),d=h==="true",f=qd({search:s,type:o,exactPattern:d}),p=(0,E.useMemo)(()=>f.data?.pages.flatMap(b=>b.keys)??[],[f.data]),g=(0,E.useRef)(null),_=Th({count:p.length,getScrollElement:()=>g.current,estimateSize:()=>33,overscan:10}),A=_.getVirtualItems();return(0,E.useEffect)(()=>{const b=window.setTimeout(()=>a(r),250);return()=>window.clearTimeout(b)},[r]),(0,E.useEffect)(()=>{const b=A.at(-1);b&&b.index>=p.length-5&&f.hasNextPage&&!f.isFetchingNextPage&&f.fetchNextPage()},[A,p.length,f.hasNextPage,f.isFetchingNextPage,f.fetchNextPage]),(0,u.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col bg-background font-mono",children:[(0,u.jsxs)("div",{children:[(0,u.jsxs)("div",{className:"space-y-2 px-3 pb-3 pt-2",children:[(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,u.jsx)(ts,{className:"absolute left-2 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),(0,u.jsx)(xt,{variant:"outline",value:r,onChange:b=>i(b.target.value),placeholder:d?"Redis glob pattern":"Find keys","aria-label":"Find Redis keys",className:"h-8 rounded-sm pl-8"})]}),(0,u.jsx)(oe,{variant:"outline",size:"icon-lg",className:"shrink-0 rounded-sm",onClick:()=>Ze.promise(f.refetch({throwOnError:!0}),{loading:"Refreshing Redis keys...",success:"Redis keys refreshed",error:"Failed to refresh Redis keys"}),disabled:f.isFetching,"aria-label":"Refresh Redis keys",children:(0,u.jsx)(Wo,{className:te(f.isFetching&&"animate-spin")})}),(0,u.jsx)(oe,{size:"icon-lg",className:"shrink-0 rounded-sm",onClick:()=>e("redis-browser.create-key"),"aria-label":"Create Redis key",children:(0,u.jsx)(tn,{})})]}),(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsxs)(Wn,{value:o||"all",onValueChange:b=>l(b==="all"?"":b),children:[(0,u.jsx)(Qn,{variant:"outline","aria-label":"Filter Redis key type",className:"h-8! min-w-0 flex-1 justify-between rounded-sm",children:(0,u.jsx)(Vn,{})}),(0,u.jsxs)(Gn,{children:[(0,u.jsx)(ut,{value:"all",children:"All types"}),Ev.map(b=>(0,u.jsx)(ut,{value:b,children:b},b))]})]}),(0,u.jsxs)(_d,{variant:"outline",size:"lg",pressed:d,onPressedChange:b=>m(b?"true":"false"),className:"shrink-0 rounded-sm px-2 text-xs/relaxed uppercase","aria-label":"Use Redis glob pattern",children:[(0,u.jsx)(Oh,{className:"size-4"})," Glob"]})]})]}),(0,u.jsxs)("div",{className:"flex h-6 items-center justify-between px-4 text-[9px] uppercase tracking-wider text-muted-foreground",children:[(0,u.jsxs)("span",{children:[p.length," loaded"]}),(0,u.jsx)("span",{children:f.dataUpdatedAt>0?new Date(f.dataUpdatedAt).toLocaleTimeString():"not scanned"})]})]}),(0,u.jsxs)("div",{ref:g,className:"min-h-0 flex-1 overflow-auto",children:[f.isLoading?(0,u.jsx)("div",{className:"px-3 py-4 text-xs text-muted-foreground",children:"Scanning keyspace…"}):p.length===0?(0,u.jsxs)("div",{className:"flex min-h-32 flex-col items-center justify-center gap-2 px-4 text-center text-muted-foreground",children:[(0,u.jsx)(yh,{className:"size-4"}),(0,u.jsx)("span",{className:"text-xs",children:"No keys in this scan."}),(0,u.jsxs)(oe,{variant:"outline",size:"sm",onClick:()=>e("redis-browser.create-key"),children:[(0,u.jsx)(tn,{})," Create key"]})]}):(0,u.jsx)("div",{className:"relative w-full",style:{height:`${_.getTotalSize()}px`},children:A.map(b=>{const v=p[b.index],S=v.key.base64||"-",L=kv(v.key.base64,v.key.utf8);return(0,u.jsxs)(oe,{variant:"ghost",onClick:()=>n(S),className:te("absolute left-0 top-0 h-auto w-full justify-start gap-2 rounded-none px-4 py-1.5 text-sm font-normal transition-colors",t===S?"bg-sidebar-accent text-sidebar-accent-foreground font-medium before:absolute before:inset-y-0 before:left-0 before:w-1 before:bg-primary":"text-sidebar-foreground/70 hover:bg-sidebar-accent/50 hover:text-sidebar-foreground"),style:{transform:`translateY(${b.start}px)`},title:L,children:[(0,u.jsx)("span",{className:"min-w-0 flex-1 truncate text-left text-current",children:L}),(0,u.jsx)(cd,{variant:"outline",className:"h-4 w-10 shrink-0 justify-center rounded-sm px-1 text-[8px] font-normal text-muted-foreground",children:Tv[v.type]??"?"}),(0,u.jsxs)("span",{className:"shrink-0 text-[9px] text-muted-foreground",children:[xv(v.memoryBytes)," ·"," ",v.ttlMs===-1?(0,u.jsx)(xh,{className:"inline size-3 align-[-2px]","aria-label":"No expiry"}):bv(v.ttlMs)]})]},`${S}-${b.index}`)})}),f.isFetchingNextPage&&(0,u.jsx)("div",{className:"px-2 py-1 text-center text-[10px] text-muted-foreground",children:"Scanning more…"})]}),(0,u.jsx)(gv,{})]})},Cv=()=>{const{pathname:e}=Pr(),t=e.split("/")[1],{dbType:n}=nt(),r=(0,E.useMemo)(()=>{if(n==="redis"&&t!=="runner")return(0,u.jsx)(yv,{});switch(t){case"":case"table":case"schema":return(0,u.jsx)(zo,{});case"runner":return(0,u.jsx)(rv,{});default:return(0,u.jsx)(zo,{})}},[n,t]);return(0,u.jsxs)(fv,{children:[(0,u.jsx)(mv,{}),r,(0,u.jsx)(dv,{})]})},Zv=Xi({component:()=>Av});function Av(){const{dbType:e}=nt(),{pathname:t}=Pr(),n=t.split("/")[1],{sidebar:{isPinned:r,width:i}}=Mr();return e==="redis"&&n!=="browser"&&n!=="runner"?(0,u.jsx)(Hs,{to:"/browser"}):e!=="redis"&&n==="browser"?(0,u.jsx)(Hs,{to:"/"}):(0,u.jsxs)("div",{className:"bg-background text-foreground w-dvw flex h-dvh max-h-dvh overflow-hidden relative",children:[(0,u.jsx)(Cv,{}),(0,u.jsxs)("div",{className:"flex-1 flex flex-col h-full overflow-hidden ",style:{marginLeft:r?`${i}px`:"0"},children:[(0,u.jsx)(ev,{}),(0,u.jsx)(gh,{})]})]})}export{a_ as a,Av as component,je as i,$C as n,Xv as r,Zv as t};
|