bloby-bot 0.54.11 → 0.55.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-bloby/assets/{bloby-CjvuL1QI.js → bloby-C0cl8nq4.js} +77 -77
- package/dist-bloby/assets/globals-BqjrOUer.css +2 -0
- package/dist-bloby/assets/{highlighted-body-OFNGDK62-D0QQRXpE.js → highlighted-body-OFNGDK62-BwjDEAOv.js} +1 -1
- package/dist-bloby/assets/mermaid-GHXKKRXX-B_2tdKu_.js +1 -0
- package/dist-bloby/assets/{onboard-DU3OfA5h.js → onboard-CeuzZ0Ku.js} +1 -1
- package/dist-bloby/bloby.html +3 -3
- package/dist-bloby/onboard.html +3 -3
- package/package.json +4 -5
- package/supervisor/chat/src/components/Chat/AudioBubble.tsx +11 -4
- package/supervisor/chat/src/components/Chat/AuthedImage.tsx +25 -0
- package/supervisor/chat/src/components/Chat/BlobyImageCard.tsx +18 -8
- package/supervisor/chat/src/components/Chat/ImageLightbox.tsx +20 -7
- package/supervisor/chat/src/components/Chat/MessageBubble.tsx +13 -3
- package/supervisor/chat/src/components/Chat/MessageList.tsx +3 -0
- package/supervisor/chat/src/components/Chat/MorphyActionCard.tsx +50 -0
- package/supervisor/chat/src/lib/authedFile.ts +57 -0
- package/supervisor/index.ts +1 -1
- package/supervisor/scheduler.ts +20 -0
- package/workspace/skills/mac/SKILL.md +178 -192
- package/workspace/skills/mac/presets/PRESETS.md +28 -34
- package/workspace/skills/mac/skill.json +3 -3
- package/dist-bloby/assets/globals-ZdFBsH0Q.css +0 -2
- package/dist-bloby/assets/mermaid-GHXKKRXX-D9GshF2B.js +0 -1
- /package/dist-bloby/assets/{globals-UaNdQXf5.js → globals-DSmE2rZO.js} +0 -0
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-OFNGDK62-
|
|
2
|
-
import{c as e,i as t,n,o as r,r as i,t as a}from"./jsx-runtime-C0W9Wf2W.js";import{a as o,c as s,d as c,f as l,h as u,i as d,l as f,m as p,n as m,o as h,p as g,r as _,s as v,t as y,u as b}from"./globals-UaNdQXf5.js";var x=p(`bell-off`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]),S=p(`bell-ring`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M22 8c0-2.3-.8-4.3-2-6`,key:`5bb3ad`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}],[`path`,{d:`M4 2C2.8 3.7 2 5.7 2 8`,key:`tap9e0`}]]),C=p(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),w=p(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),T=p(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),E=p(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ee=p(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),D=p(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),te=p(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),ne=p(`image-off`,[[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}],[`path`,{d:`M10.41 10.41a2 2 0 1 1-2.83-2.83`,key:`1bzlo9`}],[`line`,{x1:`13.5`,x2:`6`,y1:`13.5`,y2:`21`,key:`1q0aeu`}],[`line`,{x1:`18`,x2:`21`,y1:`12`,y2:`15`,key:`5mozeu`}],[`path`,{d:`M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59`,key:`mmje98`}],[`path`,{d:`M21 15V5a2 2 0 0 0-2-2H9`,key:`43el77`}]]),re=p(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),O=p(`laptop`,[[`path`,{d:`M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z`,key:`1pdavp`}],[`path`,{d:`M20.054 15.987H3.946`,key:`14rxg9`}]]),ie=p(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),ae=p(`message-square-plus`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]),oe=p(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),k=p(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),se=p(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),ce=p(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),le=p(`send-horizontal`,[[`path`,{d:`M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z`,key:`117uat`}],[`path`,{d:`M6 12h16`,key:`s4cdu5`}]]),ue=p(`share`,[[`path`,{d:`M12 2v13`,key:`1km8f5`}],[`path`,{d:`m16 6-4-4-4 4`,key:`13yo43`}],[`path`,{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`,key:`1b2hhj`}]]),A=p(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),de=p(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),fe=p(`volume-2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),pe=p(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),me=p(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),j=e(i(),1),he=e(u(),1),ge=class e{ws=null;handlers=new Map;statusHandlers=new Set;reconnectTimer=null;heartbeatTimer=null;url;queue=[];intentionalClose=!1;reconnectDelay=1e3;static MAX_RECONNECT_DELAY=8e3;tokenGetter=null;constructor(e,t){let n=location.protocol===`https:`?`wss:`:`ws:`,r=location.host;this.url=e??`${n}//${r}/ws`,this.tokenGetter=t??null}connect(){this.intentionalClose=!1;let t=this.url;if(this.tokenGetter){let e=this.tokenGetter();if(e){let n=t.includes(`?`)?`&`:`?`;t=`${t}${n}token=${e}`}}this.ws=new WebSocket(t),this.ws.onopen=()=>{this.reconnectDelay=1e3,this.notifyStatus(!0),this.flushQueue(),this.startHeartbeat()},this.ws.onmessage=e=>{if(e.data===`pong`)return;let t=JSON.parse(e.data);this.handlers.get(t.type)?.forEach(e=>e(t.data))},this.ws.onclose=()=>{this.stopHeartbeat(),this.notifyStatus(!1),this.intentionalClose||(this.reconnectTimer=setTimeout(()=>{this.reconnectDelay=Math.min(this.reconnectDelay*2,e.MAX_RECONNECT_DELAY),this.connect()},this.reconnectDelay))},this.ws.onerror=()=>this.ws?.close()}disconnect(){this.intentionalClose=!0,this.reconnectTimer&&=(clearTimeout(this.reconnectTimer),null),this.stopHeartbeat(),this.ws?.close(),this.ws=null}on(e,t){return this.handlers.has(e)||this.handlers.set(e,new Set),this.handlers.get(e).add(t),()=>this.handlers.get(e)?.delete(t)}onStatus(e){return this.statusHandlers.add(e),()=>this.statusHandlers.delete(e)}send(e,t){let n={type:e,data:t};this.ws?.readyState===WebSocket.OPEN?this.ws.send(JSON.stringify(n)):this.queue.push(n)}get connected(){return this.ws?.readyState===WebSocket.OPEN}flushQueue(){for(;this.queue.length>0&&this.ws?.readyState===WebSocket.OPEN;){let e=this.queue.shift();this.ws.send(JSON.stringify(e))}}notifyStatus(e){this.statusHandlers.forEach(t=>t(e))}startHeartbeat(){this.stopHeartbeat(),this.heartbeatTimer=setInterval(()=>{this.ws?.readyState===WebSocket.OPEN&&this.ws.send(`ping`)},25e3)}stopHeartbeat(){this.heartbeatTimer&&=(clearInterval(this.heartbeatTimer),null)}},_e=`bloby_token`,ve=null;function ye(){return localStorage.getItem(_e)}function be(e){localStorage.setItem(_e,e)}function xe(){localStorage.removeItem(_e)}function Se(e){ve=e}async function Ce(e,t={}){let n=ye(),r=new Headers(t.headers);n&&r.set(`Authorization`,`Bearer ${n}`);let i=await fetch(e,{...t,headers:r});return i.status===401&&n&&(xe(),ve?.()),i}function we(e,t,n=!0){let[r,i]=(0,j.useState)([]),[a,o]=(0,j.useState)(null),[s,c]=(0,j.useState)(!1),[l,u]=(0,j.useState)(``),[d,f]=(0,j.useState)([]),[p,m]=(0,j.useState)(!1),h=(0,j.useRef)(!1),g=(0,j.useRef)(null),_=(0,j.useRef)(!1),v=(0,j.useRef)(!1),y=(0,j.useRef)(``),b=(0,j.useRef)(0),x=(0,j.useRef)(null),S=(0,j.useRef)(null),C=(0,j.useRef)(new URLSearchParams(location.search).has(`ext`));(0,j.useEffect)(()=>{g.current=a},[a]),(0,j.useEffect)(()=>{_.current=s},[s]),(0,j.useEffect)(()=>{if(!C.current)return;function e(e){e.data?.type===`bloby:page-context`&&(S.current=e.data.context,console.log(`[blobyChat] Extension page context:`,e.data.context?.url))}return window.addEventListener(`message`,e),window.parent?.postMessage({type:`bloby:request-context`},`*`),()=>window.removeEventListener(`message`,e)},[]);let w=(0,j.useCallback)(e=>{let t;e.audio_data&&(t=e.audio_data.startsWith(`data:`)?e.audio_data:e.audio_data.includes(`/`)?`/api/files/${e.audio_data}`:`data:audio/webm;base64,${e.audio_data}`);let n;if(e.attachments)try{n=JSON.parse(e.attachments)}catch{}return{id:e.id,role:e.role,content:e.content,timestamp:e.created_at,audioData:t,hasAttachments:!!(n&&n.length>0),attachments:n}},[]),T=(0,j.useCallback)(async()=>{try{let e=await Ce(`/api/context/current`).then(e=>e.json());if(!e.conversationId)return;o(e.conversationId);let t=await Ce(`/api/conversations/${e.conversationId}/messages?limit=200`);if(!t.ok)return;let n=await t.json();if(!n?.length)return;i(n.filter(e=>e.role===`user`||e.role===`assistant`).map(w)),m(n.length>=200)}catch{}},[w]),E=(0,j.useCallback)(async()=>{if(!(v.current||!g.current)){v.current=!0;try{let e=r[0]?.id;if(!e)return;let t=await Ce(`/api/conversations/${g.current}/messages?before=${e}&limit=100`);if(!t.ok)return;let n=await t.json();if(!n?.length){m(!1);return}let a=n.filter(e=>e.role===`user`||e.role===`assistant`).map(w);i(e=>[...a,...e]),n.length<100&&m(!1)}catch{}finally{v.current=!1}}},[r,w]);(0,j.useEffect)(()=>{!n||h.current||(h.current=!0,T())},[n,T]),(0,j.useEffect)(()=>{n&&t&&t>0&&T()},[n,t,T]),(0,j.useEffect)(()=>{if(!n||!t||t===0||!s)return;let e=setInterval(()=>{if(!_.current){clearInterval(e);return}T()},3e3);return()=>clearInterval(e)},[n,t,s,T]),(0,j.useEffect)(()=>{if(!e)return;console.log(`[blobyChat] ──── WS HANDLERS REGISTERED ────`);let t=[e.on(`bot:typing`,()=>{console.log(`[blobyChat] bot:typing → streaming=true`),c(!0),f([])}),e.on(`bot:token`,e=>{c(!0),u(t=>{let n=t+e.token;return y.current=n,n})}),e.on(`bot:tool`,e=>{let t=y.current;t&&(console.log(`[blobyChat] bot:tool (${e.name}) — committing ${t.length} chars as bubble`),b.current+=t.length,i(e=>[...e,{id:`tool-`+Date.now(),role:`assistant`,content:t,timestamp:new Date().toISOString()}]),u(``),y.current=``),f(t=>t.find(t=>t.name===e.name&&t.status===`running`)?t:[...t,{name:e.name,status:`running`}])}),e.on(`bot:response`,e=>{if(g.current&&e.conversationId!==g.current)return;o(e.conversationId);let t=e.content||``;b.current>0?(t=t.slice(b.current).replace(/^\n+/,``),b.current=0,console.log(`[blobyChat] bot:response — stripped partial, remaining:`,t.slice(0,60))):console.log(`[blobyChat] bot:response — new bubble`),t.trim()&&i(n=>[...n,{id:e.messageId||Date.now().toString(),role:`assistant`,content:t,timestamp:new Date().toISOString()}]),u(``),y.current=``,f([])}),e.on(`bot:task-created`,()=>{let e=y.current;e&&(console.log(`[blobyChat] bot:task-created — committing stream, showing dots`),b.current+=e.length,i(t=>[...t,{id:`pre-task-`+Date.now(),role:`assistant`,content:e,timestamp:new Date().toISOString()}]),u(``),y.current=``)}),e.on(`bot:idle`,()=>{console.log(`[blobyChat] bot:idle → streaming=false`),c(!1)}),e.on(`bot:error`,e=>{console.log(`[blobyChat] bot:error`),u(``),y.current=``,c(!1),f([]),i(t=>[...t,{id:Date.now().toString(),role:`assistant`,content:`Error: ${e.error}`,timestamp:new Date().toISOString()}])}),e.on(`chat:sync`,e=>{g.current&&e.conversationId!==g.current||i(t=>[...t,{id:Date.now().toString(),role:e.message.role,content:e.message.content,timestamp:e.message.timestamp,hasAttachments:!!e.message.attachments?.length,attachments:e.message.attachments}])}),e.on(`chat:conversation-created`,e=>{o(e.conversationId)}),e.on(`chat:state`,e=>{e.streaming&&(c(!0),e.conversationId&&o(e.conversationId),e.buffer&&u(e.buffer))}),e.on(`chat:cleared`,()=>{i([]),o(null),u(``),c(!1),f([]),h.current=!1})];return()=>t.forEach(e=>e())},[e]);let ee=(0,j.useCallback)(e=>{let t=`pending-audio-`+Date.now();x.current=t,i(n=>[...n,{id:t,role:`user`,content:``,timestamp:new Date().toISOString(),audioData:e.startsWith(`data:`)?e:`data:audio/webm;base64,${e}`,transcribing:!0}])},[]);return{messages:r,streaming:s,streamBuffer:l,conversationId:a,tools:d,hasMore:p,loadOlder:E,sendMessage:(0,j.useCallback)((t,n,r)=>{if(!e||!t.trim()&&(!n||n.length===0)&&!r)return;let o=y.current;o&&(console.log(`[blobyChat] Committing partial —`,o.length,`chars`),b.current+=o.length,i(e=>[...e,{id:`partial-`+Date.now(),role:`assistant`,content:o,timestamp:new Date().toISOString()}]),u(``),y.current=``);let s=x.current;if(r&&s)x.current=null,i(e=>e.map(e=>e.id===s?{...e,content:t,transcribing:!1,hasAttachments:!!(n&&n.length>0)}:e));else{let e={id:Date.now().toString(),role:`user`,content:t,timestamp:new Date().toISOString(),hasAttachments:!!(n&&n.length>0),audioData:r?r.startsWith(`data:`)?r:`data:audio/webm;base64,${r}`:void 0};i(t=>[...t,e])}let c=t;if(C.current&&S.current){let e=S.current,n=[`[Page: ${e.url}`];e.title&&(n[0]+=` | ${e.title}`),e.productName&&(n[0]+=` | ${e.productName}`),e.price&&(n[0]+=` | ${e.currency||`$`}${e.price}`),n[0]+=`]`,e.selection&&n.push(`[Selected: ${e.selection}]`),e.hasForms&&n.push(`[Page has ${e.formCount} form(s)]`),c=n.join(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-OFNGDK62-BwjDEAOv.js","assets/jsx-runtime-C0W9Wf2W.js","assets/angular-html-olSuI25H.js","assets/html-CzX0w7K_.js","assets/css-zY4NE9yA.js","assets/javascript-CzjRtS1s.js","assets/angular-ts-BJPoZ_vo.js","assets/scss-Efq7Dmbs.js","assets/apl-CyVuPSCb.js","assets/json-CdFmZMJc.js","assets/xml-BlDEvPia.js","assets/java-BqKEu7zh.js","assets/astro-CKc3-gwH.js","assets/postcss-BTQso3H9.js","assets/tsx-DrzBggF8.js","assets/typescript-COZIw7xM.js","assets/blade-DMAsVBaV.js","assets/html-derivative-D-XvNBA6.js","assets/sql-CB6kO6Km.js","assets/bsl-B1qbqNES.js","assets/sdbl-BmWYR-pI.js","assets/c-BvB8CVo8.js","assets/cairo-BDj8wWhy.js","assets/python-CKg5r0C3.js","assets/cobol-hBjMZW-R.js","assets/coffee-B4OtR3w-.js","assets/cpp-BblbpnyR.js","assets/glsl-CEMf-THb.js","assets/regexp-CvWG4lI-.js","assets/crystal-x3k4USY-.js","assets/shellscript-BbEstezf.js","assets/edge-B-9TrlZC.js","assets/elixir-CXCzbj1r.js","assets/elm-BdRiwmde.js","assets/erb-C9tvRzx3.js","assets/ruby-CXP5_4kq.js","assets/graphql-dBCd2Czl.js","assets/jsx-BL6Wh6Qw.js","assets/haml-Ck5pVAEG.js","assets/lua-B4ezzssg.js","assets/yaml-iUXljnLs.js","assets/erlang-Bc4hQuqa.js","assets/markdown-BaI9LyM4.js","assets/fortran-fixed-form-B02FOYI-.js","assets/fortran-free-form-BPTf0lbT.js","assets/fsharp-DhdR18vN.js","assets/gdresource-DgnrMPIx.js","assets/gdscript-CsadCSaZ.js","assets/gdshader-PfnN_8tR.js","assets/git-commit-DGJi7qBD.js","assets/diff-CdkWtnkL.js","assets/git-rebase-HwDSB2qJ.js","assets/glimmer-js-B6LF_BMd.js","assets/glimmer-ts-Cn42BUKe.js","assets/hack-DDEqRjBe.js","assets/handlebars-g9Qe0ao2.js","assets/http-qlhghEti.js","assets/hurl-CHIKfBKk.js","assets/csv-DNUpVBxl.js","assets/hxml-adC65L_J.js","assets/haxe-DfXTCEOz.js","assets/jinja-BHZt0_Dn.js","assets/jison-TqJYWKkW.js","assets/julia-CW07fy07.js","assets/r-CGji9_vM.js","assets/just-DBcWo9WY.js","assets/perl-DqDX-7VG.js","assets/latex-D6lXiPTF.js","assets/tex-CdJ24HJj.js","assets/liquid-DhYYAQ41.js","assets/marko-xtrIBdcL.js","assets/less-C95PyOu0.js","assets/mdc-DyZVNnwP.js","assets/nextflow-JEyYUlIq.js","assets/nextflow-groovy-wvmJO4hi.js","assets/nginx-CGgm1VOJ.js","assets/nim-Br7S817Z.js","assets/php-DYSqNNGJ.js","assets/pug-Bob3gNio.js","assets/qml-CsMafcqN.js","assets/razor-B4PzhaZX.js","assets/csharp-BDKQY1K9.js","assets/rst-BXuz-2b8.js","assets/cmake-D5rSbMir.js","assets/sas-Cov9PzAD.js","assets/shaderlab-DZ3Lsiak.js","assets/hlsl-DpuYn7pp.js","assets/shellsession-BHLVblBB.js","assets/soy-e0u3-wIA.js","assets/sparql-B9c85a_o.js","assets/turtle-CqNXyJWZ.js","assets/stata-B1mLEMrz.js","assets/surrealql-BTKo2XFY.js","assets/svelte-B7URZ-wm.js","assets/templ-DVRYIgGq.js","assets/go-DLnOLj8q.js","assets/ts-tags-CCSbelDn.js","assets/twig-Dn4ruiVl.js","assets/vue-D19cWHwY.js","assets/vue-html-_j-KC7Cs.js","assets/vue-vine-BC03MN6c.js","assets/stylus-sKwvsUaC.js","assets/xsl-DR-zOeBm.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as e,i as t,n,o as r,r as i,t as a}from"./jsx-runtime-C0W9Wf2W.js";import{a as o,c as s,d as c,f as l,h as u,i as d,l as f,m as p,n as m,o as h,p as g,r as _,s as v,t as y,u as b}from"./globals-DSmE2rZO.js";var x=p(`bell-off`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]),S=p(`bell-ring`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M22 8c0-2.3-.8-4.3-2-6`,key:`5bb3ad`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}],[`path`,{d:`M4 2C2.8 3.7 2 5.7 2 8`,key:`tap9e0`}]]),C=p(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),w=p(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),T=p(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),E=p(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ee=p(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),D=p(`crosshair`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`22`,x2:`18`,y1:`12`,y2:`12`,key:`l9bcsi`}],[`line`,{x1:`6`,x2:`2`,y1:`12`,y2:`12`,key:`13hhkx`}],[`line`,{x1:`12`,x2:`12`,y1:`6`,y2:`2`,key:`10w3f3`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`18`,key:`15g9kq`}]]),te=p(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),ne=p(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),re=p(`image-off`,[[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}],[`path`,{d:`M10.41 10.41a2 2 0 1 1-2.83-2.83`,key:`1bzlo9`}],[`line`,{x1:`13.5`,x2:`6`,y1:`13.5`,y2:`21`,key:`1q0aeu`}],[`line`,{x1:`18`,x2:`21`,y1:`12`,y2:`15`,key:`5mozeu`}],[`path`,{d:`M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59`,key:`mmje98`}],[`path`,{d:`M21 15V5a2 2 0 0 0-2-2H9`,key:`43el77`}]]),O=p(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),ie=p(`laptop`,[[`path`,{d:`M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z`,key:`1pdavp`}],[`path`,{d:`M20.054 15.987H3.946`,key:`14rxg9`}]]),ae=p(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),oe=p(`message-square-plus`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]),k=p(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),se=p(`mouse-pointer-2`,[[`path`,{d:`M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z`,key:`edeuup`}]]),ce=p(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),le=p(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),ue=p(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),A=p(`send-horizontal`,[[`path`,{d:`M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z`,key:`117uat`}],[`path`,{d:`M6 12h16`,key:`s4cdu5`}]]),de=p(`share`,[[`path`,{d:`M12 2v13`,key:`1km8f5`}],[`path`,{d:`m16 6-4-4-4 4`,key:`13yo43`}],[`path`,{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`,key:`1b2hhj`}]]),fe=p(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),pe=p(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),me=p(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),he=p(`volume-2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),ge=p(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),_e=p(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),j=e(i(),1),ve=e(u(),1),ye=class e{ws=null;handlers=new Map;statusHandlers=new Set;reconnectTimer=null;heartbeatTimer=null;url;queue=[];intentionalClose=!1;reconnectDelay=1e3;static MAX_RECONNECT_DELAY=8e3;tokenGetter=null;constructor(e,t){let n=location.protocol===`https:`?`wss:`:`ws:`,r=location.host;this.url=e??`${n}//${r}/ws`,this.tokenGetter=t??null}connect(){this.intentionalClose=!1;let t=this.url;if(this.tokenGetter){let e=this.tokenGetter();if(e){let n=t.includes(`?`)?`&`:`?`;t=`${t}${n}token=${e}`}}this.ws=new WebSocket(t),this.ws.onopen=()=>{this.reconnectDelay=1e3,this.notifyStatus(!0),this.flushQueue(),this.startHeartbeat()},this.ws.onmessage=e=>{if(e.data===`pong`)return;let t;try{t=JSON.parse(e.data)}catch{return}this.handlers.get(t.type)?.forEach(e=>e(t.data))},this.ws.onclose=()=>{this.stopHeartbeat(),this.notifyStatus(!1),this.intentionalClose||(this.reconnectTimer=setTimeout(()=>{this.reconnectDelay=Math.min(this.reconnectDelay*2,e.MAX_RECONNECT_DELAY),this.connect()},this.reconnectDelay))},this.ws.onerror=()=>this.ws?.close()}disconnect(){this.intentionalClose=!0,this.reconnectTimer&&=(clearTimeout(this.reconnectTimer),null),this.stopHeartbeat(),this.ws?.close(),this.ws=null}on(e,t){return this.handlers.has(e)||this.handlers.set(e,new Set),this.handlers.get(e).add(t),()=>this.handlers.get(e)?.delete(t)}onStatus(e){return this.statusHandlers.add(e),()=>this.statusHandlers.delete(e)}send(e,t){let n={type:e,data:t};this.ws?.readyState===WebSocket.OPEN?this.ws.send(JSON.stringify(n)):this.queue.push(n)}get connected(){return this.ws?.readyState===WebSocket.OPEN}flushQueue(){for(;this.queue.length>0&&this.ws?.readyState===WebSocket.OPEN;){let e=this.queue.shift();this.ws.send(JSON.stringify(e))}}notifyStatus(e){this.statusHandlers.forEach(t=>t(e))}startHeartbeat(){this.stopHeartbeat(),this.heartbeatTimer=setInterval(()=>{this.ws?.readyState===WebSocket.OPEN&&this.ws.send(`ping`)},25e3)}stopHeartbeat(){this.heartbeatTimer&&=(clearInterval(this.heartbeatTimer),null)}},be=`bloby_token`,xe=null;function Se(){return localStorage.getItem(be)}function Ce(e){localStorage.setItem(be,e)}function we(){localStorage.removeItem(be)}function Te(e){xe=e}async function Ee(e,t={}){let n=Se(),r=new Headers(t.headers);n&&r.set(`Authorization`,`Bearer ${n}`);let i=await fetch(e,{...t,headers:r});return i.status===401&&n&&(we(),xe?.()),i}function De(e,t,n=!0){let[r,i]=(0,j.useState)([]),[a,o]=(0,j.useState)(null),[s,c]=(0,j.useState)(!1),[l,u]=(0,j.useState)(``),[d,f]=(0,j.useState)([]),[p,m]=(0,j.useState)(!1),h=(0,j.useRef)(!1),g=(0,j.useRef)(null),_=(0,j.useRef)(!1),v=(0,j.useRef)(!1),y=(0,j.useRef)(``),b=(0,j.useRef)(0),x=(0,j.useRef)(null),S=(0,j.useRef)(null),C=(0,j.useRef)(new URLSearchParams(location.search).has(`ext`));(0,j.useEffect)(()=>{g.current=a},[a]),(0,j.useEffect)(()=>{_.current=s},[s]),(0,j.useEffect)(()=>{if(!C.current)return;function e(e){e.data?.type===`bloby:page-context`&&(S.current=e.data.context,console.log(`[blobyChat] Extension page context:`,e.data.context?.url))}return window.addEventListener(`message`,e),window.parent?.postMessage({type:`bloby:request-context`},`*`),()=>window.removeEventListener(`message`,e)},[]);let w=(0,j.useCallback)(e=>{let t;e.audio_data&&(t=e.audio_data.startsWith(`data:`)?e.audio_data:e.audio_data.includes(`/`)?`/api/files/${e.audio_data}`:`data:audio/webm;base64,${e.audio_data}`);let n;if(e.attachments)try{n=JSON.parse(e.attachments)}catch{}return{id:e.id,role:e.role,content:e.content,timestamp:e.created_at,audioData:t,hasAttachments:!!(n&&n.length>0),attachments:n}},[]),T=(0,j.useCallback)(async()=>{try{let e=await Ee(`/api/context/current`).then(e=>e.json());if(!e.conversationId)return;o(e.conversationId);let t=await Ee(`/api/conversations/${e.conversationId}/messages?limit=200`);if(!t.ok)return;let n=await t.json();if(!n?.length)return;i(n.filter(e=>e.role===`user`||e.role===`assistant`).map(w)),m(n.length>=200)}catch{}},[w]),E=(0,j.useCallback)(async()=>{if(!(v.current||!g.current)){v.current=!0;try{let e=r[0]?.id;if(!e)return;let t=await Ee(`/api/conversations/${g.current}/messages?before=${e}&limit=100`);if(!t.ok)return;let n=await t.json();if(!n?.length){m(!1);return}let a=n.filter(e=>e.role===`user`||e.role===`assistant`).map(w);i(e=>[...a,...e]),n.length<100&&m(!1)}catch{}finally{v.current=!1}}},[r,w]);(0,j.useEffect)(()=>{!n||h.current||(h.current=!0,T())},[n,T]),(0,j.useEffect)(()=>{n&&t&&t>0&&T()},[n,t,T]),(0,j.useEffect)(()=>{if(!n||!t||t===0||!s)return;let e=setInterval(()=>{if(!_.current){clearInterval(e);return}T()},3e3);return()=>clearInterval(e)},[n,t,s,T]),(0,j.useEffect)(()=>{if(!e)return;console.log(`[blobyChat] ──── WS HANDLERS REGISTERED ────`);let t=[e.on(`bot:typing`,()=>{console.log(`[blobyChat] bot:typing → streaming=true`),c(!0),f([])}),e.on(`bot:token`,e=>{c(!0),u(t=>{let n=t+e.token;return y.current=n,n})}),e.on(`bot:tool`,e=>{let t=y.current;t&&(console.log(`[blobyChat] bot:tool (${e.name}) — committing ${t.length} chars as bubble`),b.current+=t.length,i(e=>[...e,{id:`tool-`+Date.now(),role:`assistant`,content:t,timestamp:new Date().toISOString()}]),u(``),y.current=``),f(t=>t.find(t=>t.name===e.name&&t.status===`running`)?t:[...t,{name:e.name,status:`running`}])}),e.on(`bot:response`,e=>{if(g.current&&e.conversationId!==g.current)return;o(e.conversationId);let t=e.content||``;b.current>0?(t=t.slice(b.current).replace(/^\n+/,``),b.current=0,console.log(`[blobyChat] bot:response — stripped partial, remaining:`,t.slice(0,60))):console.log(`[blobyChat] bot:response — new bubble`),t.trim()&&i(n=>[...n,{id:e.messageId||Date.now().toString(),role:`assistant`,content:t,timestamp:new Date().toISOString()}]),u(``),y.current=``,f([])}),e.on(`bot:task-created`,()=>{let e=y.current;e&&(console.log(`[blobyChat] bot:task-created — committing stream, showing dots`),b.current+=e.length,i(t=>[...t,{id:`pre-task-`+Date.now(),role:`assistant`,content:e,timestamp:new Date().toISOString()}]),u(``),y.current=``)}),e.on(`bot:idle`,()=>{console.log(`[blobyChat] bot:idle → streaming=false`),c(!1)}),e.on(`bot:error`,e=>{console.log(`[blobyChat] bot:error`),u(``),y.current=``,c(!1),f([]),i(t=>[...t,{id:Date.now().toString(),role:`assistant`,content:`Error: ${e.error}`,timestamp:new Date().toISOString()}])}),e.on(`chat:sync`,e=>{g.current&&e.conversationId!==g.current||i(t=>[...t,{id:Date.now().toString(),role:e.message.role,content:e.message.content,timestamp:e.message.timestamp,hasAttachments:!!e.message.attachments?.length,attachments:e.message.attachments}])}),e.on(`chat:conversation-created`,e=>{o(e.conversationId)}),e.on(`chat:state`,e=>{e.streaming&&(c(!0),e.conversationId&&o(e.conversationId),e.buffer&&u(e.buffer))}),e.on(`chat:cleared`,()=>{i([]),o(null),u(``),c(!1),f([]),h.current=!1})];return()=>t.forEach(e=>e())},[e]);let ee=(0,j.useCallback)(e=>{let t=`pending-audio-`+Date.now();x.current=t,i(n=>[...n,{id:t,role:`user`,content:``,timestamp:new Date().toISOString(),audioData:e.startsWith(`data:`)?e:`data:audio/webm;base64,${e}`,transcribing:!0}])},[]);return{messages:r,streaming:s,streamBuffer:l,conversationId:a,tools:d,hasMore:p,loadOlder:E,sendMessage:(0,j.useCallback)((t,n,r)=>{if(!e||!t.trim()&&(!n||n.length===0)&&!r)return;let o=y.current;o&&(console.log(`[blobyChat] Committing partial —`,o.length,`chars`),b.current+=o.length,i(e=>[...e,{id:`partial-`+Date.now(),role:`assistant`,content:o,timestamp:new Date().toISOString()}]),u(``),y.current=``);let s=x.current;if(r&&s)x.current=null,i(e=>e.map(e=>e.id===s?{...e,content:t,transcribing:!1,hasAttachments:!!(n&&n.length>0)}:e));else{let e={id:Date.now().toString(),role:`user`,content:t,timestamp:new Date().toISOString(),hasAttachments:!!(n&&n.length>0),audioData:r?r.startsWith(`data:`)?r:`data:audio/webm;base64,${r}`:void 0};i(t=>[...t,e])}let c=t;if(C.current&&S.current){let e=S.current,n=[`[Page: ${e.url}`];e.title&&(n[0]+=` | ${e.title}`),e.productName&&(n[0]+=` | ${e.productName}`),e.price&&(n[0]+=` | ${e.currency||`$`}${e.price}`),n[0]+=`]`,e.selection&&n.push(`[Selected: ${e.selection}]`),e.hasForms&&n.push(`[Page has ${e.formCount} form(s)]`),c=n.join(`
|
|
3
3
|
`)+`
|
|
4
|
-
`+t,window.parent?.postMessage({type:`bloby:request-context`},`*`)}let l={conversationId:a,content:c};r&&(l.audioData=r.includes(`,`)?r.split(`,`)[1]:r),n?.length&&(l.attachments=n.map(e=>{let t=e.preview.match(/^data:([^;]+);base64,(.+)$/);return{type:e.type,name:e.name,mediaType:t?.[1]||`application/octet-stream`,data:t?.[2]||``}})),e.send(`user:message`,l)},[e,a]),addPendingAudio:ee,stopStreaming:(0,j.useCallback)(()=>{e&&(e.send(`user:stop`,{conversationId:a}),c(!1),u(``),y.current=``,b.current=0,f([]))},[e,a]),clearContext:(0,j.useCallback)(()=>{e&&e.send(`user:clear-context`,{}),i([]),o(null),u(``),y.current=``,b.current=0,c(!1),f([]),h.current=!1},[e])}}var M=a(),Te=`bloby_login_totp`;function Ee({onLogin:e,totpEnabled:t}){let[n,r]=(0,j.useState)(``),[i,a]=(0,j.useState)(``),[s,u]=(0,j.useState)(!1),[d,f]=(0,j.useState)(`password`),[p,h]=(0,j.useState)(``),[y,b]=(0,j.useState)(``),[x,S]=(0,j.useState)(!0),[C,w]=(0,j.useState)(!1),T=(0,j.useRef)(null);(0,j.useEffect)(()=>{try{let e=sessionStorage.getItem(Te);if(!e)return;let t=JSON.parse(e);t.pendingToken&&t.expiresAt>Date.now()?(b(t.pendingToken),f(`totp`)):sessionStorage.removeItem(Te)}catch{}},[]),(0,j.useEffect)(()=>{d===`totp`&&setTimeout(()=>T.current?.focus(),100)},[d]);function E(e){try{sessionStorage.setItem(Te,JSON.stringify({pendingToken:e,expiresAt:Date.now()+4.5*60*1e3}))}catch{}}function ee(){try{sessionStorage.removeItem(Te)}catch{}}let D=async()=>{if(!(!n.trim()||s)){u(!0),a(``);try{let t=btoa(`admin:${n}`),r=await fetch(`/api/portal/login`,{headers:{Authorization:`Basic ${t}`},credentials:`include`}),i=await r.json();r.ok&&i.token?(ee(),e(i.token)):r.ok&&i.requiresTOTP?(b(i.pendingToken),E(i.pendingToken),f(`totp`),a(``)):a(i.error||`Invalid password`)}catch{a(`Could not reach server`)}finally{u(!1)}}},te=async()=>{if(!(!p.trim()||s)){u(!0),a(``);try{let t=await fetch(`/api/portal/login/totp?pending=${encodeURIComponent(y)}&code=${encodeURIComponent(p)}&trust=${x?`1`:`0`}`,{credentials:`include`}),n=await t.json();t.ok&&n.token?(ee(),e(n.token)):a(n.error||`Invalid code`)}catch{a(`Could not reach server`)}finally{u(!1)}}},ne=e=>{e.key===`Enter`&&(d===`password`?D():te())},re=()=>{f(`password`),a(``),h(``),w(!1),ee()},O=`w-full bg-white/[0.05] border border-white/[0.08] text-white rounded-xl px-4 py-3 text-base outline-none input-glow placeholder:text-white/20 transition-all`;return(0,M.jsx)(`div`,{className:`flex flex-col items-center justify-center h-dvh px-6`,children:(0,M.jsx)(`div`,{className:`w-full max-w-[320px] flex flex-col items-center`,children:(0,M.jsx)(_,{mode:`wait`,children:d===`password`?(0,M.jsxs)(m.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2},className:`w-full flex flex-col items-center`,children:[(0,M.jsx)(`div`,{className:`w-14 h-14 rounded-2xl bg-white/[0.04] border border-white/[0.08] flex items-center justify-center mb-5`,children:(0,M.jsx)(ie,{className:`h-6 w-6 text-white/40`})}),(0,M.jsx)(`h1`,{className:`text-xl font-bold text-white tracking-tight mb-1`,children:`Welcome back`}),(0,M.jsx)(`p`,{className:`text-white/40 text-[13px] mb-6`,children:`Enter your password to continue.`}),i&&(0,M.jsx)(`div`,{className:`w-full bg-red-500/8 border border-red-500/15 rounded-xl px-4 py-2.5 mb-4`,children:(0,M.jsx)(`p`,{className:`text-red-400/90 text-[12px]`,children:i})}),(0,M.jsx)(`input`,{type:`password`,value:n,onChange:e=>r(e.target.value),onKeyDown:ne,placeholder:`Password`,autoFocus:!0,autoComplete:`current-password`,className:O}),(0,M.jsx)(`button`,{onClick:D,disabled:!n.trim()||s,className:`w-full mt-4 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 disabled:opacity-40`,children:s?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(v,{className:`h-4 w-4 animate-spin`}),`Signing in...`]}):(0,M.jsxs)(M.Fragment,{children:[`Sign In`,(0,M.jsx)(l,{className:`h-4 w-4`})]})})]},`password`):(0,M.jsxs)(m.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:{duration:.2},className:`w-full flex flex-col items-center`,children:[(0,M.jsx)(`div`,{className:`w-14 h-14 rounded-2xl bg-[#0069FE]/10 border border-[#0069FE]/20 flex items-center justify-center mb-5`,children:(0,M.jsx)(o,{className:`h-6 w-6 text-[#0069FE]`})}),(0,M.jsx)(`h1`,{className:`text-xl font-bold text-white tracking-tight mb-1`,children:C?`Recovery code`:`Enter your 2FA code`}),(0,M.jsx)(`p`,{className:`text-white/40 text-[13px] mb-6`,children:C?`Enter one of your recovery codes.`:`Open your authenticator app and enter the 6-digit code.`}),i&&(0,M.jsx)(`div`,{className:`w-full bg-red-500/8 border border-red-500/15 rounded-xl px-4 py-2.5 mb-4`,children:(0,M.jsx)(`p`,{className:`text-red-400/90 text-[12px]`,children:i})}),(0,M.jsx)(`input`,{ref:T,type:`text`,inputMode:C?`text`:`numeric`,autoComplete:`one-time-code`,maxLength:C?20:6,value:p,onChange:e=>{h(C?e.target.value:e.target.value.replace(/\D/g,``)),a(``)},onKeyDown:ne,placeholder:C?`Recovery code`:`000000`,autoFocus:!0,className:O+(C?``:` tracking-[0.3em] text-center font-mono`)}),(0,M.jsxs)(`label`,{className:`flex items-center gap-2.5 mt-4 w-full cursor-pointer`,children:[(0,M.jsx)(`div`,{onClick:()=>S(e=>!e),className:`w-5 h-5 rounded-md border flex items-center justify-center transition-all ${x?`bg-[#0069FE] border-[#0069FE]`:`bg-white/[0.04] border-white/[0.12]`}`,children:x&&(0,M.jsx)(c,{className:`h-3.5 w-3.5 text-white`})}),(0,M.jsx)(`span`,{className:`text-[13px] text-white/50`,children:`Trust this device for 90 days`})]}),(0,M.jsx)(`button`,{onClick:te,disabled:!p.trim()||s,className:`w-full mt-4 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 disabled:opacity-40`,children:s?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(v,{className:`h-4 w-4 animate-spin`}),`Verifying...`]}):(0,M.jsxs)(M.Fragment,{children:[`Verify`,(0,M.jsx)(l,{className:`h-4 w-4`})]})}),(0,M.jsxs)(`div`,{className:`flex items-center gap-4 mt-4`,children:[(0,M.jsxs)(`button`,{onClick:re,className:`text-[12px] text-white/30 hover:text-white/50 flex items-center gap-1 transition-colors`,children:[(0,M.jsx)(g,{className:`h-3 w-3`}),`Back`]}),(0,M.jsx)(`button`,{onClick:()=>{w(e=>!e),h(``),a(``)},className:`text-[12px] text-white/30 hover:text-white/50 transition-colors`,children:C?`Use authenticator code`:`Use a recovery code`})]})]},`totp`)})})})}var De=(function(e){if(e==null)return Me;if(typeof e==`function`)return je(e);if(typeof e==`object`)return Array.isArray(e)?Oe(e):ke(e);if(typeof e==`string`)return Ae(e);throw Error(`Expected function, string, or object as test`)});function Oe(e){let t=[],n=-1;for(;++n<e.length;)t[n]=De(e[n]);return je(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function ke(e){let t=e;return je(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Ae(e){return je(t);function t(t){return t&&t.type===e}}function je(e){return t;function t(t,n,r){return!!(Ne(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Me(){return!0}function Ne(e){return typeof e==`object`&&!!e&&`type`in e}function Pe(e){return e}var Fe=[],Ie=`skip`;function Le(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=De(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+Pe(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=Fe,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Re(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Re(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?Fe:[e]}function ze(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Le(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var Be={indicator:`indicator`,textOnly:`text-only`,remove:`remove`};function Ve({defaultOrigin:e=``,allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a=`inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm`,blockedLinkClass:o=`text-gray-500`,linkBlockPolicy:s=Be.indicator,imageBlockPolicy:c=Be.indicator}){let l=t.length&&!t.every(e=>e===`*`),u=n.length&&!n.every(e=>e===`*`);if(!e&&(l||u))throw Error(`defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided`);return l=>{let u=Ze(e,t,n,r,i,a,o,s,c);qe(l),ze(l,u)}}function He(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 Ue(e){return typeof e==`string`?e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`):!1}var We=new Set([`https:`,`http:`,`irc:`,`ircs:`,`mailto:`,`xmpp:`,`blob:`]),Ge=new Set([`javascript:`,`data:`,`file:`,`vbscript:`]);function Ke(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e==`string`&&e.startsWith(`#`)&&!i)try{if(new URL(e,`http://example.com`).hash===e)return e}catch{}if(typeof e==`string`&&e.startsWith(`data:`))return i&&r&&e.startsWith(`data:image/`)?e:null;if(typeof e==`string`&&e.startsWith(`blob:`)){try{if(new URL(e).protocol===`blob:`&&e.length>5){let t=e.substring(5);if(t&&t.length>0&&t!==`invalid`)return e}}catch{return null}return null}let o=He(e,n);if(!o||Ge.has(o.protocol)||!(We.has(o.protocol)||a.includes(o.protocol)||a.includes(`*`)))return null;if(o.protocol===`mailto:`||!o.protocol.match(/^https?:$/))return o.href;let s=Ue(e);return o&&t.some(e=>{let t=He(e,n);return!t||t.origin!==o.origin?!1:o.href.startsWith(t.href)})?s?o.pathname+o.search+o.hash:o.href:t.includes(`*`)?o.protocol!==`https:`&&o.protocol!==`http:`?null:s?o.pathname+o.search+o.hash:o.href:null}function qe(e){if(`children`in e&&Array.isArray(e.children)){e.children=e.children.filter(e=>e!=null);for(let t of e.children)qe(t)}}var Je=Symbol(`node-seen`);function Ye(e,t,n){return t===Be.remove?{type:`remove`}:t===Be.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 Xe(e,t,n){if(t===Be.remove)return{type:`remove`};if(t===Be.textOnly){let t=String(e.properties.alt||``);return t?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[{type:`text`,value:t}]}}:{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 Ze=(e,t,n,r,i,a,o,s,c)=>{let l=(u,d,f)=>{if(u.type!==`element`||u[Je])return!0;if(u.tagName===`a`){let n=Ke(u.properties.href,t,e,!1,!1,i);if(n===null){if(u[Je]=!0,ze(u,l),f&&typeof d==`number`){let e=Ye(u,s,o);if(e.type===`remove`)return f.children.splice(d,1),[Ie,d];f.children[d]=e.element}return Ie}else return u.properties.href=n,u.properties.target=`_blank`,u.properties.rel=`noopener noreferrer`,!0}if(u.tagName===`img`){let t=Ke(u.properties.src,n,e,r,!0,i);if(t===null){if(u[Je]=!0,ze(u,l),f&&typeof d==`number`){let e=Xe(u,c,a);if(e.type===`remove`)return f.children.splice(d,1),[Ie,d];f.children[d]=e.element}return Ie}else return u.properties.src=t,!0}return!0};return l},Qe=typeof self==`object`?self:globalThis,$e=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new Qe[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new Qe[a](o),i)};return r},et=e=>$e(new Map,e)(0),tt=``,{toString:nt}={},{keys:rt}=Object,it=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=nt.call(e).slice(8,-1);switch(n){case`Array`:return[1,tt];case`Object`:return[2,tt];case`Date`:return[3,tt];case`RegExp`:return[4,tt];case`Map`:return[5,tt];case`Set`:return[6,tt];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},at=([e,t])=>e===0&&(t===`function`||t===`symbol`),ot=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=it(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of rt(r))(e||!at(it(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(at(it(n))||at(it(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!at(it(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},st=(e,{json:t,lossy:n}={})=>{let r=[];return ot(!(t||n),!!t,new Map,r)(e),r},ct=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?et(st(e,t)):structuredClone(e):(e,t)=>et(st(e,t)),lt=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};lt.prototype.normal={},lt.prototype.property={},lt.prototype.space=void 0;function ut(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new lt(n,r,t)}function dt(e){return e.toLowerCase()}var ft=class{constructor(e,t){this.attribute=t,this.property=e}};ft.prototype.attribute=``,ft.prototype.booleanish=!1,ft.prototype.boolean=!1,ft.prototype.commaOrSpaceSeparated=!1,ft.prototype.commaSeparated=!1,ft.prototype.defined=!1,ft.prototype.mustUseProperty=!1,ft.prototype.number=!1,ft.prototype.overloadedBoolean=!1,ft.prototype.property=``,ft.prototype.spaceSeparated=!1,ft.prototype.space=void 0;var pt=r({boolean:()=>N,booleanish:()=>ht,commaOrSpaceSeparated:()=>yt,commaSeparated:()=>vt,number:()=>P,overloadedBoolean:()=>gt,spaceSeparated:()=>_t}),mt=0,N=bt(),ht=bt(),gt=bt(),P=bt(),_t=bt(),vt=bt(),yt=bt();function bt(){return 2**++mt}var xt=Object.keys(pt),St=class extends ft{constructor(e,t,n,r){let i=-1;if(super(e,t),Ct(this,`space`,r),typeof n==`number`)for(;++i<xt.length;){let e=xt[i];Ct(this,xt[i],(n&pt[e])===pt[e])}}};St.prototype.defined=!0;function Ct(e,t,n){n&&(e[t]=n)}function wt(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new St(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[dt(r)]=r,n[dt(a.attribute)]=r}return new lt(t,n,e.space)}var Tt=wt({properties:{ariaActiveDescendant:null,ariaAtomic:ht,ariaAutoComplete:null,ariaBusy:ht,ariaChecked:ht,ariaColCount:P,ariaColIndex:P,ariaColSpan:P,ariaControls:_t,ariaCurrent:null,ariaDescribedBy:_t,ariaDetails:null,ariaDisabled:ht,ariaDropEffect:_t,ariaErrorMessage:null,ariaExpanded:ht,ariaFlowTo:_t,ariaGrabbed:ht,ariaHasPopup:null,ariaHidden:ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_t,ariaLevel:P,ariaLive:null,ariaModal:ht,ariaMultiLine:ht,ariaMultiSelectable:ht,ariaOrientation:null,ariaOwns:_t,ariaPlaceholder:null,ariaPosInSet:P,ariaPressed:ht,ariaReadOnly:ht,ariaRelevant:null,ariaRequired:ht,ariaRoleDescription:_t,ariaRowCount:P,ariaRowIndex:P,ariaRowSpan:P,ariaSelected:ht,ariaSetSize:P,ariaSort:null,ariaValueMax:P,ariaValueMin:P,ariaValueNow:P,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Et(e,t){return t in e?e[t]:t}function Dt(e,t){return Et(e,t.toLowerCase())}var Ot=wt({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:vt,acceptCharset:_t,accessKey:_t,action:null,allow:null,allowFullScreen:N,allowPaymentRequest:N,allowUserMedia:N,alt:null,as:null,async:N,autoCapitalize:null,autoComplete:_t,autoFocus:N,autoPlay:N,blocking:_t,capture:null,charSet:null,checked:N,cite:null,className:_t,cols:P,colSpan:null,content:null,contentEditable:ht,controls:N,controlsList:_t,coords:P|vt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:N,defer:N,dir:null,dirName:null,disabled:N,download:gt,draggable:ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:N,formTarget:null,headers:_t,height:P,hidden:gt,high:P,href:null,hrefLang:null,htmlFor:_t,httpEquiv:_t,id:null,imageSizes:null,imageSrcSet:null,inert:N,inputMode:null,integrity:null,is:null,isMap:N,itemId:null,itemProp:_t,itemRef:_t,itemScope:N,itemType:_t,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:N,low:P,manifest:null,max:null,maxLength:P,media:null,method:null,min:null,minLength:P,multiple:N,muted:N,name:null,nonce:null,noModule:N,noValidate:N,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:N,optimum:P,pattern:null,ping:_t,placeholder:null,playsInline:N,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:N,referrerPolicy:null,rel:_t,required:N,reversed:N,rows:P,rowSpan:P,sandbox:_t,scope:null,scoped:N,seamless:N,selected:N,shadowRootClonable:N,shadowRootDelegatesFocus:N,shadowRootMode:null,shape:null,size:P,sizes:null,slot:null,span:P,spellCheck:ht,src:null,srcDoc:null,srcLang:null,srcSet:null,start:P,step:null,style:null,tabIndex:P,target:null,title:null,translate:null,type:null,typeMustMatch:N,useMap:null,value:ht,width:P,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_t,axis:null,background:null,bgColor:null,border:P,borderColor:null,bottomMargin:P,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:N,declare:N,event:null,face:null,frame:null,frameBorder:null,hSpace:P,leftMargin:P,link:null,longDesc:null,lowSrc:null,marginHeight:P,marginWidth:P,noResize:N,noHref:N,noShade:N,noWrap:N,object:null,profile:null,prompt:null,rev:null,rightMargin:P,rules:null,scheme:null,scrolling:ht,standby:null,summary:null,text:null,topMargin:P,valueType:null,version:null,vAlign:null,vLink:null,vSpace:P,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:N,disableRemotePlayback:N,prefix:null,property:null,results:P,security:null,unselectable:null},space:`html`,transform:Dt}),kt=wt({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:yt,accentHeight:P,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:P,amplitude:P,arabicForm:null,ascent:P,attributeName:null,attributeType:null,azimuth:P,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:P,by:null,calcMode:null,capHeight:P,className:_t,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:P,diffuseConstant:P,direction:null,display:null,dur:null,divisor:P,dominantBaseline:null,download:N,dx:null,dy:null,edgeMode:null,editable:null,elevation:P,enableBackground:null,end:null,event:null,exponent:P,externalResourcesRequired:null,fill:null,fillOpacity:P,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:vt,g2:vt,glyphName:vt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:P,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:P,horizOriginX:P,horizOriginY:P,id:null,ideographic:P,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:P,k:P,k1:P,k2:P,k3:P,k4:P,kernelMatrix:yt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:P,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:P,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:P,overlineThickness:P,paintOrder:null,panose1:null,path:null,pathLength:P,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_t,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:P,pointsAtY:P,pointsAtZ:P,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:yt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:yt,rev:yt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:yt,requiredFeatures:yt,requiredFonts:yt,requiredFormats:yt,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:P,specularExponent:P,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:P,strikethroughThickness:P,string:null,stroke:null,strokeDashArray:yt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:P,strokeOpacity:P,strokeWidth:null,style:null,surfaceScale:P,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:yt,tabIndex:P,tableValues:null,target:null,targetX:P,targetY:P,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:yt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:P,underlineThickness:P,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:P,values:null,vAlphabetic:P,vMathematical:P,vectorEffect:null,vHanging:P,vIdeographic:P,version:null,vertAdvY:P,vertOriginX:P,vertOriginY:P,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:P,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Et}),At=wt({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()}}),jt=wt({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Dt}),Mt=wt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Nt={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`},Pt=/[A-Z]/g,Ft=/-[a-z]/g,It=/^data[-\w.:]+$/i;function Lt(e,t){let n=dt(t),r=t,i=ft;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&It.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Ft,zt);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Ft.test(e)){let n=e.replace(Pt,Rt);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=St}return new i(r,t)}function Rt(e){return`-`+e.toLowerCase()}function zt(e){return e.charAt(1).toUpperCase()}var Bt=ut([Tt,Ot,At,jt,Mt],`html`),Vt=ut([Tt,kt,At,jt,Mt],`svg`);function Ht(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Ut(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Wt=/[#.]/g;function Gt(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){Wt.lastIndex=i;let e=Wt.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function Kt(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function qt(e){return e.join(` `).trim()}function Jt(e,t,n){let r=n?en(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=Gt(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,Yt(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Xt(e,o.properties,t,n)}for(let e of a)Zt(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function Yt(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function Xt(e,t,n,r){let i=Lt(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?Kt(r):i.commaSeparated?Ht(r):i.commaOrSpaceSeparated?Kt(Ht(r).join(` `)):Qt(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?$t(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(Qt(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Zt(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(let n of t)Zt(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?Zt(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function Qt(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||dt(n)===dt(t)))return!0}return n}function $t(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function en(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var tn=`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`.split(`.`),nn=Jt(Bt,`div`),rn=Jt(Vt,`g`,tn);function an(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=on(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=on(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function on(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
|
|
5
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var sn={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/`},cn={}.hasOwnProperty,ln=Object.prototype;function un(e,t){let n=t||{};return dn({file:n.file||void 0,location:!1,schema:n.space===`svg`?Vt:Bt,verbose:n.verbose||!1},e)}function dn(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},mn(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:fn(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=an(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},mn(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},mn(e,r,n),n}default:return n=pn(e,t),n}}function fn(e,t){let n=-1,r=[];for(;++n<t.length;){let i=dn(e,t[n]);r.push(i)}return r}function pn(e,t){let n=e.schema;e.schema=t.namespaceURI===sn.svg?Vt:Bt;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;cn.call(ln,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?rn:nn)(t.tagName,i,fn(e,t.childNodes));if(mn(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&gn(r.startTag),o=r&&r.endTag&&gn(r.endTag),s=dn(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function mn(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=hn(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function hn(e,t,n){let r=gn(n);if(t.type===`element`){let 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){let r={},i;if(n.attrs)for(i in n.attrs)cn.call(n.attrs,i)&&(r[Lt(e.schema,i).property]=gn(n.attrs[i]));n.startTag;let a=gn(n.startTag),o=n.endTag?gn(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function gn(e){let t=_n({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=_n({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function _n(e){return e.line&&e.column?e:void 0}var vn={}.hasOwnProperty;function yn(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&vn.call(t,e)){let n=String(t[e]);i=vn.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var bn={},xn={}.hasOwnProperty,Sn=yn(`type`,{handlers:{root:wn,element:kn,text:Dn,comment:On,doctype:En}});function Cn(e,t){let n=(t||bn).space;return Sn(e,n===`svg`?Vt:Bt)}function wn(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=jn(e.children,n,t),Mn(e,n),n}function Tn(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=jn(e.children,n,t),Mn(e,n),n}function En(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return Mn(e,t),t}function Dn(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return Mn(e,t),t}function On(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return Mn(e,t),t}function kn(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=Vt);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&xn.call(e.properties,a)){let t=An(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:sn[o],childNodes:[],parentNode:null};return s.childNodes=jn(e.children,s,r),Mn(e,s),e.tagName===`template`&&e.content&&(s.content=Tn(e.content,r)),s}function An(e,t,n){let r=Lt(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Ut(n):qt(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=sn[r.space]}return i}function jn(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=Sn(e[r],n);a.parentNode=t,i.push(a)}return i}function Mn(e,t){let 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 Nn=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Pn=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]),F;(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`})(F||={});var Fn={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function In(e){return e>=55296&&e<=57343}function Ln(e){return e>=56320&&e<=57343}function Rn(e,t){return(e-55296)*1024+9216+t}function zn(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Bn(e){return e>=64976&&e<=65007||Pn.has(e)}var I;(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`})(I||={});var Vn=65536,Hn=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=Vn,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_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){let t=this.html.charCodeAt(this.pos+1);if(Ln(t))return this.pos++,this._addGap(),Rn(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,F.EOF;return this._err(I.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 t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,F.EOF;let n=this.html.charCodeAt(t);return n===F.CARRIAGE_RETURN?F.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,F.EOF;let e=this.html.charCodeAt(this.pos);return e===F.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,F.LINE_FEED):e===F.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,In(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===F.LINE_FEED||e===F.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){zn(e)?this._err(I.controlCharacterInInputStream):Bn(e)&&this._err(I.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},L;(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`})(L||={});function Un(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 Wn=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肻\xA0ଷ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))),Gn=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]]);String.fromCodePoint;function Kn(e){return e>=55296&&e<=57343||e>1114111?65533:Gn.get(e)??e}var qn;(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`})(qn||={});var Jn=32,Yn;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(Yn||={});function Xn(e){return e>=qn.ZERO&&e<=qn.NINE}function Zn(e){return e>=qn.UPPER_A&&e<=qn.UPPER_F||e>=qn.LOWER_A&&e<=qn.LOWER_F}function Qn(e){return e>=qn.UPPER_A&&e<=qn.UPPER_Z||e>=qn.LOWER_A&&e<=qn.LOWER_Z||Xn(e)}function $n(e){return e===qn.EQUALS||Qn(e)}var er;(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`})(er||={});var tr;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(tr||={});var nr=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=er.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=tr.Strict}startEntity(e){this.decodeMode=e,this.state=er.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case er.EntityStart:return e.charCodeAt(t)===qn.NUM?(this.state=er.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=er.NamedEntity,this.stateNamedEntity(e,t));case er.NumericStart:return this.stateNumericStart(e,t);case er.NumericDecimal:return this.stateNumericDecimal(e,t);case er.NumericHex:return this.stateNumericHex(e,t);case er.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Jn)===qn.LOWER_X?(this.state=er.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=er.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(Xn(r)||Zn(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){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(Xn(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.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===qn.SEMI)this.consumed+=1;else if(this.decodeMode===tr.Strict)return 0;return this.emitCodePoint(Kn(this.result),this.consumed),this.errors&&(e!==qn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&Yn.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=rr(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===tr.Attribute&&(i===0||$n(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&Yn.VALUE_LENGTH)>>14,i!==0){if(a===qn.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==tr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&Yn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~Yn.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case er.NamedEntity:return this.result!==0&&(this.decodeMode!==tr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case er.NumericDecimal:return this.emitNumericEntity(0,2);case er.NumericHex:return this.emitNumericEntity(0,3);case er.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case er.EntityStart:return 0}}};function rr(e,t,n,r){let i=(t&Yn.BRANCH_LENGTH)>>7,a=t&Yn.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var R;(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/`})(R||={});var ir;(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`})(ir||={});var ar;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(ar||={});var z;(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`})(z||={});var B;(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`})(B||={});var or=new Map([[z.A,B.A],[z.ADDRESS,B.ADDRESS],[z.ANNOTATION_XML,B.ANNOTATION_XML],[z.APPLET,B.APPLET],[z.AREA,B.AREA],[z.ARTICLE,B.ARTICLE],[z.ASIDE,B.ASIDE],[z.B,B.B],[z.BASE,B.BASE],[z.BASEFONT,B.BASEFONT],[z.BGSOUND,B.BGSOUND],[z.BIG,B.BIG],[z.BLOCKQUOTE,B.BLOCKQUOTE],[z.BODY,B.BODY],[z.BR,B.BR],[z.BUTTON,B.BUTTON],[z.CAPTION,B.CAPTION],[z.CENTER,B.CENTER],[z.CODE,B.CODE],[z.COL,B.COL],[z.COLGROUP,B.COLGROUP],[z.DD,B.DD],[z.DESC,B.DESC],[z.DETAILS,B.DETAILS],[z.DIALOG,B.DIALOG],[z.DIR,B.DIR],[z.DIV,B.DIV],[z.DL,B.DL],[z.DT,B.DT],[z.EM,B.EM],[z.EMBED,B.EMBED],[z.FIELDSET,B.FIELDSET],[z.FIGCAPTION,B.FIGCAPTION],[z.FIGURE,B.FIGURE],[z.FONT,B.FONT],[z.FOOTER,B.FOOTER],[z.FOREIGN_OBJECT,B.FOREIGN_OBJECT],[z.FORM,B.FORM],[z.FRAME,B.FRAME],[z.FRAMESET,B.FRAMESET],[z.H1,B.H1],[z.H2,B.H2],[z.H3,B.H3],[z.H4,B.H4],[z.H5,B.H5],[z.H6,B.H6],[z.HEAD,B.HEAD],[z.HEADER,B.HEADER],[z.HGROUP,B.HGROUP],[z.HR,B.HR],[z.HTML,B.HTML],[z.I,B.I],[z.IMG,B.IMG],[z.IMAGE,B.IMAGE],[z.INPUT,B.INPUT],[z.IFRAME,B.IFRAME],[z.KEYGEN,B.KEYGEN],[z.LABEL,B.LABEL],[z.LI,B.LI],[z.LINK,B.LINK],[z.LISTING,B.LISTING],[z.MAIN,B.MAIN],[z.MALIGNMARK,B.MALIGNMARK],[z.MARQUEE,B.MARQUEE],[z.MATH,B.MATH],[z.MENU,B.MENU],[z.META,B.META],[z.MGLYPH,B.MGLYPH],[z.MI,B.MI],[z.MO,B.MO],[z.MN,B.MN],[z.MS,B.MS],[z.MTEXT,B.MTEXT],[z.NAV,B.NAV],[z.NOBR,B.NOBR],[z.NOFRAMES,B.NOFRAMES],[z.NOEMBED,B.NOEMBED],[z.NOSCRIPT,B.NOSCRIPT],[z.OBJECT,B.OBJECT],[z.OL,B.OL],[z.OPTGROUP,B.OPTGROUP],[z.OPTION,B.OPTION],[z.P,B.P],[z.PARAM,B.PARAM],[z.PLAINTEXT,B.PLAINTEXT],[z.PRE,B.PRE],[z.RB,B.RB],[z.RP,B.RP],[z.RT,B.RT],[z.RTC,B.RTC],[z.RUBY,B.RUBY],[z.S,B.S],[z.SCRIPT,B.SCRIPT],[z.SEARCH,B.SEARCH],[z.SECTION,B.SECTION],[z.SELECT,B.SELECT],[z.SOURCE,B.SOURCE],[z.SMALL,B.SMALL],[z.SPAN,B.SPAN],[z.STRIKE,B.STRIKE],[z.STRONG,B.STRONG],[z.STYLE,B.STYLE],[z.SUB,B.SUB],[z.SUMMARY,B.SUMMARY],[z.SUP,B.SUP],[z.TABLE,B.TABLE],[z.TBODY,B.TBODY],[z.TEMPLATE,B.TEMPLATE],[z.TEXTAREA,B.TEXTAREA],[z.TFOOT,B.TFOOT],[z.TD,B.TD],[z.TH,B.TH],[z.THEAD,B.THEAD],[z.TITLE,B.TITLE],[z.TR,B.TR],[z.TRACK,B.TRACK],[z.TT,B.TT],[z.U,B.U],[z.UL,B.UL],[z.SVG,B.SVG],[z.VAR,B.VAR],[z.WBR,B.WBR],[z.XMP,B.XMP]]);function sr(e){return or.get(e)??B.UNKNOWN}var V=B,cr={[R.HTML]:new Set([V.ADDRESS,V.APPLET,V.AREA,V.ARTICLE,V.ASIDE,V.BASE,V.BASEFONT,V.BGSOUND,V.BLOCKQUOTE,V.BODY,V.BR,V.BUTTON,V.CAPTION,V.CENTER,V.COL,V.COLGROUP,V.DD,V.DETAILS,V.DIR,V.DIV,V.DL,V.DT,V.EMBED,V.FIELDSET,V.FIGCAPTION,V.FIGURE,V.FOOTER,V.FORM,V.FRAME,V.FRAMESET,V.H1,V.H2,V.H3,V.H4,V.H5,V.H6,V.HEAD,V.HEADER,V.HGROUP,V.HR,V.HTML,V.IFRAME,V.IMG,V.INPUT,V.LI,V.LINK,V.LISTING,V.MAIN,V.MARQUEE,V.MENU,V.META,V.NAV,V.NOEMBED,V.NOFRAMES,V.NOSCRIPT,V.OBJECT,V.OL,V.P,V.PARAM,V.PLAINTEXT,V.PRE,V.SCRIPT,V.SECTION,V.SELECT,V.SOURCE,V.STYLE,V.SUMMARY,V.TABLE,V.TBODY,V.TD,V.TEMPLATE,V.TEXTAREA,V.TFOOT,V.TH,V.THEAD,V.TITLE,V.TR,V.TRACK,V.UL,V.WBR,V.XMP]),[R.MATHML]:new Set([V.MI,V.MO,V.MN,V.MS,V.MTEXT,V.ANNOTATION_XML]),[R.SVG]:new Set([V.TITLE,V.FOREIGN_OBJECT,V.DESC]),[R.XLINK]:new Set,[R.XML]:new Set,[R.XMLNS]:new Set},lr=new Set([V.H1,V.H2,V.H3,V.H4,V.H5,V.H6]);new Set([z.STYLE,z.SCRIPT,z.XMP,z.IFRAME,z.NOEMBED,z.NOFRAMES,z.PLAINTEXT]);var H;(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`})(H||={});var ur={DATA:H.DATA,RCDATA:H.RCDATA,RAWTEXT:H.RAWTEXT,SCRIPT_DATA:H.SCRIPT_DATA,PLAINTEXT:H.PLAINTEXT,CDATA_SECTION:H.CDATA_SECTION};function dr(e){return e>=F.DIGIT_0&&e<=F.DIGIT_9}function fr(e){return e>=F.LATIN_CAPITAL_A&&e<=F.LATIN_CAPITAL_Z}function pr(e){return e>=F.LATIN_SMALL_A&&e<=F.LATIN_SMALL_Z}function mr(e){return pr(e)||fr(e)}function hr(e){return mr(e)||dr(e)}function gr(e){return e+32}function _r(e){return e===F.SPACE||e===F.LINE_FEED||e===F.TABULATION||e===F.FORM_FEED}function vr(e){return _r(e)||e===F.SOLIDUS||e===F.GREATER_THAN_SIGN}function yr(e){return e===F.NULL?I.nullCharacterReference:e>1114111?I.characterReferenceOutsideUnicodeRange:In(e)?I.surrogateCharacterReference:Bn(e)?I.noncharacterCharacterReference:zn(e)||e===F.CARRIAGE_RETURN?I.controlCharacterReference:null}var br=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=H.DATA,this.returnState=H.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new Hn(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new nr(Wn,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(I.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(I.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=yr(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||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;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw 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:L.START_TAG,tagName:``,tagID:B.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:L.END_TAG,tagName:``,tagID:B.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:L.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:L.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;let t=this.currentToken;if(Un(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(I.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(){let e=this.currentToken;this.prepareToken(e),e.tagID=sr(e.tagName),e.type===L.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(I.endTagWithAttributes),e.selfClosing&&this._err(I.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 L.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case L.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case L.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:L.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){let t=_r(e)?L.WHITESPACE_CHARACTER:e===F.NULL?L.NULL_CHARACTER:L.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(L.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=H.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?tr.Attribute:tr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===H.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===H.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===H.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case H.DATA:this._stateData(e);break;case H.RCDATA:this._stateRcdata(e);break;case H.RAWTEXT:this._stateRawtext(e);break;case H.SCRIPT_DATA:this._stateScriptData(e);break;case H.PLAINTEXT:this._statePlaintext(e);break;case H.TAG_OPEN:this._stateTagOpen(e);break;case H.END_TAG_OPEN:this._stateEndTagOpen(e);break;case H.TAG_NAME:this._stateTagName(e);break;case H.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case H.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case H.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case H.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case H.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case H.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case H.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case H.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case H.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case H.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case H.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case H.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case H.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case H.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case H.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case H.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case H.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case H.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case H.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case H.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case H.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case H.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case H.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case H.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case H.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case H.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case H.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case H.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case H.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case H.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case H.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case H.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case H.BOGUS_COMMENT:this._stateBogusComment(e);break;case H.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case H.COMMENT_START:this._stateCommentStart(e);break;case H.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case H.COMMENT:this._stateComment(e);break;case H.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case H.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case H.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case H.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case H.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case H.COMMENT_END:this._stateCommentEnd(e);break;case H.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case H.DOCTYPE:this._stateDoctype(e);break;case H.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case H.DOCTYPE_NAME:this._stateDoctypeName(e);break;case H.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case H.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case H.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case H.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case H.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case H.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case H.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case H.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case H.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case H.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case H.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case H.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case H.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case H.CDATA_SECTION:this._stateCdataSection(e);break;case H.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case H.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case H.CHARACTER_REFERENCE:this._stateCharacterReference();break;case H.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case F.LESS_THAN_SIGN:this.state=H.TAG_OPEN;break;case F.AMPERSAND:this._startCharacterReference();break;case F.NULL:this._err(I.unexpectedNullCharacter),this._emitCodePoint(e);break;case F.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case F.AMPERSAND:this._startCharacterReference();break;case F.LESS_THAN_SIGN:this.state=H.RCDATA_LESS_THAN_SIGN;break;case F.NULL:this._err(I.unexpectedNullCharacter),this._emitChars(`�`);break;case F.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case F.LESS_THAN_SIGN:this.state=H.RAWTEXT_LESS_THAN_SIGN;break;case F.NULL:this._err(I.unexpectedNullCharacter),this._emitChars(`�`);break;case F.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case F.LESS_THAN_SIGN:this.state=H.SCRIPT_DATA_LESS_THAN_SIGN;break;case F.NULL:this._err(I.unexpectedNullCharacter),this._emitChars(`�`);break;case F.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case F.NULL:this._err(I.unexpectedNullCharacter),this._emitChars(`�`);break;case F.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(mr(e))this._createStartTagToken(),this.state=H.TAG_NAME,this._stateTagName(e);else switch(e){case F.EXCLAMATION_MARK:this.state=H.MARKUP_DECLARATION_OPEN;break;case F.SOLIDUS:this.state=H.END_TAG_OPEN;break;case F.QUESTION_MARK:this._err(I.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=H.BOGUS_COMMENT,this._stateBogusComment(e);break;case F.EOF:this._err(I.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(I.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=H.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(mr(e))this._createEndTagToken(),this.state=H.TAG_NAME,this._stateTagName(e);else switch(e){case F.GREATER_THAN_SIGN:this._err(I.missingEndTagName),this.state=H.DATA;break;case F.EOF:this._err(I.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(I.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=H.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:this.state=H.BEFORE_ATTRIBUTE_NAME;break;case F.SOLIDUS:this.state=H.SELF_CLOSING_START_TAG;break;case F.GREATER_THAN_SIGN:this.state=H.DATA,this.emitCurrentTagToken();break;case F.NULL:this._err(I.unexpectedNullCharacter),t.tagName+=`�`;break;case F.EOF:this._err(I.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(fr(e)?gr(e):e)}}_stateRcdataLessThanSign(e){e===F.SOLIDUS?this.state=H.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=H.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){mr(e)?(this.state=H.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=H.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=H.BEFORE_ATTRIBUTE_NAME,!1;case F.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=H.SELF_CLOSING_START_TAG,!1;case F.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=H.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=H.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===F.SOLIDUS?this.state=H.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=H.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){mr(e)?(this.state=H.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=H.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=H.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case F.SOLIDUS:this.state=H.SCRIPT_DATA_END_TAG_OPEN;break;case F.EXCLAMATION_MARK:this.state=H.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=H.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){mr(e)?(this.state=H.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=H.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=H.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===F.HYPHEN_MINUS?(this.state=H.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=H.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===F.HYPHEN_MINUS?(this.state=H.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=H.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case F.HYPHEN_MINUS:this.state=H.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case F.LESS_THAN_SIGN:this.state=H.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case F.NULL:this._err(I.unexpectedNullCharacter),this._emitChars(`�`);break;case F.EOF:this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case F.HYPHEN_MINUS:this.state=H.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case F.LESS_THAN_SIGN:this.state=H.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case F.NULL:this._err(I.unexpectedNullCharacter),this.state=H.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case F.EOF:this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=H.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case F.HYPHEN_MINUS:this._emitChars(`-`);break;case F.LESS_THAN_SIGN:this.state=H.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case F.GREATER_THAN_SIGN:this.state=H.SCRIPT_DATA,this._emitChars(`>`);break;case F.NULL:this._err(I.unexpectedNullCharacter),this.state=H.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case F.EOF:this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=H.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===F.SOLIDUS?this.state=H.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:mr(e)?(this._emitChars(`<`),this.state=H.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=H.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){mr(e)?(this.state=H.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=H.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=H.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Fn.SCRIPT,!1)&&vr(this.preprocessor.peek(Fn.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<Fn.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=H.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case F.HYPHEN_MINUS:this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case F.LESS_THAN_SIGN:this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case F.NULL:this._err(I.unexpectedNullCharacter),this._emitChars(`�`);break;case F.EOF:this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case F.HYPHEN_MINUS:this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case F.LESS_THAN_SIGN:this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case F.NULL:this._err(I.unexpectedNullCharacter),this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case F.EOF:this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case F.HYPHEN_MINUS:this._emitChars(`-`);break;case F.LESS_THAN_SIGN:this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case F.GREATER_THAN_SIGN:this.state=H.SCRIPT_DATA,this._emitChars(`>`);break;case F.NULL:this._err(I.unexpectedNullCharacter),this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case F.EOF:this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===F.SOLIDUS?(this.state=H.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Fn.SCRIPT,!1)&&vr(this.preprocessor.peek(Fn.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<Fn.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=H.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.SOLIDUS:case F.GREATER_THAN_SIGN:case F.EOF:this.state=H.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case F.EQUALS_SIGN:this._err(I.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=H.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=H.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:case F.SOLIDUS:case F.GREATER_THAN_SIGN:case F.EOF:this._leaveAttrName(),this.state=H.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case F.EQUALS_SIGN:this._leaveAttrName(),this.state=H.BEFORE_ATTRIBUTE_VALUE;break;case F.QUOTATION_MARK:case F.APOSTROPHE:case F.LESS_THAN_SIGN:this._err(I.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case F.NULL:this._err(I.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(fr(e)?gr(e):e)}}_stateAfterAttributeName(e){switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.SOLIDUS:this.state=H.SELF_CLOSING_START_TAG;break;case F.EQUALS_SIGN:this.state=H.BEFORE_ATTRIBUTE_VALUE;break;case F.GREATER_THAN_SIGN:this.state=H.DATA,this.emitCurrentTagToken();break;case F.EOF:this._err(I.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=H.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.QUOTATION_MARK:this.state=H.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case F.APOSTROPHE:this.state=H.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case F.GREATER_THAN_SIGN:this._err(I.missingAttributeValue),this.state=H.DATA,this.emitCurrentTagToken();break;default:this.state=H.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case F.QUOTATION_MARK:this.state=H.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case F.AMPERSAND:this._startCharacterReference();break;case F.NULL:this._err(I.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case F.EOF:this._err(I.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case F.APOSTROPHE:this.state=H.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case F.AMPERSAND:this._startCharacterReference();break;case F.NULL:this._err(I.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case F.EOF:this._err(I.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:this._leaveAttrValue(),this.state=H.BEFORE_ATTRIBUTE_NAME;break;case F.AMPERSAND:this._startCharacterReference();break;case F.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=H.DATA,this.emitCurrentTagToken();break;case F.NULL:this._err(I.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case F.QUOTATION_MARK:case F.APOSTROPHE:case F.LESS_THAN_SIGN:case F.EQUALS_SIGN:case F.GRAVE_ACCENT:this._err(I.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case F.EOF:this._err(I.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:this._leaveAttrValue(),this.state=H.BEFORE_ATTRIBUTE_NAME;break;case F.SOLIDUS:this._leaveAttrValue(),this.state=H.SELF_CLOSING_START_TAG;break;case F.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=H.DATA,this.emitCurrentTagToken();break;case F.EOF:this._err(I.eofInTag),this._emitEOFToken();break;default:this._err(I.missingWhitespaceBetweenAttributes),this.state=H.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case F.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=H.DATA,this.emitCurrentTagToken();break}case F.EOF:this._err(I.eofInTag),this._emitEOFToken();break;default:this._err(I.unexpectedSolidusInTag),this.state=H.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case F.GREATER_THAN_SIGN:this.state=H.DATA,this.emitCurrentComment(t);break;case F.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case F.NULL:this._err(I.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Fn.DASH_DASH,!0)?(this._createCommentToken(Fn.DASH_DASH.length+1),this.state=H.COMMENT_START):this._consumeSequenceIfMatch(Fn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Fn.DOCTYPE.length+1),this.state=H.DOCTYPE):this._consumeSequenceIfMatch(Fn.CDATA_START,!0)?this.inForeignNode?this.state=H.CDATA_SECTION:(this._err(I.cdataInHtmlContent),this._createCommentToken(Fn.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=H.BOGUS_COMMENT):this._ensureHibernation()||(this._err(I.incorrectlyOpenedComment),this._createCommentToken(2),this.state=H.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case F.HYPHEN_MINUS:this.state=H.COMMENT_START_DASH;break;case F.GREATER_THAN_SIGN:{this._err(I.abruptClosingOfEmptyComment),this.state=H.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=H.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case F.HYPHEN_MINUS:this.state=H.COMMENT_END;break;case F.GREATER_THAN_SIGN:this._err(I.abruptClosingOfEmptyComment),this.state=H.DATA,this.emitCurrentComment(t);break;case F.EOF:this._err(I.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=H.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case F.HYPHEN_MINUS:this.state=H.COMMENT_END_DASH;break;case F.LESS_THAN_SIGN:t.data+=`<`,this.state=H.COMMENT_LESS_THAN_SIGN;break;case F.NULL:this._err(I.unexpectedNullCharacter),t.data+=`�`;break;case F.EOF:this._err(I.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case F.EXCLAMATION_MARK:t.data+=`!`,this.state=H.COMMENT_LESS_THAN_SIGN_BANG;break;case F.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=H.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===F.HYPHEN_MINUS?this.state=H.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=H.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===F.HYPHEN_MINUS?this.state=H.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=H.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==F.GREATER_THAN_SIGN&&e!==F.EOF&&this._err(I.nestedComment),this.state=H.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case F.HYPHEN_MINUS:this.state=H.COMMENT_END;break;case F.EOF:this._err(I.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=H.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case F.GREATER_THAN_SIGN:this.state=H.DATA,this.emitCurrentComment(t);break;case F.EXCLAMATION_MARK:this.state=H.COMMENT_END_BANG;break;case F.HYPHEN_MINUS:t.data+=`-`;break;case F.EOF:this._err(I.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=H.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case F.HYPHEN_MINUS:t.data+=`--!`,this.state=H.COMMENT_END_DASH;break;case F.GREATER_THAN_SIGN:this._err(I.incorrectlyClosedComment),this.state=H.DATA,this.emitCurrentComment(t);break;case F.EOF:this._err(I.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=H.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:this.state=H.BEFORE_DOCTYPE_NAME;break;case F.GREATER_THAN_SIGN:this.state=H.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case F.EOF:{this._err(I.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(I.missingWhitespaceBeforeDoctypeName),this.state=H.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(fr(e))this._createDoctypeToken(String.fromCharCode(gr(e))),this.state=H.DOCTYPE_NAME;else switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.NULL:this._err(I.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=H.DOCTYPE_NAME;break;case F.GREATER_THAN_SIGN:{this._err(I.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=H.DATA;break}case F.EOF:{this._err(I.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=H.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:this.state=H.AFTER_DOCTYPE_NAME;break;case F.GREATER_THAN_SIGN:this.state=H.DATA,this.emitCurrentDoctype(t);break;case F.NULL:this._err(I.unexpectedNullCharacter),t.name+=`�`;break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(fr(e)?gr(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.GREATER_THAN_SIGN:this.state=H.DATA,this.emitCurrentDoctype(t);break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(Fn.PUBLIC,!1)?this.state=H.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Fn.SYSTEM,!1)?this.state=H.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(I.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:this.state=H.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case F.QUOTATION_MARK:this._err(I.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=H.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case F.APOSTROPHE:this._err(I.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=H.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case F.GREATER_THAN_SIGN:this._err(I.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=H.DATA,this.emitCurrentDoctype(t);break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(I.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.QUOTATION_MARK:t.publicId=``,this.state=H.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case F.APOSTROPHE:t.publicId=``,this.state=H.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case F.GREATER_THAN_SIGN:this._err(I.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=H.DATA,this.emitCurrentDoctype(t);break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(I.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case F.QUOTATION_MARK:this.state=H.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case F.NULL:this._err(I.unexpectedNullCharacter),t.publicId+=`�`;break;case F.GREATER_THAN_SIGN:this._err(I.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=H.DATA;break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case F.APOSTROPHE:this.state=H.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case F.NULL:this._err(I.unexpectedNullCharacter),t.publicId+=`�`;break;case F.GREATER_THAN_SIGN:this._err(I.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=H.DATA;break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:this.state=H.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case F.GREATER_THAN_SIGN:this.state=H.DATA,this.emitCurrentDoctype(t);break;case F.QUOTATION_MARK:this._err(I.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case F.APOSTROPHE:this._err(I.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=H.DATA;break;case F.QUOTATION_MARK:t.systemId=``,this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case F.APOSTROPHE:t.systemId=``,this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:this.state=H.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case F.QUOTATION_MARK:this._err(I.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case F.APOSTROPHE:this._err(I.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case F.GREATER_THAN_SIGN:this._err(I.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=H.DATA,this.emitCurrentDoctype(t);break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.QUOTATION_MARK:t.systemId=``,this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case F.APOSTROPHE:t.systemId=``,this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case F.GREATER_THAN_SIGN:this._err(I.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=H.DATA,this.emitCurrentDoctype(t);break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case F.QUOTATION_MARK:this.state=H.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case F.NULL:this._err(I.unexpectedNullCharacter),t.systemId+=`�`;break;case F.GREATER_THAN_SIGN:this._err(I.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=H.DATA;break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case F.APOSTROPHE:this.state=H.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case F.NULL:this._err(I.unexpectedNullCharacter),t.systemId+=`�`;break;case F.GREATER_THAN_SIGN:this._err(I.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=H.DATA;break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=H.DATA;break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(I.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case F.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=H.DATA;break;case F.NULL:this._err(I.unexpectedNullCharacter);break;case F.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case F.RIGHT_SQUARE_BRACKET:this.state=H.CDATA_SECTION_BRACKET;break;case F.EOF:this._err(I.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===F.RIGHT_SQUARE_BRACKET?this.state=H.CDATA_SECTION_END:(this._emitChars(`]`),this.state=H.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case F.GREATER_THAN_SIGN:this.state=H.DATA;break;case F.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=H.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(F.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&hr(this.preprocessor.peek(1))?H.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){hr(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===F.SEMICOLON&&this._err(I.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},xr=new Set([B.DD,B.DT,B.LI,B.OPTGROUP,B.OPTION,B.P,B.RB,B.RP,B.RT,B.RTC]),Sr=new Set([...xr,B.CAPTION,B.COLGROUP,B.TBODY,B.TD,B.TFOOT,B.TH,B.THEAD,B.TR]),Cr=new Set([B.APPLET,B.CAPTION,B.HTML,B.MARQUEE,B.OBJECT,B.TABLE,B.TD,B.TEMPLATE,B.TH]),wr=new Set([...Cr,B.OL,B.UL]),Tr=new Set([...Cr,B.BUTTON]),Er=new Set([B.ANNOTATION_XML,B.MI,B.MN,B.MO,B.MS,B.MTEXT]),Dr=new Set([B.DESC,B.FOREIGN_OBJECT,B.TITLE]),Or=new Set([B.TR,B.TEMPLATE,B.HTML]),kr=new Set([B.TBODY,B.TFOOT,B.THEAD,B.TEMPLATE,B.HTML]),Ar=new Set([B.TABLE,B.TEMPLATE,B.HTML]),jr=new Set([B.TD,B.TH]),Mr=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=B.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===B.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===R.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(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let 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])!==R.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(lr,R.HTML)}popUntilTableCellPopped(){this.popUntilPopped(jr,R.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){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(Ar,R.HTML)}clearBackToTableBodyContext(){this.clearBackTo(kr,R.HTML)}clearBackToTableRowContext(){this.clearBackTo(Or,R.HTML)}remove(e){let 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]===B.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===B.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case R.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case R.SVG:if(Dr.has(r))return!1;break;case R.MATHML:if(Er.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Cr)}hasInListItemScope(e){return this.hasInDynamicScope(e,wr)}hasInButtonScope(e){return this.hasInDynamicScope(e,Tr)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case R.HTML:if(lr.has(t))return!0;if(Cr.has(t))return!1;break;case R.SVG:if(Dr.has(t))return!1;break;case R.MATHML:if(Er.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===R.HTML)switch(this.tagIDs[t]){case e:return!0;case B.TABLE:case B.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===R.HTML)switch(this.tagIDs[e]){case B.TBODY:case B.THEAD:case B.TFOOT:return!0;case B.TABLE:case B.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===R.HTML)switch(this.tagIDs[t]){case e:return!0;case B.OPTION:case B.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&xr.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Sr.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&Sr.has(this.currentTagId);)this.pop()}},Nr=3,Pr;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(Pr||={});var Fr={type:Pr.Marker},Ir=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===Pr.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<Nr)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<Nr)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=Nr&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(Fr)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:Pr.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Pr.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(Fr);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===Pr.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===Pr.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===Pr.Element&&t.element===e)}},Lr={createDocument(){return{nodeName:`#document`,mode:ar.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){let 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){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};Lr.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(Lr.isTextNode(n)){n.value+=t;return}}Lr.appendChild(e,Lr.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Lr.isTextNode(r)?r.value+=t:Lr.insertBefore(e,Lr.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.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}}},Rr=`html`,zr=`about:legacy-compat`,Br=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,Vr=`+//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//`.split(`,`),Hr=[...Vr,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],Ur=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),Wr=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],Gr=[...Wr,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function Kr(e,t){return t.some(t=>e.startsWith(t))}function qr(e){return e.name===Rr&&e.publicId===null&&(e.systemId===null||e.systemId===zr)}function Jr(e){if(e.name!==Rr)return ar.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===Br)return ar.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Ur.has(n))return ar.QUIRKS;let e=t===null?Hr:Vr;if(Kr(n,e))return ar.QUIRKS;if(e=t===null?Wr:Gr,Kr(n,e))return ar.LIMITED_QUIRKS}return ar.NO_QUIRKS}var Yr={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},Xr=`definitionurl`,Zr=`definitionURL`,Qr=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`.split(`.`).map(e=>[e.toLowerCase(),e])),$r=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:R.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:R.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:R.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:R.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:R.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:R.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:R.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:R.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:R.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:R.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:R.XMLNS}]]),ei=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`.split(`.`).map(e=>[e.toLowerCase(),e])),ti=new Set([B.B,B.BIG,B.BLOCKQUOTE,B.BODY,B.BR,B.CENTER,B.CODE,B.DD,B.DIV,B.DL,B.DT,B.EM,B.EMBED,B.H1,B.H2,B.H3,B.H4,B.H5,B.H6,B.HEAD,B.HR,B.I,B.IMG,B.LI,B.LISTING,B.MENU,B.META,B.NOBR,B.OL,B.P,B.PRE,B.RUBY,B.S,B.SMALL,B.SPAN,B.STRONG,B.STRIKE,B.SUB,B.SUP,B.TABLE,B.TT,B.U,B.UL,B.VAR]);function ni(e){let t=e.tagID;return t===B.FONT&&e.attrs.some(({name:e})=>e===ir.COLOR||e===ir.SIZE||e===ir.FACE)||ti.has(t)}function ri(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Xr){e.attrs[t].name=Zr;break}}function ii(e){for(let t=0;t<e.attrs.length;t++){let n=Qr.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function ai(e){for(let t=0;t<e.attrs.length;t++){let n=$r.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 oi(e){let t=ei.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=sr(e.tagName))}function si(e,t){return t===R.MATHML&&(e===B.MI||e===B.MO||e===B.MN||e===B.MS||e===B.MTEXT)}function ci(e,t,n){if(t===R.MATHML&&e===B.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===ir.ENCODING){let t=n[e].value.toLowerCase();return t===Yr.TEXT_HTML||t===Yr.APPLICATION_XML}}return t===R.SVG&&(e===B.FOREIGN_OBJECT||e===B.DESC||e===B.TITLE)}function li(e,t,n,r){return(!r||r===R.HTML)&&ci(e,t,n)||(!r||r===R.MATHML)&&si(e,t)}var ui=`hidden`,di=8,fi=3,U;(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`})(U||={});var pi={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},mi=new Set([B.TABLE,B.TBODY,B.TFOOT,B.THEAD,B.TR]),hi={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Lr,onParseError:null},gi=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=U.INITIAL,this.originalInsertionMode=U.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={...hi,...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 br(this.options,this),this.activeFormattingElements=new Ir(this.treeAdapter),this.fragmentContextID=n?sr(this.treeAdapter.getTagName(n)):B.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new Mr(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...hi,...t};e??=n.treeAdapter.createElement(z.TEMPLATE,R.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,R.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===B.TEMPLATE&&i.tmplInsertionModeStack.unshift(U.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??pi,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||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.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===R.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,R.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=U.TEXT}switchToPlaintextParsing(){this.insertionMode=U.TEXT,this.originalInsertionMode=U.IN_BODY,this.tokenizer.state=ur.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)===z.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==R.HTML))switch(this.fragmentContextID){case B.TITLE:case B.TEXTAREA:this.tokenizer.state=ur.RCDATA;break;case B.STYLE:case B.XMP:case B.IFRAME:case B.NOEMBED:case B.NOFRAMES:case B.NOSCRIPT:this.tokenizer.state=ur.RAWTEXT;break;case B.SCRIPT:this.tokenizer.state=ur.SCRIPT_DATA;break;case B.PLAINTEXT:this.tokenizer.state=ur.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,R.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,R.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(){let e=this.treeAdapter.createElement(z.HTML,R.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,B.HTML)}_appendCommentNode(e,t){let 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;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}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){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===L.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===B.SVG&&this.treeAdapter.getTagName(t)===z.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===R.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===B.MGLYPH||e.tagID===B.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,R.HTML)}_processToken(e){switch(e.type){case L.CHARACTER:this.onCharacter(e);break;case L.NULL_CHARACTER:this.onNullCharacter(e);break;case L.COMMENT:this.onComment(e);break;case L.DOCTYPE:this.onDoctype(e);break;case L.START_TAG:this._processStartTag(e);break;case L.END_TAG:this.onEndTag(e);break;case L.EOF:this.onEof(e);break;case L.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return li(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===Pr.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=U.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(B.P),this.openElements.popUntilTagNamePopped(B.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case B.TR:this.insertionMode=U.IN_ROW;return;case B.TBODY:case B.THEAD:case B.TFOOT:this.insertionMode=U.IN_TABLE_BODY;return;case B.CAPTION:this.insertionMode=U.IN_CAPTION;return;case B.COLGROUP:this.insertionMode=U.IN_COLUMN_GROUP;return;case B.TABLE:this.insertionMode=U.IN_TABLE;return;case B.BODY:this.insertionMode=U.IN_BODY;return;case B.FRAMESET:this.insertionMode=U.IN_FRAMESET;return;case B.SELECT:this._resetInsertionModeForSelect(e);return;case B.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case B.HTML:this.insertionMode=this.headElement?U.AFTER_HEAD:U.BEFORE_HEAD;return;case B.TD:case B.TH:if(e>0){this.insertionMode=U.IN_CELL;return}break;case B.HEAD:if(e>0){this.insertionMode=U.IN_HEAD;return}break}this.insertionMode=U.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===B.TEMPLATE)break;if(e===B.TABLE){this.insertionMode=U.IN_SELECT_IN_TABLE;return}}this.insertionMode=U.IN_SELECT}_isElementCausesFosterParenting(e){return mi.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--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case B.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===R.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case B.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return cr[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Fo(this,e);return}switch(this.insertionMode){case U.INITIAL:ki(this,e);break;case U.BEFORE_HTML:Mi(this,e);break;case U.BEFORE_HEAD:Fi(this,e);break;case U.IN_HEAD:zi(this,e);break;case U.IN_HEAD_NO_SCRIPT:Hi(this,e);break;case U.AFTER_HEAD:Gi(this,e);break;case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:Ji(this,e);break;case U.TEXT:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:Ua(this,e);break;case U.IN_TABLE_TEXT:no(this,e);break;case U.IN_COLUMN_GROUP:lo(this,e);break;case U.AFTER_BODY:Eo(this,e);break;case U.AFTER_AFTER_BODY:Mo(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Po(this,e);return}switch(this.insertionMode){case U.INITIAL:ki(this,e);break;case U.BEFORE_HTML:Mi(this,e);break;case U.BEFORE_HEAD:Fi(this,e);break;case U.IN_HEAD:zi(this,e);break;case U.IN_HEAD_NO_SCRIPT:Hi(this,e);break;case U.AFTER_HEAD:Gi(this,e);break;case U.TEXT:this._insertCharacters(e);break;case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:Ua(this,e);break;case U.IN_COLUMN_GROUP:lo(this,e);break;case U.AFTER_BODY:Eo(this,e);break;case U.AFTER_AFTER_BODY:Mo(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){wi(this,e);return}switch(this.insertionMode){case U.INITIAL:case U.BEFORE_HTML:case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_TEMPLATE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:wi(this,e);break;case U.IN_TABLE_TEXT:ro(this,e);break;case U.AFTER_BODY:Ti(this,e);break;case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:Ei(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case U.INITIAL:Oi(this,e);break;case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:this._err(e,I.misplacedDoctype);break;case U.IN_TABLE_TEXT:ro(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,I.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?Lo(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case U.INITIAL:ki(this,e);break;case U.BEFORE_HTML:Ai(this,e);break;case U.BEFORE_HEAD:Ni(this,e);break;case U.IN_HEAD:Ii(this,e);break;case U.IN_HEAD_NO_SCRIPT:Bi(this,e);break;case U.AFTER_HEAD:Ui(this,e);break;case U.IN_BODY:Da(this,e);break;case U.IN_TABLE:Qa(this,e);break;case U.IN_TABLE_TEXT:ro(this,e);break;case U.IN_CAPTION:ao(this,e);break;case U.IN_COLUMN_GROUP:so(this,e);break;case U.IN_TABLE_BODY:uo(this,e);break;case U.IN_ROW:po(this,e);break;case U.IN_CELL:ho(this,e);break;case U.IN_SELECT:_o(this,e);break;case U.IN_SELECT_IN_TABLE:yo(this,e);break;case U.IN_TEMPLATE:xo(this,e);break;case U.AFTER_BODY:wo(this,e);break;case U.IN_FRAMESET:Do(this,e);break;case U.AFTER_FRAMESET:ko(this,e);break;case U.AFTER_AFTER_BODY:jo(this,e);break;case U.AFTER_AFTER_FRAMESET:No(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?Ro(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case U.INITIAL:ki(this,e);break;case U.BEFORE_HTML:ji(this,e);break;case U.BEFORE_HEAD:Pi(this,e);break;case U.IN_HEAD:Li(this,e);break;case U.IN_HEAD_NO_SCRIPT:Vi(this,e);break;case U.AFTER_HEAD:Wi(this,e);break;case U.IN_BODY:za(this,e);break;case U.TEXT:Va(this,e);break;case U.IN_TABLE:$a(this,e);break;case U.IN_TABLE_TEXT:ro(this,e);break;case U.IN_CAPTION:oo(this,e);break;case U.IN_COLUMN_GROUP:co(this,e);break;case U.IN_TABLE_BODY:fo(this,e);break;case U.IN_ROW:mo(this,e);break;case U.IN_CELL:go(this,e);break;case U.IN_SELECT:vo(this,e);break;case U.IN_SELECT_IN_TABLE:bo(this,e);break;case U.IN_TEMPLATE:So(this,e);break;case U.AFTER_BODY:To(this,e);break;case U.IN_FRAMESET:Oo(this,e);break;case U.AFTER_FRAMESET:Ao(this,e);break;case U.AFTER_AFTER_BODY:Mo(this,e);break;default:}}onEof(e){switch(this.insertionMode){case U.INITIAL:ki(this,e);break;case U.BEFORE_HTML:Mi(this,e);break;case U.BEFORE_HEAD:Fi(this,e);break;case U.IN_HEAD:zi(this,e);break;case U.IN_HEAD_NO_SCRIPT:Hi(this,e);break;case U.AFTER_HEAD:Gi(this,e);break;case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:Ba(this,e);break;case U.TEXT:Ha(this,e);break;case U.IN_TABLE_TEXT:ro(this,e);break;case U.IN_TEMPLATE:Co(this,e);break;case U.AFTER_BODY:case U.IN_FRAMESET:case U.AFTER_FRAMESET:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:Di(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===F.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 U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.TEXT:case U.IN_COLUMN_GROUP:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:this._insertCharacters(e);break;case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:case U.AFTER_BODY:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:qi(this,e);break;case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:Ua(this,e);break;case U.IN_TABLE_TEXT:to(this,e);break;default:}}};function _i(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):Ra(e,t),n}function vi(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let 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 yi(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=fi;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=bi(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function bi(e,t){let 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 xi(e,t,n){let r=sr(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===B.TEMPLATE&&i===R.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Si(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Ci(e,t){for(let n=0;n<di;n++){let n=_i(e,t);if(!n)break;let r=vi(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=yi(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&xi(e,a,i),Si(e,r,n)}}function wi(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Ti(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Ei(e,t){e._appendCommentNode(t,e.document)}function Di(e,t){if(e.stopped=!0,t.location){let 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){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function Oi(e,t){e._setDocumentType(t);let n=t.forceQuirks?ar.QUIRKS:Jr(t);qr(t)||e._err(t,I.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=U.BEFORE_HTML}function ki(e,t){e._err(t,I.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ar.QUIRKS),e.insertionMode=U.BEFORE_HTML,e._processToken(t)}function Ai(e,t){t.tagID===B.HTML?(e._insertElement(t,R.HTML),e.insertionMode=U.BEFORE_HEAD):Mi(e,t)}function ji(e,t){let n=t.tagID;(n===B.HTML||n===B.HEAD||n===B.BODY||n===B.BR)&&Mi(e,t)}function Mi(e,t){e._insertFakeRootElement(),e.insertionMode=U.BEFORE_HEAD,e._processToken(t)}function Ni(e,t){switch(t.tagID){case B.HTML:Da(e,t);break;case B.HEAD:e._insertElement(t,R.HTML),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD;break;default:Fi(e,t)}}function Pi(e,t){let n=t.tagID;n===B.HEAD||n===B.BODY||n===B.HTML||n===B.BR?Fi(e,t):e._err(t,I.endTagWithoutMatchingOpenElement)}function Fi(e,t){e._insertFakeElement(z.HEAD,B.HEAD),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD,e._processToken(t)}function Ii(e,t){switch(t.tagID){case B.HTML:Da(e,t);break;case B.BASE:case B.BASEFONT:case B.BGSOUND:case B.LINK:case B.META:e._appendElement(t,R.HTML),t.ackSelfClosing=!0;break;case B.TITLE:e._switchToTextParsing(t,ur.RCDATA);break;case B.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,ur.RAWTEXT):(e._insertElement(t,R.HTML),e.insertionMode=U.IN_HEAD_NO_SCRIPT);break;case B.NOFRAMES:case B.STYLE:e._switchToTextParsing(t,ur.RAWTEXT);break;case B.SCRIPT:e._switchToTextParsing(t,ur.SCRIPT_DATA);break;case B.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=U.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(U.IN_TEMPLATE);break;case B.HEAD:e._err(t,I.misplacedStartTagForHeadElement);break;default:zi(e,t)}}function Li(e,t){switch(t.tagID){case B.HEAD:e.openElements.pop(),e.insertionMode=U.AFTER_HEAD;break;case B.BODY:case B.BR:case B.HTML:zi(e,t);break;case B.TEMPLATE:Ri(e,t);break;default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function Ri(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==B.TEMPLATE&&e._err(t,I.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(B.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,I.endTagWithoutMatchingOpenElement)}function zi(e,t){e.openElements.pop(),e.insertionMode=U.AFTER_HEAD,e._processToken(t)}function Bi(e,t){switch(t.tagID){case B.HTML:Da(e,t);break;case B.BASEFONT:case B.BGSOUND:case B.HEAD:case B.LINK:case B.META:case B.NOFRAMES:case B.STYLE:Ii(e,t);break;case B.NOSCRIPT:e._err(t,I.nestedNoscriptInHead);break;default:Hi(e,t)}}function Vi(e,t){switch(t.tagID){case B.NOSCRIPT:e.openElements.pop(),e.insertionMode=U.IN_HEAD;break;case B.BR:Hi(e,t);break;default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function Hi(e,t){let n=t.type===L.EOF?I.openElementsLeftAfterEof:I.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=U.IN_HEAD,e._processToken(t)}function Ui(e,t){switch(t.tagID){case B.HTML:Da(e,t);break;case B.BODY:e._insertElement(t,R.HTML),e.framesetOk=!1,e.insertionMode=U.IN_BODY;break;case B.FRAMESET:e._insertElement(t,R.HTML),e.insertionMode=U.IN_FRAMESET;break;case B.BASE:case B.BASEFONT:case B.BGSOUND:case B.LINK:case B.META:case B.NOFRAMES:case B.SCRIPT:case B.STYLE:case B.TEMPLATE:case B.TITLE:e._err(t,I.abandonedHeadElementChild),e.openElements.push(e.headElement,B.HEAD),Ii(e,t),e.openElements.remove(e.headElement);break;case B.HEAD:e._err(t,I.misplacedStartTagForHeadElement);break;default:Gi(e,t)}}function Wi(e,t){switch(t.tagID){case B.BODY:case B.HTML:case B.BR:Gi(e,t);break;case B.TEMPLATE:Ri(e,t);break;default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function Gi(e,t){e._insertFakeElement(z.BODY,B.BODY),e.insertionMode=U.IN_BODY,Ki(e,t)}function Ki(e,t){switch(t.type){case L.CHARACTER:Ji(e,t);break;case L.WHITESPACE_CHARACTER:qi(e,t);break;case L.COMMENT:wi(e,t);break;case L.START_TAG:Da(e,t);break;case L.END_TAG:za(e,t);break;case L.EOF:Ba(e,t);break;default:}}function qi(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Ji(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Yi(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Xi(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Zi(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,R.HTML),e.insertionMode=U.IN_FRAMESET)}function Qi(e,t){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(t,R.HTML)}function $i(e,t){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&lr.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,R.HTML)}function ea(e,t){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(t,R.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function ta(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(t,R.HTML),n||(e.formElement=e.openElements.current))}function na(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===B.LI&&r===B.LI||(n===B.DD||n===B.DT)&&(r===B.DD||r===B.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==B.ADDRESS&&r!==B.DIV&&r!==B.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(t,R.HTML)}function ra(e,t){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(t,R.HTML),e.tokenizer.state=ur.PLAINTEXT}function ia(e,t){e.openElements.hasInScope(B.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(B.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML),e.framesetOk=!1}function aa(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(z.A);n&&(Ci(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function oa(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function sa(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(B.NOBR)&&(Ci(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,R.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ca(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function la(e,t){e.treeAdapter.getDocumentMode(e.document)!==ar.QUIRKS&&e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(t,R.HTML),e.framesetOk=!1,e.insertionMode=U.IN_TABLE}function ua(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,R.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function da(e){let t=Un(e,ir.TYPE);return t!=null&&t.toLowerCase()===ui}function fa(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,R.HTML),da(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function pa(e,t){e._appendElement(t,R.HTML),t.ackSelfClosing=!0}function ma(e,t){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._appendElement(t,R.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ha(e,t){t.tagName=z.IMG,t.tagID=B.IMG,ua(e,t)}function ga(e,t){e._insertElement(t,R.HTML),e.skipNextNewLine=!0,e.tokenizer.state=ur.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=U.TEXT}function _a(e,t){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,ur.RAWTEXT)}function va(e,t){e.framesetOk=!1,e._switchToTextParsing(t,ur.RAWTEXT)}function ya(e,t){e._switchToTextParsing(t,ur.RAWTEXT)}function ba(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===U.IN_TABLE||e.insertionMode===U.IN_CAPTION||e.insertionMode===U.IN_TABLE_BODY||e.insertionMode===U.IN_ROW||e.insertionMode===U.IN_CELL?U.IN_SELECT_IN_TABLE:U.IN_SELECT}function xa(e,t){e.openElements.currentTagId===B.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML)}function Sa(e,t){e.openElements.hasInScope(B.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,R.HTML)}function Ca(e,t){e.openElements.hasInScope(B.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(B.RTC),e._insertElement(t,R.HTML)}function wa(e,t){e._reconstructActiveFormattingElements(),ri(t),ai(t),t.selfClosing?e._appendElement(t,R.MATHML):e._insertElement(t,R.MATHML),t.ackSelfClosing=!0}function Ta(e,t){e._reconstructActiveFormattingElements(),ii(t),ai(t),t.selfClosing?e._appendElement(t,R.SVG):e._insertElement(t,R.SVG),t.ackSelfClosing=!0}function Ea(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML)}function Da(e,t){switch(t.tagID){case B.I:case B.S:case B.B:case B.U:case B.EM:case B.TT:case B.BIG:case B.CODE:case B.FONT:case B.SMALL:case B.STRIKE:case B.STRONG:oa(e,t);break;case B.A:aa(e,t);break;case B.H1:case B.H2:case B.H3:case B.H4:case B.H5:case B.H6:$i(e,t);break;case B.P:case B.DL:case B.OL:case B.UL:case B.DIV:case B.DIR:case B.NAV:case B.MAIN:case B.MENU:case B.ASIDE:case B.CENTER:case B.FIGURE:case B.FOOTER:case B.HEADER:case B.HGROUP:case B.DIALOG:case B.DETAILS:case B.ADDRESS:case B.ARTICLE:case B.SEARCH:case B.SECTION:case B.SUMMARY:case B.FIELDSET:case B.BLOCKQUOTE:case B.FIGCAPTION:Qi(e,t);break;case B.LI:case B.DD:case B.DT:na(e,t);break;case B.BR:case B.IMG:case B.WBR:case B.AREA:case B.EMBED:case B.KEYGEN:ua(e,t);break;case B.HR:ma(e,t);break;case B.RB:case B.RTC:Sa(e,t);break;case B.RT:case B.RP:Ca(e,t);break;case B.PRE:case B.LISTING:ea(e,t);break;case B.XMP:_a(e,t);break;case B.SVG:Ta(e,t);break;case B.HTML:Yi(e,t);break;case B.BASE:case B.LINK:case B.META:case B.STYLE:case B.TITLE:case B.SCRIPT:case B.BGSOUND:case B.BASEFONT:case B.TEMPLATE:Ii(e,t);break;case B.BODY:Xi(e,t);break;case B.FORM:ta(e,t);break;case B.NOBR:sa(e,t);break;case B.MATH:wa(e,t);break;case B.TABLE:la(e,t);break;case B.INPUT:fa(e,t);break;case B.PARAM:case B.TRACK:case B.SOURCE:pa(e,t);break;case B.IMAGE:ha(e,t);break;case B.BUTTON:ia(e,t);break;case B.APPLET:case B.OBJECT:case B.MARQUEE:ca(e,t);break;case B.IFRAME:va(e,t);break;case B.SELECT:ba(e,t);break;case B.OPTION:case B.OPTGROUP:xa(e,t);break;case B.NOEMBED:case B.NOFRAMES:ya(e,t);break;case B.FRAMESET:Zi(e,t);break;case B.TEXTAREA:ga(e,t);break;case B.NOSCRIPT:e.options.scriptingEnabled?ya(e,t):Ea(e,t);break;case B.PLAINTEXT:ra(e,t);break;case B.COL:case B.TH:case B.TD:case B.TR:case B.HEAD:case B.FRAME:case B.TBODY:case B.TFOOT:case B.THEAD:case B.CAPTION:case B.COLGROUP:break;default:Ea(e,t)}}function Oa(e,t){if(e.openElements.hasInScope(B.BODY)&&(e.insertionMode=U.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function ka(e,t){e.openElements.hasInScope(B.BODY)&&(e.insertionMode=U.AFTER_BODY,To(e,t))}function Aa(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function ja(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(B.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(B.FORM):n&&e.openElements.remove(n))}function Ma(e){e.openElements.hasInButtonScope(B.P)||e._insertFakeElement(z.P,B.P),e._closePElement()}function Na(e){e.openElements.hasInListItemScope(B.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(B.LI),e.openElements.popUntilTagNamePopped(B.LI))}function Pa(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Fa(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Ia(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function La(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(z.BR,B.BR),e.openElements.pop(),e.framesetOk=!1}function Ra(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==B.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function za(e,t){switch(t.tagID){case B.A:case B.B:case B.I:case B.S:case B.U:case B.EM:case B.TT:case B.BIG:case B.CODE:case B.FONT:case B.NOBR:case B.SMALL:case B.STRIKE:case B.STRONG:Ci(e,t);break;case B.P:Ma(e);break;case B.DL:case B.UL:case B.OL:case B.DIR:case B.DIV:case B.NAV:case B.PRE:case B.MAIN:case B.MENU:case B.ASIDE:case B.BUTTON:case B.CENTER:case B.FIGURE:case B.FOOTER:case B.HEADER:case B.HGROUP:case B.DIALOG:case B.ADDRESS:case B.ARTICLE:case B.DETAILS:case B.SEARCH:case B.SECTION:case B.SUMMARY:case B.LISTING:case B.FIELDSET:case B.BLOCKQUOTE:case B.FIGCAPTION:Aa(e,t);break;case B.LI:Na(e);break;case B.DD:case B.DT:Pa(e,t);break;case B.H1:case B.H2:case B.H3:case B.H4:case B.H5:case B.H6:Fa(e);break;case B.BR:La(e);break;case B.BODY:Oa(e,t);break;case B.HTML:ka(e,t);break;case B.FORM:ja(e);break;case B.APPLET:case B.OBJECT:case B.MARQUEE:Ia(e,t);break;case B.TEMPLATE:Ri(e,t);break;default:Ra(e,t)}}function Ba(e,t){e.tmplInsertionModeStack.length>0?Co(e,t):Di(e,t)}function Va(e,t){var n;t.tagID===B.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Ha(e,t){e._err(t,I.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ua(e,t){if(e.openElements.currentTagId!==void 0&&mi.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=U.IN_TABLE_TEXT,t.type){case L.CHARACTER:no(e,t);break;case L.WHITESPACE_CHARACTER:to(e,t);break}else eo(e,t)}function Wa(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,R.HTML),e.insertionMode=U.IN_CAPTION}function Ga(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,R.HTML),e.insertionMode=U.IN_COLUMN_GROUP}function Ka(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(z.COLGROUP,B.COLGROUP),e.insertionMode=U.IN_COLUMN_GROUP,so(e,t)}function qa(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,R.HTML),e.insertionMode=U.IN_TABLE_BODY}function Ja(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(z.TBODY,B.TBODY),e.insertionMode=U.IN_TABLE_BODY,uo(e,t)}function Ya(e,t){e.openElements.hasInTableScope(B.TABLE)&&(e.openElements.popUntilTagNamePopped(B.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Xa(e,t){da(t)?e._appendElement(t,R.HTML):eo(e,t),t.ackSelfClosing=!0}function Za(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,R.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Qa(e,t){switch(t.tagID){case B.TD:case B.TH:case B.TR:Ja(e,t);break;case B.STYLE:case B.SCRIPT:case B.TEMPLATE:Ii(e,t);break;case B.COL:Ka(e,t);break;case B.FORM:Za(e,t);break;case B.TABLE:Ya(e,t);break;case B.TBODY:case B.TFOOT:case B.THEAD:qa(e,t);break;case B.INPUT:Xa(e,t);break;case B.CAPTION:Wa(e,t);break;case B.COLGROUP:Ga(e,t);break;default:eo(e,t)}}function $a(e,t){switch(t.tagID){case B.TABLE:e.openElements.hasInTableScope(B.TABLE)&&(e.openElements.popUntilTagNamePopped(B.TABLE),e._resetInsertionMode());break;case B.TEMPLATE:Ri(e,t);break;case B.BODY:case B.CAPTION:case B.COL:case B.COLGROUP:case B.HTML:case B.TBODY:case B.TD:case B.TFOOT:case B.TH:case B.THEAD:case B.TR:break;default:eo(e,t)}}function eo(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ki(e,t),e.fosterParentingEnabled=n}function to(e,t){e.pendingCharacterTokens.push(t)}function no(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ro(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)eo(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var io=new Set([B.CAPTION,B.COL,B.COLGROUP,B.TBODY,B.TD,B.TFOOT,B.TH,B.THEAD,B.TR]);function ao(e,t){let n=t.tagID;io.has(n)?e.openElements.hasInTableScope(B.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(B.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_TABLE,Qa(e,t)):Da(e,t)}function oo(e,t){let n=t.tagID;switch(n){case B.CAPTION:case B.TABLE:e.openElements.hasInTableScope(B.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(B.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_TABLE,n===B.TABLE&&$a(e,t));break;case B.BODY:case B.COL:case B.COLGROUP:case B.HTML:case B.TBODY:case B.TD:case B.TFOOT:case B.TH:case B.THEAD:case B.TR:break;default:za(e,t)}}function so(e,t){switch(t.tagID){case B.HTML:Da(e,t);break;case B.COL:e._appendElement(t,R.HTML),t.ackSelfClosing=!0;break;case B.TEMPLATE:Ii(e,t);break;default:lo(e,t)}}function co(e,t){switch(t.tagID){case B.COLGROUP:e.openElements.currentTagId===B.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE);break;case B.TEMPLATE:Ri(e,t);break;case B.COL:break;default:lo(e,t)}}function lo(e,t){e.openElements.currentTagId===B.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE,e._processToken(t))}function uo(e,t){switch(t.tagID){case B.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,R.HTML),e.insertionMode=U.IN_ROW;break;case B.TH:case B.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(z.TR,B.TR),e.insertionMode=U.IN_ROW,po(e,t);break;case B.CAPTION:case B.COL:case B.COLGROUP:case B.TBODY:case B.TFOOT:case B.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,Qa(e,t));break;default:Qa(e,t)}}function fo(e,t){let n=t.tagID;switch(t.tagID){case B.TBODY:case B.TFOOT:case B.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE);break;case B.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,$a(e,t));break;case B.BODY:case B.CAPTION:case B.COL:case B.COLGROUP:case B.HTML:case B.TD:case B.TH:case B.TR:break;default:$a(e,t)}}function po(e,t){switch(t.tagID){case B.TH:case B.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,R.HTML),e.insertionMode=U.IN_CELL,e.activeFormattingElements.insertMarker();break;case B.CAPTION:case B.COL:case B.COLGROUP:case B.TBODY:case B.TFOOT:case B.THEAD:case B.TR:e.openElements.hasInTableScope(B.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,uo(e,t));break;default:Qa(e,t)}}function mo(e,t){switch(t.tagID){case B.TR:e.openElements.hasInTableScope(B.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY);break;case B.TABLE:e.openElements.hasInTableScope(B.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,fo(e,t));break;case B.TBODY:case B.TFOOT:case B.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(B.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,fo(e,t));break;case B.BODY:case B.CAPTION:case B.COL:case B.COLGROUP:case B.HTML:case B.TD:case B.TH:break;default:$a(e,t)}}function ho(e,t){let n=t.tagID;io.has(n)?(e.openElements.hasInTableScope(B.TD)||e.openElements.hasInTableScope(B.TH))&&(e._closeTableCell(),po(e,t)):Da(e,t)}function go(e,t){let n=t.tagID;switch(n){case B.TD:case B.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_ROW);break;case B.TABLE:case B.TBODY:case B.TFOOT:case B.THEAD:case B.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),mo(e,t));break;case B.BODY:case B.CAPTION:case B.COL:case B.COLGROUP:case B.HTML:break;default:za(e,t)}}function _o(e,t){switch(t.tagID){case B.HTML:Da(e,t);break;case B.OPTION:e.openElements.currentTagId===B.OPTION&&e.openElements.pop(),e._insertElement(t,R.HTML);break;case B.OPTGROUP:e.openElements.currentTagId===B.OPTION&&e.openElements.pop(),e.openElements.currentTagId===B.OPTGROUP&&e.openElements.pop(),e._insertElement(t,R.HTML);break;case B.HR:e.openElements.currentTagId===B.OPTION&&e.openElements.pop(),e.openElements.currentTagId===B.OPTGROUP&&e.openElements.pop(),e._appendElement(t,R.HTML),t.ackSelfClosing=!0;break;case B.INPUT:case B.KEYGEN:case B.TEXTAREA:case B.SELECT:e.openElements.hasInSelectScope(B.SELECT)&&(e.openElements.popUntilTagNamePopped(B.SELECT),e._resetInsertionMode(),t.tagID!==B.SELECT&&e._processStartTag(t));break;case B.SCRIPT:case B.TEMPLATE:Ii(e,t);break;default:}}function vo(e,t){switch(t.tagID){case B.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===B.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===B.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===B.OPTGROUP&&e.openElements.pop();break;case B.OPTION:e.openElements.currentTagId===B.OPTION&&e.openElements.pop();break;case B.SELECT:e.openElements.hasInSelectScope(B.SELECT)&&(e.openElements.popUntilTagNamePopped(B.SELECT),e._resetInsertionMode());break;case B.TEMPLATE:Ri(e,t);break;default:}}function yo(e,t){let n=t.tagID;n===B.CAPTION||n===B.TABLE||n===B.TBODY||n===B.TFOOT||n===B.THEAD||n===B.TR||n===B.TD||n===B.TH?(e.openElements.popUntilTagNamePopped(B.SELECT),e._resetInsertionMode(),e._processStartTag(t)):_o(e,t)}function bo(e,t){let n=t.tagID;n===B.CAPTION||n===B.TABLE||n===B.TBODY||n===B.TFOOT||n===B.THEAD||n===B.TR||n===B.TD||n===B.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(B.SELECT),e._resetInsertionMode(),e.onEndTag(t)):vo(e,t)}function xo(e,t){switch(t.tagID){case B.BASE:case B.BASEFONT:case B.BGSOUND:case B.LINK:case B.META:case B.NOFRAMES:case B.SCRIPT:case B.STYLE:case B.TEMPLATE:case B.TITLE:Ii(e,t);break;case B.CAPTION:case B.COLGROUP:case B.TBODY:case B.TFOOT:case B.THEAD:e.tmplInsertionModeStack[0]=U.IN_TABLE,e.insertionMode=U.IN_TABLE,Qa(e,t);break;case B.COL:e.tmplInsertionModeStack[0]=U.IN_COLUMN_GROUP,e.insertionMode=U.IN_COLUMN_GROUP,so(e,t);break;case B.TR:e.tmplInsertionModeStack[0]=U.IN_TABLE_BODY,e.insertionMode=U.IN_TABLE_BODY,uo(e,t);break;case B.TD:case B.TH:e.tmplInsertionModeStack[0]=U.IN_ROW,e.insertionMode=U.IN_ROW,po(e,t);break;default:e.tmplInsertionModeStack[0]=U.IN_BODY,e.insertionMode=U.IN_BODY,Da(e,t)}}function So(e,t){t.tagID===B.TEMPLATE&&Ri(e,t)}function Co(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(B.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Di(e,t)}function wo(e,t){t.tagID===B.HTML?Da(e,t):Eo(e,t)}function To(e,t){if(t.tagID===B.HTML){if(e.fragmentContext||(e.insertionMode=U.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===B.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else Eo(e,t)}function Eo(e,t){e.insertionMode=U.IN_BODY,Ki(e,t)}function Do(e,t){switch(t.tagID){case B.HTML:Da(e,t);break;case B.FRAMESET:e._insertElement(t,R.HTML);break;case B.FRAME:e._appendElement(t,R.HTML),t.ackSelfClosing=!0;break;case B.NOFRAMES:Ii(e,t);break;default:}}function Oo(e,t){t.tagID===B.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==B.FRAMESET&&(e.insertionMode=U.AFTER_FRAMESET))}function ko(e,t){switch(t.tagID){case B.HTML:Da(e,t);break;case B.NOFRAMES:Ii(e,t);break;default:}}function Ao(e,t){t.tagID===B.HTML&&(e.insertionMode=U.AFTER_AFTER_FRAMESET)}function jo(e,t){t.tagID===B.HTML?Da(e,t):Mo(e,t)}function Mo(e,t){e.insertionMode=U.IN_BODY,Ki(e,t)}function No(e,t){switch(t.tagID){case B.HTML:Da(e,t);break;case B.NOFRAMES:Ii(e,t);break;default:}}function Po(e,t){t.chars=`�`,e._insertCharacters(t)}function Fo(e,t){e._insertCharacters(t),e.framesetOk=!1}function Io(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==R.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Lo(e,t){if(ni(t))Io(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===R.MATHML?ri(t):r===R.SVG&&(oi(t),ii(t)),ai(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Ro(e,t){if(t.tagID===B.P||t.tagID===B.BR){Io(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===R.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}new Set([z.AREA,z.BASE,z.BASEFONT,z.BGSOUND,z.BR,z.COL,z.EMBED,z.FRAME,z.HR,z.IMG,z.INPUT,z.KEYGEN,z.LINK,z.META,z.PARAM,z.SOURCE,z.TRACK,z.WBR]);var zo=Vo(`end`),Bo=Vo(`start`);function Vo(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Ho(e){let t=Bo(e),n=zo(e);if(t&&n)return{start:t,end:n}}var Uo=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Wo=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),Go={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Ko(e,t){let n=os(e),r=yn(`type`,{handlers:{root:Jo,element:Yo,text:Xo,comment:$o,doctype:Zo,raw:es},unknown:ts}),i={parser:n?new gi(Go):gi.getFragmentParser(void 0,Go),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),ns(i,Bo());let a=un(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&ze(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function qo(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Jo(e,t){qo(e.children,t)}function Yo(e,t){is(e,t),qo(e.children,t),as(e,t)}function Xo(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:L.CHARACTER,chars:e.value,location:ss(e)};ns(t,Bo(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Zo(e,t){let n={type:L.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:ss(e)};ns(t,Bo(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Qo(e,t){t.stitches=!0;let n=cs(e);`children`in e&&`children`in n&&(n.children=Ko({type:`root`,children:e.children},t.options).children),$o({type:`comment`,value:{stitch:n}},t)}function $o(e,t){let n=e.value,r={type:L.COMMENT,data:n,location:ss(e)};ns(t,Bo(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function es(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,rs(t,Bo(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Uo,`<$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;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function ts(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Qo(n,t);else{let e=``;throw Wo.has(n.type)&&(e=". 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"),Error("Cannot compile `"+n.type+"` node"+e)}}function ns(e,t){rs(e,t);let 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=ur.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 rs(e,t){if(t&&t.offset!==void 0){let 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 is(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===ur.PLAINTEXT)return;ns(t,Bo(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:sn.html;i===sn.html&&n===`svg`&&(i=sn.svg);let a=Cn({...e,children:[]},{space:i===sn.svg?`svg`:`html`}),o={type:L.START_TAG,tagName:n,tagID:sr(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:ss(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function as(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Nn.includes(n)||t.parser.tokenizer.state===ur.PLAINTEXT)return;ns(t,zo(e));let r={type:L.END_TAG,tagName:n,tagID:sr(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ss(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===ur.RCDATA||t.parser.tokenizer.state===ur.RAWTEXT||t.parser.tokenizer.state===ur.SCRIPT_DATA)&&(t.parser.tokenizer.state=ur.DATA)}function os(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function ss(e){let t=Bo(e)||{line:void 0,column:void 0,offset:void 0},n=zo(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 cs(e){return`children`in e?ct({...e,children:[]}):ct(e)}function ls(e){return function(t,n){return Ko(t,{...e,file:n})}}var us=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],ds={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...us,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...us],h2:[[`className`,`sr-only`]],img:[...us,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...us,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...us],table:[...us],ul:[...us,[`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`.split(`.`)},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`.split(`.`)},fs={}.hasOwnProperty;function ps(e,t){let n={type:`root`,children:[]},r=ms({schema:t?{...ds,...t}:ds,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function ms(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return hs(e,n);case`doctype`:return gs(e,n);case`element`:return _s(e,n);case`root`:return vs(e,n);case`text`:return ys(e,n);default:}}}function hs(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return Es(r,t),r}}function gs(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return Es(e,t),e}}function _s(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=bs(e,t.children),i=xs(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&fs.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return Es(o,t),o}function vs(e,t){let n={type:`root`,children:bs(e,t.children)};return Es(n,t),n}function ys(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return Es(n,t),n}function bs(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=ms(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function xs(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&fs.call(r,n)?r[n]:void 0,o=r&&fs.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(fs.call(s,l)){let t=s[l],n=Ss(e,Ds(a,l),l,t);n??=Ss(e,Ds(o,l),l,t),n!=null&&(c[l]=n)}if(i&&fs.call(i,n)){let e=i[n];for(l in e)fs.call(e,l)&&!fs.call(c,l)&&(c[l]=e[l])}return c}function Ss(e,t,n,r){return t?Array.isArray(r)?Cs(e,t,n,r):ws(e,t,n,r):void 0}function Cs(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=ws(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function ws(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&Ts(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Ts(e,t,n){let r=e.schema.protocols&&fs.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function Es(e,t){let n=Ho(t);t.data&&(e.data=ct(t.data)),n&&(e.position=n)}function Ds(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function Os(e){return function(t){return ps(t,e)}}function ks(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var As=Bs(/[A-Za-z]/),js=Bs(/[\dA-Za-z]/),Ms=Bs(/[#-'*+\--9=?A-Z^-~]/);function Ns(e){return e!==null&&(e<32||e===127)}var Ps=Bs(/\d/),Fs=Bs(/[\dA-Fa-f]/),Is=Bs(/[!-/:-@[-`{-~]/);function W(e){return e!==null&&e<-2}function Ls(e){return e!==null&&(e<0||e===32)}function G(e){return e===-2||e===-1||e===32}var Rs=Bs(/\p{P}|\p{S}/u),zs=Bs(/\s/);function Bs(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Vs(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Hs(e,t,n){let r=De((n||{}).ignore||[]),i=Us(t),a=-1;for(;++a<i.length;)Le(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function Us(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Ws(e[0]),Gs(e[1])])}return t}function Ws(e){return typeof e==`string`?new RegExp(Vs(e),`g`):e}function Gs(e){return typeof e==`function`?e:function(){return e}}var Ks=`phrasing`,qs=[`autolink`,`link`,`image`,`label`];function Js(){return{transforms:[nc],enter:{literalAutolink:Xs,literalAutolinkEmail:Zs,literalAutolinkHttp:Zs,literalAutolinkWww:Zs},exit:{literalAutolink:tc,literalAutolinkEmail:ec,literalAutolinkHttp:Qs,literalAutolinkWww:$s}}}function Ys(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Ks,notInConstruct:qs},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Ks,notInConstruct:qs},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Ks,notInConstruct:qs}]}}function Xs(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Zs(e){this.config.enter.autolinkProtocol.call(this,e)}function Qs(e){this.config.exit.autolinkProtocol.call(this,e)}function $s(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function ec(e){this.config.exit.autolinkEmail.call(this,e)}function tc(e){this.exit(e)}function nc(e){Hs(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,rc],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,ic]],{ignore:[`link`,`linkReference`]})}function rc(e,t,n,r,i){let a=``;if(!sc(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!ac(n)))return!1;let o=oc(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function ic(e,t,n,r){return!sc(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function ac(e){let 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 oc(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=ks(e,`(`),a=ks(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function sc(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||zs(n)||Rs(n))&&(!t||n!==47)}function cc(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}vc.peek=_c;function lc(){this.buffer()}function uc(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function dc(){this.buffer()}function fc(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function pc(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=cc(this.sliceSerialize(e)).toLowerCase(),n.label=t}function mc(e){this.exit(e)}function hc(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=cc(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gc(e){this.exit(e)}function _c(){return`[`}function vc(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function yc(){return{enter:{gfmFootnoteCallString:lc,gfmFootnoteCall:uc,gfmFootnoteDefinitionLabelString:dc,gfmFootnoteDefinition:fc},exit:{gfmFootnoteCallString:pc,gfmFootnoteCall:mc,gfmFootnoteDefinitionLabelString:hc,gfmFootnoteDefinition:gc}}}function bc(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:vc},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
6
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?
|
|
7
|
-
`)}function
|
|
8
|
-
`&&
|
|
9
|
-
`}function
|
|
4
|
+
`+t,window.parent?.postMessage({type:`bloby:request-context`},`*`)}let l={conversationId:a,content:c};r&&(l.audioData=r.includes(`,`)?r.split(`,`)[1]:r),n?.length&&(l.attachments=n.map(e=>{let t=e.preview.match(/^data:([^;]+);base64,(.+)$/);return{type:e.type,name:e.name,mediaType:t?.[1]||`application/octet-stream`,data:t?.[2]||``}})),e.send(`user:message`,l)},[e,a]),addPendingAudio:ee,stopStreaming:(0,j.useCallback)(()=>{e&&(e.send(`user:stop`,{conversationId:a}),c(!1),u(``),y.current=``,b.current=0,f([]))},[e,a]),clearContext:(0,j.useCallback)(()=>{e&&e.send(`user:clear-context`,{}),i([]),o(null),u(``),y.current=``,b.current=0,c(!1),f([]),h.current=!1},[e])}}var M=a(),Oe=`bloby_login_totp`;function ke({onLogin:e,totpEnabled:t}){let[n,r]=(0,j.useState)(``),[i,a]=(0,j.useState)(``),[s,u]=(0,j.useState)(!1),[d,f]=(0,j.useState)(`password`),[p,h]=(0,j.useState)(``),[y,b]=(0,j.useState)(``),[x,S]=(0,j.useState)(!0),[C,w]=(0,j.useState)(!1),T=(0,j.useRef)(null);(0,j.useEffect)(()=>{try{let e=sessionStorage.getItem(Oe);if(!e)return;let t=JSON.parse(e);t.pendingToken&&t.expiresAt>Date.now()?(b(t.pendingToken),f(`totp`)):sessionStorage.removeItem(Oe)}catch{}},[]),(0,j.useEffect)(()=>{d===`totp`&&setTimeout(()=>T.current?.focus(),100)},[d]);function E(e){try{sessionStorage.setItem(Oe,JSON.stringify({pendingToken:e,expiresAt:Date.now()+4.5*60*1e3}))}catch{}}function ee(){try{sessionStorage.removeItem(Oe)}catch{}}let D=async()=>{if(!(!n.trim()||s)){u(!0),a(``);try{let t=btoa(`admin:${n}`),r=await fetch(`/api/portal/login`,{headers:{Authorization:`Basic ${t}`},credentials:`include`}),i=await r.json();r.ok&&i.token?(ee(),e(i.token)):r.ok&&i.requiresTOTP?(b(i.pendingToken),E(i.pendingToken),f(`totp`),a(``)):a(i.error||`Invalid password`)}catch{a(`Could not reach server`)}finally{u(!1)}}},te=async()=>{if(!(!p.trim()||s)){u(!0),a(``);try{let t=await fetch(`/api/portal/login/totp?pending=${encodeURIComponent(y)}&code=${encodeURIComponent(p)}&trust=${x?`1`:`0`}`,{credentials:`include`}),n=await t.json();t.ok&&n.token?(ee(),e(n.token)):a(n.error||`Invalid code`)}catch{a(`Could not reach server`)}finally{u(!1)}}},ne=e=>{e.key===`Enter`&&(d===`password`?D():te())},re=()=>{f(`password`),a(``),h(``),w(!1),ee()},O=`w-full bg-white/[0.05] border border-white/[0.08] text-white rounded-xl px-4 py-3 text-base outline-none input-glow placeholder:text-white/20 transition-all`;return(0,M.jsx)(`div`,{className:`flex flex-col items-center justify-center h-dvh px-6`,children:(0,M.jsx)(`div`,{className:`w-full max-w-[320px] flex flex-col items-center`,children:(0,M.jsx)(_,{mode:`wait`,children:d===`password`?(0,M.jsxs)(m.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2},className:`w-full flex flex-col items-center`,children:[(0,M.jsx)(`div`,{className:`w-14 h-14 rounded-2xl bg-white/[0.04] border border-white/[0.08] flex items-center justify-center mb-5`,children:(0,M.jsx)(ae,{className:`h-6 w-6 text-white/40`})}),(0,M.jsx)(`h1`,{className:`text-xl font-bold text-white tracking-tight mb-1`,children:`Welcome back`}),(0,M.jsx)(`p`,{className:`text-white/40 text-[13px] mb-6`,children:`Enter your password to continue.`}),i&&(0,M.jsx)(`div`,{className:`w-full bg-red-500/8 border border-red-500/15 rounded-xl px-4 py-2.5 mb-4`,children:(0,M.jsx)(`p`,{className:`text-red-400/90 text-[12px]`,children:i})}),(0,M.jsx)(`input`,{type:`password`,value:n,onChange:e=>r(e.target.value),onKeyDown:ne,placeholder:`Password`,autoFocus:!0,autoComplete:`current-password`,className:O}),(0,M.jsx)(`button`,{onClick:D,disabled:!n.trim()||s,className:`w-full mt-4 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 disabled:opacity-40`,children:s?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(v,{className:`h-4 w-4 animate-spin`}),`Signing in...`]}):(0,M.jsxs)(M.Fragment,{children:[`Sign In`,(0,M.jsx)(l,{className:`h-4 w-4`})]})})]},`password`):(0,M.jsxs)(m.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:{duration:.2},className:`w-full flex flex-col items-center`,children:[(0,M.jsx)(`div`,{className:`w-14 h-14 rounded-2xl bg-[#0069FE]/10 border border-[#0069FE]/20 flex items-center justify-center mb-5`,children:(0,M.jsx)(o,{className:`h-6 w-6 text-[#0069FE]`})}),(0,M.jsx)(`h1`,{className:`text-xl font-bold text-white tracking-tight mb-1`,children:C?`Recovery code`:`Enter your 2FA code`}),(0,M.jsx)(`p`,{className:`text-white/40 text-[13px] mb-6`,children:C?`Enter one of your recovery codes.`:`Open your authenticator app and enter the 6-digit code.`}),i&&(0,M.jsx)(`div`,{className:`w-full bg-red-500/8 border border-red-500/15 rounded-xl px-4 py-2.5 mb-4`,children:(0,M.jsx)(`p`,{className:`text-red-400/90 text-[12px]`,children:i})}),(0,M.jsx)(`input`,{ref:T,type:`text`,inputMode:C?`text`:`numeric`,autoComplete:`one-time-code`,maxLength:C?20:6,value:p,onChange:e=>{h(C?e.target.value:e.target.value.replace(/\D/g,``)),a(``)},onKeyDown:ne,placeholder:C?`Recovery code`:`000000`,autoFocus:!0,className:O+(C?``:` tracking-[0.3em] text-center font-mono`)}),(0,M.jsxs)(`label`,{className:`flex items-center gap-2.5 mt-4 w-full cursor-pointer`,children:[(0,M.jsx)(`div`,{onClick:()=>S(e=>!e),className:`w-5 h-5 rounded-md border flex items-center justify-center transition-all ${x?`bg-[#0069FE] border-[#0069FE]`:`bg-white/[0.04] border-white/[0.12]`}`,children:x&&(0,M.jsx)(c,{className:`h-3.5 w-3.5 text-white`})}),(0,M.jsx)(`span`,{className:`text-[13px] text-white/50`,children:`Trust this device for 90 days`})]}),(0,M.jsx)(`button`,{onClick:te,disabled:!p.trim()||s,className:`w-full mt-4 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 disabled:opacity-40`,children:s?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(v,{className:`h-4 w-4 animate-spin`}),`Verifying...`]}):(0,M.jsxs)(M.Fragment,{children:[`Verify`,(0,M.jsx)(l,{className:`h-4 w-4`})]})}),(0,M.jsxs)(`div`,{className:`flex items-center gap-4 mt-4`,children:[(0,M.jsxs)(`button`,{onClick:re,className:`text-[12px] text-white/30 hover:text-white/50 flex items-center gap-1 transition-colors`,children:[(0,M.jsx)(g,{className:`h-3 w-3`}),`Back`]}),(0,M.jsx)(`button`,{onClick:()=>{w(e=>!e),h(``),a(``)},className:`text-[12px] text-white/30 hover:text-white/50 transition-colors`,children:C?`Use authenticator code`:`Use a recovery code`})]})]},`totp`)})})})}var Ae=(function(e){if(e==null)return Fe;if(typeof e==`function`)return Pe(e);if(typeof e==`object`)return Array.isArray(e)?je(e):Me(e);if(typeof e==`string`)return Ne(e);throw Error(`Expected function, string, or object as test`)});function je(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Ae(e[n]);return Pe(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Me(e){let t=e;return Pe(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Ne(e){return Pe(t);function t(t){return t&&t.type===e}}function Pe(e){return t;function t(t,n,r){return!!(Ie(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Fe(){return!0}function Ie(e){return typeof e==`object`&&!!e&&`type`in e}function Le(e){return e}var Re=[],ze=`skip`;function Be(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Ae(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+Le(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=Re,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Ve(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Ve(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?Re:[e]}function He(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Be(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var Ue={indicator:`indicator`,textOnly:`text-only`,remove:`remove`};function We({defaultOrigin:e=``,allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a=`inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm`,blockedLinkClass:o=`text-gray-500`,linkBlockPolicy:s=Ue.indicator,imageBlockPolicy:c=Ue.indicator}){let l=t.length&&!t.every(e=>e===`*`),u=n.length&&!n.every(e=>e===`*`);if(!e&&(l||u))throw Error(`defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided`);return l=>{let u=et(e,t,n,r,i,a,o,s,c);Xe(l),He(l,u)}}function Ge(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 Ke(e){return typeof e==`string`?e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`):!1}var qe=new Set([`https:`,`http:`,`irc:`,`ircs:`,`mailto:`,`xmpp:`,`blob:`]),Je=new Set([`javascript:`,`data:`,`file:`,`vbscript:`]);function Ye(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e==`string`&&e.startsWith(`#`)&&!i)try{if(new URL(e,`http://example.com`).hash===e)return e}catch{}if(typeof e==`string`&&e.startsWith(`data:`))return i&&r&&e.startsWith(`data:image/`)?e:null;if(typeof e==`string`&&e.startsWith(`blob:`)){try{if(new URL(e).protocol===`blob:`&&e.length>5){let t=e.substring(5);if(t&&t.length>0&&t!==`invalid`)return e}}catch{return null}return null}let o=Ge(e,n);if(!o||Je.has(o.protocol)||!(qe.has(o.protocol)||a.includes(o.protocol)||a.includes(`*`)))return null;if(o.protocol===`mailto:`||!o.protocol.match(/^https?:$/))return o.href;let s=Ke(e);return o&&t.some(e=>{let t=Ge(e,n);return!t||t.origin!==o.origin?!1:o.href.startsWith(t.href)})?s?o.pathname+o.search+o.hash:o.href:t.includes(`*`)?o.protocol!==`https:`&&o.protocol!==`http:`?null:s?o.pathname+o.search+o.hash:o.href:null}function Xe(e){if(`children`in e&&Array.isArray(e.children)){e.children=e.children.filter(e=>e!=null);for(let t of e.children)Xe(t)}}var Ze=Symbol(`node-seen`);function Qe(e,t,n){return t===Ue.remove?{type:`remove`}:t===Ue.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 $e(e,t,n){if(t===Ue.remove)return{type:`remove`};if(t===Ue.textOnly){let t=String(e.properties.alt||``);return t?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[{type:`text`,value:t}]}}:{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 et=(e,t,n,r,i,a,o,s,c)=>{let l=(u,d,f)=>{if(u.type!==`element`||u[Ze])return!0;if(u.tagName===`a`){let n=Ye(u.properties.href,t,e,!1,!1,i);if(n===null){if(u[Ze]=!0,He(u,l),f&&typeof d==`number`){let e=Qe(u,s,o);if(e.type===`remove`)return f.children.splice(d,1),[ze,d];f.children[d]=e.element}return ze}else return u.properties.href=n,u.properties.target=`_blank`,u.properties.rel=`noopener noreferrer`,!0}if(u.tagName===`img`){let t=Ye(u.properties.src,n,e,r,!0,i);if(t===null){if(u[Ze]=!0,He(u,l),f&&typeof d==`number`){let e=$e(u,c,a);if(e.type===`remove`)return f.children.splice(d,1),[ze,d];f.children[d]=e.element}return ze}else return u.properties.src=t,!0}return!0};return l},tt=typeof self==`object`?self:globalThis,nt=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new tt[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new tt[a](o),i)};return r},rt=e=>nt(new Map,e)(0),it=``,{toString:at}={},{keys:ot}=Object,st=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=at.call(e).slice(8,-1);switch(n){case`Array`:return[1,it];case`Object`:return[2,it];case`Date`:return[3,it];case`RegExp`:return[4,it];case`Map`:return[5,it];case`Set`:return[6,it];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},ct=([e,t])=>e===0&&(t===`function`||t===`symbol`),lt=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=st(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of ot(r))(e||!ct(st(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(ct(st(n))||ct(st(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!ct(st(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},ut=(e,{json:t,lossy:n}={})=>{let r=[];return lt(!(t||n),!!t,new Map,r)(e),r},dt=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?rt(ut(e,t)):structuredClone(e):(e,t)=>rt(ut(e,t)),ft=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};ft.prototype.normal={},ft.prototype.property={},ft.prototype.space=void 0;function pt(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new ft(n,r,t)}function mt(e){return e.toLowerCase()}var ht=class{constructor(e,t){this.attribute=t,this.property=e}};ht.prototype.attribute=``,ht.prototype.booleanish=!1,ht.prototype.boolean=!1,ht.prototype.commaOrSpaceSeparated=!1,ht.prototype.commaSeparated=!1,ht.prototype.defined=!1,ht.prototype.mustUseProperty=!1,ht.prototype.number=!1,ht.prototype.overloadedBoolean=!1,ht.prototype.property=``,ht.prototype.spaceSeparated=!1,ht.prototype.space=void 0;var gt=r({boolean:()=>N,booleanish:()=>vt,commaOrSpaceSeparated:()=>St,commaSeparated:()=>xt,number:()=>P,overloadedBoolean:()=>yt,spaceSeparated:()=>bt}),_t=0,N=Ct(),vt=Ct(),yt=Ct(),P=Ct(),bt=Ct(),xt=Ct(),St=Ct();function Ct(){return 2**++_t}var wt=Object.keys(gt),Tt=class extends ht{constructor(e,t,n,r){let i=-1;if(super(e,t),Et(this,`space`,r),typeof n==`number`)for(;++i<wt.length;){let e=wt[i];Et(this,wt[i],(n>[e])===gt[e])}}};Tt.prototype.defined=!0;function Et(e,t,n){n&&(e[t]=n)}function Dt(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Tt(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[mt(r)]=r,n[mt(a.attribute)]=r}return new ft(t,n,e.space)}var Ot=Dt({properties:{ariaActiveDescendant:null,ariaAtomic:vt,ariaAutoComplete:null,ariaBusy:vt,ariaChecked:vt,ariaColCount:P,ariaColIndex:P,ariaColSpan:P,ariaControls:bt,ariaCurrent:null,ariaDescribedBy:bt,ariaDetails:null,ariaDisabled:vt,ariaDropEffect:bt,ariaErrorMessage:null,ariaExpanded:vt,ariaFlowTo:bt,ariaGrabbed:vt,ariaHasPopup:null,ariaHidden:vt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:bt,ariaLevel:P,ariaLive:null,ariaModal:vt,ariaMultiLine:vt,ariaMultiSelectable:vt,ariaOrientation:null,ariaOwns:bt,ariaPlaceholder:null,ariaPosInSet:P,ariaPressed:vt,ariaReadOnly:vt,ariaRelevant:null,ariaRequired:vt,ariaRoleDescription:bt,ariaRowCount:P,ariaRowIndex:P,ariaRowSpan:P,ariaSelected:vt,ariaSetSize:P,ariaSort:null,ariaValueMax:P,ariaValueMin:P,ariaValueNow:P,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function kt(e,t){return t in e?e[t]:t}function At(e,t){return kt(e,t.toLowerCase())}var jt=Dt({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:xt,acceptCharset:bt,accessKey:bt,action:null,allow:null,allowFullScreen:N,allowPaymentRequest:N,allowUserMedia:N,alt:null,as:null,async:N,autoCapitalize:null,autoComplete:bt,autoFocus:N,autoPlay:N,blocking:bt,capture:null,charSet:null,checked:N,cite:null,className:bt,cols:P,colSpan:null,content:null,contentEditable:vt,controls:N,controlsList:bt,coords:P|xt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:N,defer:N,dir:null,dirName:null,disabled:N,download:yt,draggable:vt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:N,formTarget:null,headers:bt,height:P,hidden:yt,high:P,href:null,hrefLang:null,htmlFor:bt,httpEquiv:bt,id:null,imageSizes:null,imageSrcSet:null,inert:N,inputMode:null,integrity:null,is:null,isMap:N,itemId:null,itemProp:bt,itemRef:bt,itemScope:N,itemType:bt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:N,low:P,manifest:null,max:null,maxLength:P,media:null,method:null,min:null,minLength:P,multiple:N,muted:N,name:null,nonce:null,noModule:N,noValidate:N,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:N,optimum:P,pattern:null,ping:bt,placeholder:null,playsInline:N,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:N,referrerPolicy:null,rel:bt,required:N,reversed:N,rows:P,rowSpan:P,sandbox:bt,scope:null,scoped:N,seamless:N,selected:N,shadowRootClonable:N,shadowRootDelegatesFocus:N,shadowRootMode:null,shape:null,size:P,sizes:null,slot:null,span:P,spellCheck:vt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:P,step:null,style:null,tabIndex:P,target:null,title:null,translate:null,type:null,typeMustMatch:N,useMap:null,value:vt,width:P,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:bt,axis:null,background:null,bgColor:null,border:P,borderColor:null,bottomMargin:P,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:N,declare:N,event:null,face:null,frame:null,frameBorder:null,hSpace:P,leftMargin:P,link:null,longDesc:null,lowSrc:null,marginHeight:P,marginWidth:P,noResize:N,noHref:N,noShade:N,noWrap:N,object:null,profile:null,prompt:null,rev:null,rightMargin:P,rules:null,scheme:null,scrolling:vt,standby:null,summary:null,text:null,topMargin:P,valueType:null,version:null,vAlign:null,vLink:null,vSpace:P,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:N,disableRemotePlayback:N,prefix:null,property:null,results:P,security:null,unselectable:null},space:`html`,transform:At}),Mt=Dt({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:St,accentHeight:P,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:P,amplitude:P,arabicForm:null,ascent:P,attributeName:null,attributeType:null,azimuth:P,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:P,by:null,calcMode:null,capHeight:P,className:bt,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:P,diffuseConstant:P,direction:null,display:null,dur:null,divisor:P,dominantBaseline:null,download:N,dx:null,dy:null,edgeMode:null,editable:null,elevation:P,enableBackground:null,end:null,event:null,exponent:P,externalResourcesRequired:null,fill:null,fillOpacity:P,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:xt,g2:xt,glyphName:xt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:P,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:P,horizOriginX:P,horizOriginY:P,id:null,ideographic:P,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:P,k:P,k1:P,k2:P,k3:P,k4:P,kernelMatrix:St,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:P,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:P,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:P,overlineThickness:P,paintOrder:null,panose1:null,path:null,pathLength:P,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:bt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:P,pointsAtY:P,pointsAtZ:P,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:St,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:St,rev:St,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:St,requiredFeatures:St,requiredFonts:St,requiredFormats:St,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:P,specularExponent:P,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:P,strikethroughThickness:P,string:null,stroke:null,strokeDashArray:St,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:P,strokeOpacity:P,strokeWidth:null,style:null,surfaceScale:P,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:St,tabIndex:P,tableValues:null,target:null,targetX:P,targetY:P,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:St,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:P,underlineThickness:P,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:P,values:null,vAlphabetic:P,vMathematical:P,vectorEffect:null,vHanging:P,vIdeographic:P,version:null,vertAdvY:P,vertOriginX:P,vertOriginY:P,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:P,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:kt}),Nt=Dt({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()}}),Pt=Dt({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:At}),Ft=Dt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),It={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`},Lt=/[A-Z]/g,Rt=/-[a-z]/g,zt=/^data[-\w.:]+$/i;function Bt(e,t){let n=mt(t),r=t,i=ht;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&zt.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Rt,Ht);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Rt.test(e)){let n=e.replace(Lt,Vt);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Tt}return new i(r,t)}function Vt(e){return`-`+e.toLowerCase()}function Ht(e){return e.charAt(1).toUpperCase()}var Ut=pt([Ot,jt,Nt,Pt,Ft],`html`),Wt=pt([Ot,Mt,Nt,Pt,Ft],`svg`);function Gt(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Kt(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var qt=/[#.]/g;function Jt(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){qt.lastIndex=i;let e=qt.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function Yt(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Xt(e){return e.join(` `).trim()}function Zt(e,t,n){let r=n?rn(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=Jt(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,Qt(i))a.unshift(i);else for(let[t,n]of Object.entries(i))$t(e,o.properties,t,n)}for(let e of a)en(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function Qt(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function $t(e,t,n,r){let i=Bt(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?Yt(r):i.commaSeparated?Gt(r):i.commaOrSpaceSeparated?Yt(Gt(r).join(` `)):tn(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?nn(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(tn(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function en(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(let n of t)en(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?en(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function tn(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||mt(n)===mt(t)))return!0}return n}function nn(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function rn(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var an=`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`.split(`.`),on=Zt(Ut,`div`),sn=Zt(Wt,`g`,an);function cn(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=ln(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=ln(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function ln(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
|
|
5
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var un={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/`},dn={}.hasOwnProperty,fn=Object.prototype;function pn(e,t){let n=t||{};return mn({file:n.file||void 0,location:!1,schema:n.space===`svg`?Wt:Ut,verbose:n.verbose||!1},e)}function mn(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},_n(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:hn(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=cn(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},_n(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},_n(e,r,n),n}default:return n=gn(e,t),n}}function hn(e,t){let n=-1,r=[];for(;++n<t.length;){let i=mn(e,t[n]);r.push(i)}return r}function gn(e,t){let n=e.schema;e.schema=t.namespaceURI===un.svg?Wt:Ut;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;dn.call(fn,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?sn:on)(t.tagName,i,hn(e,t.childNodes));if(_n(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&yn(r.startTag),o=r&&r.endTag&&yn(r.endTag),s=mn(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function _n(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=vn(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function vn(e,t,n){let r=yn(n);if(t.type===`element`){let 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){let r={},i;if(n.attrs)for(i in n.attrs)dn.call(n.attrs,i)&&(r[Bt(e.schema,i).property]=yn(n.attrs[i]));n.startTag;let a=yn(n.startTag),o=n.endTag?yn(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function yn(e){let t=bn({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=bn({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function bn(e){return e.line&&e.column?e:void 0}var xn={}.hasOwnProperty;function Sn(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&xn.call(t,e)){let n=String(t[e]);i=xn.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Cn={},wn={}.hasOwnProperty,Tn=Sn(`type`,{handlers:{root:Dn,element:Mn,text:An,comment:jn,doctype:kn}});function En(e,t){let n=(t||Cn).space;return Tn(e,n===`svg`?Wt:Ut)}function Dn(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=Pn(e.children,n,t),Fn(e,n),n}function On(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=Pn(e.children,n,t),Fn(e,n),n}function kn(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return Fn(e,t),t}function An(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return Fn(e,t),t}function jn(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return Fn(e,t),t}function Mn(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=Wt);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&wn.call(e.properties,a)){let t=Nn(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:un[o],childNodes:[],parentNode:null};return s.childNodes=Pn(e.children,s,r),Fn(e,s),e.tagName===`template`&&e.content&&(s.content=On(e.content,r)),s}function Nn(e,t,n){let r=Bt(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Kt(n):Xt(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=un[r.space]}return i}function Pn(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=Tn(e[r],n);a.parentNode=t,i.push(a)}return i}function Fn(e,t){let 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 In=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Ln=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]),F;(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`})(F||={});var Rn={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function zn(e){return e>=55296&&e<=57343}function Bn(e){return e>=56320&&e<=57343}function Vn(e,t){return(e-55296)*1024+9216+t}function Hn(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Un(e){return e>=64976&&e<=65007||Ln.has(e)}var I;(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`})(I||={});var Wn=65536,Gn=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=Wn,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_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){let t=this.html.charCodeAt(this.pos+1);if(Bn(t))return this.pos++,this._addGap(),Vn(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,F.EOF;return this._err(I.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 t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,F.EOF;let n=this.html.charCodeAt(t);return n===F.CARRIAGE_RETURN?F.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,F.EOF;let e=this.html.charCodeAt(this.pos);return e===F.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,F.LINE_FEED):e===F.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,zn(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===F.LINE_FEED||e===F.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){Hn(e)?this._err(I.controlCharacterInInputStream):Un(e)&&this._err(I.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},L;(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`})(L||={});function Kn(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 qn=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肻\xA0ଷ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))),Jn=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]]);String.fromCodePoint;function Yn(e){return e>=55296&&e<=57343||e>1114111?65533:Jn.get(e)??e}var Xn;(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`})(Xn||={});var Zn=32,Qn;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(Qn||={});function $n(e){return e>=Xn.ZERO&&e<=Xn.NINE}function er(e){return e>=Xn.UPPER_A&&e<=Xn.UPPER_F||e>=Xn.LOWER_A&&e<=Xn.LOWER_F}function tr(e){return e>=Xn.UPPER_A&&e<=Xn.UPPER_Z||e>=Xn.LOWER_A&&e<=Xn.LOWER_Z||$n(e)}function nr(e){return e===Xn.EQUALS||tr(e)}var rr;(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`})(rr||={});var ir;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(ir||={});var ar=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=rr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ir.Strict}startEntity(e){this.decodeMode=e,this.state=rr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case rr.EntityStart:return e.charCodeAt(t)===Xn.NUM?(this.state=rr.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=rr.NamedEntity,this.stateNamedEntity(e,t));case rr.NumericStart:return this.stateNumericStart(e,t);case rr.NumericDecimal:return this.stateNumericDecimal(e,t);case rr.NumericHex:return this.stateNumericHex(e,t);case rr.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Zn)===Xn.LOWER_X?(this.state=rr.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=rr.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if($n(r)||er(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){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if($n(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.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Xn.SEMI)this.consumed+=1;else if(this.decodeMode===ir.Strict)return 0;return this.emitCodePoint(Yn(this.result),this.consumed),this.errors&&(e!==Xn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&Qn.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=or(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===ir.Attribute&&(i===0||nr(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&Qn.VALUE_LENGTH)>>14,i!==0){if(a===Xn.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==ir.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&Qn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~Qn.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case rr.NamedEntity:return this.result!==0&&(this.decodeMode!==ir.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case rr.NumericDecimal:return this.emitNumericEntity(0,2);case rr.NumericHex:return this.emitNumericEntity(0,3);case rr.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case rr.EntityStart:return 0}}};function or(e,t,n,r){let i=(t&Qn.BRANCH_LENGTH)>>7,a=t&Qn.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var R;(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/`})(R||={});var sr;(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`})(sr||={});var cr;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(cr||={});var z;(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`})(z||={});var B;(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`})(B||={});var lr=new Map([[z.A,B.A],[z.ADDRESS,B.ADDRESS],[z.ANNOTATION_XML,B.ANNOTATION_XML],[z.APPLET,B.APPLET],[z.AREA,B.AREA],[z.ARTICLE,B.ARTICLE],[z.ASIDE,B.ASIDE],[z.B,B.B],[z.BASE,B.BASE],[z.BASEFONT,B.BASEFONT],[z.BGSOUND,B.BGSOUND],[z.BIG,B.BIG],[z.BLOCKQUOTE,B.BLOCKQUOTE],[z.BODY,B.BODY],[z.BR,B.BR],[z.BUTTON,B.BUTTON],[z.CAPTION,B.CAPTION],[z.CENTER,B.CENTER],[z.CODE,B.CODE],[z.COL,B.COL],[z.COLGROUP,B.COLGROUP],[z.DD,B.DD],[z.DESC,B.DESC],[z.DETAILS,B.DETAILS],[z.DIALOG,B.DIALOG],[z.DIR,B.DIR],[z.DIV,B.DIV],[z.DL,B.DL],[z.DT,B.DT],[z.EM,B.EM],[z.EMBED,B.EMBED],[z.FIELDSET,B.FIELDSET],[z.FIGCAPTION,B.FIGCAPTION],[z.FIGURE,B.FIGURE],[z.FONT,B.FONT],[z.FOOTER,B.FOOTER],[z.FOREIGN_OBJECT,B.FOREIGN_OBJECT],[z.FORM,B.FORM],[z.FRAME,B.FRAME],[z.FRAMESET,B.FRAMESET],[z.H1,B.H1],[z.H2,B.H2],[z.H3,B.H3],[z.H4,B.H4],[z.H5,B.H5],[z.H6,B.H6],[z.HEAD,B.HEAD],[z.HEADER,B.HEADER],[z.HGROUP,B.HGROUP],[z.HR,B.HR],[z.HTML,B.HTML],[z.I,B.I],[z.IMG,B.IMG],[z.IMAGE,B.IMAGE],[z.INPUT,B.INPUT],[z.IFRAME,B.IFRAME],[z.KEYGEN,B.KEYGEN],[z.LABEL,B.LABEL],[z.LI,B.LI],[z.LINK,B.LINK],[z.LISTING,B.LISTING],[z.MAIN,B.MAIN],[z.MALIGNMARK,B.MALIGNMARK],[z.MARQUEE,B.MARQUEE],[z.MATH,B.MATH],[z.MENU,B.MENU],[z.META,B.META],[z.MGLYPH,B.MGLYPH],[z.MI,B.MI],[z.MO,B.MO],[z.MN,B.MN],[z.MS,B.MS],[z.MTEXT,B.MTEXT],[z.NAV,B.NAV],[z.NOBR,B.NOBR],[z.NOFRAMES,B.NOFRAMES],[z.NOEMBED,B.NOEMBED],[z.NOSCRIPT,B.NOSCRIPT],[z.OBJECT,B.OBJECT],[z.OL,B.OL],[z.OPTGROUP,B.OPTGROUP],[z.OPTION,B.OPTION],[z.P,B.P],[z.PARAM,B.PARAM],[z.PLAINTEXT,B.PLAINTEXT],[z.PRE,B.PRE],[z.RB,B.RB],[z.RP,B.RP],[z.RT,B.RT],[z.RTC,B.RTC],[z.RUBY,B.RUBY],[z.S,B.S],[z.SCRIPT,B.SCRIPT],[z.SEARCH,B.SEARCH],[z.SECTION,B.SECTION],[z.SELECT,B.SELECT],[z.SOURCE,B.SOURCE],[z.SMALL,B.SMALL],[z.SPAN,B.SPAN],[z.STRIKE,B.STRIKE],[z.STRONG,B.STRONG],[z.STYLE,B.STYLE],[z.SUB,B.SUB],[z.SUMMARY,B.SUMMARY],[z.SUP,B.SUP],[z.TABLE,B.TABLE],[z.TBODY,B.TBODY],[z.TEMPLATE,B.TEMPLATE],[z.TEXTAREA,B.TEXTAREA],[z.TFOOT,B.TFOOT],[z.TD,B.TD],[z.TH,B.TH],[z.THEAD,B.THEAD],[z.TITLE,B.TITLE],[z.TR,B.TR],[z.TRACK,B.TRACK],[z.TT,B.TT],[z.U,B.U],[z.UL,B.UL],[z.SVG,B.SVG],[z.VAR,B.VAR],[z.WBR,B.WBR],[z.XMP,B.XMP]]);function ur(e){return lr.get(e)??B.UNKNOWN}var V=B,dr={[R.HTML]:new Set([V.ADDRESS,V.APPLET,V.AREA,V.ARTICLE,V.ASIDE,V.BASE,V.BASEFONT,V.BGSOUND,V.BLOCKQUOTE,V.BODY,V.BR,V.BUTTON,V.CAPTION,V.CENTER,V.COL,V.COLGROUP,V.DD,V.DETAILS,V.DIR,V.DIV,V.DL,V.DT,V.EMBED,V.FIELDSET,V.FIGCAPTION,V.FIGURE,V.FOOTER,V.FORM,V.FRAME,V.FRAMESET,V.H1,V.H2,V.H3,V.H4,V.H5,V.H6,V.HEAD,V.HEADER,V.HGROUP,V.HR,V.HTML,V.IFRAME,V.IMG,V.INPUT,V.LI,V.LINK,V.LISTING,V.MAIN,V.MARQUEE,V.MENU,V.META,V.NAV,V.NOEMBED,V.NOFRAMES,V.NOSCRIPT,V.OBJECT,V.OL,V.P,V.PARAM,V.PLAINTEXT,V.PRE,V.SCRIPT,V.SECTION,V.SELECT,V.SOURCE,V.STYLE,V.SUMMARY,V.TABLE,V.TBODY,V.TD,V.TEMPLATE,V.TEXTAREA,V.TFOOT,V.TH,V.THEAD,V.TITLE,V.TR,V.TRACK,V.UL,V.WBR,V.XMP]),[R.MATHML]:new Set([V.MI,V.MO,V.MN,V.MS,V.MTEXT,V.ANNOTATION_XML]),[R.SVG]:new Set([V.TITLE,V.FOREIGN_OBJECT,V.DESC]),[R.XLINK]:new Set,[R.XML]:new Set,[R.XMLNS]:new Set},fr=new Set([V.H1,V.H2,V.H3,V.H4,V.H5,V.H6]);new Set([z.STYLE,z.SCRIPT,z.XMP,z.IFRAME,z.NOEMBED,z.NOFRAMES,z.PLAINTEXT]);var H;(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`})(H||={});var pr={DATA:H.DATA,RCDATA:H.RCDATA,RAWTEXT:H.RAWTEXT,SCRIPT_DATA:H.SCRIPT_DATA,PLAINTEXT:H.PLAINTEXT,CDATA_SECTION:H.CDATA_SECTION};function mr(e){return e>=F.DIGIT_0&&e<=F.DIGIT_9}function hr(e){return e>=F.LATIN_CAPITAL_A&&e<=F.LATIN_CAPITAL_Z}function gr(e){return e>=F.LATIN_SMALL_A&&e<=F.LATIN_SMALL_Z}function _r(e){return gr(e)||hr(e)}function vr(e){return _r(e)||mr(e)}function yr(e){return e+32}function br(e){return e===F.SPACE||e===F.LINE_FEED||e===F.TABULATION||e===F.FORM_FEED}function xr(e){return br(e)||e===F.SOLIDUS||e===F.GREATER_THAN_SIGN}function Sr(e){return e===F.NULL?I.nullCharacterReference:e>1114111?I.characterReferenceOutsideUnicodeRange:zn(e)?I.surrogateCharacterReference:Un(e)?I.noncharacterCharacterReference:Hn(e)||e===F.CARRIAGE_RETURN?I.controlCharacterReference:null}var Cr=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=H.DATA,this.returnState=H.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new Gn(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new ar(qn,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(I.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(I.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=Sr(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||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;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw 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:L.START_TAG,tagName:``,tagID:B.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:L.END_TAG,tagName:``,tagID:B.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:L.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:L.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;let t=this.currentToken;if(Kn(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(I.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(){let e=this.currentToken;this.prepareToken(e),e.tagID=ur(e.tagName),e.type===L.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(I.endTagWithAttributes),e.selfClosing&&this._err(I.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 L.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case L.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case L.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:L.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){let t=br(e)?L.WHITESPACE_CHARACTER:e===F.NULL?L.NULL_CHARACTER:L.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(L.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=H.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ir.Attribute:ir.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===H.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===H.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===H.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case H.DATA:this._stateData(e);break;case H.RCDATA:this._stateRcdata(e);break;case H.RAWTEXT:this._stateRawtext(e);break;case H.SCRIPT_DATA:this._stateScriptData(e);break;case H.PLAINTEXT:this._statePlaintext(e);break;case H.TAG_OPEN:this._stateTagOpen(e);break;case H.END_TAG_OPEN:this._stateEndTagOpen(e);break;case H.TAG_NAME:this._stateTagName(e);break;case H.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case H.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case H.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case H.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case H.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case H.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case H.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case H.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case H.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case H.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case H.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case H.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case H.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case H.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case H.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case H.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case H.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case H.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case H.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case H.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case H.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case H.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case H.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case H.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case H.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case H.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case H.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case H.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case H.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case H.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case H.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case H.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case H.BOGUS_COMMENT:this._stateBogusComment(e);break;case H.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case H.COMMENT_START:this._stateCommentStart(e);break;case H.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case H.COMMENT:this._stateComment(e);break;case H.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case H.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case H.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case H.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case H.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case H.COMMENT_END:this._stateCommentEnd(e);break;case H.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case H.DOCTYPE:this._stateDoctype(e);break;case H.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case H.DOCTYPE_NAME:this._stateDoctypeName(e);break;case H.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case H.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case H.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case H.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case H.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case H.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case H.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case H.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case H.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case H.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case H.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case H.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case H.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case H.CDATA_SECTION:this._stateCdataSection(e);break;case H.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case H.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case H.CHARACTER_REFERENCE:this._stateCharacterReference();break;case H.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case F.LESS_THAN_SIGN:this.state=H.TAG_OPEN;break;case F.AMPERSAND:this._startCharacterReference();break;case F.NULL:this._err(I.unexpectedNullCharacter),this._emitCodePoint(e);break;case F.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case F.AMPERSAND:this._startCharacterReference();break;case F.LESS_THAN_SIGN:this.state=H.RCDATA_LESS_THAN_SIGN;break;case F.NULL:this._err(I.unexpectedNullCharacter),this._emitChars(`�`);break;case F.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case F.LESS_THAN_SIGN:this.state=H.RAWTEXT_LESS_THAN_SIGN;break;case F.NULL:this._err(I.unexpectedNullCharacter),this._emitChars(`�`);break;case F.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case F.LESS_THAN_SIGN:this.state=H.SCRIPT_DATA_LESS_THAN_SIGN;break;case F.NULL:this._err(I.unexpectedNullCharacter),this._emitChars(`�`);break;case F.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case F.NULL:this._err(I.unexpectedNullCharacter),this._emitChars(`�`);break;case F.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(_r(e))this._createStartTagToken(),this.state=H.TAG_NAME,this._stateTagName(e);else switch(e){case F.EXCLAMATION_MARK:this.state=H.MARKUP_DECLARATION_OPEN;break;case F.SOLIDUS:this.state=H.END_TAG_OPEN;break;case F.QUESTION_MARK:this._err(I.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=H.BOGUS_COMMENT,this._stateBogusComment(e);break;case F.EOF:this._err(I.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(I.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=H.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(_r(e))this._createEndTagToken(),this.state=H.TAG_NAME,this._stateTagName(e);else switch(e){case F.GREATER_THAN_SIGN:this._err(I.missingEndTagName),this.state=H.DATA;break;case F.EOF:this._err(I.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(I.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=H.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:this.state=H.BEFORE_ATTRIBUTE_NAME;break;case F.SOLIDUS:this.state=H.SELF_CLOSING_START_TAG;break;case F.GREATER_THAN_SIGN:this.state=H.DATA,this.emitCurrentTagToken();break;case F.NULL:this._err(I.unexpectedNullCharacter),t.tagName+=`�`;break;case F.EOF:this._err(I.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(hr(e)?yr(e):e)}}_stateRcdataLessThanSign(e){e===F.SOLIDUS?this.state=H.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=H.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){_r(e)?(this.state=H.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=H.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=H.BEFORE_ATTRIBUTE_NAME,!1;case F.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=H.SELF_CLOSING_START_TAG,!1;case F.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=H.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=H.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===F.SOLIDUS?this.state=H.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=H.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){_r(e)?(this.state=H.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=H.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=H.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case F.SOLIDUS:this.state=H.SCRIPT_DATA_END_TAG_OPEN;break;case F.EXCLAMATION_MARK:this.state=H.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=H.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){_r(e)?(this.state=H.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=H.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=H.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===F.HYPHEN_MINUS?(this.state=H.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=H.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===F.HYPHEN_MINUS?(this.state=H.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=H.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case F.HYPHEN_MINUS:this.state=H.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case F.LESS_THAN_SIGN:this.state=H.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case F.NULL:this._err(I.unexpectedNullCharacter),this._emitChars(`�`);break;case F.EOF:this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case F.HYPHEN_MINUS:this.state=H.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case F.LESS_THAN_SIGN:this.state=H.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case F.NULL:this._err(I.unexpectedNullCharacter),this.state=H.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case F.EOF:this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=H.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case F.HYPHEN_MINUS:this._emitChars(`-`);break;case F.LESS_THAN_SIGN:this.state=H.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case F.GREATER_THAN_SIGN:this.state=H.SCRIPT_DATA,this._emitChars(`>`);break;case F.NULL:this._err(I.unexpectedNullCharacter),this.state=H.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case F.EOF:this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=H.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===F.SOLIDUS?this.state=H.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:_r(e)?(this._emitChars(`<`),this.state=H.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=H.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){_r(e)?(this.state=H.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=H.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=H.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Rn.SCRIPT,!1)&&xr(this.preprocessor.peek(Rn.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<Rn.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=H.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case F.HYPHEN_MINUS:this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case F.LESS_THAN_SIGN:this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case F.NULL:this._err(I.unexpectedNullCharacter),this._emitChars(`�`);break;case F.EOF:this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case F.HYPHEN_MINUS:this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case F.LESS_THAN_SIGN:this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case F.NULL:this._err(I.unexpectedNullCharacter),this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case F.EOF:this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case F.HYPHEN_MINUS:this._emitChars(`-`);break;case F.LESS_THAN_SIGN:this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case F.GREATER_THAN_SIGN:this.state=H.SCRIPT_DATA,this._emitChars(`>`);break;case F.NULL:this._err(I.unexpectedNullCharacter),this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case F.EOF:this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===F.SOLIDUS?(this.state=H.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Rn.SCRIPT,!1)&&xr(this.preprocessor.peek(Rn.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<Rn.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=H.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.SOLIDUS:case F.GREATER_THAN_SIGN:case F.EOF:this.state=H.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case F.EQUALS_SIGN:this._err(I.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=H.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=H.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:case F.SOLIDUS:case F.GREATER_THAN_SIGN:case F.EOF:this._leaveAttrName(),this.state=H.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case F.EQUALS_SIGN:this._leaveAttrName(),this.state=H.BEFORE_ATTRIBUTE_VALUE;break;case F.QUOTATION_MARK:case F.APOSTROPHE:case F.LESS_THAN_SIGN:this._err(I.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case F.NULL:this._err(I.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(hr(e)?yr(e):e)}}_stateAfterAttributeName(e){switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.SOLIDUS:this.state=H.SELF_CLOSING_START_TAG;break;case F.EQUALS_SIGN:this.state=H.BEFORE_ATTRIBUTE_VALUE;break;case F.GREATER_THAN_SIGN:this.state=H.DATA,this.emitCurrentTagToken();break;case F.EOF:this._err(I.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=H.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.QUOTATION_MARK:this.state=H.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case F.APOSTROPHE:this.state=H.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case F.GREATER_THAN_SIGN:this._err(I.missingAttributeValue),this.state=H.DATA,this.emitCurrentTagToken();break;default:this.state=H.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case F.QUOTATION_MARK:this.state=H.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case F.AMPERSAND:this._startCharacterReference();break;case F.NULL:this._err(I.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case F.EOF:this._err(I.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case F.APOSTROPHE:this.state=H.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case F.AMPERSAND:this._startCharacterReference();break;case F.NULL:this._err(I.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case F.EOF:this._err(I.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:this._leaveAttrValue(),this.state=H.BEFORE_ATTRIBUTE_NAME;break;case F.AMPERSAND:this._startCharacterReference();break;case F.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=H.DATA,this.emitCurrentTagToken();break;case F.NULL:this._err(I.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case F.QUOTATION_MARK:case F.APOSTROPHE:case F.LESS_THAN_SIGN:case F.EQUALS_SIGN:case F.GRAVE_ACCENT:this._err(I.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case F.EOF:this._err(I.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:this._leaveAttrValue(),this.state=H.BEFORE_ATTRIBUTE_NAME;break;case F.SOLIDUS:this._leaveAttrValue(),this.state=H.SELF_CLOSING_START_TAG;break;case F.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=H.DATA,this.emitCurrentTagToken();break;case F.EOF:this._err(I.eofInTag),this._emitEOFToken();break;default:this._err(I.missingWhitespaceBetweenAttributes),this.state=H.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case F.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=H.DATA,this.emitCurrentTagToken();break}case F.EOF:this._err(I.eofInTag),this._emitEOFToken();break;default:this._err(I.unexpectedSolidusInTag),this.state=H.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case F.GREATER_THAN_SIGN:this.state=H.DATA,this.emitCurrentComment(t);break;case F.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case F.NULL:this._err(I.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Rn.DASH_DASH,!0)?(this._createCommentToken(Rn.DASH_DASH.length+1),this.state=H.COMMENT_START):this._consumeSequenceIfMatch(Rn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Rn.DOCTYPE.length+1),this.state=H.DOCTYPE):this._consumeSequenceIfMatch(Rn.CDATA_START,!0)?this.inForeignNode?this.state=H.CDATA_SECTION:(this._err(I.cdataInHtmlContent),this._createCommentToken(Rn.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=H.BOGUS_COMMENT):this._ensureHibernation()||(this._err(I.incorrectlyOpenedComment),this._createCommentToken(2),this.state=H.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case F.HYPHEN_MINUS:this.state=H.COMMENT_START_DASH;break;case F.GREATER_THAN_SIGN:{this._err(I.abruptClosingOfEmptyComment),this.state=H.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=H.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case F.HYPHEN_MINUS:this.state=H.COMMENT_END;break;case F.GREATER_THAN_SIGN:this._err(I.abruptClosingOfEmptyComment),this.state=H.DATA,this.emitCurrentComment(t);break;case F.EOF:this._err(I.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=H.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case F.HYPHEN_MINUS:this.state=H.COMMENT_END_DASH;break;case F.LESS_THAN_SIGN:t.data+=`<`,this.state=H.COMMENT_LESS_THAN_SIGN;break;case F.NULL:this._err(I.unexpectedNullCharacter),t.data+=`�`;break;case F.EOF:this._err(I.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case F.EXCLAMATION_MARK:t.data+=`!`,this.state=H.COMMENT_LESS_THAN_SIGN_BANG;break;case F.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=H.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===F.HYPHEN_MINUS?this.state=H.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=H.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===F.HYPHEN_MINUS?this.state=H.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=H.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==F.GREATER_THAN_SIGN&&e!==F.EOF&&this._err(I.nestedComment),this.state=H.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case F.HYPHEN_MINUS:this.state=H.COMMENT_END;break;case F.EOF:this._err(I.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=H.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case F.GREATER_THAN_SIGN:this.state=H.DATA,this.emitCurrentComment(t);break;case F.EXCLAMATION_MARK:this.state=H.COMMENT_END_BANG;break;case F.HYPHEN_MINUS:t.data+=`-`;break;case F.EOF:this._err(I.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=H.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case F.HYPHEN_MINUS:t.data+=`--!`,this.state=H.COMMENT_END_DASH;break;case F.GREATER_THAN_SIGN:this._err(I.incorrectlyClosedComment),this.state=H.DATA,this.emitCurrentComment(t);break;case F.EOF:this._err(I.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=H.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:this.state=H.BEFORE_DOCTYPE_NAME;break;case F.GREATER_THAN_SIGN:this.state=H.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case F.EOF:{this._err(I.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(I.missingWhitespaceBeforeDoctypeName),this.state=H.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(hr(e))this._createDoctypeToken(String.fromCharCode(yr(e))),this.state=H.DOCTYPE_NAME;else switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.NULL:this._err(I.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=H.DOCTYPE_NAME;break;case F.GREATER_THAN_SIGN:{this._err(I.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=H.DATA;break}case F.EOF:{this._err(I.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=H.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:this.state=H.AFTER_DOCTYPE_NAME;break;case F.GREATER_THAN_SIGN:this.state=H.DATA,this.emitCurrentDoctype(t);break;case F.NULL:this._err(I.unexpectedNullCharacter),t.name+=`�`;break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(hr(e)?yr(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.GREATER_THAN_SIGN:this.state=H.DATA,this.emitCurrentDoctype(t);break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(Rn.PUBLIC,!1)?this.state=H.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Rn.SYSTEM,!1)?this.state=H.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(I.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:this.state=H.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case F.QUOTATION_MARK:this._err(I.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=H.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case F.APOSTROPHE:this._err(I.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=H.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case F.GREATER_THAN_SIGN:this._err(I.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=H.DATA,this.emitCurrentDoctype(t);break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(I.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.QUOTATION_MARK:t.publicId=``,this.state=H.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case F.APOSTROPHE:t.publicId=``,this.state=H.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case F.GREATER_THAN_SIGN:this._err(I.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=H.DATA,this.emitCurrentDoctype(t);break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(I.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case F.QUOTATION_MARK:this.state=H.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case F.NULL:this._err(I.unexpectedNullCharacter),t.publicId+=`�`;break;case F.GREATER_THAN_SIGN:this._err(I.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=H.DATA;break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case F.APOSTROPHE:this.state=H.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case F.NULL:this._err(I.unexpectedNullCharacter),t.publicId+=`�`;break;case F.GREATER_THAN_SIGN:this._err(I.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=H.DATA;break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:this.state=H.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case F.GREATER_THAN_SIGN:this.state=H.DATA,this.emitCurrentDoctype(t);break;case F.QUOTATION_MARK:this._err(I.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case F.APOSTROPHE:this._err(I.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=H.DATA;break;case F.QUOTATION_MARK:t.systemId=``,this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case F.APOSTROPHE:t.systemId=``,this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:this.state=H.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case F.QUOTATION_MARK:this._err(I.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case F.APOSTROPHE:this._err(I.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case F.GREATER_THAN_SIGN:this._err(I.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=H.DATA,this.emitCurrentDoctype(t);break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.QUOTATION_MARK:t.systemId=``,this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case F.APOSTROPHE:t.systemId=``,this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case F.GREATER_THAN_SIGN:this._err(I.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=H.DATA,this.emitCurrentDoctype(t);break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case F.QUOTATION_MARK:this.state=H.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case F.NULL:this._err(I.unexpectedNullCharacter),t.systemId+=`�`;break;case F.GREATER_THAN_SIGN:this._err(I.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=H.DATA;break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case F.APOSTROPHE:this.state=H.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case F.NULL:this._err(I.unexpectedNullCharacter),t.systemId+=`�`;break;case F.GREATER_THAN_SIGN:this._err(I.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=H.DATA;break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=H.DATA;break;case F.EOF:this._err(I.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(I.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case F.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=H.DATA;break;case F.NULL:this._err(I.unexpectedNullCharacter);break;case F.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case F.RIGHT_SQUARE_BRACKET:this.state=H.CDATA_SECTION_BRACKET;break;case F.EOF:this._err(I.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===F.RIGHT_SQUARE_BRACKET?this.state=H.CDATA_SECTION_END:(this._emitChars(`]`),this.state=H.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case F.GREATER_THAN_SIGN:this.state=H.DATA;break;case F.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=H.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(F.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&vr(this.preprocessor.peek(1))?H.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){vr(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===F.SEMICOLON&&this._err(I.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},wr=new Set([B.DD,B.DT,B.LI,B.OPTGROUP,B.OPTION,B.P,B.RB,B.RP,B.RT,B.RTC]),Tr=new Set([...wr,B.CAPTION,B.COLGROUP,B.TBODY,B.TD,B.TFOOT,B.TH,B.THEAD,B.TR]),Er=new Set([B.APPLET,B.CAPTION,B.HTML,B.MARQUEE,B.OBJECT,B.TABLE,B.TD,B.TEMPLATE,B.TH]),Dr=new Set([...Er,B.OL,B.UL]),Or=new Set([...Er,B.BUTTON]),kr=new Set([B.ANNOTATION_XML,B.MI,B.MN,B.MO,B.MS,B.MTEXT]),Ar=new Set([B.DESC,B.FOREIGN_OBJECT,B.TITLE]),jr=new Set([B.TR,B.TEMPLATE,B.HTML]),Mr=new Set([B.TBODY,B.TFOOT,B.THEAD,B.TEMPLATE,B.HTML]),Nr=new Set([B.TABLE,B.TEMPLATE,B.HTML]),Pr=new Set([B.TD,B.TH]),Fr=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=B.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===B.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===R.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(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let 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])!==R.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(fr,R.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Pr,R.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){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(Nr,R.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Mr,R.HTML)}clearBackToTableRowContext(){this.clearBackTo(jr,R.HTML)}remove(e){let 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]===B.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===B.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case R.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case R.SVG:if(Ar.has(r))return!1;break;case R.MATHML:if(kr.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Er)}hasInListItemScope(e){return this.hasInDynamicScope(e,Dr)}hasInButtonScope(e){return this.hasInDynamicScope(e,Or)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case R.HTML:if(fr.has(t))return!0;if(Er.has(t))return!1;break;case R.SVG:if(Ar.has(t))return!1;break;case R.MATHML:if(kr.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===R.HTML)switch(this.tagIDs[t]){case e:return!0;case B.TABLE:case B.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===R.HTML)switch(this.tagIDs[e]){case B.TBODY:case B.THEAD:case B.TFOOT:return!0;case B.TABLE:case B.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===R.HTML)switch(this.tagIDs[t]){case e:return!0;case B.OPTION:case B.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&wr.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Tr.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&Tr.has(this.currentTagId);)this.pop()}},Ir=3,Lr;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(Lr||={});var Rr={type:Lr.Marker},zr=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===Lr.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<Ir)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<Ir)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=Ir&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(Rr)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:Lr.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Lr.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(Rr);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===Lr.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===Lr.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===Lr.Element&&t.element===e)}},Br={createDocument(){return{nodeName:`#document`,mode:cr.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){let 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){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};Br.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(Br.isTextNode(n)){n.value+=t;return}}Br.appendChild(e,Br.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Br.isTextNode(r)?r.value+=t:Br.insertBefore(e,Br.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.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}}},Vr=`html`,Hr=`about:legacy-compat`,Ur=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,Wr=`+//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//`.split(`,`),Gr=[...Wr,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],Kr=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),qr=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],Jr=[...qr,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function Yr(e,t){return t.some(t=>e.startsWith(t))}function Xr(e){return e.name===Vr&&e.publicId===null&&(e.systemId===null||e.systemId===Hr)}function Zr(e){if(e.name!==Vr)return cr.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===Ur)return cr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Kr.has(n))return cr.QUIRKS;let e=t===null?Gr:Wr;if(Yr(n,e))return cr.QUIRKS;if(e=t===null?qr:Jr,Yr(n,e))return cr.LIMITED_QUIRKS}return cr.NO_QUIRKS}var Qr={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},$r=`definitionurl`,ei=`definitionURL`,ti=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`.split(`.`).map(e=>[e.toLowerCase(),e])),ni=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:R.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:R.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:R.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:R.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:R.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:R.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:R.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:R.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:R.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:R.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:R.XMLNS}]]),ri=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`.split(`.`).map(e=>[e.toLowerCase(),e])),ii=new Set([B.B,B.BIG,B.BLOCKQUOTE,B.BODY,B.BR,B.CENTER,B.CODE,B.DD,B.DIV,B.DL,B.DT,B.EM,B.EMBED,B.H1,B.H2,B.H3,B.H4,B.H5,B.H6,B.HEAD,B.HR,B.I,B.IMG,B.LI,B.LISTING,B.MENU,B.META,B.NOBR,B.OL,B.P,B.PRE,B.RUBY,B.S,B.SMALL,B.SPAN,B.STRONG,B.STRIKE,B.SUB,B.SUP,B.TABLE,B.TT,B.U,B.UL,B.VAR]);function ai(e){let t=e.tagID;return t===B.FONT&&e.attrs.some(({name:e})=>e===sr.COLOR||e===sr.SIZE||e===sr.FACE)||ii.has(t)}function oi(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===$r){e.attrs[t].name=ei;break}}function si(e){for(let t=0;t<e.attrs.length;t++){let n=ti.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function ci(e){for(let t=0;t<e.attrs.length;t++){let n=ni.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 li(e){let t=ri.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ur(e.tagName))}function ui(e,t){return t===R.MATHML&&(e===B.MI||e===B.MO||e===B.MN||e===B.MS||e===B.MTEXT)}function di(e,t,n){if(t===R.MATHML&&e===B.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===sr.ENCODING){let t=n[e].value.toLowerCase();return t===Qr.TEXT_HTML||t===Qr.APPLICATION_XML}}return t===R.SVG&&(e===B.FOREIGN_OBJECT||e===B.DESC||e===B.TITLE)}function fi(e,t,n,r){return(!r||r===R.HTML)&&di(e,t,n)||(!r||r===R.MATHML)&&ui(e,t)}var pi=`hidden`,mi=8,hi=3,U;(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`})(U||={});var gi={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},_i=new Set([B.TABLE,B.TBODY,B.TFOOT,B.THEAD,B.TR]),vi={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Br,onParseError:null},yi=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=U.INITIAL,this.originalInsertionMode=U.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={...vi,...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 Cr(this.options,this),this.activeFormattingElements=new zr(this.treeAdapter),this.fragmentContextID=n?ur(this.treeAdapter.getTagName(n)):B.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new Fr(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...vi,...t};e??=n.treeAdapter.createElement(z.TEMPLATE,R.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,R.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===B.TEMPLATE&&i.tmplInsertionModeStack.unshift(U.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??gi,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||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.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===R.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,R.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=U.TEXT}switchToPlaintextParsing(){this.insertionMode=U.TEXT,this.originalInsertionMode=U.IN_BODY,this.tokenizer.state=pr.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)===z.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==R.HTML))switch(this.fragmentContextID){case B.TITLE:case B.TEXTAREA:this.tokenizer.state=pr.RCDATA;break;case B.STYLE:case B.XMP:case B.IFRAME:case B.NOEMBED:case B.NOFRAMES:case B.NOSCRIPT:this.tokenizer.state=pr.RAWTEXT;break;case B.SCRIPT:this.tokenizer.state=pr.SCRIPT_DATA;break;case B.PLAINTEXT:this.tokenizer.state=pr.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,R.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,R.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(){let e=this.treeAdapter.createElement(z.HTML,R.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,B.HTML)}_appendCommentNode(e,t){let 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;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}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){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===L.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===B.SVG&&this.treeAdapter.getTagName(t)===z.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===R.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===B.MGLYPH||e.tagID===B.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,R.HTML)}_processToken(e){switch(e.type){case L.CHARACTER:this.onCharacter(e);break;case L.NULL_CHARACTER:this.onNullCharacter(e);break;case L.COMMENT:this.onComment(e);break;case L.DOCTYPE:this.onDoctype(e);break;case L.START_TAG:this._processStartTag(e);break;case L.END_TAG:this.onEndTag(e);break;case L.EOF:this.onEof(e);break;case L.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return fi(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===Lr.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=U.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(B.P),this.openElements.popUntilTagNamePopped(B.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case B.TR:this.insertionMode=U.IN_ROW;return;case B.TBODY:case B.THEAD:case B.TFOOT:this.insertionMode=U.IN_TABLE_BODY;return;case B.CAPTION:this.insertionMode=U.IN_CAPTION;return;case B.COLGROUP:this.insertionMode=U.IN_COLUMN_GROUP;return;case B.TABLE:this.insertionMode=U.IN_TABLE;return;case B.BODY:this.insertionMode=U.IN_BODY;return;case B.FRAMESET:this.insertionMode=U.IN_FRAMESET;return;case B.SELECT:this._resetInsertionModeForSelect(e);return;case B.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case B.HTML:this.insertionMode=this.headElement?U.AFTER_HEAD:U.BEFORE_HEAD;return;case B.TD:case B.TH:if(e>0){this.insertionMode=U.IN_CELL;return}break;case B.HEAD:if(e>0){this.insertionMode=U.IN_HEAD;return}break}this.insertionMode=U.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===B.TEMPLATE)break;if(e===B.TABLE){this.insertionMode=U.IN_SELECT_IN_TABLE;return}}this.insertionMode=U.IN_SELECT}_isElementCausesFosterParenting(e){return _i.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--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case B.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===R.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case B.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return dr[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Ro(this,e);return}switch(this.insertionMode){case U.INITIAL:Mi(this,e);break;case U.BEFORE_HTML:Fi(this,e);break;case U.BEFORE_HEAD:Ri(this,e);break;case U.IN_HEAD:Hi(this,e);break;case U.IN_HEAD_NO_SCRIPT:Gi(this,e);break;case U.AFTER_HEAD:Ji(this,e);break;case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:Zi(this,e);break;case U.TEXT:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:Ka(this,e);break;case U.IN_TABLE_TEXT:ao(this,e);break;case U.IN_COLUMN_GROUP:po(this,e);break;case U.AFTER_BODY:ko(this,e);break;case U.AFTER_AFTER_BODY:Fo(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Lo(this,e);return}switch(this.insertionMode){case U.INITIAL:Mi(this,e);break;case U.BEFORE_HTML:Fi(this,e);break;case U.BEFORE_HEAD:Ri(this,e);break;case U.IN_HEAD:Hi(this,e);break;case U.IN_HEAD_NO_SCRIPT:Gi(this,e);break;case U.AFTER_HEAD:Ji(this,e);break;case U.TEXT:this._insertCharacters(e);break;case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:Ka(this,e);break;case U.IN_COLUMN_GROUP:po(this,e);break;case U.AFTER_BODY:ko(this,e);break;case U.AFTER_AFTER_BODY:Fo(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){Di(this,e);return}switch(this.insertionMode){case U.INITIAL:case U.BEFORE_HTML:case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_TEMPLATE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:Di(this,e);break;case U.IN_TABLE_TEXT:oo(this,e);break;case U.AFTER_BODY:Oi(this,e);break;case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:ki(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case U.INITIAL:ji(this,e);break;case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:this._err(e,I.misplacedDoctype);break;case U.IN_TABLE_TEXT:oo(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,I.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?Bo(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case U.INITIAL:Mi(this,e);break;case U.BEFORE_HTML:Ni(this,e);break;case U.BEFORE_HEAD:Ii(this,e);break;case U.IN_HEAD:zi(this,e);break;case U.IN_HEAD_NO_SCRIPT:Ui(this,e);break;case U.AFTER_HEAD:Ki(this,e);break;case U.IN_BODY:Aa(this,e);break;case U.IN_TABLE:to(this,e);break;case U.IN_TABLE_TEXT:oo(this,e);break;case U.IN_CAPTION:co(this,e);break;case U.IN_COLUMN_GROUP:uo(this,e);break;case U.IN_TABLE_BODY:mo(this,e);break;case U.IN_ROW:go(this,e);break;case U.IN_CELL:vo(this,e);break;case U.IN_SELECT:bo(this,e);break;case U.IN_SELECT_IN_TABLE:So(this,e);break;case U.IN_TEMPLATE:wo(this,e);break;case U.AFTER_BODY:Do(this,e);break;case U.IN_FRAMESET:Ao(this,e);break;case U.AFTER_FRAMESET:Mo(this,e);break;case U.AFTER_AFTER_BODY:Po(this,e);break;case U.AFTER_AFTER_FRAMESET:Io(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?Vo(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case U.INITIAL:Mi(this,e);break;case U.BEFORE_HTML:Pi(this,e);break;case U.BEFORE_HEAD:Li(this,e);break;case U.IN_HEAD:Bi(this,e);break;case U.IN_HEAD_NO_SCRIPT:Wi(this,e);break;case U.AFTER_HEAD:qi(this,e);break;case U.IN_BODY:Ha(this,e);break;case U.TEXT:Wa(this,e);break;case U.IN_TABLE:no(this,e);break;case U.IN_TABLE_TEXT:oo(this,e);break;case U.IN_CAPTION:lo(this,e);break;case U.IN_COLUMN_GROUP:fo(this,e);break;case U.IN_TABLE_BODY:ho(this,e);break;case U.IN_ROW:_o(this,e);break;case U.IN_CELL:yo(this,e);break;case U.IN_SELECT:xo(this,e);break;case U.IN_SELECT_IN_TABLE:Co(this,e);break;case U.IN_TEMPLATE:To(this,e);break;case U.AFTER_BODY:Oo(this,e);break;case U.IN_FRAMESET:jo(this,e);break;case U.AFTER_FRAMESET:No(this,e);break;case U.AFTER_AFTER_BODY:Fo(this,e);break;default:}}onEof(e){switch(this.insertionMode){case U.INITIAL:Mi(this,e);break;case U.BEFORE_HTML:Fi(this,e);break;case U.BEFORE_HEAD:Ri(this,e);break;case U.IN_HEAD:Hi(this,e);break;case U.IN_HEAD_NO_SCRIPT:Gi(this,e);break;case U.AFTER_HEAD:Ji(this,e);break;case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:Ua(this,e);break;case U.TEXT:Ga(this,e);break;case U.IN_TABLE_TEXT:oo(this,e);break;case U.IN_TEMPLATE:Eo(this,e);break;case U.AFTER_BODY:case U.IN_FRAMESET:case U.AFTER_FRAMESET:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:Ai(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===F.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 U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.TEXT:case U.IN_COLUMN_GROUP:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:this._insertCharacters(e);break;case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:case U.AFTER_BODY:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:Xi(this,e);break;case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:Ka(this,e);break;case U.IN_TABLE_TEXT:io(this,e);break;default:}}};function bi(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):Va(e,t),n}function xi(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let 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 Si(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=hi;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=Ci(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function Ci(e,t){let 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 wi(e,t,n){let r=ur(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===B.TEMPLATE&&i===R.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Ti(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Ei(e,t){for(let n=0;n<mi;n++){let n=bi(e,t);if(!n)break;let r=xi(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=Si(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&wi(e,a,i),Ti(e,r,n)}}function Di(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Oi(e,t){e._appendCommentNode(t,e.openElements.items[0])}function ki(e,t){e._appendCommentNode(t,e.document)}function Ai(e,t){if(e.stopped=!0,t.location){let 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){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function ji(e,t){e._setDocumentType(t);let n=t.forceQuirks?cr.QUIRKS:Zr(t);Xr(t)||e._err(t,I.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=U.BEFORE_HTML}function Mi(e,t){e._err(t,I.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,cr.QUIRKS),e.insertionMode=U.BEFORE_HTML,e._processToken(t)}function Ni(e,t){t.tagID===B.HTML?(e._insertElement(t,R.HTML),e.insertionMode=U.BEFORE_HEAD):Fi(e,t)}function Pi(e,t){let n=t.tagID;(n===B.HTML||n===B.HEAD||n===B.BODY||n===B.BR)&&Fi(e,t)}function Fi(e,t){e._insertFakeRootElement(),e.insertionMode=U.BEFORE_HEAD,e._processToken(t)}function Ii(e,t){switch(t.tagID){case B.HTML:Aa(e,t);break;case B.HEAD:e._insertElement(t,R.HTML),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD;break;default:Ri(e,t)}}function Li(e,t){let n=t.tagID;n===B.HEAD||n===B.BODY||n===B.HTML||n===B.BR?Ri(e,t):e._err(t,I.endTagWithoutMatchingOpenElement)}function Ri(e,t){e._insertFakeElement(z.HEAD,B.HEAD),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD,e._processToken(t)}function zi(e,t){switch(t.tagID){case B.HTML:Aa(e,t);break;case B.BASE:case B.BASEFONT:case B.BGSOUND:case B.LINK:case B.META:e._appendElement(t,R.HTML),t.ackSelfClosing=!0;break;case B.TITLE:e._switchToTextParsing(t,pr.RCDATA);break;case B.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,pr.RAWTEXT):(e._insertElement(t,R.HTML),e.insertionMode=U.IN_HEAD_NO_SCRIPT);break;case B.NOFRAMES:case B.STYLE:e._switchToTextParsing(t,pr.RAWTEXT);break;case B.SCRIPT:e._switchToTextParsing(t,pr.SCRIPT_DATA);break;case B.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=U.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(U.IN_TEMPLATE);break;case B.HEAD:e._err(t,I.misplacedStartTagForHeadElement);break;default:Hi(e,t)}}function Bi(e,t){switch(t.tagID){case B.HEAD:e.openElements.pop(),e.insertionMode=U.AFTER_HEAD;break;case B.BODY:case B.BR:case B.HTML:Hi(e,t);break;case B.TEMPLATE:Vi(e,t);break;default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function Vi(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==B.TEMPLATE&&e._err(t,I.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(B.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,I.endTagWithoutMatchingOpenElement)}function Hi(e,t){e.openElements.pop(),e.insertionMode=U.AFTER_HEAD,e._processToken(t)}function Ui(e,t){switch(t.tagID){case B.HTML:Aa(e,t);break;case B.BASEFONT:case B.BGSOUND:case B.HEAD:case B.LINK:case B.META:case B.NOFRAMES:case B.STYLE:zi(e,t);break;case B.NOSCRIPT:e._err(t,I.nestedNoscriptInHead);break;default:Gi(e,t)}}function Wi(e,t){switch(t.tagID){case B.NOSCRIPT:e.openElements.pop(),e.insertionMode=U.IN_HEAD;break;case B.BR:Gi(e,t);break;default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function Gi(e,t){let n=t.type===L.EOF?I.openElementsLeftAfterEof:I.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=U.IN_HEAD,e._processToken(t)}function Ki(e,t){switch(t.tagID){case B.HTML:Aa(e,t);break;case B.BODY:e._insertElement(t,R.HTML),e.framesetOk=!1,e.insertionMode=U.IN_BODY;break;case B.FRAMESET:e._insertElement(t,R.HTML),e.insertionMode=U.IN_FRAMESET;break;case B.BASE:case B.BASEFONT:case B.BGSOUND:case B.LINK:case B.META:case B.NOFRAMES:case B.SCRIPT:case B.STYLE:case B.TEMPLATE:case B.TITLE:e._err(t,I.abandonedHeadElementChild),e.openElements.push(e.headElement,B.HEAD),zi(e,t),e.openElements.remove(e.headElement);break;case B.HEAD:e._err(t,I.misplacedStartTagForHeadElement);break;default:Ji(e,t)}}function qi(e,t){switch(t.tagID){case B.BODY:case B.HTML:case B.BR:Ji(e,t);break;case B.TEMPLATE:Vi(e,t);break;default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function Ji(e,t){e._insertFakeElement(z.BODY,B.BODY),e.insertionMode=U.IN_BODY,Yi(e,t)}function Yi(e,t){switch(t.type){case L.CHARACTER:Zi(e,t);break;case L.WHITESPACE_CHARACTER:Xi(e,t);break;case L.COMMENT:Di(e,t);break;case L.START_TAG:Aa(e,t);break;case L.END_TAG:Ha(e,t);break;case L.EOF:Ua(e,t);break;default:}}function Xi(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Zi(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Qi(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function $i(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function ea(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,R.HTML),e.insertionMode=U.IN_FRAMESET)}function ta(e,t){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(t,R.HTML)}function na(e,t){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&fr.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,R.HTML)}function ra(e,t){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(t,R.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function ia(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(t,R.HTML),n||(e.formElement=e.openElements.current))}function aa(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===B.LI&&r===B.LI||(n===B.DD||n===B.DT)&&(r===B.DD||r===B.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==B.ADDRESS&&r!==B.DIV&&r!==B.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(t,R.HTML)}function oa(e,t){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(t,R.HTML),e.tokenizer.state=pr.PLAINTEXT}function sa(e,t){e.openElements.hasInScope(B.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(B.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML),e.framesetOk=!1}function ca(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(z.A);n&&(Ei(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function la(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ua(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(B.NOBR)&&(Ei(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,R.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function da(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function fa(e,t){e.treeAdapter.getDocumentMode(e.document)!==cr.QUIRKS&&e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(t,R.HTML),e.framesetOk=!1,e.insertionMode=U.IN_TABLE}function pa(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,R.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ma(e){let t=Kn(e,sr.TYPE);return t!=null&&t.toLowerCase()===pi}function ha(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,R.HTML),ma(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function ga(e,t){e._appendElement(t,R.HTML),t.ackSelfClosing=!0}function _a(e,t){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._appendElement(t,R.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function va(e,t){t.tagName=z.IMG,t.tagID=B.IMG,pa(e,t)}function ya(e,t){e._insertElement(t,R.HTML),e.skipNextNewLine=!0,e.tokenizer.state=pr.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=U.TEXT}function ba(e,t){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,pr.RAWTEXT)}function xa(e,t){e.framesetOk=!1,e._switchToTextParsing(t,pr.RAWTEXT)}function Sa(e,t){e._switchToTextParsing(t,pr.RAWTEXT)}function Ca(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===U.IN_TABLE||e.insertionMode===U.IN_CAPTION||e.insertionMode===U.IN_TABLE_BODY||e.insertionMode===U.IN_ROW||e.insertionMode===U.IN_CELL?U.IN_SELECT_IN_TABLE:U.IN_SELECT}function wa(e,t){e.openElements.currentTagId===B.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML)}function Ta(e,t){e.openElements.hasInScope(B.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,R.HTML)}function Ea(e,t){e.openElements.hasInScope(B.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(B.RTC),e._insertElement(t,R.HTML)}function Da(e,t){e._reconstructActiveFormattingElements(),oi(t),ci(t),t.selfClosing?e._appendElement(t,R.MATHML):e._insertElement(t,R.MATHML),t.ackSelfClosing=!0}function Oa(e,t){e._reconstructActiveFormattingElements(),si(t),ci(t),t.selfClosing?e._appendElement(t,R.SVG):e._insertElement(t,R.SVG),t.ackSelfClosing=!0}function ka(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML)}function Aa(e,t){switch(t.tagID){case B.I:case B.S:case B.B:case B.U:case B.EM:case B.TT:case B.BIG:case B.CODE:case B.FONT:case B.SMALL:case B.STRIKE:case B.STRONG:la(e,t);break;case B.A:ca(e,t);break;case B.H1:case B.H2:case B.H3:case B.H4:case B.H5:case B.H6:na(e,t);break;case B.P:case B.DL:case B.OL:case B.UL:case B.DIV:case B.DIR:case B.NAV:case B.MAIN:case B.MENU:case B.ASIDE:case B.CENTER:case B.FIGURE:case B.FOOTER:case B.HEADER:case B.HGROUP:case B.DIALOG:case B.DETAILS:case B.ADDRESS:case B.ARTICLE:case B.SEARCH:case B.SECTION:case B.SUMMARY:case B.FIELDSET:case B.BLOCKQUOTE:case B.FIGCAPTION:ta(e,t);break;case B.LI:case B.DD:case B.DT:aa(e,t);break;case B.BR:case B.IMG:case B.WBR:case B.AREA:case B.EMBED:case B.KEYGEN:pa(e,t);break;case B.HR:_a(e,t);break;case B.RB:case B.RTC:Ta(e,t);break;case B.RT:case B.RP:Ea(e,t);break;case B.PRE:case B.LISTING:ra(e,t);break;case B.XMP:ba(e,t);break;case B.SVG:Oa(e,t);break;case B.HTML:Qi(e,t);break;case B.BASE:case B.LINK:case B.META:case B.STYLE:case B.TITLE:case B.SCRIPT:case B.BGSOUND:case B.BASEFONT:case B.TEMPLATE:zi(e,t);break;case B.BODY:$i(e,t);break;case B.FORM:ia(e,t);break;case B.NOBR:ua(e,t);break;case B.MATH:Da(e,t);break;case B.TABLE:fa(e,t);break;case B.INPUT:ha(e,t);break;case B.PARAM:case B.TRACK:case B.SOURCE:ga(e,t);break;case B.IMAGE:va(e,t);break;case B.BUTTON:sa(e,t);break;case B.APPLET:case B.OBJECT:case B.MARQUEE:da(e,t);break;case B.IFRAME:xa(e,t);break;case B.SELECT:Ca(e,t);break;case B.OPTION:case B.OPTGROUP:wa(e,t);break;case B.NOEMBED:case B.NOFRAMES:Sa(e,t);break;case B.FRAMESET:ea(e,t);break;case B.TEXTAREA:ya(e,t);break;case B.NOSCRIPT:e.options.scriptingEnabled?Sa(e,t):ka(e,t);break;case B.PLAINTEXT:oa(e,t);break;case B.COL:case B.TH:case B.TD:case B.TR:case B.HEAD:case B.FRAME:case B.TBODY:case B.TFOOT:case B.THEAD:case B.CAPTION:case B.COLGROUP:break;default:ka(e,t)}}function ja(e,t){if(e.openElements.hasInScope(B.BODY)&&(e.insertionMode=U.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Ma(e,t){e.openElements.hasInScope(B.BODY)&&(e.insertionMode=U.AFTER_BODY,Oo(e,t))}function Na(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Pa(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(B.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(B.FORM):n&&e.openElements.remove(n))}function Fa(e){e.openElements.hasInButtonScope(B.P)||e._insertFakeElement(z.P,B.P),e._closePElement()}function Ia(e){e.openElements.hasInListItemScope(B.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(B.LI),e.openElements.popUntilTagNamePopped(B.LI))}function La(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Ra(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function za(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Ba(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(z.BR,B.BR),e.openElements.pop(),e.framesetOk=!1}function Va(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==B.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function Ha(e,t){switch(t.tagID){case B.A:case B.B:case B.I:case B.S:case B.U:case B.EM:case B.TT:case B.BIG:case B.CODE:case B.FONT:case B.NOBR:case B.SMALL:case B.STRIKE:case B.STRONG:Ei(e,t);break;case B.P:Fa(e);break;case B.DL:case B.UL:case B.OL:case B.DIR:case B.DIV:case B.NAV:case B.PRE:case B.MAIN:case B.MENU:case B.ASIDE:case B.BUTTON:case B.CENTER:case B.FIGURE:case B.FOOTER:case B.HEADER:case B.HGROUP:case B.DIALOG:case B.ADDRESS:case B.ARTICLE:case B.DETAILS:case B.SEARCH:case B.SECTION:case B.SUMMARY:case B.LISTING:case B.FIELDSET:case B.BLOCKQUOTE:case B.FIGCAPTION:Na(e,t);break;case B.LI:Ia(e);break;case B.DD:case B.DT:La(e,t);break;case B.H1:case B.H2:case B.H3:case B.H4:case B.H5:case B.H6:Ra(e);break;case B.BR:Ba(e);break;case B.BODY:ja(e,t);break;case B.HTML:Ma(e,t);break;case B.FORM:Pa(e);break;case B.APPLET:case B.OBJECT:case B.MARQUEE:za(e,t);break;case B.TEMPLATE:Vi(e,t);break;default:Va(e,t)}}function Ua(e,t){e.tmplInsertionModeStack.length>0?Eo(e,t):Ai(e,t)}function Wa(e,t){var n;t.tagID===B.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Ga(e,t){e._err(t,I.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ka(e,t){if(e.openElements.currentTagId!==void 0&&_i.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=U.IN_TABLE_TEXT,t.type){case L.CHARACTER:ao(e,t);break;case L.WHITESPACE_CHARACTER:io(e,t);break}else ro(e,t)}function qa(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,R.HTML),e.insertionMode=U.IN_CAPTION}function Ja(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,R.HTML),e.insertionMode=U.IN_COLUMN_GROUP}function Ya(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(z.COLGROUP,B.COLGROUP),e.insertionMode=U.IN_COLUMN_GROUP,uo(e,t)}function Xa(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,R.HTML),e.insertionMode=U.IN_TABLE_BODY}function Za(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(z.TBODY,B.TBODY),e.insertionMode=U.IN_TABLE_BODY,mo(e,t)}function Qa(e,t){e.openElements.hasInTableScope(B.TABLE)&&(e.openElements.popUntilTagNamePopped(B.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function $a(e,t){ma(t)?e._appendElement(t,R.HTML):ro(e,t),t.ackSelfClosing=!0}function eo(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,R.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function to(e,t){switch(t.tagID){case B.TD:case B.TH:case B.TR:Za(e,t);break;case B.STYLE:case B.SCRIPT:case B.TEMPLATE:zi(e,t);break;case B.COL:Ya(e,t);break;case B.FORM:eo(e,t);break;case B.TABLE:Qa(e,t);break;case B.TBODY:case B.TFOOT:case B.THEAD:Xa(e,t);break;case B.INPUT:$a(e,t);break;case B.CAPTION:qa(e,t);break;case B.COLGROUP:Ja(e,t);break;default:ro(e,t)}}function no(e,t){switch(t.tagID){case B.TABLE:e.openElements.hasInTableScope(B.TABLE)&&(e.openElements.popUntilTagNamePopped(B.TABLE),e._resetInsertionMode());break;case B.TEMPLATE:Vi(e,t);break;case B.BODY:case B.CAPTION:case B.COL:case B.COLGROUP:case B.HTML:case B.TBODY:case B.TD:case B.TFOOT:case B.TH:case B.THEAD:case B.TR:break;default:ro(e,t)}}function ro(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Yi(e,t),e.fosterParentingEnabled=n}function io(e,t){e.pendingCharacterTokens.push(t)}function ao(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function oo(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ro(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var so=new Set([B.CAPTION,B.COL,B.COLGROUP,B.TBODY,B.TD,B.TFOOT,B.TH,B.THEAD,B.TR]);function co(e,t){let n=t.tagID;so.has(n)?e.openElements.hasInTableScope(B.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(B.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_TABLE,to(e,t)):Aa(e,t)}function lo(e,t){let n=t.tagID;switch(n){case B.CAPTION:case B.TABLE:e.openElements.hasInTableScope(B.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(B.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_TABLE,n===B.TABLE&&no(e,t));break;case B.BODY:case B.COL:case B.COLGROUP:case B.HTML:case B.TBODY:case B.TD:case B.TFOOT:case B.TH:case B.THEAD:case B.TR:break;default:Ha(e,t)}}function uo(e,t){switch(t.tagID){case B.HTML:Aa(e,t);break;case B.COL:e._appendElement(t,R.HTML),t.ackSelfClosing=!0;break;case B.TEMPLATE:zi(e,t);break;default:po(e,t)}}function fo(e,t){switch(t.tagID){case B.COLGROUP:e.openElements.currentTagId===B.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE);break;case B.TEMPLATE:Vi(e,t);break;case B.COL:break;default:po(e,t)}}function po(e,t){e.openElements.currentTagId===B.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE,e._processToken(t))}function mo(e,t){switch(t.tagID){case B.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,R.HTML),e.insertionMode=U.IN_ROW;break;case B.TH:case B.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(z.TR,B.TR),e.insertionMode=U.IN_ROW,go(e,t);break;case B.CAPTION:case B.COL:case B.COLGROUP:case B.TBODY:case B.TFOOT:case B.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,to(e,t));break;default:to(e,t)}}function ho(e,t){let n=t.tagID;switch(t.tagID){case B.TBODY:case B.TFOOT:case B.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE);break;case B.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,no(e,t));break;case B.BODY:case B.CAPTION:case B.COL:case B.COLGROUP:case B.HTML:case B.TD:case B.TH:case B.TR:break;default:no(e,t)}}function go(e,t){switch(t.tagID){case B.TH:case B.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,R.HTML),e.insertionMode=U.IN_CELL,e.activeFormattingElements.insertMarker();break;case B.CAPTION:case B.COL:case B.COLGROUP:case B.TBODY:case B.TFOOT:case B.THEAD:case B.TR:e.openElements.hasInTableScope(B.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,mo(e,t));break;default:to(e,t)}}function _o(e,t){switch(t.tagID){case B.TR:e.openElements.hasInTableScope(B.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY);break;case B.TABLE:e.openElements.hasInTableScope(B.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,ho(e,t));break;case B.TBODY:case B.TFOOT:case B.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(B.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,ho(e,t));break;case B.BODY:case B.CAPTION:case B.COL:case B.COLGROUP:case B.HTML:case B.TD:case B.TH:break;default:no(e,t)}}function vo(e,t){let n=t.tagID;so.has(n)?(e.openElements.hasInTableScope(B.TD)||e.openElements.hasInTableScope(B.TH))&&(e._closeTableCell(),go(e,t)):Aa(e,t)}function yo(e,t){let n=t.tagID;switch(n){case B.TD:case B.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_ROW);break;case B.TABLE:case B.TBODY:case B.TFOOT:case B.THEAD:case B.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),_o(e,t));break;case B.BODY:case B.CAPTION:case B.COL:case B.COLGROUP:case B.HTML:break;default:Ha(e,t)}}function bo(e,t){switch(t.tagID){case B.HTML:Aa(e,t);break;case B.OPTION:e.openElements.currentTagId===B.OPTION&&e.openElements.pop(),e._insertElement(t,R.HTML);break;case B.OPTGROUP:e.openElements.currentTagId===B.OPTION&&e.openElements.pop(),e.openElements.currentTagId===B.OPTGROUP&&e.openElements.pop(),e._insertElement(t,R.HTML);break;case B.HR:e.openElements.currentTagId===B.OPTION&&e.openElements.pop(),e.openElements.currentTagId===B.OPTGROUP&&e.openElements.pop(),e._appendElement(t,R.HTML),t.ackSelfClosing=!0;break;case B.INPUT:case B.KEYGEN:case B.TEXTAREA:case B.SELECT:e.openElements.hasInSelectScope(B.SELECT)&&(e.openElements.popUntilTagNamePopped(B.SELECT),e._resetInsertionMode(),t.tagID!==B.SELECT&&e._processStartTag(t));break;case B.SCRIPT:case B.TEMPLATE:zi(e,t);break;default:}}function xo(e,t){switch(t.tagID){case B.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===B.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===B.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===B.OPTGROUP&&e.openElements.pop();break;case B.OPTION:e.openElements.currentTagId===B.OPTION&&e.openElements.pop();break;case B.SELECT:e.openElements.hasInSelectScope(B.SELECT)&&(e.openElements.popUntilTagNamePopped(B.SELECT),e._resetInsertionMode());break;case B.TEMPLATE:Vi(e,t);break;default:}}function So(e,t){let n=t.tagID;n===B.CAPTION||n===B.TABLE||n===B.TBODY||n===B.TFOOT||n===B.THEAD||n===B.TR||n===B.TD||n===B.TH?(e.openElements.popUntilTagNamePopped(B.SELECT),e._resetInsertionMode(),e._processStartTag(t)):bo(e,t)}function Co(e,t){let n=t.tagID;n===B.CAPTION||n===B.TABLE||n===B.TBODY||n===B.TFOOT||n===B.THEAD||n===B.TR||n===B.TD||n===B.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(B.SELECT),e._resetInsertionMode(),e.onEndTag(t)):xo(e,t)}function wo(e,t){switch(t.tagID){case B.BASE:case B.BASEFONT:case B.BGSOUND:case B.LINK:case B.META:case B.NOFRAMES:case B.SCRIPT:case B.STYLE:case B.TEMPLATE:case B.TITLE:zi(e,t);break;case B.CAPTION:case B.COLGROUP:case B.TBODY:case B.TFOOT:case B.THEAD:e.tmplInsertionModeStack[0]=U.IN_TABLE,e.insertionMode=U.IN_TABLE,to(e,t);break;case B.COL:e.tmplInsertionModeStack[0]=U.IN_COLUMN_GROUP,e.insertionMode=U.IN_COLUMN_GROUP,uo(e,t);break;case B.TR:e.tmplInsertionModeStack[0]=U.IN_TABLE_BODY,e.insertionMode=U.IN_TABLE_BODY,mo(e,t);break;case B.TD:case B.TH:e.tmplInsertionModeStack[0]=U.IN_ROW,e.insertionMode=U.IN_ROW,go(e,t);break;default:e.tmplInsertionModeStack[0]=U.IN_BODY,e.insertionMode=U.IN_BODY,Aa(e,t)}}function To(e,t){t.tagID===B.TEMPLATE&&Vi(e,t)}function Eo(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(B.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ai(e,t)}function Do(e,t){t.tagID===B.HTML?Aa(e,t):ko(e,t)}function Oo(e,t){if(t.tagID===B.HTML){if(e.fragmentContext||(e.insertionMode=U.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===B.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else ko(e,t)}function ko(e,t){e.insertionMode=U.IN_BODY,Yi(e,t)}function Ao(e,t){switch(t.tagID){case B.HTML:Aa(e,t);break;case B.FRAMESET:e._insertElement(t,R.HTML);break;case B.FRAME:e._appendElement(t,R.HTML),t.ackSelfClosing=!0;break;case B.NOFRAMES:zi(e,t);break;default:}}function jo(e,t){t.tagID===B.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==B.FRAMESET&&(e.insertionMode=U.AFTER_FRAMESET))}function Mo(e,t){switch(t.tagID){case B.HTML:Aa(e,t);break;case B.NOFRAMES:zi(e,t);break;default:}}function No(e,t){t.tagID===B.HTML&&(e.insertionMode=U.AFTER_AFTER_FRAMESET)}function Po(e,t){t.tagID===B.HTML?Aa(e,t):Fo(e,t)}function Fo(e,t){e.insertionMode=U.IN_BODY,Yi(e,t)}function Io(e,t){switch(t.tagID){case B.HTML:Aa(e,t);break;case B.NOFRAMES:zi(e,t);break;default:}}function Lo(e,t){t.chars=`�`,e._insertCharacters(t)}function Ro(e,t){e._insertCharacters(t),e.framesetOk=!1}function zo(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==R.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Bo(e,t){if(ai(t))zo(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===R.MATHML?oi(t):r===R.SVG&&(li(t),si(t)),ci(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Vo(e,t){if(t.tagID===B.P||t.tagID===B.BR){zo(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===R.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}new Set([z.AREA,z.BASE,z.BASEFONT,z.BGSOUND,z.BR,z.COL,z.EMBED,z.FRAME,z.HR,z.IMG,z.INPUT,z.KEYGEN,z.LINK,z.META,z.PARAM,z.SOURCE,z.TRACK,z.WBR]);var Ho=Wo(`end`),Uo=Wo(`start`);function Wo(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Go(e){let t=Uo(e),n=Ho(e);if(t&&n)return{start:t,end:n}}var Ko=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,qo=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),Jo={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Yo(e,t){let n=ls(e),r=Sn(`type`,{handlers:{root:Zo,element:Qo,text:$o,comment:ns,doctype:es,raw:rs},unknown:is}),i={parser:n?new yi(Jo):yi.getFragmentParser(void 0,Jo),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),as(i,Uo());let a=pn(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&He(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function Xo(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Zo(e,t){Xo(e.children,t)}function Qo(e,t){ss(e,t),Xo(e.children,t),cs(e,t)}function $o(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:L.CHARACTER,chars:e.value,location:us(e)};as(t,Uo(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function es(e,t){let n={type:L.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:us(e)};as(t,Uo(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ts(e,t){t.stitches=!0;let n=ds(e);`children`in e&&`children`in n&&(n.children=Yo({type:`root`,children:e.children},t.options).children),ns({type:`comment`,value:{stitch:n}},t)}function ns(e,t){let n=e.value,r={type:L.COMMENT,data:n,location:us(e)};as(t,Uo(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function rs(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,os(t,Uo(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Ko,`<$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;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function is(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))ts(n,t);else{let e=``;throw qo.has(n.type)&&(e=". 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"),Error("Cannot compile `"+n.type+"` node"+e)}}function as(e,t){os(e,t);let 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=pr.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 os(e,t){if(t&&t.offset!==void 0){let 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 ss(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===pr.PLAINTEXT)return;as(t,Uo(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:un.html;i===un.html&&n===`svg`&&(i=un.svg);let a=En({...e,children:[]},{space:i===un.svg?`svg`:`html`}),o={type:L.START_TAG,tagName:n,tagID:ur(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:us(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function cs(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&In.includes(n)||t.parser.tokenizer.state===pr.PLAINTEXT)return;as(t,Ho(e));let r={type:L.END_TAG,tagName:n,tagID:ur(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:us(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===pr.RCDATA||t.parser.tokenizer.state===pr.RAWTEXT||t.parser.tokenizer.state===pr.SCRIPT_DATA)&&(t.parser.tokenizer.state=pr.DATA)}function ls(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function us(e){let t=Uo(e)||{line:void 0,column:void 0,offset:void 0},n=Ho(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 ds(e){return`children`in e?dt({...e,children:[]}):dt(e)}function fs(e){return function(t,n){return Yo(t,{...e,file:n})}}var ps=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],ms={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...ps,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...ps],h2:[[`className`,`sr-only`]],img:[...ps,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...ps,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...ps],table:[...ps],ul:[...ps,[`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`.split(`.`)},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`.split(`.`)},hs={}.hasOwnProperty;function gs(e,t){let n={type:`root`,children:[]},r=_s({schema:t?{...ms,...t}:ms,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function _s(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return vs(e,n);case`doctype`:return ys(e,n);case`element`:return bs(e,n);case`root`:return xs(e,n);case`text`:return Ss(e,n);default:}}}function vs(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return ks(r,t),r}}function ys(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return ks(e,t),e}}function bs(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=Cs(e,t.children),i=ws(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&hs.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return ks(o,t),o}function xs(e,t){let n={type:`root`,children:Cs(e,t.children)};return ks(n,t),n}function Ss(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return ks(n,t),n}function Cs(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=_s(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function ws(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&hs.call(r,n)?r[n]:void 0,o=r&&hs.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(hs.call(s,l)){let t=s[l],n=Ts(e,As(a,l),l,t);n??=Ts(e,As(o,l),l,t),n!=null&&(c[l]=n)}if(i&&hs.call(i,n)){let e=i[n];for(l in e)hs.call(e,l)&&!hs.call(c,l)&&(c[l]=e[l])}return c}function Ts(e,t,n,r){return t?Array.isArray(r)?Es(e,t,n,r):Ds(e,t,n,r):void 0}function Es(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=Ds(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function Ds(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&Os(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Os(e,t,n){let r=e.schema.protocols&&hs.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function ks(e,t){let n=Go(t);t.data&&(e.data=dt(t.data)),n&&(e.position=n)}function As(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function js(e){return function(t){return gs(t,e)}}function Ms(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var Ns=Us(/[A-Za-z]/),Ps=Us(/[\dA-Za-z]/),Fs=Us(/[#-'*+\--9=?A-Z^-~]/);function Is(e){return e!==null&&(e<32||e===127)}var Ls=Us(/\d/),Rs=Us(/[\dA-Fa-f]/),zs=Us(/[!-/:-@[-`{-~]/);function W(e){return e!==null&&e<-2}function Bs(e){return e!==null&&(e<0||e===32)}function G(e){return e===-2||e===-1||e===32}var Vs=Us(/\p{P}|\p{S}/u),Hs=Us(/\s/);function Us(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Ws(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Gs(e,t,n){let r=Ae((n||{}).ignore||[]),i=Ks(t),a=-1;for(;++a<i.length;)Be(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function Ks(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([qs(e[0]),Js(e[1])])}return t}function qs(e){return typeof e==`string`?new RegExp(Ws(e),`g`):e}function Js(e){return typeof e==`function`?e:function(){return e}}var Ys=`phrasing`,Xs=[`autolink`,`link`,`image`,`label`];function Zs(){return{transforms:[ac],enter:{literalAutolink:$s,literalAutolinkEmail:ec,literalAutolinkHttp:ec,literalAutolinkWww:ec},exit:{literalAutolink:ic,literalAutolinkEmail:rc,literalAutolinkHttp:tc,literalAutolinkWww:nc}}}function Qs(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Ys,notInConstruct:Xs},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Ys,notInConstruct:Xs},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Ys,notInConstruct:Xs}]}}function $s(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function ec(e){this.config.enter.autolinkProtocol.call(this,e)}function tc(e){this.config.exit.autolinkProtocol.call(this,e)}function nc(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function rc(e){this.config.exit.autolinkEmail.call(this,e)}function ic(e){this.exit(e)}function ac(e){Gs(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,oc],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,sc]],{ignore:[`link`,`linkReference`]})}function oc(e,t,n,r,i){let a=``;if(!uc(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!cc(n)))return!1;let o=lc(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function sc(e,t,n,r){return!uc(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function cc(e){let 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 lc(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Ms(e,`(`),a=Ms(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function uc(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Hs(n)||Vs(n))&&(!t||n!==47)}function dc(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}xc.peek=bc;function fc(){this.buffer()}function pc(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function mc(){this.buffer()}function hc(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function gc(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=dc(this.sliceSerialize(e)).toLowerCase(),n.label=t}function _c(e){this.exit(e)}function vc(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=dc(this.sliceSerialize(e)).toLowerCase(),n.label=t}function yc(e){this.exit(e)}function bc(){return`[`}function xc(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Sc(){return{enter:{gfmFootnoteCallString:fc,gfmFootnoteCall:pc,gfmFootnoteDefinitionLabelString:mc,gfmFootnoteDefinition:hc},exit:{gfmFootnoteCallString:gc,gfmFootnoteCall:_c,gfmFootnoteDefinitionLabelString:vc,gfmFootnoteDefinition:yc}}}function Cc(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:xc},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
6
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Tc:wc))),s(),o}}function wc(e,t,n){return t===0?e:Tc(e,t,n)}function Tc(e,t,n){return(n?``:` `)+e}var Ec=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];jc.peek=Mc;function Dc(){return{canContainEols:[`delete`],enter:{strikethrough:kc},exit:{strikethrough:Ac}}}function Oc(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Ec}],handlers:{delete:jc}}}function kc(e){this.enter({type:`delete`,children:[]},e)}function Ac(e){this.exit(e)}function jc(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Mc(){return`~`}function Nc(e){return e.length}function Pc(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Nc,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Fc(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=Ic(r[d]);else{let e=Ic(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
7
|
+
`)}function Fc(e){return e==null?``:String(e)}function Ic(e){let 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 Lc(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Rc);return i(),o}function Rc(e,t,n){return`>`+(n?``:` `)+e}function zc(e,t){return Bc(e,t.inConstruct,!0)&&!Bc(e,t.notInConstruct,!1)}function Bc(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 Vc(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
8
|
+
`&&zc(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
9
|
+
`}function Hc(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Uc(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 Wc(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Gc(e,t,n,r){let i=Wc(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(Uc(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Kc);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(Hc(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
10
10
|
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
11
11
|
`),a&&(u+=s.move(a+`
|
|
12
|
-
`)),u+=s.move(c),l(),u}function
|
|
13
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function
|
|
12
|
+
`)),u+=s.move(c),l(),u}function Kc(e,t,n){return(n?``:` `)+e}function qc(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Jc(e,t,n,r){let i=qc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
13
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Yc(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Xc(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Zc(e){if(e===null||Bs(e)||Hs(e))return 1;if(Vs(e))return 2}function Qc(e,t,n){let r=Zc(e),i=Zc(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}}$c.peek=el;function $c(e,t,n,r){let i=Yc(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Qc(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Xc(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Qc(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Xc(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function el(e,t,n){return n.options.emphasis||`*`}var tl={};function nl(e,t){let n=t||tl;return rl(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function rl(e,t,n){if(al(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 il(e.children,t,n)}return Array.isArray(e)?il(e,t,n):``}function il(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=rl(e[i],t,n);return r.join(``)}function al(e){return!!(e&&typeof e==`object`)}function ol(e,t){let n=!1;return He(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&nl(e)&&(t.options.setext||n))}function sl(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(ol(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
14
14
|
`,after:`
|
|
15
15
|
`});return r(),t(),o+`
|
|
16
16
|
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
17
17
|
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
18
|
-
`,...a.current()});return/^[\t ]/.test(l)&&(l=
|
|
18
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=Xc(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}cl.peek=ll;function cl(e){return e.value||``}function ll(){return`<`}ul.peek=dl;function ul(e,t,n,r){let i=qc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function dl(){return`!`}fl.peek=pl;function fl(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function pl(){return`!`}ml.peek=hl;function ml(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function hl(){return"`"}function gl(e,t){let n=nl(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))}_l.peek=vl;function _l(e,t,n,r){let i=qc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(gl(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function vl(e,t,n){return gl(e,n)?`<`:`[`}yl.peek=bl;function yl(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function bl(){return`[`}function xl(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Sl(e){let t=xl(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Cl(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function wl(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Tl(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Cl(n):xl(n),s=e.ordered?o===`.`?`)`:`.`:Sl(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.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&&(c=!0),wl(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function El(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Dl(e,t,n,r){let i=El(n),a=n.bulletCurrent||xl(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Ol(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var kl=Ae([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Al(e,t,n,r){return(e.children.some(function(e){return kl(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function jl(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Ml.peek=Nl;function Ml(e,t,n,r){let i=jl(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Qc(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Xc(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Qc(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Xc(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Nl(e,t,n){return n.options.strong||`*`}function Pl(e,t,n,r){return n.safe(e.value,r)}function Fl(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Il(e,t,n){let r=(wl(n)+(n.options.ruleSpaces?` `:``)).repeat(Fl(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Ll={blockquote:Lc,break:Vc,code:Gc,definition:Jc,emphasis:$c,hardBreak:Vc,heading:sl,html:cl,image:ul,imageReference:fl,inlineCode:ml,link:_l,linkReference:yl,list:Tl,listItem:Dl,paragraph:Ol,root:Al,strong:Ml,text:Pl,thematicBreak:Il},Rl=document.createElement(`i`);function zl(e){let t=`&`+e+`;`;Rl.innerHTML=t;let n=Rl.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function Bl(e,t){let 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 Vl=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Hl(e){return e.replace(Vl,Ul)}function Ul(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Bl(n.slice(t?2:1),t?16:10)}return zl(n)||e}function Wl(){return{enter:{table:Gl,tableData:Yl,tableHeader:Yl,tableRow:ql},exit:{codeText:Xl,table:Kl,tableData:Jl,tableHeader:Jl,tableRow:Jl}}}function Gl(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Kl(e){this.exit(e),this.data.inTable=void 0}function ql(e){this.enter({type:`tableRow`,children:[]},e)}function Jl(e){this.exit(e)}function Yl(e){this.enter({type:`tableCell`,children:[]},e)}function Xl(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Zl));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Zl(e,t){return t===`|`?t:e}function Ql(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
19
19
|
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
20
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return jc(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Pl.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function Xl(){return{exit:{taskListCheckValueChecked:Ql,taskListCheckValueUnchecked:Ql,paragraph:$l}}}function Zl(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:eu}}}function Ql(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function $l(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function eu(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Pl.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function tu(){return[Js(),yc(),wc(),Vl(),Xl()]}function nu(e){return{extensions:[Ys(),bc(e),Tc(),Yl(e),Zl()]}}function ru(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function iu(e,t){return e.length>0?(ru(e,e.length,0,t),e):t}var au={}.hasOwnProperty;function ou(e){let t={},n=-1;for(;++n<e.length;)su(t,e[n]);return t}function su(e,t){let n;for(n in t){let r=(au.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){au.call(r,a)||(r[a]=[]);let e=i[a];cu(r[a],Array.isArray(e)?e:e?[e]:[])}}}function cu(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);ru(e,0,0,r)}var lu={tokenize:Cu,partial:!0},uu={tokenize:wu,partial:!0},du={tokenize:Tu,partial:!0},fu={tokenize:Eu,partial:!0},pu={tokenize:Du,partial:!0},mu={name:`wwwAutolink`,tokenize:xu,previous:Ou},hu={name:`protocolAutolink`,tokenize:Su,previous:ku},gu={name:`emailAutolink`,tokenize:bu,previous:Au},_u={};function vu(){return{text:_u}}for(var yu=48;yu<123;)_u[yu]=gu,yu++,yu===58?yu=65:yu===91&&(yu=97);_u[43]=gu,_u[45]=gu,_u[46]=gu,_u[95]=gu,_u[72]=[gu,hu],_u[104]=[gu,hu],_u[87]=[gu,mu],_u[119]=[gu,mu];function bu(e,t,n){let r=this,i,a;return o;function o(t){return!ju(t)||!Au.call(r,r.previous)||Mu(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return ju(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(pu,u,l)(t):t===45||t===95||js(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&As(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function xu(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Ou.call(r,r.previous)||Mu(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(lu,e.attempt(uu,e.attempt(du,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Su(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&ku.call(r,r.previous)&&!Mu(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(As(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Ns(t)||Ls(t)||zs(t)||Rs(t)?n(t):e.attempt(uu,e.attempt(du,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Cu(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function wu(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(fu,c,s)(t):t===null||Ls(t)||zs(t)||t!==45&&Rs(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Tu(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(fu,t,a)(o):o===null||Ls(o)||zs(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Eu(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),a):o===93?(e.consume(o),i):o===60||o===null||Ls(o)||zs(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Ls(e)||zs(e)?t(e):r(e)}function a(e){return As(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):As(t)?(e.consume(t),o):n(t)}}function Du(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return js(e)?n(e):t(e)}}function Ou(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ls(e)}function ku(e){return!As(e)}function Au(e){return!(e===47||ju(e))}function ju(e){return e===43||e===45||e===46||e===95||js(e)}function Mu(e){let t=e.length,n=!1;for(;t--;){let 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 Nu(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&js(e.charCodeAt(n+1))&&js(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Pu(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Fu={name:`attention`,resolveAll:Iu,tokenize:Lu};function Iu(e,t){let n=-1,r,i,a,o,s,c,l,u;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;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Ru(d,-c),Ru(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=iu(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=iu(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=iu(l,Pu(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=iu(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=iu(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,ru(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Lu(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Jc(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Jc(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Ru(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var zu={name:`autolink`,tokenize:Bu};function Bu(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return As(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||js(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||js(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Ns(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Ms(t)?(e.consume(t),l):n(t)}function u(e){return js(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||js(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function K(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return G(r)?(e.enter(n),s(r)):t(r)}function s(r){return G(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Vu={partial:!0,tokenize:Hu};function Hu(e,t,n){return r;function r(t){return G(t)?K(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||W(e)?t(e):n(e)}}var Uu={continuation:{tokenize:Gu},exit:Ku,name:`blockQuote`,tokenize:Wu};function Wu(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return G(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Gu(e,t,n){let r=this;return i;function i(t){return G(t)?K(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Uu,t,n)(r)}}function Ku(e){e.exit(`blockQuote`)}var qu={name:`characterEscape`,tokenize:Ju};function Ju(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Is(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Yu={name:`characterReference`,tokenize:Xu};function Xu(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=js,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Fs,u):(e.enter(`characterReferenceValue`),a=7,o=Ps,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===js&&!Il(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Zu={partial:!0,tokenize:ed},Qu={concrete:!0,name:`codeFenced`,tokenize:$u};function $u(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),G(t)?K(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||W(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Zu,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||W(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):G(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),K(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||W(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||W(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&G(t)?K(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||W(t)?e.check(Zu,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||W(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),G(t)?K(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),G(t)?K(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||W(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function ed(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var td={name:`codeIndented`,tokenize:rd},nd={partial:!0,tokenize:id};function rd(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),K(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):W(t)?e.attempt(nd,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||W(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function id(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):K(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):W(e)?i(e):n(e)}}var ad={name:`codeText`,previous:sd,resolve:od,tokenize:cd};function od(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 sd(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function cd(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||W(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var ld=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw 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){let n=t??1/0;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){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&ud(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),ud(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ud(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){let t=this.left.splice(e,1/0);ud(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);ud(this.left,t.reverse())}}};function ud(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 dd(e){let t={},n=-1,r,i,a,o,s,c,l,u=new ld(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,fd(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return ru(e,0,1/0,u.slice(0)),!l}function fd(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var pd={resolve:hd,tokenize:gd},md={partial:!0,tokenize:_d};function hd(e){return dd(e),e}function gd(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):W(t)?e.check(md,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function _d(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),K(e,a,`linePrefix`)}function a(i){if(i===null||W(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function vd(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Ns(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||W(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Ls(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Ns(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function yd(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):W(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||W(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!G(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function bd(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),K(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||W(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function xd(e,t){let n;return r;function r(i){return W(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):G(i)?K(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Sd={name:`definition`,tokenize:wd},Cd={partial:!0,tokenize:Td};function wd(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return yd.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=cc(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Ls(t)?xd(e,l)(t):l(t)}function l(t){return vd(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Cd,d,d)(t)}function d(t){return G(t)?K(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||W(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Td(e,t,n){return r;function r(t){return Ls(t)?xd(e,i)(t):n(t)}function i(t){return bd(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return G(t)?K(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||W(e)?t(e):n(e)}}var Ed={name:`hardBreakEscape`,tokenize:Dd};function Dd(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return W(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Od={name:`headingAtx`,resolve:kd,tokenize:Ad};function kd(e,t){let n=e.length-2,r=3,i,a;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},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},ru(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Ad(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Ls(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||W(n)?(e.exit(`atxHeading`),t(n)):G(n)?K(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Ls(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var jd=`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`.split(`.`),Md=[`pre`,`script`,`style`,`textarea`],Nd={concrete:!0,name:`htmlFlow`,resolveTo:Id,tokenize:Ld},Pd={partial:!0,tokenize:zd},Fd={partial:!0,tokenize:Rd};function Id(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 Ld(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:k):As(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):As(a)?(e.consume(a),i=4,r.interrupt?t:k):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:k):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:D:m):n(i)}function h(t){return As(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Ls(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Md.includes(l)?(i=1,r.interrupt?t(s):D(s)):jd.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):D(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||js(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:D):n(i)}function v(t){return G(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||As(t)?(e.consume(t),b):G(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||js(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):G(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):G(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||W(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Ls(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||G(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),ee):n(t)}function ee(t){return t===null||W(t)?D(t):G(t)?(e.consume(t),ee):n(t)}function D(t){return t===45&&i===2?(e.consume(t),O):t===60&&i===1?(e.consume(t),ie):t===62&&i===4?(e.consume(t),se):t===63&&i===3?(e.consume(t),k):t===93&&i===5?(e.consume(t),oe):W(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Pd,ce,te)(t)):t===null||W(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),D)}function te(t){return e.check(Fd,ne,ce)(t)}function ne(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return t===null||W(t)?te(t):(e.enter(`htmlFlowData`),D(t))}function O(t){return t===45?(e.consume(t),k):D(t)}function ie(t){return t===47?(e.consume(t),o=``,ae):D(t)}function ae(t){if(t===62){let n=o.toLowerCase();return Md.includes(n)?(e.consume(t),se):D(t)}return As(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ae):D(t)}function oe(t){return t===93?(e.consume(t),k):D(t)}function k(t){return t===62?(e.consume(t),se):t===45&&i===2?(e.consume(t),k):D(t)}function se(t){return t===null||W(t)?(e.exit(`htmlFlowData`),ce(t)):(e.consume(t),se)}function ce(n){return e.exit(`htmlFlow`),t(n)}}function Rd(e,t,n){let r=this;return i;function i(t){return W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function zd(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Vu,t,n)}}var Bd={name:`htmlText`,tokenize:Vd};function Vd(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):As(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):As(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):W(t)?(o=d,ie(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?O(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):W(t)?(o=h,ie(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?O(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?O(t):W(t)?(o=v,ie(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):W(t)?(o=y,ie(t)):(e.consume(t),y)}function b(e){return e===62?O(e):y(e)}function x(t){return As(t)?(e.consume(t),S):n(t)}function S(t){return t===45||js(t)?(e.consume(t),S):C(t)}function C(t){return W(t)?(o=C,ie(t)):G(t)?(e.consume(t),C):O(t)}function w(t){return t===45||js(t)?(e.consume(t),w):t===47||t===62||Ls(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),O):t===58||t===95||As(t)?(e.consume(t),E):W(t)?(o=T,ie(t)):G(t)?(e.consume(t),T):O(t)}function E(t){return t===45||t===46||t===58||t===95||js(t)?(e.consume(t),E):ee(t)}function ee(t){return t===61?(e.consume(t),D):W(t)?(o=ee,ie(t)):G(t)?(e.consume(t),ee):T(t)}function D(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,te):W(t)?(o=D,ie(t)):G(t)?(e.consume(t),D):(e.consume(t),ne)}function te(t){return t===i?(e.consume(t),i=void 0,re):t===null?n(t):W(t)?(o=te,ie(t)):(e.consume(t),te)}function ne(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Ls(t)?T(t):(e.consume(t),ne)}function re(e){return e===47||e===62||Ls(e)?T(e):n(e)}function O(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function ie(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ae}function ae(t){return G(t)?K(e,oe,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):oe(t)}function oe(t){return e.enter(`htmlTextData`),o(t)}}var Hd={name:`labelEnd`,resolveAll:Kd,resolveTo:qd,tokenize:Jd},Ud={tokenize:Yd},Wd={tokenize:Xd},Gd={tokenize:Zd};function Kd(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&ru(e,0,e.length,n),e}function qd(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=iu(s,e.slice(a+1,a+r+3)),s=iu(s,[[`enter`,u,t]]),s=iu(s,Pu(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=iu(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=iu(s,e.slice(o+1)),s=iu(s,[[`exit`,c,t]]),ru(e,a,e.length,s),e}function Jd(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(cc(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Ud,u,o?u:d)(t):t===91?e.attempt(Wd,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Gd,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Yd(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Ls(t)?xd(e,a)(t):a(t)}function a(t){return t===41?u(t):vd(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Ls(t)?xd(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?bd(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Ls(t)?xd(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Xd(e,t,n){let r=this;return i;function i(t){return yd.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(cc(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Zd(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Qd={name:`labelStartImage`,resolveAll:Hd.resolveAll,tokenize:$d};function $d(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var ef={name:`labelStartLink`,resolveAll:Hd.resolveAll,tokenize:tf};function tf(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var nf={name:`lineEnding`,tokenize:rf};function rf(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),K(e,t,`linePrefix`)}}var af={name:`thematicBreak`,tokenize:of};function of(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||W(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),G(t)?K(e,s,`whitespace`)(t):s(t))}}var sf={continuation:{tokenize:df},exit:pf,name:`list`,tokenize:uf},cf={partial:!0,tokenize:mf},lf={partial:!0,tokenize:ff};function uf(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Ps(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(af,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Ps(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Vu,r.interrupt?n:u,e.attempt(cf,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return G(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function df(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Vu,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,K(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!G(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(lf,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,K(e,e.attempt(sf,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function ff(e,t,n){let r=this;return K(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function pf(e){e.exit(this.containerState.type)}function mf(e,t,n){let r=this;return K(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!G(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var hf={name:`setextUnderline`,resolveTo:gf,tokenize:_f};function gf(e,t){let n=e.length,r,i,a;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),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function _f(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),G(t)?K(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||W(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var vf={tokenize:Ef,partial:!0};function yf(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Cf,continuation:{tokenize:wf},exit:Tf}},text:{91:{name:`gfmFootnoteCall`,tokenize:Sf},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:bf,resolveTo:xf}}}}function bf(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=cc(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function xf(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`;let 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++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Sf(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Ls(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(cc(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Ls(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Cf(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Ls(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=cc(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Ls(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),K(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function wf(e,t,n){return e.check(Vu,t,e.attempt(vf,t,n))}function Tf(e){e.exit(`gfmFootnoteDefinition`)}function Ef(e,t,n){let r=this;return K(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Df(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&ru(o,o.length,0,Pu(s,e.slice(r+1,n),t)),ru(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),ru(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Jc(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Jc(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Of=class{constructor(){this.map=[]}add(e,t,n){kf(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,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(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function kf(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 Af(e,t){let n=!1,r=[];for(;t<e.length;){let 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`){let e=r.length-1;r[e]=r[e]===`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 jf(){return{flow:{null:{name:`table`,tokenize:Mf,resolveAll:Nf}}}}function Mf(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):W(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):G(t)?K(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Ls(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,G(t)?K(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return G(t)?K(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||W(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return G(t)?K(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||W(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||W(n)?(e.exit(`tableRow`),t(n)):G(n)?K(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Ls(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Nf(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Of;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Ff(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Pf(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Pf(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Pf(f,t,o,i,n,d)):(o[0]=o[1],d=Pf(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Ff(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Af(t.events,n))}return e}function Pf(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},If(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=If(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=If(t.events,n[2]),a=If(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},If(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Ff(e,t,n,r,i){let a=[],o=If(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function If(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Lf={name:`tasklistCheck`,tokenize:zf};function Rf(){return{text:{91:Lf}}}function zf(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Ls(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return W(r)?t(r):G(r)?e.check({tokenize:Bf},t,n)(r):n(r)}}function Bf(e,t,n){return K(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Vf(e){return ou([vu(),yf(),Df(e),jf(),Rf()])}var Hf={};function Uf(e){let t=this,n=e||Hf,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Vf(n)),a.push(tu()),o.push(nu(n))}var Wf=Object.defineProperty,Gf=Object.defineProperties,Kf=Object.getOwnPropertyDescriptors,qf=Object.getOwnPropertySymbols,Jf=Object.prototype.hasOwnProperty,Yf=Object.prototype.propertyIsEnumerable,Xf=(e,t,n)=>t in e?Wf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zf=(e,t)=>{for(var n in t||={})Jf.call(t,n)&&Xf(e,n,t[n]);if(qf)for(var n of qf(t))Yf.call(t,n)&&Xf(e,n,t[n]);return e},Qf=(e,t)=>Gf(e,Kf(t)),$f=(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},ep=(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},tp=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]==="`"&&!ep(e,n)&&(t+=1)}return t},np=(e,t)=>{let n=!1,r=!1,i=-1;for(let a=0;a<e.length;a+=1){if(e[a]===`\\`&&a+1<e.length&&e[a+1]==="`"){a+=1;continue}if(e.substring(a,a+3)==="```"){r=!r,a+=2;continue}if(!r&&e[a]==="`")if(n){if(i<t&&t<a)return!0;n=!1,i=-1}else n=!0,i=a}return!1},rp=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,ip=e=>!e||typeof e!=`string`||!e.includes(`>`)?e:e.replace(rp,(t,n,r,i)=>$f(e,i)?t:`${n}\\>${r}`),ap=/(\*\*)([^*]*\*?)$/,op=/(__)([^_]*?)$/,sp=/(\*\*\*)([^*]*?)$/,cp=/(\*)([^*]*?)$/,lp=/(_)([^_]*?)$/,up=/(`)([^`]*?)$/,dp=/(~~)([^~]*?)$/,fp=/^[\s_~*`]*$/,pp=/^[\s]*[-*+][\s]+$/,mp=/[\p{L}\p{N}_]/u,hp=/^```[^`\n]*```?$/,gp=/^\*{4,}$/,_p=/(__)([^_]+)_$/,vp=/(~~)([^~]+)~$/,yp=/~~/g,bp=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:mp.test(e)},xp=(e,t)=>{let n=1;for(let r=t-1;r>=0;--r)if(e[r]===`]`)n+=1;else if(e[r]===`[`&&(--n,n===0))return r;return-1},Sp=(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,n===0))return r;return-1},Cp=(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},wp=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===`)`)return!0;if(e[n]===`
|
|
21
|
-
`)return!1}return!1},
|
|
22
|
-
`)return!1}return!1},
|
|
23
|
-
`)return!1}return!1},
|
|
20
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Pc(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Ll.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function $l(){return{exit:{taskListCheckValueChecked:tu,taskListCheckValueUnchecked:tu,paragraph:nu}}}function eu(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:ru}}}function tu(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function nu(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function ru(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Ll.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function iu(){return[Zs(),Sc(),Dc(),Wl(),$l()]}function au(e){return{extensions:[Qs(),Cc(e),Oc(),Ql(e),eu()]}}function ou(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function su(e,t){return e.length>0?(ou(e,e.length,0,t),e):t}var cu={}.hasOwnProperty;function lu(e){let t={},n=-1;for(;++n<e.length;)uu(t,e[n]);return t}function uu(e,t){let n;for(n in t){let r=(cu.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){cu.call(r,a)||(r[a]=[]);let e=i[a];du(r[a],Array.isArray(e)?e:e?[e]:[])}}}function du(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);ou(e,0,0,r)}var fu={tokenize:Eu,partial:!0},pu={tokenize:Du,partial:!0},mu={tokenize:Ou,partial:!0},hu={tokenize:ku,partial:!0},gu={tokenize:Au,partial:!0},_u={name:`wwwAutolink`,tokenize:wu,previous:ju},vu={name:`protocolAutolink`,tokenize:Tu,previous:Mu},yu={name:`emailAutolink`,tokenize:Cu,previous:Nu},bu={};function xu(){return{text:bu}}for(var Su=48;Su<123;)bu[Su]=yu,Su++,Su===58?Su=65:Su===91&&(Su=97);bu[43]=yu,bu[45]=yu,bu[46]=yu,bu[95]=yu,bu[72]=[yu,vu],bu[104]=[yu,vu],bu[87]=[yu,_u],bu[119]=[yu,_u];function Cu(e,t,n){let r=this,i,a;return o;function o(t){return!Pu(t)||!Nu.call(r,r.previous)||Fu(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Pu(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(gu,u,l)(t):t===45||t===95||Ps(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Ns(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function wu(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!ju.call(r,r.previous)||Fu(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(fu,e.attempt(pu,e.attempt(mu,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Tu(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Mu.call(r,r.previous)&&!Fu(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Ns(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Is(t)||Bs(t)||Hs(t)||Vs(t)?n(t):e.attempt(pu,e.attempt(mu,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Eu(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Du(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(hu,c,s)(t):t===null||Bs(t)||Hs(t)||t!==45&&Vs(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Ou(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(hu,t,a)(o):o===null||Bs(o)||Hs(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function ku(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),a):o===93?(e.consume(o),i):o===60||o===null||Bs(o)||Hs(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Bs(e)||Hs(e)?t(e):r(e)}function a(e){return Ns(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Ns(t)?(e.consume(t),o):n(t)}}function Au(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return Ps(e)?n(e):t(e)}}function ju(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Bs(e)}function Mu(e){return!Ns(e)}function Nu(e){return!(e===47||Pu(e))}function Pu(e){return e===43||e===45||e===46||e===95||Ps(e)}function Fu(e){let t=e.length,n=!1;for(;t--;){let 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 Iu(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&Ps(e.charCodeAt(n+1))&&Ps(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Lu(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Ru={name:`attention`,resolveAll:zu,tokenize:Bu};function zu(e,t){let n=-1,r,i,a,o,s,c,l,u;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;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Vu(d,-c),Vu(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=su(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=su(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=su(l,Lu(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=su(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=su(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,ou(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Bu(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Zc(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Zc(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Vu(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Hu={name:`autolink`,tokenize:Uu};function Uu(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Ns(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||Ps(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||Ps(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Is(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Fs(t)?(e.consume(t),l):n(t)}function u(e){return Ps(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||Ps(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function K(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return G(r)?(e.enter(n),s(r)):t(r)}function s(r){return G(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Wu={partial:!0,tokenize:Gu};function Gu(e,t,n){return r;function r(t){return G(t)?K(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||W(e)?t(e):n(e)}}var Ku={continuation:{tokenize:Ju},exit:Yu,name:`blockQuote`,tokenize:qu};function qu(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return G(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Ju(e,t,n){let r=this;return i;function i(t){return G(t)?K(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Ku,t,n)(r)}}function Yu(e){e.exit(`blockQuote`)}var Xu={name:`characterEscape`,tokenize:Zu};function Zu(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return zs(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Qu={name:`characterReference`,tokenize:$u};function $u(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=Ps,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Rs,u):(e.enter(`characterReferenceValue`),a=7,o=Ls,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===Ps&&!zl(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var ed={partial:!0,tokenize:rd},td={concrete:!0,name:`codeFenced`,tokenize:nd};function nd(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),G(t)?K(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||W(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(ed,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||W(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):G(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),K(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||W(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||W(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&G(t)?K(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||W(t)?e.check(ed,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||W(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),G(t)?K(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),G(t)?K(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||W(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function rd(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var id={name:`codeIndented`,tokenize:od},ad={partial:!0,tokenize:sd};function od(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),K(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):W(t)?e.attempt(ad,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||W(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function sd(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):K(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):W(e)?i(e):n(e)}}var cd={name:`codeText`,previous:ud,resolve:ld,tokenize:dd};function ld(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 ud(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function dd(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||W(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var fd=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw 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){let n=t??1/0;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){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&pd(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),pd(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),pd(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){let t=this.left.splice(e,1/0);pd(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);pd(this.left,t.reverse())}}};function pd(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 md(e){let t={},n=-1,r,i,a,o,s,c,l,u=new fd(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,hd(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return ou(e,0,1/0,u.slice(0)),!l}function hd(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var gd={resolve:vd,tokenize:yd},_d={partial:!0,tokenize:bd};function vd(e){return md(e),e}function yd(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):W(t)?e.check(_d,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function bd(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),K(e,a,`linePrefix`)}function a(i){if(i===null||W(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function xd(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Is(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||W(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Bs(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Is(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Sd(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):W(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||W(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!G(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Cd(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),K(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||W(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function wd(e,t){let n;return r;function r(i){return W(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):G(i)?K(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Td={name:`definition`,tokenize:Dd},Ed={partial:!0,tokenize:Od};function Dd(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Sd.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=dc(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Bs(t)?wd(e,l)(t):l(t)}function l(t){return xd(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Ed,d,d)(t)}function d(t){return G(t)?K(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||W(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Od(e,t,n){return r;function r(t){return Bs(t)?wd(e,i)(t):n(t)}function i(t){return Cd(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return G(t)?K(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||W(e)?t(e):n(e)}}var kd={name:`hardBreakEscape`,tokenize:Ad};function Ad(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return W(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var jd={name:`headingAtx`,resolve:Md,tokenize:Nd};function Md(e,t){let n=e.length-2,r=3,i,a;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},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},ou(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Nd(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Bs(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||W(n)?(e.exit(`atxHeading`),t(n)):G(n)?K(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Bs(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Pd=`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`.split(`.`),Fd=[`pre`,`script`,`style`,`textarea`],Id={concrete:!0,name:`htmlFlow`,resolveTo:zd,tokenize:Bd},Ld={partial:!0,tokenize:Hd},Rd={partial:!0,tokenize:Vd};function zd(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 Bd(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:k):Ns(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Ns(a)?(e.consume(a),i=4,r.interrupt?t:k):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:k):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:D:m):n(i)}function h(t){return Ns(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Bs(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Fd.includes(l)?(i=1,r.interrupt?t(s):D(s)):Pd.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):D(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Ps(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:D):n(i)}function v(t){return G(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Ns(t)?(e.consume(t),b):G(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||Ps(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):G(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):G(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||W(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Bs(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||G(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),ee):n(t)}function ee(t){return t===null||W(t)?D(t):G(t)?(e.consume(t),ee):n(t)}function D(t){return t===45&&i===2?(e.consume(t),O):t===60&&i===1?(e.consume(t),ie):t===62&&i===4?(e.consume(t),se):t===63&&i===3?(e.consume(t),k):t===93&&i===5?(e.consume(t),oe):W(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Ld,ce,te)(t)):t===null||W(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),D)}function te(t){return e.check(Rd,ne,ce)(t)}function ne(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return t===null||W(t)?te(t):(e.enter(`htmlFlowData`),D(t))}function O(t){return t===45?(e.consume(t),k):D(t)}function ie(t){return t===47?(e.consume(t),o=``,ae):D(t)}function ae(t){if(t===62){let n=o.toLowerCase();return Fd.includes(n)?(e.consume(t),se):D(t)}return Ns(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ae):D(t)}function oe(t){return t===93?(e.consume(t),k):D(t)}function k(t){return t===62?(e.consume(t),se):t===45&&i===2?(e.consume(t),k):D(t)}function se(t){return t===null||W(t)?(e.exit(`htmlFlowData`),ce(t)):(e.consume(t),se)}function ce(n){return e.exit(`htmlFlow`),t(n)}}function Vd(e,t,n){let r=this;return i;function i(t){return W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Hd(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Wu,t,n)}}var Ud={name:`htmlText`,tokenize:Wd};function Wd(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Ns(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Ns(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):W(t)?(o=d,ie(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?O(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):W(t)?(o=h,ie(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?O(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?O(t):W(t)?(o=v,ie(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):W(t)?(o=y,ie(t)):(e.consume(t),y)}function b(e){return e===62?O(e):y(e)}function x(t){return Ns(t)?(e.consume(t),S):n(t)}function S(t){return t===45||Ps(t)?(e.consume(t),S):C(t)}function C(t){return W(t)?(o=C,ie(t)):G(t)?(e.consume(t),C):O(t)}function w(t){return t===45||Ps(t)?(e.consume(t),w):t===47||t===62||Bs(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),O):t===58||t===95||Ns(t)?(e.consume(t),E):W(t)?(o=T,ie(t)):G(t)?(e.consume(t),T):O(t)}function E(t){return t===45||t===46||t===58||t===95||Ps(t)?(e.consume(t),E):ee(t)}function ee(t){return t===61?(e.consume(t),D):W(t)?(o=ee,ie(t)):G(t)?(e.consume(t),ee):T(t)}function D(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,te):W(t)?(o=D,ie(t)):G(t)?(e.consume(t),D):(e.consume(t),ne)}function te(t){return t===i?(e.consume(t),i=void 0,re):t===null?n(t):W(t)?(o=te,ie(t)):(e.consume(t),te)}function ne(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Bs(t)?T(t):(e.consume(t),ne)}function re(e){return e===47||e===62||Bs(e)?T(e):n(e)}function O(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function ie(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ae}function ae(t){return G(t)?K(e,oe,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):oe(t)}function oe(t){return e.enter(`htmlTextData`),o(t)}}var Gd={name:`labelEnd`,resolveAll:Yd,resolveTo:Xd,tokenize:Zd},Kd={tokenize:Qd},qd={tokenize:$d},Jd={tokenize:ef};function Yd(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&ou(e,0,e.length,n),e}function Xd(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=su(s,e.slice(a+1,a+r+3)),s=su(s,[[`enter`,u,t]]),s=su(s,Lu(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=su(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=su(s,e.slice(o+1)),s=su(s,[[`exit`,c,t]]),ou(e,a,e.length,s),e}function Zd(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(dc(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Kd,u,o?u:d)(t):t===91?e.attempt(qd,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Jd,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Qd(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Bs(t)?wd(e,a)(t):a(t)}function a(t){return t===41?u(t):xd(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Bs(t)?wd(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Cd(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Bs(t)?wd(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function $d(e,t,n){let r=this;return i;function i(t){return Sd.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(dc(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function ef(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var tf={name:`labelStartImage`,resolveAll:Gd.resolveAll,tokenize:nf};function nf(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var rf={name:`labelStartLink`,resolveAll:Gd.resolveAll,tokenize:af};function af(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var of={name:`lineEnding`,tokenize:sf};function sf(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),K(e,t,`linePrefix`)}}var cf={name:`thematicBreak`,tokenize:lf};function lf(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||W(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),G(t)?K(e,s,`whitespace`)(t):s(t))}}var uf={continuation:{tokenize:mf},exit:gf,name:`list`,tokenize:pf},df={partial:!0,tokenize:_f},ff={partial:!0,tokenize:hf};function pf(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Ls(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(cf,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Ls(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Wu,r.interrupt?n:u,e.attempt(df,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return G(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function mf(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Wu,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,K(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!G(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ff,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,K(e,e.attempt(uf,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function hf(e,t,n){let r=this;return K(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function gf(e){e.exit(this.containerState.type)}function _f(e,t,n){let r=this;return K(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!G(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var vf={name:`setextUnderline`,resolveTo:yf,tokenize:bf};function yf(e,t){let n=e.length,r,i,a;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),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function bf(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),G(t)?K(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||W(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var xf={tokenize:kf,partial:!0};function Sf(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Ef,continuation:{tokenize:Df},exit:Of}},text:{91:{name:`gfmFootnoteCall`,tokenize:Tf},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Cf,resolveTo:wf}}}}function Cf(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=dc(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function wf(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`;let 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++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Tf(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Bs(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(dc(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Bs(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Ef(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Bs(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=dc(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Bs(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),K(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Df(e,t,n){return e.check(Wu,t,e.attempt(xf,t,n))}function Of(e){e.exit(`gfmFootnoteDefinition`)}function kf(e,t,n){let r=this;return K(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Af(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&ou(o,o.length,0,Lu(s,e.slice(r+1,n),t)),ou(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),ou(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Zc(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Zc(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var jf=class{constructor(){this.map=[]}add(e,t,n){Mf(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,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(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Mf(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 Nf(e,t){let n=!1,r=[];for(;t<e.length;){let 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`){let e=r.length-1;r[e]=r[e]===`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 Pf(){return{flow:{null:{name:`table`,tokenize:Ff,resolveAll:If}}}}function Ff(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):W(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):G(t)?K(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Bs(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,G(t)?K(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return G(t)?K(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||W(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return G(t)?K(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||W(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||W(n)?(e.exit(`tableRow`),t(n)):G(n)?K(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Bs(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function If(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new jf;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Rf(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Lf(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Lf(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Lf(f,t,o,i,n,d)):(o[0]=o[1],d=Lf(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Rf(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Nf(t.events,n))}return e}function Lf(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},zf(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=zf(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=zf(t.events,n[2]),a=zf(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},zf(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Rf(e,t,n,r,i){let a=[],o=zf(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function zf(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Bf={name:`tasklistCheck`,tokenize:Hf};function Vf(){return{text:{91:Bf}}}function Hf(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Bs(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return W(r)?t(r):G(r)?e.check({tokenize:Uf},t,n)(r):n(r)}}function Uf(e,t,n){return K(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Wf(e){return lu([xu(),Sf(),Af(e),Pf(),Vf()])}var Gf={};function Kf(e){let t=this,n=e||Gf,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Wf(n)),a.push(iu()),o.push(au(n))}var qf=Object.defineProperty,Jf=Object.defineProperties,Yf=Object.getOwnPropertyDescriptors,Xf=Object.getOwnPropertySymbols,Zf=Object.prototype.hasOwnProperty,Qf=Object.prototype.propertyIsEnumerable,$f=(e,t,n)=>t in e?qf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ep=(e,t)=>{for(var n in t||={})Zf.call(t,n)&&$f(e,n,t[n]);if(Xf)for(var n of Xf(t))Qf.call(t,n)&&$f(e,n,t[n]);return e},tp=(e,t)=>Jf(e,Yf(t)),np=(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},rp=(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},ip=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]==="`"&&!rp(e,n)&&(t+=1)}return t},ap=(e,t)=>{let n=!1,r=!1,i=-1;for(let a=0;a<e.length;a+=1){if(e[a]===`\\`&&a+1<e.length&&e[a+1]==="`"){a+=1;continue}if(e.substring(a,a+3)==="```"){r=!r,a+=2;continue}if(!r&&e[a]==="`")if(n){if(i<t&&t<a)return!0;n=!1,i=-1}else n=!0,i=a}return!1},op=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,sp=e=>!e||typeof e!=`string`||!e.includes(`>`)?e:e.replace(op,(t,n,r,i)=>np(e,i)?t:`${n}\\>${r}`),cp=/(\*\*)([^*]*\*?)$/,lp=/(__)([^_]*?)$/,up=/(\*\*\*)([^*]*?)$/,dp=/(\*)([^*]*?)$/,fp=/(_)([^_]*?)$/,pp=/(`)([^`]*?)$/,mp=/(~~)([^~]*?)$/,hp=/^[\s_~*`]*$/,gp=/^[\s]*[-*+][\s]+$/,_p=/[\p{L}\p{N}_]/u,vp=/^```[^`\n]*```?$/,yp=/^\*{4,}$/,bp=/(__)([^_]+)_$/,xp=/(~~)([^~]+)~$/,Sp=/~~/g,Cp=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:_p.test(e)},wp=(e,t)=>{let n=1;for(let r=t-1;r>=0;--r)if(e[r]===`]`)n+=1;else if(e[r]===`[`&&(--n,n===0))return r;return-1},Tp=(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,n===0))return r;return-1},Ep=(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},Dp=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===`)`)return!0;if(e[n]===`
|
|
21
|
+
`)return!1}return!1},Op=(e,t)=>{for(let n=t-1;n>=0;--n){if(e[n]===`)`)return!1;if(e[n]===`(`)return n>0&&e[n-1]===`]`?Dp(e,t):!1;if(e[n]===`
|
|
22
|
+
`)return!1}return!1},kp=(e,t)=>{for(let n=t-1;n>=0;--n){if(e[n]===`>`)return!1;if(e[n]===`<`){let t=n+1<e.length?e[n+1]:``;return t>=`a`&&t<=`z`||t>=`A`&&t<=`Z`||t===`/`}if(e[n]===`
|
|
23
|
+
`)return!1}return!1},Ap=(e,t,n)=>{let r=0;for(let n=t-1;n>=0;--n)if(e[n]===`
|
|
24
24
|
`){r=n+1;break}let i=e.length;for(let n=t;n<e.length;n+=1)if(e[n]===`
|
|
25
|
-
`){i=n;break}let a=e.substring(r,i),o=0,s=!1;for(let e of a)if(e===n)o+=1;else if(e!==` `&&e!==` `){s=!0;break}return o>=3&&!s},
|
|
25
|
+
`){i=n;break}let a=e.substring(r,i),o=0,s=!1;for(let e of a)if(e===n)o+=1;else if(e!==` `&&e!==` `){s=!0;break}return o>=3&&!s},jp=(e,t,n,r)=>n===`\\`||e.includes(`$`)&&Ep(e,t)?!0:n!==`*`&&r===`*`?(t<e.length-2?e[t+2]:``)!==`*`:!!(n===`*`||n&&r&&Cp(n)&&Cp(r)||(!n||n===` `||n===` `||n===`
|
|
26
26
|
`)&&(!r||r===` `||r===` `||r===`
|
|
27
|
-
`)),
|
|
28
|
-
`),i=r===-1?0:r+1,a=e.substring(i,n);return
|
|
29
|
-
`)?!0:
|
|
30
|
-
`),i=r===-1?0:r+1,a=e.substring(i,n);return
|
|
31
|
-
`)?!0:
|
|
27
|
+
`)),Mp=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 a=i>0?e[i-1]:``,o=i<r-1?e[i+1]:``;jp(e,i,a,o)||(t+=1)}return t},Np=(e,t,n,r)=>!!(n===`\\`||e.includes(`$`)&&Ep(e,t)||Op(e,t)||kp(e,t)||n===`_`||r===`_`||n&&r&&Cp(n)&&Cp(r)),Pp=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 a=i>0?e[i-1]:``,o=i<r-1?e[i+1]:``;Np(e,i,a,o)||(t+=1)}return t},Fp=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},Ip=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},Lp=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},Rp=(e,t,n)=>{if(!t||hp.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
28
|
+
`),i=r===-1?0:r+1,a=e.substring(i,n);return gp.test(a)&&t.includes(`
|
|
29
|
+
`)?!0:Ap(e,n,`*`)},zp=e=>{let t=e.match(cp);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return np(e,r)||ap(e,r)||Rp(e,n,r)?e:Ip(e)%2==1?n.endsWith(`*`)?`${e}*`:`${e}**`:e},Bp=(e,t,n)=>{if(!t||hp.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
30
|
+
`),i=r===-1?0:r+1,a=e.substring(i,n);return gp.test(a)&&t.includes(`
|
|
31
|
+
`)?!0:Ap(e,n,`_`)},Vp=e=>{let t=e.match(lp);if(!t){let t=e.match(bp);if(t){let n=e.lastIndexOf(t[1]);if(!(np(e,n)||ap(e,n))&&Lp(e)%2==1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return np(e,r)||ap(e,r)||Bp(e,n,r)?e:Lp(e)%2==1?`${e}__`:e},Hp=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]!==`\\`&&!Ep(e,n)){let t=n>0?e[n-1]:``,r=n<e.length-1?e[n+1]:``;if((!t||t===` `||t===` `||t===`
|
|
32
32
|
`)&&(!r||r===` `||r===` `||r===`
|
|
33
|
-
`)||t&&r&&
|
|
34
|
-
`;)--t;return t<e.length?`${e.slice(0,t)}_${e.slice(t)}`:`${e}_`},
|
|
35
|
-
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,
|
|
33
|
+
`)||t&&r&&Cp(t)&&Cp(r))continue;return n}}return-1},Up=e=>{if(!e.match(dp))return e;let t=Hp(e);if(t===-1||np(e,t)||ap(e,t))return e;let n=e.substring(t+1);return!n||hp.test(n)?e:Mp(e)%2==1?`${e}*`:e},Wp=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]!==`\\`&&!Ep(e,n)&&!Op(e,n)){let t=n>0?e[n-1]:``,r=n<e.length-1?e[n+1]:``;if(t&&r&&Cp(t)&&Cp(r))continue;return n}}return-1},Gp=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
34
|
+
`;)--t;return t<e.length?`${e.slice(0,t)}_${e.slice(t)}`:`${e}_`},Kp=e=>{if(!e.endsWith(`**`))return null;let t=e.slice(0,-2);if(Ip(t)%2!=1)return null;let n=t.indexOf(`**`),r=Wp(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},qp=e=>{if(!e.match(fp))return e;let t=Wp(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||hp.test(n)||np(e,t)||ap(e,t))return e;if(Pp(e)%2==1){let t=Kp(e);return t===null?Gp(e):t}return e},Jp=e=>{let t=Ip(e),n=Mp(e);return t%2==0&&n%2==0},Yp=(e,t,n)=>!t||hp.test(t)||np(e,n)||ap(e,n)?!0:Ap(e,n,`*`),Xp=e=>{if(yp.test(e))return e;let t=e.match(up);if(!t)return e;let n=t[2];return Yp(e,n,e.lastIndexOf(t[1]))?e:Fp(e)%2==1?Jp(e)?e:`${e}***`:e},Zp=/<[a-zA-Z/][^>]*$/,Qp=e=>{let t=e.match(Zp);return!t||t.index===void 0||np(e,t.index)?e:e.substring(0,t.index).trimEnd()},$p=e=>!e.match(vp)||e.includes(`
|
|
35
|
+
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,em=e=>(e.match(/```/g)||[]).length%2==1,tm=e=>{let t=$p(e);if(t!==null)return t;let n=e.match(pp);if(n&&!em(e)){let t=n[2];if(!t||hp.test(t))return e;if(ip(e)%2==1)return`${e}\``}return e},nm=(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)==="```",rm=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!nm(e,r)&&(n=!n),!n&&e[r]===`$`&&e[r+1]===`$`&&(t+=1,r+=1);return t},im=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]===`\\`){r+=1;continue}if(e[r]==="`"&&!nm(e,r)){n=!n;continue}!n&&e[r]===`$`&&(r+1<e.length&&e[r+1]===`$`?r+=1:t+=1)}return t},am=e=>{if(e.endsWith(`$`)&&!e.endsWith(`$$`))return`${e}$`;let t=e.indexOf(`$$`);return t!==-1&&e.indexOf(`
|
|
36
36
|
`,t)!==-1&&!e.endsWith(`
|
|
37
37
|
`)?`${e}
|
|
38
|
-
$$`:`${e}$$`},
|
|
39
|
-
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(
|
|
40
|
-
`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}if(
|
|
41
|
-
`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}return e},mm=RegExp(`(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])`,`gu`),hm=e=>!e||typeof e!=`string`||!e.includes(`~`)?e:e.replace(mm,(t,n)=>$f(e,n)?t:`\\~`),gm=e=>{let t=e.match(dp);if(t){let n=t[2];if(!n||fp.test(n))return e;let r=e.lastIndexOf(t[1]);if($f(e,r)||np(e,r))return e;if(e.match(yp)?.length%2==1)return`${e}~~`}else{let t=e.match(vp);if(t){let n=e.lastIndexOf(t[0].slice(0,2));if($f(e,n)||np(e,n))return e;if(e.match(yp)?.length%2==1)return`${e}~`}}return e},_m=e=>e!==!1,vm=e=>e===!0,ym={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},bm=[{handler:{name:`singleTilde`,handle:hm,priority:ym.SINGLE_TILDE},optionKey:`singleTilde`},{handler:{name:`comparisonOperators`,handle:ip,priority:ym.COMPARISON_OPERATORS},optionKey:`comparisonOperators`},{handler:{name:`htmlTags`,handle:Yp,priority:ym.HTML_TAGS},optionKey:`htmlTags`},{handler:{name:`setextHeadings`,handle:pm,priority:ym.SETEXT_HEADINGS},optionKey:`setextHeadings`},{handler:{name:`links`,handle:cm,priority:ym.LINKS},optionKey:`links`,earlyReturn:e=>e.endsWith(`](streamdown:incomplete-link)`)},{handler:{name:`boldItalic`,handle:qp,priority:ym.BOLD_ITALIC},optionKey:`boldItalic`},{handler:{name:`bold`,handle:Ip,priority:ym.BOLD},optionKey:`bold`},{handler:{name:`italicDoubleUnderscore`,handle:Rp,priority:ym.ITALIC_DOUBLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`italicSingleAsterisk`,handle:Bp,priority:ym.ITALIC_SINGLE_ASTERISK},optionKey:`italic`},{handler:{name:`italicSingleUnderscore`,handle:Wp,priority:ym.ITALIC_SINGLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`inlineCode`,handle:Qp,priority:ym.INLINE_CODE},optionKey:`inlineCode`},{handler:{name:`strikethrough`,handle:gm,priority:ym.STRIKETHROUGH},optionKey:`strikethrough`},{handler:{name:`katex`,handle:rm,priority:ym.KATEX},optionKey:`katex`},{handler:{name:`inlineKatex`,handle:im,priority:ym.INLINE_KATEX},optionKey:`inlineKatex`}],xm=e=>{let t=e?.linkMode??`protocol`;return bm.filter(({handler:t,optionKey:n})=>t.name===`links`?_m(e?.links)||_m(e?.images):t.name===`inlineKatex`?vm(e?.inlineKatex):_m(e?.[n])).map(({handler:e,earlyReturn:n})=>e.name===`links`?{handler:Qf(Zf({},e),{handle:e=>cm(e,t)}),earlyReturn:t===`protocol`?n:void 0}:{handler:e,earlyReturn:n})},Sm=(e,t)=>{if(!e||typeof e!=`string`)return e;let n=e.endsWith(` `)&&!e.endsWith(` `)?e.slice(0,-1):e,r=xm(t),i=(t?.handlers??[]).map(e=>({handler:Qf(Zf({},e),{priority:e.priority??ym.DEFAULT}),earlyReturn:void 0})),a=[...r,...i].sort((e,t)=>(e.handler.priority??0)-(t.handler.priority??0));for(let{handler:e,earlyReturn:t}of a)if(n=e.handle(n),t!=null&&t(n))return n;return n};function Cm(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Cm(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function wm(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Cm(e))&&(r&&(r+=` `),r+=t);return r}var Tm=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Em=(e,t)=>({classGroupId:e,validator:t}),Dm=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Om=`-`,km=[],Am=`arbitrary..`,jm=e=>{let t=Pm(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Nm(e);let n=e.split(Om);return Mm(n,n[0]===``&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Tm(i,t):t:i||km}return n[e]||km}}},Mm=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Mm(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Om):e.slice(t).join(Om),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Nm=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Am+r:void 0})(),Pm=e=>{let{theme:t,classGroups:n}=e;return Fm(n,t)},Fm=(e,t)=>{let n=Dm();for(let r in e){let i=e[r];Im(i,n,r,t)}return n},Im=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Lm(i,t,n,r)}},Lm=(e,t,n,r)=>{if(typeof e==`string`){Rm(e,t,n);return}if(typeof e==`function`){zm(e,t,n,r);return}Bm(e,t,n,r)},Rm=(e,t,n)=>{let r=e===``?t:Vm(t,e);r.classGroupId=n},zm=(e,t,n,r)=>{if(Hm(e)){Im(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Em(n,e))},Bm=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Im(o,Vm(t,a),n,r)}},Vm=(e,t)=>{let n=e,r=t.split(Om),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Dm(),n.nextPart.set(t,i)),n=i}return n},Hm=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Um=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Wm=`!`,Gm=`:`,Km=[],qm=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Jm=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Gm){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Wm)?(c=s.slice(0,-1),l=!0):s.startsWith(Wm)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return qm(t,l,c,u)};if(t){let e=t+Gm,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):qm(Km,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Ym=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Xm=e=>({cache:Um(e.cacheSize),parseClassName:Jm(e),sortModifiers:Ym(e),...jm(e)}),Zm=/\s+/,Qm=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(Zm),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+Wm:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},$m=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=eh(n))&&(i&&(i+=` `),i+=r);return i},eh=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=eh(e[r]))&&(n&&(n+=` `),n+=t);return n},th=(e,...t)=>{let n,r,i,a,o=o=>(n=Xm(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Qm(e,n);return i(e,a),a};return a=o,(...e)=>a($m(...e))},nh=[],rh=e=>{let t=t=>t[e]||nh;return t.isThemeGetter=!0,t},ih=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ah=/^\((?:(\w[\w-]*):)?(.+)\)$/i,oh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,sh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ch=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,lh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,uh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fh=e=>oh.test(e),q=e=>!!e&&!Number.isNaN(Number(e)),ph=e=>!!e&&Number.isInteger(Number(e)),mh=e=>e.endsWith(`%`)&&q(e.slice(0,-1)),hh=e=>sh.test(e),gh=()=>!0,_h=e=>ch.test(e)&&!lh.test(e),vh=()=>!1,yh=e=>uh.test(e),bh=e=>dh.test(e),xh=e=>!J(e)&&!Y(e),Sh=e=>Lh(e,Vh,vh),J=e=>ih.test(e),Ch=e=>Lh(e,Hh,_h),wh=e=>Lh(e,Uh,q),Th=e=>Lh(e,Gh,gh),Eh=e=>Lh(e,Wh,vh),Dh=e=>Lh(e,zh,vh),Oh=e=>Lh(e,Bh,bh),kh=e=>Lh(e,Kh,yh),Y=e=>ah.test(e),Ah=e=>Rh(e,Hh),jh=e=>Rh(e,Wh),Mh=e=>Rh(e,zh),Nh=e=>Rh(e,Vh),Ph=e=>Rh(e,Bh),Fh=e=>Rh(e,Kh,!0),Ih=e=>Rh(e,Gh,!0),Lh=(e,t,n)=>{let r=ih.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Rh=(e,t,n=!1)=>{let r=ah.exec(e);return r?r[1]?t(r[1]):n:!1},zh=e=>e===`position`||e===`percentage`,Bh=e=>e===`image`||e===`url`,Vh=e=>e===`length`||e===`size`||e===`bg-size`,Hh=e=>e===`length`,Uh=e=>e===`number`,Wh=e=>e===`family-name`,Gh=e=>e===`number`||e===`weight`,Kh=e=>e===`shadow`,qh=th(()=>{let e=rh(`color`),t=rh(`font`),n=rh(`text`),r=rh(`font-weight`),i=rh(`tracking`),a=rh(`leading`),o=rh(`breakpoint`),s=rh(`container`),c=rh(`spacing`),l=rh(`radius`),u=rh(`shadow`),d=rh(`inset-shadow`),f=rh(`text-shadow`),p=rh(`drop-shadow`),m=rh(`blur`),h=rh(`perspective`),g=rh(`aspect`),_=rh(`ease`),v=rh(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Y,J],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Y,J,c],T=()=>[fh,`full`,`auto`,...w()],E=()=>[ph,`none`,`subgrid`,Y,J],ee=()=>[`auto`,{span:[`full`,ph,Y,J]},ph,Y,J],D=()=>[ph,`auto`,Y,J],te=()=>[`auto`,`min`,`max`,`fr`,Y,J],ne=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],re=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],O=()=>[`auto`,...w()],ie=()=>[fh,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ae=()=>[fh,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],oe=()=>[fh,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],k=()=>[e,Y,J],se=()=>[...b(),Mh,Dh,{position:[Y,J]}],ce=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],le=()=>[`auto`,`cover`,`contain`,Nh,Sh,{size:[Y,J]}],ue=()=>[mh,Ah,Ch],A=()=>[``,`none`,`full`,l,Y,J],de=()=>[``,q,Ah,Ch],fe=()=>[`solid`,`dashed`,`dotted`,`double`],pe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],me=()=>[q,mh,Mh,Dh],j=()=>[``,`none`,m,Y,J],he=()=>[`none`,q,Y,J],ge=()=>[`none`,q,Y,J],_e=()=>[q,Y,J],ve=()=>[fh,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[hh],breakpoint:[hh],color:[gh],container:[hh],"drop-shadow":[hh],ease:[`in`,`out`,`in-out`],font:[xh],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[hh],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[hh],shadow:[hh],spacing:[`px`,q],text:[hh],"text-shadow":[hh],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,fh,J,Y,g]}],container:[`container`],columns:[{columns:[q,J,Y,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[ph,`auto`,Y,J]}],basis:[{basis:[fh,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[q,fh,`auto`,`initial`,`none`,J]}],grow:[{grow:[``,q,Y,J]}],shrink:[{shrink:[``,q,Y,J]}],order:[{order:[ph,`first`,`last`,`none`,Y,J]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ne(),`normal`]}],"justify-items":[{"justify-items":[...re(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...re()]}],"align-content":[{content:[`normal`,...ne()]}],"align-items":[{items:[...re(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...re(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...re(),`baseline`]}],"place-self":[{"place-self":[`auto`,...re()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ie()}],"inline-size":[{inline:[`auto`,...ae()]}],"min-inline-size":[{"min-inline":[`auto`,...ae()]}],"max-inline-size":[{"max-inline":[`none`,...ae()]}],"block-size":[{block:[`auto`,...oe()]}],"min-block-size":[{"min-block":[`auto`,...oe()]}],"max-block-size":[{"max-block":[`none`,...oe()]}],w:[{w:[s,`screen`,...ie()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ie()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ie()]}],h:[{h:[`screen`,`lh`,...ie()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ie()]}],"max-h":[{"max-h":[`screen`,`lh`,...ie()]}],"font-size":[{text:[`base`,n,Ah,Ch]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ih,Th]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,mh,J]}],"font-family":[{font:[jh,Eh,t]}],"font-features":[{"font-features":[J]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Y,J]}],"line-clamp":[{"line-clamp":[q,`none`,Y,wh]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Y,J]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Y,J]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...fe(),`wavy`]}],"text-decoration-thickness":[{decoration:[q,`from-font`,`auto`,Y,Ch]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[q,`auto`,Y,J]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Y,J]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Y,J]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:se()}],"bg-repeat":[{bg:ce()}],"bg-size":[{bg:le()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},ph,Y,J],radial:[``,Y,J],conic:[ph,Y,J]},Ph,Oh]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:A()}],"rounded-s":[{"rounded-s":A()}],"rounded-e":[{"rounded-e":A()}],"rounded-t":[{"rounded-t":A()}],"rounded-r":[{"rounded-r":A()}],"rounded-b":[{"rounded-b":A()}],"rounded-l":[{"rounded-l":A()}],"rounded-ss":[{"rounded-ss":A()}],"rounded-se":[{"rounded-se":A()}],"rounded-ee":[{"rounded-ee":A()}],"rounded-es":[{"rounded-es":A()}],"rounded-tl":[{"rounded-tl":A()}],"rounded-tr":[{"rounded-tr":A()}],"rounded-br":[{"rounded-br":A()}],"rounded-bl":[{"rounded-bl":A()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":de()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...fe(),`hidden`,`none`]}],"divide-style":[{divide:[...fe(),`hidden`,`none`]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-bs":[{"border-bs":k()}],"border-color-be":[{"border-be":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...fe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[q,Y,J]}],"outline-w":[{outline:[``,q,Ah,Ch]}],"outline-color":[{outline:k()}],shadow:[{shadow:[``,`none`,u,Fh,kh]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":[`none`,d,Fh,kh]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:de()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[q,Ch]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":[`none`,f,Fh,kh]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[q,Y,J]}],"mix-blend":[{"mix-blend":[...pe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[q]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[Y,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[q]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:se()}],"mask-repeat":[{mask:ce()}],"mask-size":[{mask:le()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Y,J]}],filter:[{filter:[``,`none`,Y,J]}],blur:[{blur:j()}],brightness:[{brightness:[q,Y,J]}],contrast:[{contrast:[q,Y,J]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Fh,kh]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:[``,q,Y,J]}],"hue-rotate":[{"hue-rotate":[q,Y,J]}],invert:[{invert:[``,q,Y,J]}],saturate:[{saturate:[q,Y,J]}],sepia:[{sepia:[``,q,Y,J]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Y,J]}],"backdrop-blur":[{"backdrop-blur":j()}],"backdrop-brightness":[{"backdrop-brightness":[q,Y,J]}],"backdrop-contrast":[{"backdrop-contrast":[q,Y,J]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,q,Y,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[q,Y,J]}],"backdrop-invert":[{"backdrop-invert":[``,q,Y,J]}],"backdrop-opacity":[{"backdrop-opacity":[q,Y,J]}],"backdrop-saturate":[{"backdrop-saturate":[q,Y,J]}],"backdrop-sepia":[{"backdrop-sepia":[``,q,Y,J]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Y,J]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[q,`initial`,Y,J]}],ease:[{ease:[`linear`,`initial`,_,Y,J]}],delay:[{delay:[q,Y,J]}],animate:[{animate:[`none`,v,Y,J]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Y,J]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":[`scale-3d`],skew:[{skew:_e()}],"skew-x":[{"skew-x":_e()}],"skew-y":[{"skew-y":_e()}],transform:[{transform:[Y,J,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ve()}],"translate-x":[{"translate-x":ve()}],"translate-y":[{"translate-y":ve()}],"translate-z":[{"translate-z":ve()}],"translate-none":[`translate-none`],accent:[{accent:k()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Y,J]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Y,J]}],fill:[{fill:[`none`,...k()]}],"stroke-w":[{stroke:[q,Ah,Ch,wh]}],stroke:[{stroke:[`none`,...k()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),Jh=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Yh=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Xh={};function Zh(e,t){return((t||Xh).jsx?Yh:Jh).test(e)}var Qh=/[ \t\n\f\r]/g;function $h(e){return typeof e==`object`?e.type===`text`?eg(e.value):!1:eg(e)}function eg(e){return e.replace(Qh,``)===``}var tg=t(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
42
|
-
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function ee(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),ee()}function _(e){return e?e.replace(l,p):p}t.exports=g})),ng=t((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(tg());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),rg=t((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)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),ig=t(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(ng()),r=rg();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i}));function ag(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?sg(e.position):`start`in e||`end`in e?sg(e):`line`in e||`column`in e?og(e):``}function og(e){return cg(e&&e.line)+`:`+cg(e&&e.column)}function sg(e){return og(e&&e.start)+`-`+og(e&&e.end)}function cg(e){return e&&typeof e==`number`?e:1}var lg=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=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=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=ag(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=a&&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}};lg.prototype.file=``,lg.prototype.name=``,lg.prototype.reason=``,lg.prototype.message=``,lg.prototype.stack=``,lg.prototype.column=void 0,lg.prototype.line=void 0,lg.prototype.ancestors=void 0,lg.prototype.cause=void 0,lg.prototype.fatal=void 0,lg.prototype.place=void 0,lg.prototype.ruleId=void 0,lg.prototype.source=void 0;var ug=e(ig(),1),dg={}.hasOwnProperty,fg=new Map,pg=/[A-Z]/g,mg=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),hg=new Set([`td`,`th`]),gg=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function _g(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Og(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Dg(n,t.jsx,t.jsxs)}let 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`?Vt:Bt,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=vg(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function vg(e,t,n){if(t.type===`element`)return yg(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return bg(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Sg(e,t,n);if(t.type===`mdxjsEsm`)return xg(e,t);if(t.type===`root`)return Cg(e,t,n);if(t.type===`text`)return wg(e,t)}function yg(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Vt,e.schema=i),e.ancestors.push(t);let a=Pg(e,t.tagName,!1),o=kg(e,t),s=jg(e,t);return mg.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!$h(e):!0})),Tg(e,o,a,t),Eg(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function bg(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Fg(e,t.position)}function xg(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Fg(e,t.position)}function Sg(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Vt,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Pg(e,t.name,!0),o=Ag(e,t),s=jg(e,t);return Tg(e,o,a,t),Eg(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Cg(e,t,n){let r={};return Eg(r,jg(e,t)),e.create(t,e.Fragment,r,n)}function wg(e,t){return t.value}function Tg(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Eg(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Dg(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Og(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Bo(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function kg(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&dg.call(t.properties,i)){let a=Mg(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&hg.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Ag(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Fg(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Fg(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function jg(e,t){let n=[],r=-1,i=e.passKeys?new Map:fg;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=vg(e,a,o);s!==void 0&&n.push(s)}return n}function Mg(e,t,n){let r=Lt(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ut(n):qt(n)),r.property===`style`){let t=typeof n==`object`?n:Ng(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Ig(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Nt[r.property]||r.property:r.attribute,n]}}function Ng(e,t){try{return(0,ug.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new lg("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=gg+`#cannot-parse-style-attribute`,r}}function Pg(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Zh(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Zh(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return dg.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Fg(e)}function Fg(e,t){let n=new lg("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=gg+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Ig(e){let t={},n;for(n in e)dg.call(e,n)&&(t[Lg(n)]=e[n]);return t}function Lg(e){let t=e.replace(pg,Rg);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Rg(e){return`-`+e.toLowerCase()}var zg={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`]},Bg={tokenize:Vg};function Vg(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),K(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return W(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Hg={tokenize:Wg},Ug={tokenize:Gg};function Wg(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return ru(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ug,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Ug,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return W(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;ru(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Gg(e,t,n){return K(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var Kg={tokenize:qg};function qg(e){let t=this,n=e.attempt(Vu,r,e.attempt(this.parser.constructs.flowInitial,i,K(e,e.attempt(this.parser.constructs.flow,i,e.attempt(pd,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Jg={resolveAll:Qg()},Yg=Zg(`string`),Xg=Zg(`text`);function Zg(e){return{resolveAll:Qg(e===`text`?$g:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Qg(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function $g(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var e_=r({attentionMarkers:()=>c_,contentInitial:()=>n_,disable:()=>l_,document:()=>t_,flow:()=>i_,flowInitial:()=>r_,insideSpan:()=>s_,string:()=>a_,text:()=>o_}),t_={42:sf,43:sf,45:sf,48:sf,49:sf,50:sf,51:sf,52:sf,53:sf,54:sf,55:sf,56:sf,57:sf,62:Uu},n_={91:Sd},r_={[-2]:td,[-1]:td,32:td},i_={35:Od,42:af,45:[hf,af],60:Nd,61:hf,95:af,96:Qu,126:Qu},a_={38:Yu,92:qu},o_={[-5]:nf,[-4]:nf,[-3]:nf,33:Qd,38:Yu,42:Fu,60:[zu,Bd],91:ef,92:[Ed,qu],93:Hd,95:Fu,96:ad},s_={null:[Fu,Jg]},c_={null:[42,95]},l_={null:[]};function u_(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=iu(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Pu(a,l.events,l),l.events):[]}function f(e,t){return f_(p(e),t)}function p(e){return d_(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){W(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&ru(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function d_(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function f_(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
38
|
+
$$`:`${e}$$`},om=e=>rm(e)%2==0?e:am(e),sm=e=>im(e)%2==1?`${e}$`:e,cm=(e,t,n)=>{if(e.substring(t+2).includes(`)`))return null;let r=wp(e,t);if(r===-1||np(e,r))return null;let i=r>0&&e[r-1]===`!`,a=i?r-1:r,o=e.substring(0,a);if(i)return o;let s=e.substring(r+1,t);return n===`text-only`?`${o}${s}`:`${o}[${s}](streamdown:incomplete-link)`},lm=(e,t)=>{for(let n=0;n<t;n++)if(e[n]===`[`&&!np(e,n)){if(n>0&&e[n-1]===`!`)continue;let t=Tp(e,n);if(t===-1)return n;if(t+1<e.length&&e[t+1]===`(`){let r=e.indexOf(`)`,t+2);r!==-1&&(n=r)}}return t},um=(e,t,n)=>{let r=t>0&&e[t-1]===`!`,i=r?t-1:t;if(!e.substring(t+1).includes(`]`)){let a=e.substring(0,i);if(r)return a;if(n===`text-only`){let n=lm(e,t);return e.substring(0,n)+e.substring(n+1)}return`${e}](streamdown:incomplete-link)`}if(Tp(e,t)===-1){let a=e.substring(0,i);if(r)return a;if(n===`text-only`){let n=lm(e,t);return e.substring(0,n)+e.substring(n+1)}return`${e}](streamdown:incomplete-link)`}return null},dm=(e,t=`protocol`)=>{let n=e.lastIndexOf(`](`);if(n!==-1&&!np(e,n)){let r=cm(e,n,t);if(r!==null)return r}for(let n=e.length-1;n>=0;--n)if(e[n]===`[`&&!np(e,n)){let r=um(e,n,t);if(r!==null)return r}return e},fm=/^-{1,2}$/,pm=/^[\s]*-{1,2}[\s]+$/,mm=/^={1,2}$/,hm=/^[\s]*={1,2}[\s]+$/,gm=e=>{if(!e||typeof e!=`string`)return e;let t=e.lastIndexOf(`
|
|
39
|
+
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(fm.test(i)&&!n.match(pm)){let t=r.split(`
|
|
40
|
+
`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}if(mm.test(i)&&!n.match(hm)){let t=r.split(`
|
|
41
|
+
`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}return e},_m=RegExp(`(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])`,`gu`),vm=e=>!e||typeof e!=`string`||!e.includes(`~`)?e:e.replace(_m,(t,n)=>np(e,n)?t:`\\~`),ym=e=>{let t=e.match(mp);if(t){let n=t[2];if(!n||hp.test(n))return e;let r=e.lastIndexOf(t[1]);if(np(e,r)||ap(e,r))return e;if(e.match(Sp)?.length%2==1)return`${e}~~`}else{let t=e.match(xp);if(t){let n=e.lastIndexOf(t[0].slice(0,2));if(np(e,n)||ap(e,n))return e;if(e.match(Sp)?.length%2==1)return`${e}~`}}return e},bm=e=>e!==!1,xm=e=>e===!0,Sm={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},Cm=[{handler:{name:`singleTilde`,handle:vm,priority:Sm.SINGLE_TILDE},optionKey:`singleTilde`},{handler:{name:`comparisonOperators`,handle:sp,priority:Sm.COMPARISON_OPERATORS},optionKey:`comparisonOperators`},{handler:{name:`htmlTags`,handle:Qp,priority:Sm.HTML_TAGS},optionKey:`htmlTags`},{handler:{name:`setextHeadings`,handle:gm,priority:Sm.SETEXT_HEADINGS},optionKey:`setextHeadings`},{handler:{name:`links`,handle:dm,priority:Sm.LINKS},optionKey:`links`,earlyReturn:e=>e.endsWith(`](streamdown:incomplete-link)`)},{handler:{name:`boldItalic`,handle:Xp,priority:Sm.BOLD_ITALIC},optionKey:`boldItalic`},{handler:{name:`bold`,handle:zp,priority:Sm.BOLD},optionKey:`bold`},{handler:{name:`italicDoubleUnderscore`,handle:Vp,priority:Sm.ITALIC_DOUBLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`italicSingleAsterisk`,handle:Up,priority:Sm.ITALIC_SINGLE_ASTERISK},optionKey:`italic`},{handler:{name:`italicSingleUnderscore`,handle:qp,priority:Sm.ITALIC_SINGLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`inlineCode`,handle:tm,priority:Sm.INLINE_CODE},optionKey:`inlineCode`},{handler:{name:`strikethrough`,handle:ym,priority:Sm.STRIKETHROUGH},optionKey:`strikethrough`},{handler:{name:`katex`,handle:om,priority:Sm.KATEX},optionKey:`katex`},{handler:{name:`inlineKatex`,handle:sm,priority:Sm.INLINE_KATEX},optionKey:`inlineKatex`}],wm=e=>{let t=e?.linkMode??`protocol`;return Cm.filter(({handler:t,optionKey:n})=>t.name===`links`?bm(e?.links)||bm(e?.images):t.name===`inlineKatex`?xm(e?.inlineKatex):bm(e?.[n])).map(({handler:e,earlyReturn:n})=>e.name===`links`?{handler:tp(ep({},e),{handle:e=>dm(e,t)}),earlyReturn:t===`protocol`?n:void 0}:{handler:e,earlyReturn:n})},Tm=(e,t)=>{if(!e||typeof e!=`string`)return e;let n=e.endsWith(` `)&&!e.endsWith(` `)?e.slice(0,-1):e,r=wm(t),i=(t?.handlers??[]).map(e=>({handler:tp(ep({},e),{priority:e.priority??Sm.DEFAULT}),earlyReturn:void 0})),a=[...r,...i].sort((e,t)=>(e.handler.priority??0)-(t.handler.priority??0));for(let{handler:e,earlyReturn:t}of a)if(n=e.handle(n),t!=null&&t(n))return n;return n};function Em(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Em(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Dm(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Em(e))&&(r&&(r+=` `),r+=t);return r}var Om=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},km=(e,t)=>({classGroupId:e,validator:t}),Am=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),jm=`-`,Mm=[],Nm=`arbitrary..`,Pm=e=>{let t=Lm(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Im(e);let n=e.split(jm);return Fm(n,n[0]===``&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Om(i,t):t:i||Mm}return n[e]||Mm}}},Fm=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Fm(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(jm):e.slice(t).join(jm),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Im=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Nm+r:void 0})(),Lm=e=>{let{theme:t,classGroups:n}=e;return Rm(n,t)},Rm=(e,t)=>{let n=Am();for(let r in e){let i=e[r];zm(i,n,r,t)}return n},zm=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Bm(i,t,n,r)}},Bm=(e,t,n,r)=>{if(typeof e==`string`){Vm(e,t,n);return}if(typeof e==`function`){Hm(e,t,n,r);return}Um(e,t,n,r)},Vm=(e,t,n)=>{let r=e===``?t:Wm(t,e);r.classGroupId=n},Hm=(e,t,n,r)=>{if(Gm(e)){zm(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(km(n,e))},Um=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];zm(o,Wm(t,a),n,r)}},Wm=(e,t)=>{let n=e,r=t.split(jm),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Am(),n.nextPart.set(t,i)),n=i}return n},Gm=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Km=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},qm=`!`,Jm=`:`,Ym=[],Xm=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Zm=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Jm){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(qm)?(c=s.slice(0,-1),l=!0):s.startsWith(qm)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Xm(t,l,c,u)};if(t){let e=t+Jm,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Xm(Ym,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Qm=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},$m=e=>({cache:Km(e.cacheSize),parseClassName:Zm(e),sortModifiers:Qm(e),...Pm(e)}),eh=/\s+/,th=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(eh),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+qm:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},nh=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=rh(n))&&(i&&(i+=` `),i+=r);return i},rh=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=rh(e[r]))&&(n&&(n+=` `),n+=t);return n},ih=(e,...t)=>{let n,r,i,a,o=o=>(n=$m(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=th(e,n);return i(e,a),a};return a=o,(...e)=>a(nh(...e))},ah=[],oh=e=>{let t=t=>t[e]||ah;return t.isThemeGetter=!0,t},sh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ch=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,uh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,fh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ph=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,hh=e=>lh.test(e),q=e=>!!e&&!Number.isNaN(Number(e)),gh=e=>!!e&&Number.isInteger(Number(e)),_h=e=>e.endsWith(`%`)&&q(e.slice(0,-1)),vh=e=>uh.test(e),yh=()=>!0,bh=e=>dh.test(e)&&!fh.test(e),xh=()=>!1,Sh=e=>ph.test(e),Ch=e=>mh.test(e),wh=e=>!J(e)&&!Y(e),Th=e=>Bh(e,Wh,xh),J=e=>sh.test(e),Eh=e=>Bh(e,Gh,bh),Dh=e=>Bh(e,Kh,q),Oh=e=>Bh(e,Jh,yh),kh=e=>Bh(e,qh,xh),Ah=e=>Bh(e,Hh,xh),jh=e=>Bh(e,Uh,Ch),Mh=e=>Bh(e,Yh,Sh),Y=e=>ch.test(e),Nh=e=>Vh(e,Gh),Ph=e=>Vh(e,qh),Fh=e=>Vh(e,Hh),Ih=e=>Vh(e,Wh),Lh=e=>Vh(e,Uh),Rh=e=>Vh(e,Yh,!0),zh=e=>Vh(e,Jh,!0),Bh=(e,t,n)=>{let r=sh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Vh=(e,t,n=!1)=>{let r=ch.exec(e);return r?r[1]?t(r[1]):n:!1},Hh=e=>e===`position`||e===`percentage`,Uh=e=>e===`image`||e===`url`,Wh=e=>e===`length`||e===`size`||e===`bg-size`,Gh=e=>e===`length`,Kh=e=>e===`number`,qh=e=>e===`family-name`,Jh=e=>e===`number`||e===`weight`,Yh=e=>e===`shadow`,Xh=ih(()=>{let e=oh(`color`),t=oh(`font`),n=oh(`text`),r=oh(`font-weight`),i=oh(`tracking`),a=oh(`leading`),o=oh(`breakpoint`),s=oh(`container`),c=oh(`spacing`),l=oh(`radius`),u=oh(`shadow`),d=oh(`inset-shadow`),f=oh(`text-shadow`),p=oh(`drop-shadow`),m=oh(`blur`),h=oh(`perspective`),g=oh(`aspect`),_=oh(`ease`),v=oh(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Y,J],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Y,J,c],T=()=>[hh,`full`,`auto`,...w()],E=()=>[gh,`none`,`subgrid`,Y,J],ee=()=>[`auto`,{span:[`full`,gh,Y,J]},gh,Y,J],D=()=>[gh,`auto`,Y,J],te=()=>[`auto`,`min`,`max`,`fr`,Y,J],ne=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],re=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],O=()=>[`auto`,...w()],ie=()=>[hh,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ae=()=>[hh,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],oe=()=>[hh,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],k=()=>[e,Y,J],se=()=>[...b(),Fh,Ah,{position:[Y,J]}],ce=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],le=()=>[`auto`,`cover`,`contain`,Ih,Th,{size:[Y,J]}],ue=()=>[_h,Nh,Eh],A=()=>[``,`none`,`full`,l,Y,J],de=()=>[``,q,Nh,Eh],fe=()=>[`solid`,`dashed`,`dotted`,`double`],pe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],me=()=>[q,_h,Fh,Ah],he=()=>[``,`none`,m,Y,J],ge=()=>[`none`,q,Y,J],_e=()=>[`none`,q,Y,J],j=()=>[q,Y,J],ve=()=>[hh,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[vh],breakpoint:[vh],color:[yh],container:[vh],"drop-shadow":[vh],ease:[`in`,`out`,`in-out`],font:[wh],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[vh],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[vh],shadow:[vh],spacing:[`px`,q],text:[vh],"text-shadow":[vh],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,hh,J,Y,g]}],container:[`container`],columns:[{columns:[q,J,Y,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[gh,`auto`,Y,J]}],basis:[{basis:[hh,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[q,hh,`auto`,`initial`,`none`,J]}],grow:[{grow:[``,q,Y,J]}],shrink:[{shrink:[``,q,Y,J]}],order:[{order:[gh,`first`,`last`,`none`,Y,J]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ne(),`normal`]}],"justify-items":[{"justify-items":[...re(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...re()]}],"align-content":[{content:[`normal`,...ne()]}],"align-items":[{items:[...re(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...re(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...re(),`baseline`]}],"place-self":[{"place-self":[`auto`,...re()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ie()}],"inline-size":[{inline:[`auto`,...ae()]}],"min-inline-size":[{"min-inline":[`auto`,...ae()]}],"max-inline-size":[{"max-inline":[`none`,...ae()]}],"block-size":[{block:[`auto`,...oe()]}],"min-block-size":[{"min-block":[`auto`,...oe()]}],"max-block-size":[{"max-block":[`none`,...oe()]}],w:[{w:[s,`screen`,...ie()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ie()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ie()]}],h:[{h:[`screen`,`lh`,...ie()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ie()]}],"max-h":[{"max-h":[`screen`,`lh`,...ie()]}],"font-size":[{text:[`base`,n,Nh,Eh]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,zh,Oh]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,_h,J]}],"font-family":[{font:[Ph,kh,t]}],"font-features":[{"font-features":[J]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Y,J]}],"line-clamp":[{"line-clamp":[q,`none`,Y,Dh]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Y,J]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Y,J]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...fe(),`wavy`]}],"text-decoration-thickness":[{decoration:[q,`from-font`,`auto`,Y,Eh]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[q,`auto`,Y,J]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Y,J]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Y,J]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:se()}],"bg-repeat":[{bg:ce()}],"bg-size":[{bg:le()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},gh,Y,J],radial:[``,Y,J],conic:[gh,Y,J]},Lh,jh]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:A()}],"rounded-s":[{"rounded-s":A()}],"rounded-e":[{"rounded-e":A()}],"rounded-t":[{"rounded-t":A()}],"rounded-r":[{"rounded-r":A()}],"rounded-b":[{"rounded-b":A()}],"rounded-l":[{"rounded-l":A()}],"rounded-ss":[{"rounded-ss":A()}],"rounded-se":[{"rounded-se":A()}],"rounded-ee":[{"rounded-ee":A()}],"rounded-es":[{"rounded-es":A()}],"rounded-tl":[{"rounded-tl":A()}],"rounded-tr":[{"rounded-tr":A()}],"rounded-br":[{"rounded-br":A()}],"rounded-bl":[{"rounded-bl":A()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":de()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...fe(),`hidden`,`none`]}],"divide-style":[{divide:[...fe(),`hidden`,`none`]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-bs":[{"border-bs":k()}],"border-color-be":[{"border-be":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...fe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[q,Y,J]}],"outline-w":[{outline:[``,q,Nh,Eh]}],"outline-color":[{outline:k()}],shadow:[{shadow:[``,`none`,u,Rh,Mh]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":[`none`,d,Rh,Mh]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:de()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[q,Eh]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":[`none`,f,Rh,Mh]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[q,Y,J]}],"mix-blend":[{"mix-blend":[...pe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[q]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[Y,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[q]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:se()}],"mask-repeat":[{mask:ce()}],"mask-size":[{mask:le()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Y,J]}],filter:[{filter:[``,`none`,Y,J]}],blur:[{blur:he()}],brightness:[{brightness:[q,Y,J]}],contrast:[{contrast:[q,Y,J]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Rh,Mh]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:[``,q,Y,J]}],"hue-rotate":[{"hue-rotate":[q,Y,J]}],invert:[{invert:[``,q,Y,J]}],saturate:[{saturate:[q,Y,J]}],sepia:[{sepia:[``,q,Y,J]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Y,J]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[q,Y,J]}],"backdrop-contrast":[{"backdrop-contrast":[q,Y,J]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,q,Y,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[q,Y,J]}],"backdrop-invert":[{"backdrop-invert":[``,q,Y,J]}],"backdrop-opacity":[{"backdrop-opacity":[q,Y,J]}],"backdrop-saturate":[{"backdrop-saturate":[q,Y,J]}],"backdrop-sepia":[{"backdrop-sepia":[``,q,Y,J]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Y,J]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[q,`initial`,Y,J]}],ease:[{ease:[`linear`,`initial`,_,Y,J]}],delay:[{delay:[q,Y,J]}],animate:[{animate:[`none`,v,Y,J]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Y,J]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:_e()}],"scale-x":[{"scale-x":_e()}],"scale-y":[{"scale-y":_e()}],"scale-z":[{"scale-z":_e()}],"scale-3d":[`scale-3d`],skew:[{skew:j()}],"skew-x":[{"skew-x":j()}],"skew-y":[{"skew-y":j()}],transform:[{transform:[Y,J,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ve()}],"translate-x":[{"translate-x":ve()}],"translate-y":[{"translate-y":ve()}],"translate-z":[{"translate-z":ve()}],"translate-none":[`translate-none`],accent:[{accent:k()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Y,J]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Y,J]}],fill:[{fill:[`none`,...k()]}],"stroke-w":[{stroke:[q,Nh,Eh,Dh]}],stroke:[{stroke:[`none`,...k()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),Zh=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qh=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$h={};function eg(e,t){return((t||$h).jsx?Qh:Zh).test(e)}var tg=/[ \t\n\f\r]/g;function ng(e){return typeof e==`object`?e.type===`text`?rg(e.value):!1:rg(e)}function rg(e){return e.replace(tg,``)===``}var ig=t(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
42
|
+
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function ee(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),ee()}function _(e){return e?e.replace(l,p):p}t.exports=g})),ag=t((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(ig());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),og=t((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)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),sg=t(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(ag()),r=og();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i}));function cg(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?ug(e.position):`start`in e||`end`in e?ug(e):`line`in e||`column`in e?lg(e):``}function lg(e){return dg(e&&e.line)+`:`+dg(e&&e.column)}function ug(e){return lg(e&&e.start)+`-`+lg(e&&e.end)}function dg(e){return e&&typeof e==`number`?e:1}var fg=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=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=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=cg(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=a&&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}};fg.prototype.file=``,fg.prototype.name=``,fg.prototype.reason=``,fg.prototype.message=``,fg.prototype.stack=``,fg.prototype.column=void 0,fg.prototype.line=void 0,fg.prototype.ancestors=void 0,fg.prototype.cause=void 0,fg.prototype.fatal=void 0,fg.prototype.place=void 0,fg.prototype.ruleId=void 0,fg.prototype.source=void 0;var pg=e(sg(),1),mg={}.hasOwnProperty,hg=new Map,gg=/[A-Z]/g,_g=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),vg=new Set([`td`,`th`]),yg=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function bg(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=jg(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Ag(n,t.jsx,t.jsxs)}let 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`?Wt:Ut,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=xg(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function xg(e,t,n){if(t.type===`element`)return Sg(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Cg(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Tg(e,t,n);if(t.type===`mdxjsEsm`)return wg(e,t);if(t.type===`root`)return Eg(e,t,n);if(t.type===`text`)return Dg(e,t)}function Sg(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Wt,e.schema=i),e.ancestors.push(t);let a=Lg(e,t.tagName,!1),o=Mg(e,t),s=Pg(e,t);return _g.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!ng(e):!0})),Og(e,o,a,t),kg(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Cg(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Rg(e,t.position)}function wg(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Rg(e,t.position)}function Tg(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Wt,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Lg(e,t.name,!0),o=Ng(e,t),s=Pg(e,t);return Og(e,o,a,t),kg(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Eg(e,t,n){let r={};return kg(r,Pg(e,t)),e.create(t,e.Fragment,r,n)}function Dg(e,t){return t.value}function Og(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function kg(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Ag(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function jg(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Uo(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Mg(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&mg.call(t.properties,i)){let a=Fg(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&vg.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Ng(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Rg(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Rg(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Pg(e,t){let n=[],r=-1,i=e.passKeys?new Map:hg;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=xg(e,a,o);s!==void 0&&n.push(s)}return n}function Fg(e,t,n){let r=Bt(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Kt(n):Xt(n)),r.property===`style`){let t=typeof n==`object`?n:Ig(e,String(n));return e.stylePropertyNameCase===`css`&&(t=zg(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?It[r.property]||r.property:r.attribute,n]}}function Ig(e,t){try{return(0,pg.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new fg("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=yg+`#cannot-parse-style-attribute`,r}}function Lg(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=eg(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=eg(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return mg.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Rg(e)}function Rg(e,t){let n=new fg("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=yg+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function zg(e){let t={},n;for(n in e)mg.call(e,n)&&(t[Bg(n)]=e[n]);return t}function Bg(e){let t=e.replace(gg,Vg);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Vg(e){return`-`+e.toLowerCase()}var Hg={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`]},Ug={tokenize:Wg};function Wg(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),K(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return W(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Gg={tokenize:qg},Kg={tokenize:Jg};function qg(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return ou(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Kg,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Kg,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return W(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;ou(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Jg(e,t,n){return K(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var Yg={tokenize:Xg};function Xg(e){let t=this,n=e.attempt(Wu,r,e.attempt(this.parser.constructs.flowInitial,i,K(e,e.attempt(this.parser.constructs.flow,i,e.attempt(gd,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Zg={resolveAll:t_()},Qg=e_(`string`),$g=e_(`text`);function e_(e){return{resolveAll:t_(e===`text`?n_:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function t_(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function n_(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var r_=r({attentionMarkers:()=>d_,contentInitial:()=>a_,disable:()=>f_,document:()=>i_,flow:()=>s_,flowInitial:()=>o_,insideSpan:()=>u_,string:()=>c_,text:()=>l_}),i_={42:uf,43:uf,45:uf,48:uf,49:uf,50:uf,51:uf,52:uf,53:uf,54:uf,55:uf,56:uf,57:uf,62:Ku},a_={91:Td},o_={[-2]:id,[-1]:id,32:id},s_={35:jd,42:cf,45:[vf,cf],60:Id,61:vf,95:cf,96:td,126:td},c_={38:Qu,92:Xu},l_={[-5]:of,[-4]:of,[-3]:of,33:tf,38:Qu,42:Ru,60:[Hu,Ud],91:rf,92:[kd,Xu],93:Gd,95:Ru,96:cd},u_={null:[Ru,Zg]},d_={null:[42,95]},f_={null:[]};function p_(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=su(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Lu(a,l.events,l),l.events):[]}function f(e,t){return h_(p(e),t)}function p(e){return m_(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){W(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&ou(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function m_(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function h_(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
43
43
|
`;break;case-3:o=`\r
|
|
44
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function p_(e){let t={constructs:ou([e_,...(e||{}).extensions||[]]),content:n(Bg),defined:[],document:n(Hg),flow:n(Kg),lazy:{},string:n(Yg),text:n(Xg)};return t;function n(e){return n;function n(n){return u_(t,e,n)}}}function m_(e){for(;!dd(e););return e}var h_=/[\0\t\n\r]/g;function g_(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(h_.lastIndex=u,c=h_.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var __={}.hasOwnProperty;function v_(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),y_(n)(m_(p_(n).document().write(g_()(e,t,!0))))}function y_(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Ce),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ye),blockQuote:a(j),characterEscape:T,characterReference:T,codeFenced:a(he),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(he,o),codeText:a(ge,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(_e),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ve),hardBreakEscape:a(be),hardBreakTrailing:a(be),htmlFlow:a(xe,o),htmlFlowData:T,htmlText:a(xe,o),htmlTextData:T,image:a(Se),label:o,link:a(Ce),listItem:a(M),listItemValue:f,listOrdered:a(we,d),listUnordered:a(we),paragraph:a(Te),reference:le,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ye),strong:a(Ee),thematicBreak:a(Oe)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:me,autolinkProtocol:pe,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:A,characterReferenceMarkerNumeric:A,characterReferenceValue:de,characterReference:fe,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(re),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(D),hardBreakTrailing:c(D),htmlFlow:c(te),htmlFlowData:E,htmlText:c(ne),htmlTextData:E,image:c(ie),label:oe,labelText:ae,lineEnding:ee,link:c(O),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ue,resourceDestinationString:k,resourceTitleString:se,resource:ce,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};x_(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];__.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||C_).call(a,void 0,e[0])}for(r.position={start:b_(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:b_(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:b_(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||C_).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+ag({start:e.start,end:e.end})+`): it’s not open`);n.position.end=b_(e.end)}function u(){return $c(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=cc(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=De(),n.position={start:b_(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=b_(e.end)}function ee(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=b_(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function D(){this.data.atHardBreak=!0}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function O(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ie(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ae(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=zl(t),n.identifier=cc(t).toLowerCase()}function oe(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function se(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ce(){this.data.inReference=void 0}function le(){this.data.referenceType=`collapsed`}function ue(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=cc(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function A(e){this.data.characterReferenceType=e.type}function de(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Ll(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Il(t);let i=this.stack[this.stack.length-1];i.value+=r}function fe(e){let t=this.stack.pop();t.position.end=b_(e.end)}function pe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function me(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function j(){return{type:`blockquote`,children:[]}}function he(){return{type:`code`,lang:null,meta:null,value:``}}function ge(){return{type:`inlineCode`,value:``}}function _e(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function ve(){return{type:`emphasis`,children:[]}}function ye(){return{type:`heading`,depth:0,children:[]}}function be(){return{type:`break`}}function xe(){return{type:`html`,value:``}}function Se(){return{type:`image`,title:null,url:``,alt:null}}function Ce(){return{type:`link`,title:null,url:``,children:[]}}function we(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function M(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Te(){return{type:`paragraph`,children:[]}}function Ee(){return{type:`strong`,children:[]}}function De(){return{type:`text`,value:``}}function Oe(){return{type:`thematicBreak`}}}function b_(e){return{line:e.line,column:e.column,offset:e.offset}}function x_(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?x_(e,r):S_(e,r)}}function S_(e,t){let n;for(n in t)if(__.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function C_(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+ag({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ag({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+ag({start:t.start,end:t.end})+`) is still open`)}function w_(e){let t=this;t.parser=n;function n(n){return v_(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function T_(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function E_(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
45
|
-
`}]}function
|
|
46
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function
|
|
44
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function g_(e){let t={constructs:lu([r_,...(e||{}).extensions||[]]),content:n(Ug),defined:[],document:n(Gg),flow:n(Yg),lazy:{},string:n(Qg),text:n($g)};return t;function n(e){return n;function n(n){return p_(t,e,n)}}}function __(e){for(;!md(e););return e}var v_=/[\0\t\n\r]/g;function y_(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(v_.lastIndex=u,c=v_.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var b_={}.hasOwnProperty;function x_(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),S_(n)(__(g_(n).document().write(y_()(e,t,!0))))}function S_(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Ce),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ye),blockQuote:a(he),characterEscape:T,characterReference:T,codeFenced:a(ge),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ge,o),codeText:a(_e,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(j),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ve),hardBreakEscape:a(be),hardBreakTrailing:a(be),htmlFlow:a(xe,o),htmlFlowData:T,htmlText:a(xe,o),htmlTextData:T,image:a(Se),label:o,link:a(Ce),listItem:a(Te),listItemValue:f,listOrdered:a(we,d),listUnordered:a(we),paragraph:a(Ee),reference:le,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ye),strong:a(De),thematicBreak:a(Oe)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:me,autolinkProtocol:pe,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:A,characterReferenceMarkerNumeric:A,characterReferenceValue:de,characterReference:fe,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(re),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(D),hardBreakTrailing:c(D),htmlFlow:c(te),htmlFlowData:E,htmlText:c(ne),htmlTextData:E,image:c(ie),label:oe,labelText:ae,lineEnding:ee,link:c(O),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ue,resourceDestinationString:k,resourceTitleString:se,resource:ce,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};w_(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];b_.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||E_).call(a,void 0,e[0])}for(r.position={start:C_(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:C_(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:C_(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||E_).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+cg({start:e.start,end:e.end})+`): it’s not open`);n.position.end=C_(e.end)}function u(){return nl(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=dc(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=M(),n.position={start:C_(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=C_(e.end)}function ee(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=C_(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function D(){this.data.atHardBreak=!0}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function O(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ie(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ae(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Hl(t),n.identifier=dc(t).toLowerCase()}function oe(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function se(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ce(){this.data.inReference=void 0}function le(){this.data.referenceType=`collapsed`}function ue(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=dc(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function A(e){this.data.characterReferenceType=e.type}function de(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Bl(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=zl(t);let i=this.stack[this.stack.length-1];i.value+=r}function fe(e){let t=this.stack.pop();t.position.end=C_(e.end)}function pe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function me(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function he(){return{type:`blockquote`,children:[]}}function ge(){return{type:`code`,lang:null,meta:null,value:``}}function _e(){return{type:`inlineCode`,value:``}}function j(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function ve(){return{type:`emphasis`,children:[]}}function ye(){return{type:`heading`,depth:0,children:[]}}function be(){return{type:`break`}}function xe(){return{type:`html`,value:``}}function Se(){return{type:`image`,title:null,url:``,alt:null}}function Ce(){return{type:`link`,title:null,url:``,children:[]}}function we(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Te(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Ee(){return{type:`paragraph`,children:[]}}function De(){return{type:`strong`,children:[]}}function M(){return{type:`text`,value:``}}function Oe(){return{type:`thematicBreak`}}}function C_(e){return{line:e.line,column:e.column,offset:e.offset}}function w_(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?w_(e,r):T_(e,r)}}function T_(e,t){let n;for(n in t)if(b_.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function E_(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+cg({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+cg({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+cg({start:t.start,end:t.end})+`) is still open`)}function D_(e){let t=this;t.parser=n;function n(n){return x_(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function O_(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function k_(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
45
|
+
`}]}function A_(e,t){let n=t.value?t.value+`
|
|
46
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function j_(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function M_(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function N_(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Iu(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function P_(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function F_(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function I_(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function L_(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return I_(e,t);let i={src:Iu(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function R_(e,t){let n={src:Iu(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function z_(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function B_(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return I_(e,t);let i={href:Iu(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function V_(e,t){let n={href:Iu(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function H_(e,t,n){let r=e.all(t),i=n?U_(n):W_(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
47
47
|
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
48
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function
|
|
48
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function U_(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=W_(n[r])}return t}function W_(e){return e.spread??e.children.length>1}function G_(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function K_(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function q_(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function J_(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Y_(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Uo(t.children[1]),o=Ho(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function X_(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Z_(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Q_=9,$_=32;function ev(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(tv(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(tv(t.slice(i),i>0,!1)),a.join(``)}function tv(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Q_||t===$_;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Q_||t===$_;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function nv(e,t){let n={type:`text`,value:ev(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function rv(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var iv={blockquote:O_,break:k_,code:A_,delete:j_,emphasis:M_,footnoteReference:N_,heading:P_,html:F_,imageReference:L_,image:R_,inlineCode:z_,linkReference:B_,link:V_,listItem:H_,list:G_,paragraph:K_,root:q_,strong:J_,table:Y_,tableCell:Z_,tableRow:X_,text:nv,thematicBreak:rv,toml:av,yaml:av,definition:av,footnoteDefinition:av};function av(){}function ov(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function sv(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function cv(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||ov,r=e.options.footnoteBackLabel||sv,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=Iu(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...dt(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
49
49
|
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
50
|
-
`}]}}var
|
|
50
|
+
`}]}}var lv={}.hasOwnProperty,uv={};function dv(e,t){let n=t||uv,r=new Map,i=new Map,a={all:s,applyData:pv,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...iv,...n.handlers},one:o,options:n,patch:fv,wrap:hv};return He(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(lv.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=dt(n);return r.children=a.all(e),r}return dt(e)}return(a.options.unknownHandler||mv)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=gv(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=gv(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function fv(e,t){e.position&&(t.position=Go(e))}function pv(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,dt(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function mv(e,t){let n=t.data||{},r=`value`in t&&!(lv.call(n,`hProperties`)||lv.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 hv(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
51
51
|
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
52
52
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
53
|
-
`}),n}function
|
|
54
|
-
`},i)),a}function hv(e,t){return e&&`run`in e?async function(n,r){let i=mv(n,{file:r,...t});await e.run(i,r)}:function(n,r){return mv(n,{file:r,...e||t})}}function gv(e){if(e)throw e}var _v=t(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function vv(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function yv(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?bv(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function bv(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var xv={basename:Sv,dirname:Cv,extname:wv,join:Tv,sep:`/`};function Sv(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Ov(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Cv(e){if(Ov(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||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function wv(e){Ov(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Tv(...e){let t=-1,n;for(;++t<e.length;)Ov(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Ev(n)}function Ev(e){Ov(e);let t=e.codePointAt(0)===47,n=Dv(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Dv(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Ov(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var kv={cwd:Av};function Av(){return`/`}function jv(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Mv(e){if(typeof e==`string`)e=new URL(e);else if(!jv(e)){let t=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:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Nv(e)}function Nv(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Pv=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Fv=class{constructor(e){let t;t=e?jv(e)?{path:e}:typeof e==`string`||zv(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:kv.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Pv.length;){let e=Pv[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Pv.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?xv.basename(this.path):void 0}set basename(e){Lv(e,`basename`),Iv(e,`basename`),this.path=xv.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?xv.dirname(this.path):void 0}set dirname(e){Rv(this.basename,`dirname`),this.path=xv.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?xv.extname(this.path):void 0}set extname(e){if(Iv(e,`extname`),Rv(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=xv.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){jv(e)&&(e=Mv(e)),Lv(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?xv.basename(this.path,this.extname):void 0}set stem(e){Lv(e,`stem`),Iv(e,`stem`),this.path=xv.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new lg(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 Iv(e,t){if(e&&e.includes(xv.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+xv.sep+"`")}function Lv(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Rv(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function zv(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Bv=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Vv=e(_v(),1),Hv={}.hasOwnProperty,Uv=new class e extends Bv{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=yv()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Vv.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Kv(`data`,this.frozen),this.namespace[e]=t,this):Hv.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Kv(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Yv(e),n=this.parser||this.Parser;return Wv(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Wv(`process`,this.parser||this.Parser),Gv(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Yv(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Zv(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Wv(`processSync`,this.parser||this.Parser),Gv(`processSync`,this.compiler||this.Compiler),this.process(e,r),Jv(`processSync`,`process`,t),n;function r(e,r){t=!0,gv(e),n=r}}run(e,t,n){qv(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Yv(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Jv(`runSync`,`run`,n),r;function i(e,t){gv(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Yv(t),r=this.compiler||this.Compiler;return Gv(`stringify`,r),qv(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Kv(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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(e.plugins),e.settings&&(r.settings=(0,Vv.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];vv(o)&&vv(r)&&(r=(0,Vv.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Wv(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Gv(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Kv(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function qv(e){if(!vv(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Jv(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Yv(e){return Xv(e)?e:new Fv(e)}function Xv(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Zv(e){return typeof e==`string`||Qv(e)}function Qv(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var $v=n();function ey(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ty=ey();function ny(e){ty=e}var ry={exec:()=>null};function X(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(ay.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var iy=(()=>{try{return!0}catch{return!1}})(),ay={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=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`),blockquoteBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}>`)},oy=/^(?:[ \t]*(?:\n|$))+/,sy=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,cy=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ly=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,uy=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,dy=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,fy=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,py=X(fy).replace(/bull/g,dy).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(),my=X(fy).replace(/bull/g,dy).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(),hy=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,gy=/^[^\n]+/,_y=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,vy=X(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,_y).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),yy=X(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,dy).getRegex(),by=`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`,xy=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Sy=X(`^ {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`,xy).replace(`tag`,by).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Cy=X(hy).replace(`hr`,ly).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`,by).getRegex(),wy={blockquote:X(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Cy).getRegex(),code:sy,def:vy,fences:cy,heading:uy,hr:ly,html:Sy,lheading:py,list:yy,newline:oy,paragraph:Cy,table:ry,text:gy},Ty=X(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,ly).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`,by).getRegex(),Ey={...wy,lheading:my,table:Ty,paragraph:X(hy).replace(`hr`,ly).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Ty).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`,by).getRegex()},Dy={...wy,html:X(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,xy).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:ry,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:X(hy).replace(`hr`,ly).replace(`heading`,` *#{1,6} *[^
|
|
55
|
-
]`).replace(`lheading`,
|
|
53
|
+
`}),n}function gv(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function _v(e,t){let n=dv(e,t),r=n.one(e,void 0),i=cv(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
54
|
+
`},i)),a}function vv(e,t){return e&&`run`in e?async function(n,r){let i=_v(n,{file:r,...t});await e.run(i,r)}:function(n,r){return _v(n,{file:r,...e||t})}}function yv(e){if(e)throw e}var bv=t(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function xv(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Sv(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Cv(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Cv(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var wv={basename:Tv,dirname:Ev,extname:Dv,join:Ov,sep:`/`};function Tv(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);jv(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Ev(e){if(jv(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||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Dv(e){jv(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Ov(...e){let t=-1,n;for(;++t<e.length;)jv(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:kv(n)}function kv(e){jv(e);let t=e.codePointAt(0)===47,n=Av(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Av(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function jv(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Mv={cwd:Nv};function Nv(){return`/`}function Pv(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Fv(e){if(typeof e==`string`)e=new URL(e);else if(!Pv(e)){let t=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:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Iv(e)}function Iv(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Lv=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Rv=class{constructor(e){let t;t=e?Pv(e)?{path:e}:typeof e==`string`||Hv(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Mv.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Lv.length;){let e=Lv[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Lv.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?wv.basename(this.path):void 0}set basename(e){Bv(e,`basename`),zv(e,`basename`),this.path=wv.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?wv.dirname(this.path):void 0}set dirname(e){Vv(this.basename,`dirname`),this.path=wv.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?wv.extname(this.path):void 0}set extname(e){if(zv(e,`extname`),Vv(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=wv.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Pv(e)&&(e=Fv(e)),Bv(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?wv.basename(this.path,this.extname):void 0}set stem(e){Bv(e,`stem`),zv(e,`stem`),this.path=wv.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new fg(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 zv(e,t){if(e&&e.includes(wv.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+wv.sep+"`")}function Bv(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Vv(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Hv(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Uv=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Wv=e(bv(),1),Gv={}.hasOwnProperty,Kv=new class e extends Uv{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=Sv()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Wv.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Yv(`data`,this.frozen),this.namespace[e]=t,this):Gv.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Yv(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Qv(e),n=this.parser||this.Parser;return qv(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),qv(`process`,this.parser||this.Parser),Jv(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Qv(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);ey(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),qv(`processSync`,this.parser||this.Parser),Jv(`processSync`,this.compiler||this.Compiler),this.process(e,r),Zv(`processSync`,`process`,t),n;function r(e,r){t=!0,yv(e),n=r}}run(e,t,n){Xv(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Qv(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Zv(`runSync`,`run`,n),r;function i(e,t){yv(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Qv(t),r=this.compiler||this.Compiler;return Jv(`stringify`,r),Xv(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Yv(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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(e.plugins),e.settings&&(r.settings=(0,Wv.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];xv(o)&&xv(r)&&(r=(0,Wv.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function qv(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Jv(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Yv(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Xv(e){if(!xv(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Zv(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Qv(e){return $v(e)?e:new Rv(e)}function $v(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function ey(e){return typeof e==`string`||ty(e)}function ty(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var ny=n();function ry(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var iy=ry();function ay(e){iy=e}var oy={exec:()=>null};function X(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(cy.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var sy=(()=>{try{return!0}catch{return!1}})(),cy={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=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`),blockquoteBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}>`)},ly=/^(?:[ \t]*(?:\n|$))+/,uy=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,dy=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,fy=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,py=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,my=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,hy=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,gy=X(hy).replace(/bull/g,my).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(),_y=X(hy).replace(/bull/g,my).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(),vy=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,yy=/^[^\n]+/,by=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,xy=X(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,by).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Sy=X(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,my).getRegex(),Cy=`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`,wy=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ty=X(`^ {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`,wy).replace(`tag`,Cy).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ey=X(vy).replace(`hr`,fy).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`,Cy).getRegex(),Dy={blockquote:X(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Ey).getRegex(),code:uy,def:xy,fences:dy,heading:py,hr:fy,html:Ty,lheading:gy,list:Sy,newline:ly,paragraph:Ey,table:oy,text:yy},Oy=X(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,fy).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`,Cy).getRegex(),ky={...Dy,lheading:_y,table:Oy,paragraph:X(vy).replace(`hr`,fy).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Oy).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`,Cy).getRegex()},Ay={...Dy,html:X(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,wy).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:oy,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:X(vy).replace(`hr`,fy).replace(`heading`,` *#{1,6} *[^
|
|
55
|
+
]`).replace(`lheading`,gy).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},jy=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,My=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ny=/^( {2,}|\\)\n(?!\s*$)/,Py=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Fy=/[\p{P}\p{S}]/u,Iy=/[\s\p{P}\p{S}]/u,Ly=/[^\s\p{P}\p{S}]/u,Ry=X(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,Iy).getRegex(),zy=/(?!~)[\p{P}\p{S}]/u,By=/(?!~)[\s\p{P}\p{S}]/u,Vy=/(?:[^\s\p{P}\p{S}]|~)/u,Hy=X(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,sy?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Uy=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Wy=X(Uy,`u`).replace(/punct/g,Fy).getRegex(),Gy=X(Uy,`u`).replace(/punct/g,zy).getRegex(),Ky=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,qy=X(Ky,`gu`).replace(/notPunctSpace/g,Ly).replace(/punctSpace/g,Iy).replace(/punct/g,Fy).getRegex(),Jy=X(Ky,`gu`).replace(/notPunctSpace/g,Vy).replace(/punctSpace/g,By).replace(/punct/g,zy).getRegex(),Yy=X(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Ly).replace(/punctSpace/g,Iy).replace(/punct/g,Fy).getRegex(),Xy=X(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,Fy).getRegex(),Zy=X(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Ly).replace(/punctSpace/g,Iy).replace(/punct/g,Fy).getRegex(),Qy=X(/\\(punct)/,`gu`).replace(/punct/g,Fy).getRegex(),$y=X(/^<(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(),eb=X(wy).replace(`(?:-->|$)`,`-->`).getRegex(),tb=X(`^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`,eb).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),nb=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,rb=X(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,nb).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ib=X(/^!?\[(label)\]\[(ref)\]/).replace(`label`,nb).replace(`ref`,by).getRegex(),ab=X(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,by).getRegex(),ob=X(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,ib).replace(`nolink`,ab).getRegex(),sb=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,cb={_backpedal:oy,anyPunctuation:Qy,autolink:$y,blockSkip:Hy,br:Ny,code:My,del:oy,delLDelim:oy,delRDelim:oy,emStrongLDelim:Wy,emStrongRDelimAst:qy,emStrongRDelimUnd:Yy,escape:jy,link:rb,nolink:ab,punctuation:Ry,reflink:ib,reflinkSearch:ob,tag:tb,text:Py,url:oy},lb={...cb,link:X(/^!?\[(label)\]\((.*?)\)/).replace(`label`,nb).getRegex(),reflink:X(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,nb).getRegex()},ub={...cb,emStrongRDelimAst:Jy,emStrongLDelim:Gy,delLDelim:Xy,delRDelim:Zy,url:X(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,sb).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:X(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,sb).getRegex()},db={...ub,br:X(Ny).replace(`{2,}`,`*`).getRegex(),text:X(ub.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},fb={normal:Dy,gfm:ky,pedantic:Ay},pb={normal:cb,gfm:ub,breaks:db,pedantic:lb},mb={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},hb=e=>mb[e];function gb(e,t){if(t){if(cy.escapeTest.test(e))return e.replace(cy.escapeReplace,hb)}else if(cy.escapeTestNoEncode.test(e))return e.replace(cy.escapeReplaceNoEncode,hb);return e}function _b(e){try{e=encodeURI(e).replace(cy.percentDecode,`%`)}catch{return null}return e}function vb(e,t){let n=e.replace(cy.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(cy.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(cy.slashPipe,`|`);return n}function yb(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function bb(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 xb(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function Sb(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function Cb(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
56
56
|
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
|
|
57
|
-
`)}var
|
|
58
|
-
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=
|
|
59
|
-
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=
|
|
57
|
+
`)}var wb=class{options;rules;lexer;constructor(e){this.options=e||iy}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 e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:yb(e,`
|
|
58
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=Cb(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=yb(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:yb(t[0],`
|
|
59
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=yb(t[0],`
|
|
60
60
|
`).split(`
|
|
61
61
|
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
|
62
62
|
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
@@ -67,17 +67,17 @@ ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
|
|
|
67
67
|
`),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}else if(u?.type===`list`){let t=u,a=t.raw+`
|
|
68
68
|
`+e.join(`
|
|
69
69
|
`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
|
|
70
|
-
`);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}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 a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=
|
|
70
|
+
`);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}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 a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=xb(t[2].split(`
|
|
71
71
|
`,1)[0],t[1].length),l=e.split(`
|
|
72
72
|
`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=c.search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
|
|
73
73
|
`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d),f=this.rules.other.blockquoteBeginRegex(d);for(;e;){let p=e.split(`
|
|
74
74
|
`,1)[0],m;if(l=p,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),m=l):m=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||f.test(l)||t.test(l)||n.test(l))break;if(m.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
|
|
75
75
|
`+m.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
|
|
76
76
|
`+l}u=!l.trim(),r+=p+`
|
|
77
|
-
`,e=e.substring(p.length+1),c=m.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){if(e.text=e.text.replace(this.rules.other.listReplaceTask,``),e.tokens[0]?.type===`text`||e.tokens[0]?.type===`paragraph`){e.tokens[0].raw=e.tokens[0].raw.replace(this.rules.other.listReplaceTask,``),e.tokens[0].text=e.tokens[0].text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}}let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let n={type:`checkbox`,raw:t[0]+` `,checked:t[0]!==`[ ]`};e.checked=n.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=n.raw+e.tokens[0].raw,e.tokens[0].text=n.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(n)):e.tokens.unshift({type:`paragraph`,raw:n.raw,text:n.raw,tokens:[n]}):e.tokens.unshift(n)}}if(!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.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 e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=
|
|
78
|
-
`):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(
|
|
79
|
-
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}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 e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=
|
|
80
|
-
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(
|
|
77
|
+
`,e=e.substring(p.length+1),c=m.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){if(e.text=e.text.replace(this.rules.other.listReplaceTask,``),e.tokens[0]?.type===`text`||e.tokens[0]?.type===`paragraph`){e.tokens[0].raw=e.tokens[0].raw.replace(this.rules.other.listReplaceTask,``),e.tokens[0].text=e.tokens[0].text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}}let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let n={type:`checkbox`,raw:t[0]+` `,checked:t[0]!==`[ ]`};e.checked=n.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=n.raw+e.tokens[0].raw,e.tokens[0].text=n.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(n)):e.tokens.unshift({type:`paragraph`,raw:n.raw,text:n.raw,tokens:[n]}):e.tokens.unshift(n)}}if(!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.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 e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=vb(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
78
|
+
`):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(vb(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
79
|
+
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}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 e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=yb(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=bb(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),Sb(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.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 e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return Sb(n,e,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 n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}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 n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},Tb=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||iy,this.options.tokenizer=this.options.tokenizer||new wb,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 t={other:cy,block:fb.normal,inline:pb.normal};this.options.pedantic?(t.block=fb.pedantic,t.inline=pb.pedantic):this.options.gfm&&(t.block=fb.gfm,this.options.breaks?t.inline=pb.breaks:t.inline=pb.gfm),this.tokenizer.rules=t}static get rules(){return{block:fb,inline:pb}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(cy.carriageReturn,`
|
|
80
|
+
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(cy.tabCharGlobal,` `).replace(cy.spaceLine,``));e;){let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=`
|
|
81
81
|
`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
82
82
|
`)?``:`
|
|
83
83
|
`)+r.raw,n.text+=`
|
|
@@ -90,9 +90,9 @@ ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
|
|
|
90
90
|
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
91
91
|
`)?``:`
|
|
92
92
|
`)+r.raw,n.text+=`
|
|
93
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},
|
|
94
|
-
`;return r?`<pre><code class="language-`+
|
|
95
|
-
`:`<pre><code>`+(n?i:
|
|
93
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},Eb=class{options;parser;constructor(e){this.options=e||iy}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(cy.notSpaceStart)?.[0],i=e.replace(cy.endingNewline,``)+`
|
|
94
|
+
`;return r?`<pre><code class="language-`+gb(r)+`">`+(n?i:gb(i,!0))+`</code></pre>
|
|
95
|
+
`:`<pre><code>`+(n?i:gb(i,!0))+`</code></pre>
|
|
96
96
|
`}blockquote({tokens:e}){return`<blockquote>
|
|
97
97
|
${this.parser.parse(e)}</blockquote>
|
|
98
98
|
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
@@ -108,19 +108,19 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
108
108
|
`}tablerow({text:e}){return`<tr>
|
|
109
109
|
${e}</tr>
|
|
110
110
|
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
111
|
-
`}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>${
|
|
112
|
-
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+
|
|
113
|
-
`:e.map((e,t)=>{let n={},r=!!e.bgColor;if(e.color&&(n[`--sdm-c`]=e.color),e.bgColor&&(n[`--sdm-tbg`]=e.bgColor),e.htmlStyle)for(let[t,i]of Object.entries(e.htmlStyle))t===`color`?n[`--sdm-c`]=i:t===`background-color`?(n[`--sdm-tbg`]=i,r=!0):n[t]=i;return(0,M.jsx)(`span`,{className:s(`text-[var(--sdm-c,inherit)]`,`dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]`,r&&`bg-[var(--sdm-tbg)]`,r&&`dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]`),style:n,...e.htmlAttrs,children:e.content},t)})},t))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),
|
|
114
|
-
`;)t--;return e.slice(0,t)},
|
|
115
|
-
`).map(e=>[{content:e,color:`inherit`,bgColor:`transparent`,htmlStyle:{},offset:0}])}),[l]);return(0,M.jsx)(ix.Provider,{value:{code:e},children:(0,M.jsxs)(rx,{isIncomplete:i,language:t,children:[(0,M.jsx)(ox,{language:t}),r?(0,M.jsx)(`div`,{className:c(`pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end`),children:(0,M.jsx)(`div`,{className:c(`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,M.jsx)(j.Suspense,{fallback:(0,M.jsx)(nx,{className:n,language:t,lineNumbers:o,result:u,startLine:a,...s}),children:(0,M.jsx)(cx,{className:n,code:l,language:t,lineNumbers:o,raw:u,startLine:a,...s})})]})})},ux={CheckIcon:e=>(0,M.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,M.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`})}),CopyIcon:e=>(0,M.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,M.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`})}),DownloadIcon:e=>(0,M.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,M.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`})}),ExternalLinkIcon:e=>(0,M.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,M.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`})}),Loader2Icon:e=>(0,M.jsxs)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:[(0,M.jsx)(`path`,{d:`M8 0V4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,M.jsx)(`path`,{d:`M8 16V12`,opacity:`0.5`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,M.jsx)(`path`,{d:`M3.29773 1.52783L5.64887 4.7639`,opacity:`0.9`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,M.jsx)(`path`,{d:`M12.7023 1.52783L10.3511 4.7639`,opacity:`0.1`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,M.jsx)(`path`,{d:`M12.7023 14.472L10.3511 11.236`,opacity:`0.4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,M.jsx)(`path`,{d:`M3.29773 14.472L5.64887 11.236`,opacity:`0.6`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,M.jsx)(`path`,{d:`M15.6085 5.52783L11.8043 6.7639`,opacity:`0.2`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,M.jsx)(`path`,{d:`M0.391602 10.472L4.19583 9.23598`,opacity:`0.7`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,M.jsx)(`path`,{d:`M15.6085 10.4722L11.8043 9.2361`,opacity:`0.3`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,M.jsx)(`path`,{d:`M0.391602 5.52783L4.19583 6.7639`,opacity:`0.8`,stroke:`currentColor`,strokeWidth:`1.5`})]}),Maximize2Icon:e=>(0,M.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,M.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`})}),RotateCcwIcon:e=>(0,M.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,M.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`})}),XIcon:e=>(0,M.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,M.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`})}),ZoomInIcon:e=>(0,M.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,M.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`})}),ZoomOutIcon:e=>(0,M.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,M.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`})})},dx=(0,j.createContext)(ux),fx=(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?n.every(n=>e[n]===t[n]):!1},px=({icons:e,children:t})=>{let n=(0,j.useRef)(e),r=(0,j.useRef)(e?{...ux,...e}:ux);fx(n.current,e)||(n.current=e,r.current=e?{...ux,...e}:ux);let i=r.current;return(0,M.jsx)(dx.Provider,{value:i,children:t})},mx=()=>(0,j.useContext)(dx),hx={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`},gx=(0,j.createContext)(hx),_x=()=>(0,j.useContext)(gx),vx=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...o})=>{let s=Q(),[c,l]=(0,j.useState)(!1),u=(0,j.useRef)(0),{code:d}=ax(),{isAnimating:f}=(0,j.useContext)(wC),p=_x(),m=a??d,h=async()=>{var r;if(typeof window>`u`||!((r=navigator==null?void 0:navigator.clipboard)!=null&&r.writeText)){t?.(Error(`Clipboard API not available`));return}try{c||(await navigator.clipboard.writeText(m),l(!0),e?.(),u.current=window.setTimeout(()=>l(!1),n))}catch(e){t?.(e)}};(0,j.useEffect)(()=>()=>{window.clearTimeout(u.current)},[]);let g=mx(),_=c?g.CheckIcon:g.CopyIcon;return(0,M.jsx)(`button`,{className:s(`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:h,title:p.copyCode,type:`button`,...o,children:r??(0,M.jsx)(_,{size:14})})},yx={"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`},bx=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...o})=>{let s=Q(),{code:c}=ax(),{isAnimating:l}=(0,j.useContext)(wC),u=_x(),d=mx(),f=a??c,p=`file.${n&&n in yx?yx[n]:`txt`}`,m=()=>{try{Qb(p,f,`text/plain`),e?.()}catch(e){t?.(e)}};return(0,M.jsx)(`button`,{className:s(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-download-button`,disabled:l,onClick:m,title:u.downloadFile,type:`button`,...o,children:r??(0,M.jsx)(d.DownloadIcon,{size:14})})},xx=()=>{let{Loader2Icon:e}=mx(),t=Q();return(0,M.jsxs)(`div`,{className:t(`w-full divide-y divide-border overflow-hidden rounded-xl border border-border`),children:[(0,M.jsx)(`div`,{className:t(`h-[46px] w-full bg-muted/80`)}),(0,M.jsx)(`div`,{className:t(`flex w-full items-center justify-center p-4`),children:(0,M.jsx)(e,{className:t(`size-4 animate-spin`)})})]})},Sx=/\.[^/.]+$/,Cx=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,...o})=>{let{DownloadIcon:s}=mx(),c=Q(),l=(0,j.useRef)(null),[u,d]=(0,j.useState)(!1),[f,p]=(0,j.useState)(!1),m=_x(),h=o.width!=null||o.height!=null,g=(u||h)&&!f,_=f&&!h;(0,j.useEffect)(()=>{let e=l.current;if(e!=null&&e.complete){let t=e.naturalWidth>0;d(t),p(!t)}},[]);let v=(0,j.useCallback)(e=>{d(!0),p(!1),i?.(e)},[i]),y=(0,j.useCallback)(e=>{d(!1),p(!0),a?.(e)},[a]),b=async()=>{if(n)try{let e=await(await fetch(n)).blob(),t=new URL(n,window.location.origin).pathname.split(`/`).pop()||``,i=t.split(`.`).pop(),a=t.includes(`.`)&&i!==void 0&&i.length<=4,o=``;if(a)o=t;else{let n=e.type,i=`png`;n.includes(`jpeg`)||n.includes(`jpg`)?i=`jpg`:n.includes(`png`)?i=`png`:n.includes(`svg`)?i=`svg`:n.includes(`gif`)?i=`gif`:n.includes(`webp`)&&(i=`webp`),o=`${(r||t||`image`).replace(Sx,``)}.${i}`}Qb(o,e,e.type)}catch{window.open(n,`_blank`)}};return n?(0,M.jsxs)(`div`,{className:c(`group relative my-4 inline-block`),"data-streamdown":`image-wrapper`,children:[(0,M.jsx)(`img`,{alt:r,className:c(`max-w-full rounded-lg`,_&&`hidden`,t),"data-streamdown":`image`,onError:y,onLoad:v,ref:l,src:n,...o}),_&&(0,M.jsx)(`span`,{className:c(`text-muted-foreground text-xs italic`),"data-streamdown":`image-fallback`,children:m.imageNotAvailable}),(0,M.jsx)(`div`,{className:c(`pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block`)}),g&&(0,M.jsx)(`button`,{className:c(`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:b,title:m.downloadImage,type:`button`,children:(0,M.jsx)(s,{size:14})})]}):null},wx=0,Tx=()=>{wx+=1,wx===1&&(document.body.style.overflow=`hidden`)},Ex=()=>{wx=Math.max(0,wx-1),wx===0&&(document.body.style.overflow=``)},Dx=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:o,XIcon:s}=mx(),c=Q(),[l,u]=(0,j.useState)(!1),d=_x(),f=(0,j.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),2e3)}catch{}},[e]),p=(0,j.useCallback)(()=>{r(),n()},[r,n]);return(0,j.useEffect)(()=>{if(t){Tx();let e=e=>{e.key===`Escape`&&n()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),Ex()}}},[t,n]),t?(0,M.jsx)(`div`,{className:c(`fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm`),"data-streamdown":`link-safety-modal`,onClick:n,onKeyDown:e=>{e.key===`Escape`&&n()},role:`button`,tabIndex:0,children:(0,M.jsxs)(`div`,{className:c(`relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,M.jsx)(`button`,{className:c(`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,M.jsx)(s,{size:16})}),(0,M.jsxs)(`div`,{className:c(`flex flex-col gap-2`),children:[(0,M.jsxs)(`div`,{className:c(`flex items-center gap-2 font-semibold text-lg`),children:[(0,M.jsx)(o,{size:20}),(0,M.jsx)(`span`,{children:d.openExternalLink})]}),(0,M.jsx)(`p`,{className:c(`text-muted-foreground text-sm`),children:d.externalLinkWarning})]}),(0,M.jsx)(`div`,{className:c(`break-all rounded-md bg-muted p-3 font-mono text-sm`,e.length>100&&`max-h-32 overflow-y-auto`),children:e}),(0,M.jsxs)(`div`,{className:c(`flex gap-2`),children:[(0,M.jsx)(`button`,{className:c(`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:l?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(i,{size:14}),(0,M.jsx)(`span`,{children:d.copied})]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(a,{size:14}),(0,M.jsx)(`span`,{children:d.copyLink})]})}),(0,M.jsxs)(`button`,{className:c(`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,M.jsx)(o,{size:14}),(0,M.jsx)(`span`,{children:d.openLink})]})]})]})}):null},Ox=(0,j.createContext)(null),kx=()=>(0,j.useContext)(Ox),Ax=()=>kx()?.code??null,jx=()=>kx()?.mermaid??null,Mx=e=>{var t;let n=kx();return n!=null&&n.renderers&&e&&(t=n.renderers.find(t=>Array.isArray(t.language)?t.language.includes(e):t.language===e))!=null?t:null},Nx=(e,t)=>new Promise((t,n)=>{let r=`data:image/svg+xml;base64,`+btoa(unescape(encodeURIComponent(e))),i=new Image;i.crossOrigin=`anonymous`,i.onload=()=>{let e=document.createElement(`canvas`),r=i.width*5,a=i.height*5;e.width=r,e.height=a;let o=e.getContext(`2d`);if(!o){n(Error(`Failed to create 2D canvas context for PNG export`));return}o.drawImage(i,0,0,r,a),e.toBlob(e=>{if(!e){n(Error(`Failed to create PNG blob`));return}t(e)},`image/png`)},i.onerror=()=>n(Error(`Failed to load SVG image`)),i.src=r}),Px=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let o=Q(),[s,c]=(0,j.useState)(!1),l=(0,j.useRef)(null),{isAnimating:u}=(0,j.useContext)(wC),d=mx(),f=jx(),p=_x(),m=async t=>{try{if(t===`mmd`){Qb(`diagram.mmd`,e,`text/plain`),c(!1),r?.(t);return}if(!f){a?.(Error(`Mermaid plugin not available`));return}let n=f.getMermaid(i),o=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),s=`mermaid-${Math.abs(o)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:l}=await n.render(s,e);if(!l){a?.(Error(`SVG not found. Please wait for the diagram to render.`));return}if(t===`svg`){Qb(`diagram.svg`,l,`image/svg+xml`),c(!1),r?.(t);return}if(t===`png`){Qb(`diagram.png`,await Nx(l),`image/png`),r?.(t),c(!1);return}}catch(e){a?.(e)}};return(0,j.useEffect)(()=>{let e=e=>{let t=e.composedPath();l.current&&!t.includes(l.current)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,M.jsxs)(`div`,{className:o(`relative`),ref:l,children:[(0,M.jsx)(`button`,{className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,n),disabled:u,onClick:()=>c(!s),title:p.downloadDiagram,type:`button`,children:t??(0,M.jsx)(d.DownloadIcon,{size:14})}),s?(0,M.jsxs)(`div`,{className:o(`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,M.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`svg`),title:p.downloadDiagramAsSvg,type:`button`,children:p.mermaidFormatSvg}),(0,M.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`png`),title:p.downloadDiagramAsPng,type:`button`,children:p.mermaidFormatPng}),(0,M.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`mmd`),title:p.downloadDiagramAsMmd,type:`button`,children:p.mermaidFormatMmd})]}):null]})},Fx=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let{Maximize2Icon:o,XIcon:s}=mx(),c=Q(),[l,u]=(0,j.useState)(!1),{isAnimating:d,controls:f}=(0,j.useContext)(wC),p=_x(),m=(()=>{if(typeof f==`boolean`)return f;let e=f.mermaid;return e===!1?!1:e===!0||e===void 0?!0:e.panZoom!==!1})(),h=()=>{u(!l)};return(0,j.useEffect)(()=>{if(l){Tx();let e=e=>{e.key===`Escape`&&u(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),Ex()}}},[l]),(0,j.useEffect)(()=>{l?n?.():r&&r()},[l,n,r]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`button`,{className:c(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),disabled:d,onClick:h,title:p.viewFullscreen,type:`button`,...a,children:(0,M.jsx)(o,{size:14})}),l?(0,$v.createPortal)((0,M.jsxs)(`div`,{className:c(`fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm`),onClick:h,onKeyDown:e=>{e.key===`Escape`&&h()},role:`button`,tabIndex:0,children:[(0,M.jsx)(`button`,{className:c(`absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:h,title:p.exitFullscreen,type:`button`,children:(0,M.jsx)(s,{size:20})}),(0,M.jsx)(`div`,{className:c(`flex size-full items-center justify-center p-4`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:(0,M.jsx)(OC,{chart:e,className:c(`size-full [&_svg]:h-auto [&_svg]:w-auto`),config:t,fullscreen:!0,showControls:m})})]}),document.body):null]})},Ix=e=>{let t=[],n=[],r=e.querySelectorAll(`thead th`);for(let e of r)t.push(e.textContent?.trim()||``);let i=e.querySelectorAll(`tbody tr`);for(let e of i){let t=[],r=e.querySelectorAll(`td`);for(let e of r)t.push(e.textContent?.trim()||``);n.push(t)}return{headers:t,rows:n}},Lx=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1,n=!1;for(let r of e){if(r===`"`){t=!0,n=!0;break}(r===`,`||r===`
|
|
111
|
+
`}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>${gb(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=_b(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+gb(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=_b(e);if(i===null)return gb(n);e=i;let a=`<img src="${e}" alt="${gb(n)}"`;return t&&(a+=` title="${gb(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:gb(e.text)}},Db=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}},Ob=class e{options;renderer;textRenderer;constructor(e){this.options=e||iy,this.options.renderer=this.options.renderer||new Eb,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Db}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},kb=class{options;block;constructor(e){this.options=e||iy}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(){return this.block?Tb.lex:Tb.lexInline}provideParser(){return this.block?Ob.parse:Ob.parseInline}},Ab=new class{defaults=ry();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ob;Renderer=Eb;TextRenderer=Db;Lexer=Tb;Tokenizer=wb;Hooks=kb;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 e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Eb(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new wb(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new kb;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];kb.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&kb.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Tb.lex(e,t??this.defaults)}parser(e,t){return Ob.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(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 a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(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 n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer():e?Tb.lex:Tb.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser():e?Ob.parse:Ob.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer():e?Tb.lex:Tb.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser():e?Ob.parse:Ob.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
112
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+gb(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function jb(e,t){return Ab.parse(e,t)}jb.options=jb.setOptions=function(e){return Ab.setOptions(e),jb.defaults=Ab.defaults,ay(jb.defaults),jb},jb.getDefaults=ry,jb.defaults=iy,jb.use=function(...e){return Ab.use(...e),jb.defaults=Ab.defaults,ay(jb.defaults),jb},jb.walkTokens=function(e,t){return Ab.walkTokens(e,t)},jb.parseInline=Ab.parseInline,jb.Parser=Ob,jb.parser=Ob.parse,jb.Renderer=Eb,jb.TextRenderer=Db,jb.Lexer=Tb,jb.lexer=Tb.lex,jb.Tokenizer=wb,jb.Hooks=kb,jb.parse=jb,jb.options,jb.setOptions,jb.use,jb.walkTokens,jb.parseInline,Ob.parse,Tb.lex;var Mb=`modulepreload`,Nb=function(e){return`/bloby/`+e},Pb={},Z=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Nb(t,n),t in Pb)return;Pb[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Mb,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Fb=300,Ib=`300px`,Lb=500;function Rb(e={}){let{immediate:t=!1,debounceDelay:n=Fb,rootMargin:r=Ib,idleTimeout:i=Lb}=e,[a,o]=(0,j.useState)(!1),s=(0,j.useRef)(null),c=(0,j.useRef)(null),l=(0,j.useRef)(null),u=(0,j.useMemo)(()=>e=>{let t=Date.now();return window.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})},1)},[]),d=(0,j.useMemo)(()=>typeof window<`u`&&window.requestIdleCallback?(e,t)=>window.requestIdleCallback(e,t):u,[u]),f=(0,j.useMemo)(()=>typeof window<`u`&&window.cancelIdleCallback?e=>window.cancelIdleCallback(e):e=>{clearTimeout(e)},[]);return(0,j.useEffect)(()=>{if(t){o(!0);return}let e=s.current;if(!e)return;c.current&&=(clearTimeout(c.current),null),l.current&&=(f(l.current),null);let a=()=>{c.current&&=(clearTimeout(c.current),null),l.current&&=(f(l.current),null)},u=e=>{l.current=d(t=>{t.timeRemaining()>0||t.didTimeout?(o(!0),e.disconnect()):l.current=d(()=>{o(!0),e.disconnect()},{timeout:i/2})},{timeout:i})},p=e=>{a(),c.current=window.setTimeout(()=>{var t;let n=e.takeRecords();(n.length===0||(t=n.at(-1)?.isIntersecting)!=null&&t)&&u(e)},n)},m=(e,t)=>{e.isIntersecting?p(t):a()},h=new IntersectionObserver(e=>{for(let t of e)m(t,h)},{rootMargin:r,threshold:0});return h.observe(e),()=>{c.current&&clearTimeout(c.current),l.current&&f(l.current),h.disconnect()}},[t,n,r,i,f,d]),{shouldRender:a,containerRef:s}}var zb=/\s/,Bb=/^\s+$/,Vb=new Set([`code`,`pre`,`svg`,`math`,`annotation`]),Hb=e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`element`,Ub=e=>e.some(e=>Hb(e)&&Vb.has(e.tagName)),Wb=e=>{let t=[],n=``,r=!1;for(let i of e){let e=zb.test(i);e!==r&&n&&(t.push(n),n=``),n+=i,r=e}return n&&t.push(n),t},Gb=e=>{let t=[],n=``;for(let r of e)zb.test(r)?n+=r:(n&&=(t.push(n),``),t.push(r));return n&&t.push(n),t},Kb=(e,t,n,r,i,a)=>{let o=`--sd-animation:sd-${t};--sd-duration:${i?0:n}ms;--sd-easing:${r}`;return a&&(o+=`;--sd-delay:${a}ms`),{type:`element`,tagName:`span`,properties:{"data-sd-animate":!0,style:o},children:[{type:`text`,value:e}]}},qb=(e,t,n,r,i)=>{let a=t.at(-1);if(!(a&&`children`in a))return;if(Ub(t))return ze;let o=a,s=o.children.indexOf(e);if(s===-1)return;let c=e.value;if(!c.trim()){i.count+=c.length;return}let l=n.sep===`char`?Gb(c):Wb(c),u=r.prevContentLength,d=l.map(e=>{let t=i.count;if(i.count+=e.length,Bb.test(e))return{type:`text`,value:e};let r=u>0&&t<u,a=r?0:i.newIndex++*n.stagger;return Kb(e,n.animation,n.duration,n.easing,r,a)});return o.children.splice(s,1,...d),s+d.length},Jb=0;function Yb(e){let t={animation:e?.animation??`fadeIn`,duration:e?.duration??150,easing:e?.easing??`ease`,sep:e?.sep??`word`,stagger:e?.stagger??40},n={prevContentLength:0,lastRenderCharCount:0},r=Jb++,i=()=>e=>{let r={count:0,newIndex:0};Be(e,`text`,(e,i)=>qb(e,i,t,n,r)),n.lastRenderCharCount=r.count,n.prevContentLength=0};return Object.defineProperty(i,`name`,{value:`rehypeAnimate$${r}`}),{name:`animate`,type:`animate`,rehypePlugin:i,setPrevContentLength(e){n.prevContentLength=e},getLastRenderCharCount(){let e=n.lastRenderCharCount;return n.lastRenderCharCount=0,e}}}Yb();var Xb=(0,j.createContext)(!1),Zb=()=>(0,j.useContext)(Xb),Qb=(...e)=>Xh(Dm(e)),$b=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(t=>t.startsWith(n)?t:`${e}:${t}`).join(` `)},ex=e=>e?(...t)=>$b(e,Xh(Dm(t))):Qb,tx=(e,t,n)=>{let r=typeof t==`string`&&n.startsWith(`text/csv`)?``:``,i=typeof t==`string`?new Blob([r+t],{type:n}):t,a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},nx=(0,j.createContext)(Qb),Q=()=>(0,j.useContext)(nx),rx=Qb(`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`),ix=e=>{let t={};for(let n of e.split(`;`)){let e=n.indexOf(`:`);if(e>0){let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();r&&i&&(t[r]=i)}}return t},ax=(0,j.memo)(({children:e,result:t,language:n,className:r,startLine:i,lineNumbers:a=!0,...o})=>{let s=Q(),c=(0,j.useMemo)(()=>s(rx),[s]),l=(0,j.useMemo)(()=>{let e={};return t.bg&&(e[`--sdm-bg`]=t.bg),t.fg&&(e[`--sdm-fg`]=t.fg),t.rootStyle&&Object.assign(e,ix(t.rootStyle)),e},[t.bg,t.fg,t.rootStyle]);return(0,M.jsx)(`div`,{className:s(r,`overflow-x-auto rounded-md border border-border bg-background p-4 text-sm`),"data-language":n,"data-streamdown":`code-block-body`,...o,children:(0,M.jsx)(`pre`,{className:s(r,`bg-[var(--sdm-bg,inherit]`,`dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]`),style:l,children:(0,M.jsx)(`code`,{className:a?s(`[counter-increment:line_0] [counter-reset:line]`):void 0,style:a&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((e,t)=>(0,M.jsx)(`span`,{className:a?c:void 0,children:e.length===0||e.length===1&&e[0].content===``?`
|
|
113
|
+
`:e.map((e,t)=>{let n={},r=!!e.bgColor;if(e.color&&(n[`--sdm-c`]=e.color),e.bgColor&&(n[`--sdm-tbg`]=e.bgColor),e.htmlStyle)for(let[t,i]of Object.entries(e.htmlStyle))t===`color`?n[`--sdm-c`]=i:t===`background-color`?(n[`--sdm-tbg`]=i,r=!0):n[t]=i;return(0,M.jsx)(`span`,{className:s(`text-[var(--sdm-c,inherit)]`,`dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]`,r&&`bg-[var(--sdm-tbg)]`,r&&`dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]`),style:n,...e.htmlAttrs,children:e.content},t)})},t))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),ox=({className:e,language:t,style:n,isIncomplete:r,...i})=>(0,M.jsx)(`div`,{className:Q()(`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}),sx=(0,j.createContext)({code:``}),cx=()=>(0,j.useContext)(sx),lx=({language:e})=>{let t=Q();return(0,M.jsx)(`div`,{className:t(`flex h-8 items-center text-muted-foreground text-xs`),"data-language":e,"data-streamdown":`code-block-header`,children:(0,M.jsx)(`span`,{className:t(`ml-1 font-mono lowercase`),children:e})})},ux=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
114
|
+
`;)t--;return e.slice(0,t)},dx=(0,j.lazy)(()=>Z(()=>import(`./highlighted-body-OFNGDK62-BwjDEAOv.js`).then(e=>({default:e.HighlightedCodeBlockBody})),__vite__mapDeps([0,1]))),fx=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:a,lineNumbers:o,...s})=>{let c=Q(),l=(0,j.useMemo)(()=>ux(e),[e]),u=(0,j.useMemo)(()=>({bg:`transparent`,fg:`inherit`,tokens:l.split(`
|
|
115
|
+
`).map(e=>[{content:e,color:`inherit`,bgColor:`transparent`,htmlStyle:{},offset:0}])}),[l]);return(0,M.jsx)(sx.Provider,{value:{code:e},children:(0,M.jsxs)(ox,{isIncomplete:i,language:t,children:[(0,M.jsx)(lx,{language:t}),r?(0,M.jsx)(`div`,{className:c(`pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end`),children:(0,M.jsx)(`div`,{className:c(`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,M.jsx)(j.Suspense,{fallback:(0,M.jsx)(ax,{className:n,language:t,lineNumbers:o,result:u,startLine:a,...s}),children:(0,M.jsx)(dx,{className:n,code:l,language:t,lineNumbers:o,raw:u,startLine:a,...s})})]})})},px={CheckIcon:e=>(0,M.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,M.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`})}),CopyIcon:e=>(0,M.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,M.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`})}),DownloadIcon:e=>(0,M.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,M.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`})}),ExternalLinkIcon:e=>(0,M.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,M.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`})}),Loader2Icon:e=>(0,M.jsxs)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:[(0,M.jsx)(`path`,{d:`M8 0V4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,M.jsx)(`path`,{d:`M8 16V12`,opacity:`0.5`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,M.jsx)(`path`,{d:`M3.29773 1.52783L5.64887 4.7639`,opacity:`0.9`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,M.jsx)(`path`,{d:`M12.7023 1.52783L10.3511 4.7639`,opacity:`0.1`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,M.jsx)(`path`,{d:`M12.7023 14.472L10.3511 11.236`,opacity:`0.4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,M.jsx)(`path`,{d:`M3.29773 14.472L5.64887 11.236`,opacity:`0.6`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,M.jsx)(`path`,{d:`M15.6085 5.52783L11.8043 6.7639`,opacity:`0.2`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,M.jsx)(`path`,{d:`M0.391602 10.472L4.19583 9.23598`,opacity:`0.7`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,M.jsx)(`path`,{d:`M15.6085 10.4722L11.8043 9.2361`,opacity:`0.3`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,M.jsx)(`path`,{d:`M0.391602 5.52783L4.19583 6.7639`,opacity:`0.8`,stroke:`currentColor`,strokeWidth:`1.5`})]}),Maximize2Icon:e=>(0,M.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,M.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`})}),RotateCcwIcon:e=>(0,M.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,M.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`})}),XIcon:e=>(0,M.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,M.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`})}),ZoomInIcon:e=>(0,M.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,M.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`})}),ZoomOutIcon:e=>(0,M.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,M.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`})})},mx=(0,j.createContext)(px),hx=(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?n.every(n=>e[n]===t[n]):!1},gx=({icons:e,children:t})=>{let n=(0,j.useRef)(e),r=(0,j.useRef)(e?{...px,...e}:px);hx(n.current,e)||(n.current=e,r.current=e?{...px,...e}:px);let i=r.current;return(0,M.jsx)(mx.Provider,{value:i,children:t})},_x=()=>(0,j.useContext)(mx),vx={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`},yx=(0,j.createContext)(vx),bx=()=>(0,j.useContext)(yx),xx=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...o})=>{let s=Q(),[c,l]=(0,j.useState)(!1),u=(0,j.useRef)(0),{code:d}=cx(),{isAnimating:f}=(0,j.useContext)(DC),p=bx(),m=a??d,h=async()=>{var r;if(typeof window>`u`||!((r=navigator==null?void 0:navigator.clipboard)!=null&&r.writeText)){t?.(Error(`Clipboard API not available`));return}try{c||(await navigator.clipboard.writeText(m),l(!0),e?.(),u.current=window.setTimeout(()=>l(!1),n))}catch(e){t?.(e)}};(0,j.useEffect)(()=>()=>{window.clearTimeout(u.current)},[]);let g=_x(),_=c?g.CheckIcon:g.CopyIcon;return(0,M.jsx)(`button`,{className:s(`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:h,title:p.copyCode,type:`button`,...o,children:r??(0,M.jsx)(_,{size:14})})},Sx={"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`},Cx=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...o})=>{let s=Q(),{code:c}=cx(),{isAnimating:l}=(0,j.useContext)(DC),u=bx(),d=_x(),f=a??c,p=`file.${n&&n in Sx?Sx[n]:`txt`}`,m=()=>{try{tx(p,f,`text/plain`),e?.()}catch(e){t?.(e)}};return(0,M.jsx)(`button`,{className:s(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-download-button`,disabled:l,onClick:m,title:u.downloadFile,type:`button`,...o,children:r??(0,M.jsx)(d.DownloadIcon,{size:14})})},wx=()=>{let{Loader2Icon:e}=_x(),t=Q();return(0,M.jsxs)(`div`,{className:t(`w-full divide-y divide-border overflow-hidden rounded-xl border border-border`),children:[(0,M.jsx)(`div`,{className:t(`h-[46px] w-full bg-muted/80`)}),(0,M.jsx)(`div`,{className:t(`flex w-full items-center justify-center p-4`),children:(0,M.jsx)(e,{className:t(`size-4 animate-spin`)})})]})},Tx=/\.[^/.]+$/,Ex=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,...o})=>{let{DownloadIcon:s}=_x(),c=Q(),l=(0,j.useRef)(null),[u,d]=(0,j.useState)(!1),[f,p]=(0,j.useState)(!1),m=bx(),h=o.width!=null||o.height!=null,g=(u||h)&&!f,_=f&&!h;(0,j.useEffect)(()=>{let e=l.current;if(e!=null&&e.complete){let t=e.naturalWidth>0;d(t),p(!t)}},[]);let v=(0,j.useCallback)(e=>{d(!0),p(!1),i?.(e)},[i]),y=(0,j.useCallback)(e=>{d(!1),p(!0),a?.(e)},[a]),b=async()=>{if(n)try{let e=await(await fetch(n)).blob(),t=new URL(n,window.location.origin).pathname.split(`/`).pop()||``,i=t.split(`.`).pop(),a=t.includes(`.`)&&i!==void 0&&i.length<=4,o=``;if(a)o=t;else{let n=e.type,i=`png`;n.includes(`jpeg`)||n.includes(`jpg`)?i=`jpg`:n.includes(`png`)?i=`png`:n.includes(`svg`)?i=`svg`:n.includes(`gif`)?i=`gif`:n.includes(`webp`)&&(i=`webp`),o=`${(r||t||`image`).replace(Tx,``)}.${i}`}tx(o,e,e.type)}catch{window.open(n,`_blank`)}};return n?(0,M.jsxs)(`div`,{className:c(`group relative my-4 inline-block`),"data-streamdown":`image-wrapper`,children:[(0,M.jsx)(`img`,{alt:r,className:c(`max-w-full rounded-lg`,_&&`hidden`,t),"data-streamdown":`image`,onError:y,onLoad:v,ref:l,src:n,...o}),_&&(0,M.jsx)(`span`,{className:c(`text-muted-foreground text-xs italic`),"data-streamdown":`image-fallback`,children:m.imageNotAvailable}),(0,M.jsx)(`div`,{className:c(`pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block`)}),g&&(0,M.jsx)(`button`,{className:c(`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:b,title:m.downloadImage,type:`button`,children:(0,M.jsx)(s,{size:14})})]}):null},Dx=0,Ox=()=>{Dx+=1,Dx===1&&(document.body.style.overflow=`hidden`)},kx=()=>{Dx=Math.max(0,Dx-1),Dx===0&&(document.body.style.overflow=``)},Ax=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:o,XIcon:s}=_x(),c=Q(),[l,u]=(0,j.useState)(!1),d=bx(),f=(0,j.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),2e3)}catch{}},[e]),p=(0,j.useCallback)(()=>{r(),n()},[r,n]);return(0,j.useEffect)(()=>{if(t){Ox();let e=e=>{e.key===`Escape`&&n()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),kx()}}},[t,n]),t?(0,M.jsx)(`div`,{className:c(`fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm`),"data-streamdown":`link-safety-modal`,onClick:n,onKeyDown:e=>{e.key===`Escape`&&n()},role:`button`,tabIndex:0,children:(0,M.jsxs)(`div`,{className:c(`relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,M.jsx)(`button`,{className:c(`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,M.jsx)(s,{size:16})}),(0,M.jsxs)(`div`,{className:c(`flex flex-col gap-2`),children:[(0,M.jsxs)(`div`,{className:c(`flex items-center gap-2 font-semibold text-lg`),children:[(0,M.jsx)(o,{size:20}),(0,M.jsx)(`span`,{children:d.openExternalLink})]}),(0,M.jsx)(`p`,{className:c(`text-muted-foreground text-sm`),children:d.externalLinkWarning})]}),(0,M.jsx)(`div`,{className:c(`break-all rounded-md bg-muted p-3 font-mono text-sm`,e.length>100&&`max-h-32 overflow-y-auto`),children:e}),(0,M.jsxs)(`div`,{className:c(`flex gap-2`),children:[(0,M.jsx)(`button`,{className:c(`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:l?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(i,{size:14}),(0,M.jsx)(`span`,{children:d.copied})]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(a,{size:14}),(0,M.jsx)(`span`,{children:d.copyLink})]})}),(0,M.jsxs)(`button`,{className:c(`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,M.jsx)(o,{size:14}),(0,M.jsx)(`span`,{children:d.openLink})]})]})]})}):null},jx=(0,j.createContext)(null),Mx=()=>(0,j.useContext)(jx),Nx=()=>Mx()?.code??null,Px=()=>Mx()?.mermaid??null,Fx=e=>{var t;let n=Mx();return n!=null&&n.renderers&&e&&(t=n.renderers.find(t=>Array.isArray(t.language)?t.language.includes(e):t.language===e))!=null?t:null},Ix=(e,t)=>new Promise((t,n)=>{let r=`data:image/svg+xml;base64,`+btoa(unescape(encodeURIComponent(e))),i=new Image;i.crossOrigin=`anonymous`,i.onload=()=>{let e=document.createElement(`canvas`),r=i.width*5,a=i.height*5;e.width=r,e.height=a;let o=e.getContext(`2d`);if(!o){n(Error(`Failed to create 2D canvas context for PNG export`));return}o.drawImage(i,0,0,r,a),e.toBlob(e=>{if(!e){n(Error(`Failed to create PNG blob`));return}t(e)},`image/png`)},i.onerror=()=>n(Error(`Failed to load SVG image`)),i.src=r}),Lx=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let o=Q(),[s,c]=(0,j.useState)(!1),l=(0,j.useRef)(null),{isAnimating:u}=(0,j.useContext)(DC),d=_x(),f=Px(),p=bx(),m=async t=>{try{if(t===`mmd`){tx(`diagram.mmd`,e,`text/plain`),c(!1),r?.(t);return}if(!f){a?.(Error(`Mermaid plugin not available`));return}let n=f.getMermaid(i),o=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),s=`mermaid-${Math.abs(o)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:l}=await n.render(s,e);if(!l){a?.(Error(`SVG not found. Please wait for the diagram to render.`));return}if(t===`svg`){tx(`diagram.svg`,l,`image/svg+xml`),c(!1),r?.(t);return}if(t===`png`){tx(`diagram.png`,await Ix(l),`image/png`),r?.(t),c(!1);return}}catch(e){a?.(e)}};return(0,j.useEffect)(()=>{let e=e=>{let t=e.composedPath();l.current&&!t.includes(l.current)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,M.jsxs)(`div`,{className:o(`relative`),ref:l,children:[(0,M.jsx)(`button`,{className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,n),disabled:u,onClick:()=>c(!s),title:p.downloadDiagram,type:`button`,children:t??(0,M.jsx)(d.DownloadIcon,{size:14})}),s?(0,M.jsxs)(`div`,{className:o(`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,M.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`svg`),title:p.downloadDiagramAsSvg,type:`button`,children:p.mermaidFormatSvg}),(0,M.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`png`),title:p.downloadDiagramAsPng,type:`button`,children:p.mermaidFormatPng}),(0,M.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`mmd`),title:p.downloadDiagramAsMmd,type:`button`,children:p.mermaidFormatMmd})]}):null]})},Rx=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let{Maximize2Icon:o,XIcon:s}=_x(),c=Q(),[l,u]=(0,j.useState)(!1),{isAnimating:d,controls:f}=(0,j.useContext)(DC),p=bx(),m=(()=>{if(typeof f==`boolean`)return f;let e=f.mermaid;return e===!1?!1:e===!0||e===void 0?!0:e.panZoom!==!1})(),h=()=>{u(!l)};return(0,j.useEffect)(()=>{if(l){Ox();let e=e=>{e.key===`Escape`&&u(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),kx()}}},[l]),(0,j.useEffect)(()=>{l?n?.():r&&r()},[l,n,r]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`button`,{className:c(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),disabled:d,onClick:h,title:p.viewFullscreen,type:`button`,...a,children:(0,M.jsx)(o,{size:14})}),l?(0,ny.createPortal)((0,M.jsxs)(`div`,{className:c(`fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm`),onClick:h,onKeyDown:e=>{e.key===`Escape`&&h()},role:`button`,tabIndex:0,children:[(0,M.jsx)(`button`,{className:c(`absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:h,title:p.exitFullscreen,type:`button`,children:(0,M.jsx)(s,{size:20})}),(0,M.jsx)(`div`,{className:c(`flex size-full items-center justify-center p-4`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:(0,M.jsx)(jC,{chart:e,className:c(`size-full [&_svg]:h-auto [&_svg]:w-auto`),config:t,fullscreen:!0,showControls:m})})]}),document.body):null]})},zx=e=>{let t=[],n=[],r=e.querySelectorAll(`thead th`);for(let e of r)t.push(e.textContent?.trim()||``);let i=e.querySelectorAll(`tbody tr`);for(let e of i){let t=[],r=e.querySelectorAll(`td`);for(let e of r)t.push(e.textContent?.trim()||``);n.push(t)}return{headers:t,rows:n}},Bx=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1,n=!1;for(let r of e){if(r===`"`){t=!0,n=!0;break}(r===`,`||r===`
|
|
116
116
|
`)&&(t=!0)}return t?n?`"${e.replace(/"/g,`""`)}"`:`"${e}"`:e},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(`,`),o+=1);for(let e of n)a[o]=e.map(r).join(`,`),o+=1;return a.join(`
|
|
117
|
-
`)},
|
|
117
|
+
`)},Vx=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1;for(let n of e)if(n===` `||n===`
|
|
118
118
|
`||n===`\r`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===` `?n.push(`\\t`):t===`
|
|
119
119
|
`?n.push(`\\n`):t===`\r`?n.push(`\\r`):n.push(t);return n.join(``)},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(` `),o+=1);for(let e of n)a[o]=e.map(r).join(` `),o+=1;return a.join(`
|
|
120
|
-
`)},
|
|
121
|
-
`)},Vx=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let a=Q(),[o,s]=(0,j.useState)(!1),[c,l]=(0,j.useState)(!1),u=(0,j.useRef)(null),d=(0,j.useRef)(0),{isAnimating:f}=(0,j.useContext)(wC),p=_x(),m=async e=>{var t;if(typeof window>`u`||!((t=navigator==null?void 0:navigator.clipboard)!=null&&t.write)){r?.(Error(`Clipboard API not available`));return}try{let t=(u.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let a=Ix(t),o=({csv:Lx,tsv:Rx,md:Bx}[e]||Bx)(a),c=new ClipboardItem({"text/plain":new Blob([o],{type:`text/plain`}),"text/html":new Blob([t.outerHTML],{type:`text/html`})});await navigator.clipboard.write([c]),l(!0),s(!1),n?.(e),d.current=window.setTimeout(()=>l(!1),i)}catch(e){r?.(e)}};(0,j.useEffect)(()=>{let e=e=>{let t=e.composedPath();u.current&&!t.includes(u.current)&&s(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e),window.clearTimeout(d.current)}},[]);let h=mx(),g=c?h.CheckIcon:h.CopyIcon;return(0,M.jsxs)(`div`,{className:a(`relative`),ref:u,children:[(0,M.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:f,onClick:()=>s(!o),title:p.copyTable,type:`button`,children:e??(0,M.jsx)(g,{height:14,width:14})}),o?(0,M.jsxs)(`div`,{className:a(`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,M.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`md`),title:p.copyTableAsMarkdown,type:`button`,children:p.tableFormatMarkdown}),(0,M.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`csv`),title:p.copyTableAsCsv,type:`button`,children:p.tableFormatCsv}),(0,M.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`tsv`),title:p.copyTableAsTsv,type:`button`,children:p.tableFormatTsv})]}):null]})},Hx=({children:e,className:t,onDownload:n,onError:r})=>{let i=Q(),[a,o]=(0,j.useState)(!1),s=(0,j.useRef)(null),{isAnimating:c}=(0,j.useContext)(wC),l=_x(),u=mx(),d=e=>{try{let t=(s.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let i=Ix(t),a=e===`csv`?Lx(i):Bx(i);Qb(`table.${e===`csv`?`csv`:`md`}`,a,e===`csv`?`text/csv`:`text/markdown`),o(!1),n?.(e)}catch(e){r?.(e)}};return(0,j.useEffect)(()=>{let e=e=>{let t=e.composedPath();s.current&&!t.includes(s.current)&&o(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,M.jsxs)(`div`,{className:i(`relative`),ref:s,children:[(0,M.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:c,onClick:()=>o(!a),title:l.downloadTable,type:`button`,children:e??(0,M.jsx)(u.DownloadIcon,{size:14})}),a?(0,M.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,M.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>d(`csv`),title:l.downloadTableAsCsv,type:`button`,children:l.tableFormatCsv}),(0,M.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>d(`markdown`),title:l.downloadTableAsMarkdown,type:`button`,children:l.tableFormatMarkdown})]}):null]})},Ux=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:a}=mx(),o=Q(),[s,c]=(0,j.useState)(!1),{isAnimating:l}=(0,j.useContext)(wC),u=_x(),d=()=>{c(!0)},f=()=>{c(!1)};return(0,j.useEffect)(()=>{if(s){Tx();let e=e=>{e.key===`Escape`&&c(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),Ex()}}},[s]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`button`,{className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:l,onClick:d,title:u.viewFullscreen,type:`button`,children:(0,M.jsx)(i,{size:14})}),s?(0,$v.createPortal)((0,M.jsx)(`div`,{"aria-label":u.viewFullscreen,"aria-modal":`true`,className:o(`fixed inset-0 z-50 flex flex-col bg-background`),"data-streamdown":`table-fullscreen`,onClick:f,onKeyDown:e=>{e.key===`Escape`&&f()},role:`dialog`,children:(0,M.jsxs)(`div`,{className:o(`flex h-full flex-col`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,M.jsxs)(`div`,{className:o(`flex items-center justify-end gap-1 p-4`),children:[n?(0,M.jsx)(Vx,{}):null,r?(0,M.jsx)(Hx,{}):null,(0,M.jsx)(`button`,{className:o(`rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:f,title:u.exitFullscreen,type:`button`,children:(0,M.jsx)(a,{size:20})})]}),(0,M.jsx)(`div`,{className:o(`flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10`),children:(0,M.jsx)(`table`,{className:o(`w-full border-collapse border border-border`),"data-streamdown":`table`,children:e})})]})}),document.body):null]})},Wx=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:a=!0,...o})=>{let s=Q(),c=n&&r,l=n&&i,u=n&&a,d=c||l||u;return(0,M.jsxs)(`div`,{className:s(`my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2`),"data-streamdown":`table-wrapper`,children:[d?(0,M.jsxs)(`div`,{className:s(`flex items-center justify-end gap-1`),children:[c?(0,M.jsx)(Vx,{}):null,l?(0,M.jsx)(Hx,{}):null,u?(0,M.jsx)(Ux,{showCopy:c,showDownload:l,children:e}):null]}):null,(0,M.jsx)(`div`,{className:s(`border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background`),children:(0,M.jsx)(`table`,{className:s(`w-full divide-y divide-border`,t),"data-streamdown":`table`,...o,children:e})})]})},Gx=/startLine=(\d+)/,Kx=/\bnoLineNumbers\b/,qx=(0,j.lazy)(()=>Z(()=>import(`./mermaid-GHXKKRXX-D9GshF2B.js`).then(e=>({default:e.Mermaid})),[])),Jx=/language-([^\s]+)/;function Yx(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function Xx(e,t){return e.className===t.className&&Yx(e.node,t.node)}var Zx=(e,t)=>typeof e==`boolean`?e:e[t]!==!1,Qx=(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},$x=(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},eS=(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},tS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`ol`,{className:Q()(`list-inside list-decimal whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`ordered-list`,...r,children:e}),(e,t)=>Xx(e,t));tS.displayName=`MarkdownOl`;var nS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`li`,{className:Q()(`py-1 [&>p]:inline`,t),"data-streamdown":`list-item`,...r,children:e}),(e,t)=>e.className===t.className&&Yx(e.node,t.node));nS.displayName=`MarkdownLi`;var rS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`ul`,{className:Q()(`list-inside list-disc whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`unordered-list`,...r,children:e}),(e,t)=>Xx(e,t));rS.displayName=`MarkdownUl`;var iS=(0,j.memo)(({className:e,node:t,...n})=>(0,M.jsx)(`hr`,{className:Q()(`my-6 border-border`,e),"data-streamdown":`horizontal-rule`,...n}),(e,t)=>Xx(e,t));iS.displayName=`MarkdownHr`;var aS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`span`,{className:Q()(`font-semibold`,t),"data-streamdown":`strong`,...r,children:e}),(e,t)=>Xx(e,t));aS.displayName=`MarkdownStrong`;var oS=(0,j.memo)(({children:e,className:t,href:n,node:r,...i})=>{let a=Q(),{linkSafety:o}=(0,j.useContext)(wC),[s,c]=(0,j.useState)(!1),l=n===`streamdown:incomplete-link`,u=(0,j.useCallback)(async e=>{if(!(!(o!=null&&o.enabled&&n)||l)){if(e.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(n)){window.open(n,`_blank`,`noreferrer`);return}c(!0)}},[o,n,l]),d=(0,j.useCallback)(()=>{n&&window.open(n,`_blank`,`noreferrer`)},[n]),f=(0,j.useCallback)(()=>{c(!1)},[]),p={url:n??``,isOpen:s,onClose:f,onConfirm:d};return o!=null&&o.enabled&&n?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`button`,{className:a(`wrap-anywhere appearance-none text-left font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,onClick:u,type:`button`,children:e}),o.renderModal?o.renderModal(p):(0,M.jsx)(Dx,{...p})]}):(0,M.jsx)(`a`,{className:a(`wrap-anywhere font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,href:n,rel:`noreferrer`,target:`_blank`,...i,children:e})},(e,t)=>Xx(e,t)&&e.href===t.href);oS.displayName=`MarkdownA`;var sS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`h1`,{className:Q()(`mt-6 mb-2 font-semibold text-3xl`,t),"data-streamdown":`heading-1`,...r,children:e}),(e,t)=>Xx(e,t));sS.displayName=`MarkdownH1`;var cS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`h2`,{className:Q()(`mt-6 mb-2 font-semibold text-2xl`,t),"data-streamdown":`heading-2`,...r,children:e}),(e,t)=>Xx(e,t));cS.displayName=`MarkdownH2`;var lS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`h3`,{className:Q()(`mt-6 mb-2 font-semibold text-xl`,t),"data-streamdown":`heading-3`,...r,children:e}),(e,t)=>Xx(e,t));lS.displayName=`MarkdownH3`;var uS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`h4`,{className:Q()(`mt-6 mb-2 font-semibold text-lg`,t),"data-streamdown":`heading-4`,...r,children:e}),(e,t)=>Xx(e,t));uS.displayName=`MarkdownH4`;var dS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`h5`,{className:Q()(`mt-6 mb-2 font-semibold text-base`,t),"data-streamdown":`heading-5`,...r,children:e}),(e,t)=>Xx(e,t));dS.displayName=`MarkdownH5`;var fS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`h6`,{className:Q()(`mt-6 mb-2 font-semibold text-sm`,t),"data-streamdown":`heading-6`,...r,children:e}),(e,t)=>Xx(e,t));fS.displayName=`MarkdownH6`;var pS=(0,j.memo)(({children:e,className:t,node:n,...r})=>{let{controls:i}=(0,j.useContext)(wC);return(0,M.jsx)(Wx,{className:t,showControls:Zx(i,`table`),showCopy:Qx(i,`copy`),showDownload:Qx(i,`download`),showFullscreen:Qx(i,`fullscreen`),...r,children:e})},(e,t)=>Xx(e,t));pS.displayName=`MarkdownTable`;var mS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`thead`,{className:Q()(`bg-muted/80`,t),"data-streamdown":`table-header`,...r,children:e}),(e,t)=>Xx(e,t));mS.displayName=`MarkdownThead`;var hS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`tbody`,{className:Q()(`divide-y divide-border`,t),"data-streamdown":`table-body`,...r,children:e}),(e,t)=>Xx(e,t));hS.displayName=`MarkdownTbody`;var gS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`tr`,{className:Q()(`border-border`,t),"data-streamdown":`table-row`,...r,children:e}),(e,t)=>Xx(e,t));gS.displayName=`MarkdownTr`;var _S=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`th`,{className:Q()(`whitespace-nowrap px-4 py-2 text-left font-semibold text-sm`,t),"data-streamdown":`table-header-cell`,...r,children:e}),(e,t)=>Xx(e,t));_S.displayName=`MarkdownTh`;var vS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`td`,{className:Q()(`px-4 py-2 text-sm`,t),"data-streamdown":`table-cell`,...r,children:e}),(e,t)=>Xx(e,t));vS.displayName=`MarkdownTd`;var yS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`blockquote`,{className:Q()(`my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic`,t),"data-streamdown":`blockquote`,...r,children:e}),(e,t)=>Xx(e,t));yS.displayName=`MarkdownBlockquote`;var bS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`sup`,{className:Q()(`text-sm`,t),"data-streamdown":`superscript`,...r,children:e}),(e,t)=>Xx(e,t));bS.displayName=`MarkdownSup`;var xS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`sub`,{className:Q()(`text-sm`,t),"data-streamdown":`subscript`,...r,children:e}),(e,t)=>Xx(e,t));xS.displayName=`MarkdownSub`;var SS=(0,j.memo)(({children:e,className:t,node:n,...r})=>{if(`data-footnotes`in r){let n=e=>{if(!(0,j.isValidElement)(e))return!1;let t=Array.isArray(e.props.children)?e.props.children:[e.props.children],n=!1,r=!1;for(let e of t)if(e){if(typeof e==`string`)e.trim()!==``&&(n=!0);else if((0,j.isValidElement)(e))if(e.props?.[`data-footnote-backref`]!==void 0)r=!0;else{let t=Array.isArray(e.props.children)?e.props.children:[e.props.children];for(let e of t){if(typeof e==`string`&&e.trim()!==``){n=!0;break}if((0,j.isValidElement)(e)&&e.props?.[`data-footnote-backref`]===void 0){n=!0;break}}}}return r&&!n},i=Array.isArray(e)?e.map(e=>{if(!(0,j.isValidElement)(e))return e;if(e.type===tS){let t=(Array.isArray(e.props.children)?e.props.children:[e.props.children]).filter(e=>!n(e));return t.length===0?null:{...e,props:{...e.props,children:t}}}return e}):e;return(Array.isArray(i)?i.some(e=>e!==null):i!==null)?(0,M.jsx)(`section`,{className:t,...r,children:i}):null}return(0,M.jsx)(`section`,{className:t,...r,children:e})},(e,t)=>Xx(e,t));SS.displayName=`MarkdownSection`;var CS=(0,j.memo)(({node:e,className:t,children:n,...r})=>{let i=Q(),a=!(`data-block`in r),{mermaid:o,controls:s,lineNumbers:c}=(0,j.useContext)(wC),l=jx(),u=Jb(),d=(t?.match(Jx))?.at(1)??``,f=Mx(d);if(a)return(0,M.jsx)(`code`,{className:i(`rounded bg-muted px-1.5 py-0.5 font-mono text-sm`,t),"data-streamdown":`inline-code`,...r,children:n});let p=e?.properties?.metastring,m=p?.match(Gx),h=m?Number.parseInt(m[1],10):void 0,g=h!==void 0&&h>=1?h:void 0,_=!(p&&Kx.test(p))&&c!==!1,v=``;if((0,j.isValidElement)(n)&&n.props&&typeof n.props==`object`&&`children`in n.props&&typeof n.props.children==`string`?v=n.props.children:typeof n==`string`&&(v=n),f){let e=f.component;return(0,M.jsx)(j.Suspense,{fallback:(0,M.jsx)(xx,{}),children:(0,M.jsx)(e,{code:v,isIncomplete:u,language:d,meta:p})})}if(d===`mermaid`&&l){let e=Zx(s,`mermaid`),n=eS(s,`download`),r=eS(s,`copy`),a=eS(s,`fullscreen`),c=eS(s,`panZoom`),l=e&&(n||r||a);return(0,M.jsx)(j.Suspense,{fallback:(0,M.jsx)(xx,{}),children:(0,M.jsxs)(`div`,{className:i(`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,M.jsx)(`div`,{className:i(`flex h-8 items-center text-muted-foreground text-xs`),children:(0,M.jsx)(`span`,{className:i(`ml-1 font-mono lowercase`),children:`mermaid`})}),l?(0,M.jsx)(`div`,{className:i(`pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end`),children:(0,M.jsxs)(`div`,{className:i(`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:[n?(0,M.jsx)(Px,{chart:v,config:o?.config}):null,r?(0,M.jsx)(vx,{code:v}):null,a?(0,M.jsx)(Fx,{chart:v,config:o?.config}):null]})}):null,(0,M.jsx)(`div`,{className:i(`rounded-md border border-border bg-background`),children:(0,M.jsx)(qx,{chart:v,config:o?.config,showControls:c})})]})})}let y=Zx(s,`code`),b=$x(s,`download`),x=$x(s,`copy`);return(0,M.jsx)(lx,{className:t,code:v,isIncomplete:u,language:d,lineNumbers:_,startLine:g,children:y?(0,M.jsxs)(M.Fragment,{children:[b?(0,M.jsx)(bx,{code:v,language:d}):null,x?(0,M.jsx)(vx,{}):null]}):null})},(e,t)=>e.className===t.className&&Yx(e.node,t.node));CS.displayName=`MarkdownCode`;var wS=(0,j.memo)(Cx,(e,t)=>e.className===t.className&&Yx(e.node,t.node));wS.displayName=`MarkdownImg`;var TS=(0,j.memo)(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(e=>e!=null&&e!==``);if(r.length===1&&(0,j.isValidElement)(r[0])){let t=r[0].props.node?.tagName;if(t===`img`||t===`code`&&`data-block`in r[0].props)return(0,M.jsx)(M.Fragment,{children:e})}return(0,M.jsx)(`p`,{...n,children:e})},(e,t)=>Xx(e,t));TS.displayName=`MarkdownParagraph`;var ES={ol:tS,li:nS,ul:rS,hr:iS,strong:aS,a:oS,h1:sS,h2:cS,h3:lS,h4:uS,h5:dS,h6:fS,table:pS,thead:mS,tbody:hS,tr:gS,th:_S,td:vS,blockquote:yS,code:CS,img:wS,pre:({children:e})=>(0,j.isValidElement)(e)?(0,j.cloneElement)(e,{"data-block":`true`}):e,sup:bS,sub:xS,p:TS,section:SS},DS=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,OS=/\p{L}/u;function kS(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 e of t){if(DS.test(e))return`rtl`;if(OS.test(e))return`ltr`}return`ltr`}var AS=/^[ \t]{0,3}(`{3,}|~{3,})/,jS=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,MS=e=>{let t=e.split(`
|
|
122
|
-
`),n=null,r=0;for(let e of t){let t=
|
|
123
|
-
`);for(let e of t){let t=e.trim();if(t.length>0&&t.includes(`|`)&&
|
|
120
|
+
`)},Hx=e=>{let t=!1;for(let n of e)if(n===`\\`||n===`|`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===`\\`?n.push(`\\\\`):t===`|`?n.push(`\\|`):n.push(t);return n.join(``)},Ux=e=>{let{headers:t,rows:n}=e;if(t.length===0)return``;let r=Array(n.length+2),i=0;r[i]=`| ${t.map(e=>Hx(e)).join(` | `)} |`,i+=1;let a=Array(t.length);for(let e=0;e<t.length;e+=1)a[e]=`---`;r[i]=`| ${a.join(` | `)} |`,i+=1;for(let e of n)if(e.length<t.length){let n=Array(t.length);for(let r=0;r<t.length;r+=1)n[r]=r<e.length?Hx(e[r]):``;r[i]=`| ${n.join(` | `)} |`,i+=1}else r[i]=`| ${e.map(e=>Hx(e)).join(` | `)} |`,i+=1;return r.join(`
|
|
121
|
+
`)},Wx=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let a=Q(),[o,s]=(0,j.useState)(!1),[c,l]=(0,j.useState)(!1),u=(0,j.useRef)(null),d=(0,j.useRef)(0),{isAnimating:f}=(0,j.useContext)(DC),p=bx(),m=async e=>{var t;if(typeof window>`u`||!((t=navigator==null?void 0:navigator.clipboard)!=null&&t.write)){r?.(Error(`Clipboard API not available`));return}try{let t=(u.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let a=zx(t),o=({csv:Bx,tsv:Vx,md:Ux}[e]||Ux)(a),c=new ClipboardItem({"text/plain":new Blob([o],{type:`text/plain`}),"text/html":new Blob([t.outerHTML],{type:`text/html`})});await navigator.clipboard.write([c]),l(!0),s(!1),n?.(e),d.current=window.setTimeout(()=>l(!1),i)}catch(e){r?.(e)}};(0,j.useEffect)(()=>{let e=e=>{let t=e.composedPath();u.current&&!t.includes(u.current)&&s(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e),window.clearTimeout(d.current)}},[]);let h=_x(),g=c?h.CheckIcon:h.CopyIcon;return(0,M.jsxs)(`div`,{className:a(`relative`),ref:u,children:[(0,M.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:f,onClick:()=>s(!o),title:p.copyTable,type:`button`,children:e??(0,M.jsx)(g,{height:14,width:14})}),o?(0,M.jsxs)(`div`,{className:a(`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,M.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`md`),title:p.copyTableAsMarkdown,type:`button`,children:p.tableFormatMarkdown}),(0,M.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`csv`),title:p.copyTableAsCsv,type:`button`,children:p.tableFormatCsv}),(0,M.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`tsv`),title:p.copyTableAsTsv,type:`button`,children:p.tableFormatTsv})]}):null]})},Gx=({children:e,className:t,onDownload:n,onError:r})=>{let i=Q(),[a,o]=(0,j.useState)(!1),s=(0,j.useRef)(null),{isAnimating:c}=(0,j.useContext)(DC),l=bx(),u=_x(),d=e=>{try{let t=(s.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let i=zx(t),a=e===`csv`?Bx(i):Ux(i);tx(`table.${e===`csv`?`csv`:`md`}`,a,e===`csv`?`text/csv`:`text/markdown`),o(!1),n?.(e)}catch(e){r?.(e)}};return(0,j.useEffect)(()=>{let e=e=>{let t=e.composedPath();s.current&&!t.includes(s.current)&&o(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,M.jsxs)(`div`,{className:i(`relative`),ref:s,children:[(0,M.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:c,onClick:()=>o(!a),title:l.downloadTable,type:`button`,children:e??(0,M.jsx)(u.DownloadIcon,{size:14})}),a?(0,M.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,M.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>d(`csv`),title:l.downloadTableAsCsv,type:`button`,children:l.tableFormatCsv}),(0,M.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>d(`markdown`),title:l.downloadTableAsMarkdown,type:`button`,children:l.tableFormatMarkdown})]}):null]})},Kx=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:a}=_x(),o=Q(),[s,c]=(0,j.useState)(!1),{isAnimating:l}=(0,j.useContext)(DC),u=bx(),d=()=>{c(!0)},f=()=>{c(!1)};return(0,j.useEffect)(()=>{if(s){Ox();let e=e=>{e.key===`Escape`&&c(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),kx()}}},[s]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`button`,{className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:l,onClick:d,title:u.viewFullscreen,type:`button`,children:(0,M.jsx)(i,{size:14})}),s?(0,ny.createPortal)((0,M.jsx)(`div`,{"aria-label":u.viewFullscreen,"aria-modal":`true`,className:o(`fixed inset-0 z-50 flex flex-col bg-background`),"data-streamdown":`table-fullscreen`,onClick:f,onKeyDown:e=>{e.key===`Escape`&&f()},role:`dialog`,children:(0,M.jsxs)(`div`,{className:o(`flex h-full flex-col`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,M.jsxs)(`div`,{className:o(`flex items-center justify-end gap-1 p-4`),children:[n?(0,M.jsx)(Wx,{}):null,r?(0,M.jsx)(Gx,{}):null,(0,M.jsx)(`button`,{className:o(`rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:f,title:u.exitFullscreen,type:`button`,children:(0,M.jsx)(a,{size:20})})]}),(0,M.jsx)(`div`,{className:o(`flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10`),children:(0,M.jsx)(`table`,{className:o(`w-full border-collapse border border-border`),"data-streamdown":`table`,children:e})})]})}),document.body):null]})},qx=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:a=!0,...o})=>{let s=Q(),c=n&&r,l=n&&i,u=n&&a,d=c||l||u;return(0,M.jsxs)(`div`,{className:s(`my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2`),"data-streamdown":`table-wrapper`,children:[d?(0,M.jsxs)(`div`,{className:s(`flex items-center justify-end gap-1`),children:[c?(0,M.jsx)(Wx,{}):null,l?(0,M.jsx)(Gx,{}):null,u?(0,M.jsx)(Kx,{showCopy:c,showDownload:l,children:e}):null]}):null,(0,M.jsx)(`div`,{className:s(`border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background`),children:(0,M.jsx)(`table`,{className:s(`w-full divide-y divide-border`,t),"data-streamdown":`table`,...o,children:e})})]})},Jx=/startLine=(\d+)/,Yx=/\bnoLineNumbers\b/,Xx=(0,j.lazy)(()=>Z(()=>import(`./mermaid-GHXKKRXX-B_2tdKu_.js`).then(e=>({default:e.Mermaid})),[])),Zx=/language-([^\s]+)/;function Qx(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function $x(e,t){return e.className===t.className&&Qx(e.node,t.node)}var eS=(e,t)=>typeof e==`boolean`?e:e[t]!==!1,tS=(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},nS=(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},rS=(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},iS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`ol`,{className:Q()(`list-inside list-decimal whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`ordered-list`,...r,children:e}),(e,t)=>$x(e,t));iS.displayName=`MarkdownOl`;var aS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`li`,{className:Q()(`py-1 [&>p]:inline`,t),"data-streamdown":`list-item`,...r,children:e}),(e,t)=>e.className===t.className&&Qx(e.node,t.node));aS.displayName=`MarkdownLi`;var oS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`ul`,{className:Q()(`list-inside list-disc whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`unordered-list`,...r,children:e}),(e,t)=>$x(e,t));oS.displayName=`MarkdownUl`;var sS=(0,j.memo)(({className:e,node:t,...n})=>(0,M.jsx)(`hr`,{className:Q()(`my-6 border-border`,e),"data-streamdown":`horizontal-rule`,...n}),(e,t)=>$x(e,t));sS.displayName=`MarkdownHr`;var cS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`span`,{className:Q()(`font-semibold`,t),"data-streamdown":`strong`,...r,children:e}),(e,t)=>$x(e,t));cS.displayName=`MarkdownStrong`;var lS=(0,j.memo)(({children:e,className:t,href:n,node:r,...i})=>{let a=Q(),{linkSafety:o}=(0,j.useContext)(DC),[s,c]=(0,j.useState)(!1),l=n===`streamdown:incomplete-link`,u=(0,j.useCallback)(async e=>{if(!(!(o!=null&&o.enabled&&n)||l)){if(e.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(n)){window.open(n,`_blank`,`noreferrer`);return}c(!0)}},[o,n,l]),d=(0,j.useCallback)(()=>{n&&window.open(n,`_blank`,`noreferrer`)},[n]),f=(0,j.useCallback)(()=>{c(!1)},[]),p={url:n??``,isOpen:s,onClose:f,onConfirm:d};return o!=null&&o.enabled&&n?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`button`,{className:a(`wrap-anywhere appearance-none text-left font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,onClick:u,type:`button`,children:e}),o.renderModal?o.renderModal(p):(0,M.jsx)(Ax,{...p})]}):(0,M.jsx)(`a`,{className:a(`wrap-anywhere font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,href:n,rel:`noreferrer`,target:`_blank`,...i,children:e})},(e,t)=>$x(e,t)&&e.href===t.href);lS.displayName=`MarkdownA`;var uS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`h1`,{className:Q()(`mt-6 mb-2 font-semibold text-3xl`,t),"data-streamdown":`heading-1`,...r,children:e}),(e,t)=>$x(e,t));uS.displayName=`MarkdownH1`;var dS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`h2`,{className:Q()(`mt-6 mb-2 font-semibold text-2xl`,t),"data-streamdown":`heading-2`,...r,children:e}),(e,t)=>$x(e,t));dS.displayName=`MarkdownH2`;var fS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`h3`,{className:Q()(`mt-6 mb-2 font-semibold text-xl`,t),"data-streamdown":`heading-3`,...r,children:e}),(e,t)=>$x(e,t));fS.displayName=`MarkdownH3`;var pS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`h4`,{className:Q()(`mt-6 mb-2 font-semibold text-lg`,t),"data-streamdown":`heading-4`,...r,children:e}),(e,t)=>$x(e,t));pS.displayName=`MarkdownH4`;var mS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`h5`,{className:Q()(`mt-6 mb-2 font-semibold text-base`,t),"data-streamdown":`heading-5`,...r,children:e}),(e,t)=>$x(e,t));mS.displayName=`MarkdownH5`;var hS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`h6`,{className:Q()(`mt-6 mb-2 font-semibold text-sm`,t),"data-streamdown":`heading-6`,...r,children:e}),(e,t)=>$x(e,t));hS.displayName=`MarkdownH6`;var gS=(0,j.memo)(({children:e,className:t,node:n,...r})=>{let{controls:i}=(0,j.useContext)(DC);return(0,M.jsx)(qx,{className:t,showControls:eS(i,`table`),showCopy:tS(i,`copy`),showDownload:tS(i,`download`),showFullscreen:tS(i,`fullscreen`),...r,children:e})},(e,t)=>$x(e,t));gS.displayName=`MarkdownTable`;var _S=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`thead`,{className:Q()(`bg-muted/80`,t),"data-streamdown":`table-header`,...r,children:e}),(e,t)=>$x(e,t));_S.displayName=`MarkdownThead`;var vS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`tbody`,{className:Q()(`divide-y divide-border`,t),"data-streamdown":`table-body`,...r,children:e}),(e,t)=>$x(e,t));vS.displayName=`MarkdownTbody`;var yS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`tr`,{className:Q()(`border-border`,t),"data-streamdown":`table-row`,...r,children:e}),(e,t)=>$x(e,t));yS.displayName=`MarkdownTr`;var bS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`th`,{className:Q()(`whitespace-nowrap px-4 py-2 text-left font-semibold text-sm`,t),"data-streamdown":`table-header-cell`,...r,children:e}),(e,t)=>$x(e,t));bS.displayName=`MarkdownTh`;var xS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`td`,{className:Q()(`px-4 py-2 text-sm`,t),"data-streamdown":`table-cell`,...r,children:e}),(e,t)=>$x(e,t));xS.displayName=`MarkdownTd`;var SS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`blockquote`,{className:Q()(`my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic`,t),"data-streamdown":`blockquote`,...r,children:e}),(e,t)=>$x(e,t));SS.displayName=`MarkdownBlockquote`;var CS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`sup`,{className:Q()(`text-sm`,t),"data-streamdown":`superscript`,...r,children:e}),(e,t)=>$x(e,t));CS.displayName=`MarkdownSup`;var wS=(0,j.memo)(({children:e,className:t,node:n,...r})=>(0,M.jsx)(`sub`,{className:Q()(`text-sm`,t),"data-streamdown":`subscript`,...r,children:e}),(e,t)=>$x(e,t));wS.displayName=`MarkdownSub`;var TS=(0,j.memo)(({children:e,className:t,node:n,...r})=>{if(`data-footnotes`in r){let n=e=>{if(!(0,j.isValidElement)(e))return!1;let t=Array.isArray(e.props.children)?e.props.children:[e.props.children],n=!1,r=!1;for(let e of t)if(e){if(typeof e==`string`)e.trim()!==``&&(n=!0);else if((0,j.isValidElement)(e))if(e.props?.[`data-footnote-backref`]!==void 0)r=!0;else{let t=Array.isArray(e.props.children)?e.props.children:[e.props.children];for(let e of t){if(typeof e==`string`&&e.trim()!==``){n=!0;break}if((0,j.isValidElement)(e)&&e.props?.[`data-footnote-backref`]===void 0){n=!0;break}}}}return r&&!n},i=Array.isArray(e)?e.map(e=>{if(!(0,j.isValidElement)(e))return e;if(e.type===iS){let t=(Array.isArray(e.props.children)?e.props.children:[e.props.children]).filter(e=>!n(e));return t.length===0?null:{...e,props:{...e.props,children:t}}}return e}):e;return(Array.isArray(i)?i.some(e=>e!==null):i!==null)?(0,M.jsx)(`section`,{className:t,...r,children:i}):null}return(0,M.jsx)(`section`,{className:t,...r,children:e})},(e,t)=>$x(e,t));TS.displayName=`MarkdownSection`;var ES=(0,j.memo)(({node:e,className:t,children:n,...r})=>{let i=Q(),a=!(`data-block`in r),{mermaid:o,controls:s,lineNumbers:c}=(0,j.useContext)(DC),l=Px(),u=Zb(),d=(t?.match(Zx))?.at(1)??``,f=Fx(d);if(a)return(0,M.jsx)(`code`,{className:i(`rounded bg-muted px-1.5 py-0.5 font-mono text-sm`,t),"data-streamdown":`inline-code`,...r,children:n});let p=e?.properties?.metastring,m=p?.match(Jx),h=m?Number.parseInt(m[1],10):void 0,g=h!==void 0&&h>=1?h:void 0,_=!(p&&Yx.test(p))&&c!==!1,v=``;if((0,j.isValidElement)(n)&&n.props&&typeof n.props==`object`&&`children`in n.props&&typeof n.props.children==`string`?v=n.props.children:typeof n==`string`&&(v=n),f){let e=f.component;return(0,M.jsx)(j.Suspense,{fallback:(0,M.jsx)(wx,{}),children:(0,M.jsx)(e,{code:v,isIncomplete:u,language:d,meta:p})})}if(d===`mermaid`&&l){let e=eS(s,`mermaid`),n=rS(s,`download`),r=rS(s,`copy`),a=rS(s,`fullscreen`),c=rS(s,`panZoom`),l=e&&(n||r||a);return(0,M.jsx)(j.Suspense,{fallback:(0,M.jsx)(wx,{}),children:(0,M.jsxs)(`div`,{className:i(`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,M.jsx)(`div`,{className:i(`flex h-8 items-center text-muted-foreground text-xs`),children:(0,M.jsx)(`span`,{className:i(`ml-1 font-mono lowercase`),children:`mermaid`})}),l?(0,M.jsx)(`div`,{className:i(`pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end`),children:(0,M.jsxs)(`div`,{className:i(`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:[n?(0,M.jsx)(Lx,{chart:v,config:o?.config}):null,r?(0,M.jsx)(xx,{code:v}):null,a?(0,M.jsx)(Rx,{chart:v,config:o?.config}):null]})}):null,(0,M.jsx)(`div`,{className:i(`rounded-md border border-border bg-background`),children:(0,M.jsx)(Xx,{chart:v,config:o?.config,showControls:c})})]})})}let y=eS(s,`code`),b=nS(s,`download`),x=nS(s,`copy`);return(0,M.jsx)(fx,{className:t,code:v,isIncomplete:u,language:d,lineNumbers:_,startLine:g,children:y?(0,M.jsxs)(M.Fragment,{children:[b?(0,M.jsx)(Cx,{code:v,language:d}):null,x?(0,M.jsx)(xx,{}):null]}):null})},(e,t)=>e.className===t.className&&Qx(e.node,t.node));ES.displayName=`MarkdownCode`;var DS=(0,j.memo)(Ex,(e,t)=>e.className===t.className&&Qx(e.node,t.node));DS.displayName=`MarkdownImg`;var OS=(0,j.memo)(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(e=>e!=null&&e!==``);if(r.length===1&&(0,j.isValidElement)(r[0])){let t=r[0].props.node?.tagName;if(t===`img`||t===`code`&&`data-block`in r[0].props)return(0,M.jsx)(M.Fragment,{children:e})}return(0,M.jsx)(`p`,{...n,children:e})},(e,t)=>$x(e,t));OS.displayName=`MarkdownParagraph`;var kS={ol:iS,li:aS,ul:oS,hr:sS,strong:cS,a:lS,h1:uS,h2:dS,h3:fS,h4:pS,h5:mS,h6:hS,table:gS,thead:_S,tbody:vS,tr:yS,th:bS,td:xS,blockquote:SS,code:ES,img:DS,pre:({children:e})=>(0,j.isValidElement)(e)?(0,j.cloneElement)(e,{"data-block":`true`}):e,sup:CS,sub:wS,p:OS,section:TS},AS=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,jS=/\p{L}/u;function MS(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 e of t){if(AS.test(e))return`rtl`;if(jS.test(e))return`ltr`}return`ltr`}var NS=/^[ \t]{0,3}(`{3,}|~{3,})/,PS=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,FS=e=>{let t=e.split(`
|
|
122
|
+
`),n=null,r=0;for(let e of t){let t=NS.exec(e);if(n===null){if(t){let e=t[1];n=e[0],r=e.length}}else if(t){let e=t[1],i=e[0],a=e.length;i===n&&a>=r&&(n=null,r=0)}}return n!==null},IS=e=>{let t=e.split(`
|
|
123
|
+
`);for(let e of t){let t=e.trim();if(t.length>0&&t.includes(`|`)&&PS.test(t))return!0}return!1},LS=()=>e=>{He(e,`html`,(e,t,n)=>{!n||typeof t!=`number`||(n.children[t]={type:`text`,value:e.value})})},RS=[],zS={allowDangerousHtml:!0},BS=new WeakMap,VS=new 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 t=`default`;return this.keyCache.set(e,t),t}let a=e=>{if(!e||e.length===0)return``;let t=``;for(let n=0;n<e.length;n+=1){let r=e[n];if(n>0&&(t+=`,`),Array.isArray(r)){let[e,n]=r;if(typeof e==`function`){let n=BS.get(e);n||(n=e.name,BS.set(e,n)),t+=n}else t+=String(e);t+=`:`,t+=JSON.stringify(n)}else if(typeof r==`function`){let e=BS.get(r);e||(e=r.name,BS.set(r,e)),t+=e}else t+=String(r)}return t},o=a(n),s=`${a(r)}::${o}::${i?JSON.stringify(i):``}`;return this.keyCache.set(e,s),s}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 e=this.cache.keys().next().value;e&&this.cache.delete(e)}this.cache.set(n,t)}clear(){this.cache.clear()}},HS=e=>{let t=US(e),n=e.children||``;return XS(t.runSync(t.parse(n),n),e)},US=e=>{let t=VS.get(e);if(t)return t;let n=GS(e);return VS.set(e,n),n},WS=e=>e.some(e=>Array.isArray(e)?e[0]===fs:e===fs),GS=e=>{let t=e.rehypePlugins||RS,n=e.remarkPlugins||RS,r=WS(t)?n:[...n,LS],i=e.remarkRehypeOptions?{...zS,...e.remarkRehypeOptions}:zS;return Kv().use(D_).use(r).use(vv,i).use(t)},KS=e=>e,qS=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:`text`,value:r}},JS=(e,t)=>{for(let n in Hg)if(Object.hasOwn(Hg,n)&&Object.hasOwn(e.properties,n)){let r=e.properties[n],i=Hg[n];(i===null||i.includes(e.tagName))&&(e.properties[n]=t(String(r||``),n,e)??void 0)}},YS=(e,t,n,r,i,a)=>{let o=!1;return r?o=!r.includes(e.tagName):i&&(o=i.includes(e.tagName)),!o&&a&&typeof t==`number`&&(o=!a(e,t,n)),o},XS=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:o,urlTransform:s}=t;if(n||r||i||a||s){let t=s||KS;He(e,(e,s,c)=>{if(e.type===`raw`&&c&&typeof s==`number`)return qS(c,s,a,e.value),s;if(e.type===`element`&&(JS(e,t),YS(e,s,c,r,i,n)&&c&&typeof s==`number`))return o&&e.children?c.children.splice(s,1,...e.children):c.children.splice(s,1),s})}return bg(e,{Fragment:M.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:M.jsx,jsxs:M.jsxs,passKeys:!0,passNode:!0})},ZS=/\[\^[\w-]{1,200}\](?!:)/,QS=/\[\^[\w-]{1,200}\]:/,$S=/<(\w+)[\s>]/,eC=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),tC=new Map,nC=new Map,rC=e=>{let t=e.toLowerCase(),n=tC.get(t);if(n)return n;let r=RegExp(`<${t}(?=[\\s>/])[^>]*>`,`gi`);return tC.set(t,r),r},iC=e=>{let t=e.toLowerCase(),n=nC.get(t);if(n)return n;let r=RegExp(`</${t}(?=[\\s>])[^>]*>`,`gi`);return nC.set(t,r),r},aC=(e,t)=>{if(eC.has(t.toLowerCase()))return 0;let n=e.match(rC(t));if(!n)return 0;let r=0;for(let e of n)e.trimEnd().endsWith(`/>`)||(r+=1);return r},oC=(e,t)=>{let n=e.match(iC(t));return n?n.length:0},sC=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},cC=e=>{let t=ZS.test(e),n=QS.test(e);if(t||n)return[e];let r=Tb.lex(e,{gfm:!0}),i=[],a=[],o=!1;for(let e of r){let t=e.raw,n=i.length;if(a.length>0){i[n-1]+=t;let e=a.at(-1),r=aC(t,e),o=oC(t,e);for(let t=0;t<r;t+=1)a.push(e);for(let t=0;t<o;t+=1)a.length>0&&a.at(-1)===e&&a.pop();continue}if(e.type===`html`&&e.block){let e=t.match($S);if(e){let n=e[1];aC(t,n)>oC(t,n)&&a.push(n)}}if(n>0&&!o){let e=i[n-1];if(sC(e)%2==1){i[n-1]=e+t;continue}}i.push(t),e.type!==`space`&&(o=e.type===`code`)}return i},lC=(e,t)=>{if(!t.length)return e;let n=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${e}\\s*>)`,`gi`);n=n.replace(t,(e,t,n,r)=>{if(!n.includes(`
|
|
124
124
|
|
|
125
125
|
`))return t+n+r;let i=n.replace(/\n\n/g,`
|
|
126
126
|
<!---->
|
|
@@ -130,9 +130,9 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
|
|
|
130
130
|
`)?``:`
|
|
131
131
|
`)}${r}
|
|
132
132
|
|
|
133
|
-
`})}return n},sC=/([\\`*_~[\]|])/g,cC=e=>e.replace(sC,`\\$1`),lC=(e,t)=>{if(!t.length)return e;let n=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${e}\\s*>)`,`gi`);n=n.replace(t,(e,t,n,r)=>t+cC(n).replace(/\n\n/g,` `)+r)}return n},uC=e=>e.type===`text`?e.value:`children`in e&&Array.isArray(e.children)?e.children.map(uC).join(``):``,dC=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(e=>e.toLowerCase()));ze(t,`element`,e=>{if(n.has(e.tagName.toLowerCase())){let t=uC(e);e.children=t?[{type:`text`,value:t}]:[]}})},fC=()=>e=>{ze(e,`code`,e=>{e.meta&&(e.data=e.data??{},e.data.hProperties={...e.data.hProperties??{},metastring:e.meta})})},pC=/^[ \t]*<[\w!/?-]/,mC=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,hC=e=>typeof e!=`string`||e.length===0||!pC.test(e)?e:e.replace(mC,`$1`),gC={...ds,protocols:{...ds.protocols,href:[...ds.protocols?.href??[],`tel`]},attributes:{...ds.attributes,code:[...ds.attributes?.code??[],`metastring`]}},_C={raw:ls,sanitize:[Os,gC],harden:[Ve,{allowedImagePrefixes:[`*`],allowedLinkPrefixes:[`*`],allowedProtocols:[`*`],defaultOrigin:void 0,allowDataImages:!0}]},vC={gfm:[Uf,{}],codeMeta:fC},yC=Object.values(_C),bC=Object.values(vC),xC={block:` ▋`,circle:` ●`},SC=[`github-light`,`github-dark`],CC={enabled:!0},wC=(0,j.createContext)({shikiTheme:SC,controls:!0,isAnimating:!1,lineNumbers:!0,mode:`streaming`,mermaid:void 0,linkSafety:CC}),TC=(0,j.memo)(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:a,animatePlugin:o,...s})=>{if(o){let e=o.getLastRenderCharCount();o.setPrevContentLength(e)}let c=typeof e==`string`&&n?hC(e):e,l=(0,M.jsx)(zS,{...s,children:c});return(0,M.jsx)(qb.Provider,{value:i,children:a?(0,M.jsx)(`div`,{dir:a,style:{display:`contents`},children:l}):l})},(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(n=>e.components?.[n]!==t.components?.[n]))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});TC.displayName=`Block`;var EC=(0,j.memo)(({children:e,mode:t=`streaming`,dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:o=yC,remarkPlugins:s=bC,className:c,shikiTheme:l=SC,mermaid:u,controls:d=!0,isAnimating:f=!1,animated:p,BlockComponent:m=TC,parseMarkdownIntoBlocksFn:h=aC,caret:g,plugins:_,remend:v,linkSafety:y=CC,lineNumbers:b=!0,allowedTags:x,literalTagContent:S,translations:C,icons:w,prefix:T,onAnimationStart:E,onAnimationEnd:ee,...D})=>{let te=(0,j.useId)(),[ne,re]=(0,j.useTransition)(),O=(0,j.useMemo)(()=>Zb(T),[T]),ie=(0,j.useRef)(null),ae=(0,j.useRef)(E),oe=(0,j.useRef)(ee);ae.current=E,oe.current=ee,(0,j.useEffect)(()=>{var e,n,r;if(t===`static`)return;let i=ie.current;if(ie.current=f,i===null){f&&((e=ae.current)==null||e.call(ae));return}f&&!i?(n=ae.current)==null||n.call(ae):!f&&i&&((r=oe.current)==null||r.call(oe))},[f,t]);let k=(0,j.useMemo)(()=>x?Object.keys(x):[],[x]),se=(0,j.useMemo)(()=>{if(typeof e!=`string`)return``;let n=t===`streaming`&&r?Sm(e,v):e;return S&&S.length>0&&(n=lC(n,S)),k.length>0&&(n=oC(n,k)),n},[e,t,r,v,k,S]),ce=(0,j.useMemo)(()=>h(se),[se,h]),[le,ue]=(0,j.useState)(ce);(0,j.useEffect)(()=>{t===`streaming`&&!me?re(()=>{ue(ce)}):ue(ce)},[ce,t]);let A=t===`streaming`?le:ce,de=(0,j.useMemo)(()=>n===`auto`?A.map(kS):void 0,[A,n]),fe=(0,j.useMemo)(()=>A.map((e,t)=>`${te}-${t}`),[A.length,te]),pe=(0,j.useMemo)(()=>p===!0?`true`:p?JSON.stringify(p):``,[p]),me=(0,j.useMemo)(()=>pe?pe===`true`?Kb():Kb(p):null,[pe]),he=(0,j.useMemo)(()=>({shikiTheme:(_?.code)?.getThemes()??l,controls:d,isAnimating:f,lineNumbers:b,mode:t,mermaid:u,linkSafety:y}),[l,d,f,b,t,u,y,_?.code]),ge=(0,j.useMemo)(()=>({...hx,...C}),[(0,j.useMemo)(()=>C?JSON.stringify(C):``,[C])]),_e=(0,j.useMemo)(()=>{let{inlineCode:e,...t}=a??{},n={...ES,...t};if(e){let t=n.code;n.code=n=>`data-block`in n?t?(0,j.createElement)(t,n):null:(0,j.createElement)(e,n)}return n},[a]),ve=(0,j.useMemo)(()=>{let e=[];return _!=null&&_.cjk&&(e=[...e,..._.cjk.remarkPluginsBefore]),e=[...e,...s],_!=null&&_.cjk&&(e=[...e,..._.cjk.remarkPluginsAfter]),_!=null&&_.math&&(e=[...e,_.math.remarkPlugin]),e},[s,_?.math,_?.cjk]),ye=(0,j.useMemo)(()=>{let e=o;if(x&&Object.keys(x).length>0&&o===yC){let t={...gC,tagNames:[...gC.tagNames??[],...Object.keys(x)],attributes:{...gC.attributes,...x}};e=[_C.raw,[Os,t],_C.harden]}return S&&S.length>0&&(e=[...e,[dC,S]]),_!=null&&_.math&&(e=[...e,_.math.rehypePlugin]),me&&f&&(e=[...e,me.rehypePlugin]),e},[o,_?.math,me,f,x,S]),be=(0,j.useMemo)(()=>{if(!f||A.length===0)return!1;let e=A.at(-1);return MS(e)||NS(e)},[f,A]),xe=(0,j.useMemo)(()=>g&&f&&!be?{"--streamdown-caret":`"${xC[g]}"`}:void 0,[g,f,be]);return t===`static`?(0,M.jsx)(gx.Provider,{value:ge,children:(0,M.jsx)(Ox.Provider,{value:_??null,children:(0,M.jsx)(wC.Provider,{value:he,children:(0,M.jsx)(px,{icons:w,children:(0,M.jsx)($b.Provider,{value:O,children:(0,M.jsx)(`div`,{className:O(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,c),dir:n===`auto`?kS(se):n,children:(0,M.jsx)(zS,{components:_e,rehypePlugins:ye,remarkPlugins:ve,...D,children:se})})})})})})}):(0,M.jsx)(gx.Provider,{value:ge,children:(0,M.jsx)(Ox.Provider,{value:_??null,children:(0,M.jsx)(wC.Provider,{value:he,children:(0,M.jsx)(px,{icons:w,children:(0,M.jsx)($b.Provider,{value:O,children:(0,M.jsxs)(`div`,{className:O(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,g&&!be?`[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]`:null,c),style:xe,children:[A.length===0&&g&&f&&(0,M.jsx)(`span`,{}),A.map((e,t)=>{let a=t===A.length-1,o=f&&a&&MS(e);return(0,M.jsx)(m,{animatePlugin:me,components:_e,content:e,dir:de?.[t]??(n===`auto`?void 0:n),index:t,isIncomplete:o,rehypePlugins:ye,remarkPlugins:ve,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...D},fe[t])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&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);EC.displayName=`Streamdown`;var DC=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:o=1,fullscreen:s=!1})=>{let{RotateCcwIcon:c,ZoomInIcon:l,ZoomOutIcon:u}=mx(),d=Q(),f=(0,j.useRef)(null),p=(0,j.useRef)(null),[m,h]=(0,j.useState)(o),[g,_]=(0,j.useState)({x:0,y:0}),[v,y]=(0,j.useState)(!1),[b,x]=(0,j.useState)({x:0,y:0}),[S,C]=(0,j.useState)({x:0,y:0}),w=(0,j.useCallback)(e=>{h(t=>Math.max(n,Math.min(r,t+e)))},[n,r]),T=(0,j.useCallback)(()=>{w(i)},[w,i]),E=(0,j.useCallback)(()=>{w(-i)},[w,i]),ee=(0,j.useCallback)(()=>{h(o),_({x:0,y:0})},[o]),D=(0,j.useCallback)(e=>{e.preventDefault(),w(e.deltaY>0?-i:i)},[w,i]),te=(0,j.useCallback)(e=>{if(e.button!==0||e.isPrimary===!1)return;y(!0),x({x:e.clientX,y:e.clientY}),C(g);let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId)},[g]),ne=(0,j.useCallback)(e=>{if(!v)return;e.preventDefault();let t=e.clientX-b.x,n=e.clientY-b.y;_({x:S.x+t,y:S.y+n})},[v,b,S]),re=(0,j.useCallback)(e=>{y(!1);let t=e.currentTarget;t instanceof HTMLElement&&t.releasePointerCapture(e.pointerId)},[]);return(0,j.useEffect)(()=>{let e=f.current;if(e)return e.addEventListener(`wheel`,D,{passive:!1}),()=>{e.removeEventListener(`wheel`,D)}},[D]),(0,j.useEffect)(()=>{let e=p.current;if(e&&v)return document.body.style.userSelect=`none`,e.addEventListener(`pointermove`,ne,{passive:!1}),e.addEventListener(`pointerup`,re),e.addEventListener(`pointercancel`,re),()=>{document.body.style.userSelect=``,e.removeEventListener(`pointermove`,ne),e.removeEventListener(`pointerup`,re),e.removeEventListener(`pointercancel`,re)}},[v,ne,re]),(0,M.jsxs)(`div`,{className:d(`relative flex flex-col`,s?`h-full w-full`:`min-h-28 w-full`,t),ref:f,style:{cursor:v?`grabbing`:`grab`},children:[a?(0,M.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`,s?`bottom-4 left-4`:`bottom-2 left-2`),children:[(0,M.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:m>=r,onClick:T,title:`Zoom in`,type:`button`,children:(0,M.jsx)(l,{size:16})}),(0,M.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:m<=n,onClick:E,title:`Zoom out`,type:`button`,children:(0,M.jsx)(u,{size:16})}),(0,M.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:ee,title:`Reset zoom and pan`,type:`button`,children:(0,M.jsx)(c,{size:16})})]}):null,(0,M.jsx)(`div`,{className:d(`flex-1 origin-center transition-transform duration-150 ease-out`,s?`flex h-full w-full items-center justify-center`:`flex w-full items-center justify-center`),onPointerDown:te,ref:p,role:`application`,style:{transform:`translate(${g.x}px, ${g.y}px) scale(${m})`,transformOrigin:`center center`,touchAction:`none`,willChange:`transform`},children:e})]})},OC=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let a=Q(),[o,s]=(0,j.useState)(null),[c,l]=(0,j.useState)(!1),[u,d]=(0,j.useState)(``),[f,p]=(0,j.useState)(``),[m,h]=(0,j.useState)(0),{mermaid:g}=(0,j.useContext)(wC),_=jx(),v=g?.errorComponent,{shouldRender:y,containerRef:b}=Fb({immediate:r});if((0,j.useEffect)(()=>{if(y){if(!_){s(`Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.`);return}(async()=>{try{s(null),l(!0);let t=_.getMermaid(n),r=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),i=`mermaid-${Math.abs(r)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:a}=await t.render(i,e);d(a),p(a)}catch(e){f||u||s(e instanceof Error?e.message:`Failed to render Mermaid chart`)}finally{l(!1)}})()}},[e,n,m,y,_]),!(y||u||f))return(0,M.jsx)(`div`,{className:a(`my-4 min-h-[200px]`,t),ref:b});if(c&&!u&&!f)return(0,M.jsx)(`div`,{className:a(`my-4 flex justify-center p-4`,t),ref:b,children:(0,M.jsxs)(`div`,{className:a(`flex items-center space-x-2 text-muted-foreground`),children:[(0,M.jsx)(`div`,{className:a(`h-4 w-4 animate-spin rounded-full border-current border-b-2`)}),(0,M.jsx)(`span`,{className:a(`text-sm`),children:`Loading diagram...`})]})});if(o&&!u&&!f)return v?(0,M.jsx)(`div`,{ref:b,children:(0,M.jsx)(v,{chart:e,error:o,retry:()=>h(e=>e+1)})}):(0,M.jsxs)(`div`,{className:a(`rounded-md bg-red-50 p-4`,t),ref:b,children:[(0,M.jsxs)(`p`,{className:a(`font-mono text-red-700 text-sm`),children:[`Mermaid Error: `,o]}),(0,M.jsxs)(`details`,{className:a(`mt-2`),children:[(0,M.jsx)(`summary`,{className:a(`cursor-pointer text-red-600 text-xs`),children:`Show Code`}),(0,M.jsx)(`pre`,{className:a(`mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs`),children:e})]})]});let x=u||f;return(0,M.jsx)(`div`,{className:a(`size-full`,t),"data-streamdown":`mermaid`,ref:b,children:(0,M.jsx)(DC,{className:a(r?`size-full overflow-hidden`:`overflow-hidden`,t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:(0,M.jsx)(`div`,{"aria-label":`Mermaid chart`,className:a(`flex justify-center`,r?`size-full items-center`:null),dangerouslySetInnerHTML:{__html:x},role:`img`})})})},kC=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function AC(e){return jC(e)}function jC(e){return Array.isArray(e)?MC(e):e instanceof RegExp?e:typeof e==`object`?NC(e):e}function MC(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=jC(e[n]);return t}function NC(e){let t={};for(let n in e)t[n]=jC(e[n]);return t}function PC(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function FC(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?FC(e.substring(0,e.length-1)):e.substr(~t+1)}var IC=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,LC=class{static hasCaptures(e){return e===null?!1:(IC.lastIndex=0,IC.test(e))}static replaceCaptures(e,t,n){return e.replace(IC,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function RC(e,t){return e<t?-1:e>t?1:0}function zC(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=RC(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function BC(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function VC(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var HC=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},UC=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(JC(e),t)}static createFromParsedTheme(e,t){return ZC(e,t)}_cachedMatchRoot=new HC(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>GC(e.parent,t.parentScopes));return n?new qC(n.fontStyle,n.foreground,n.background):null}},WC=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function GC(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!KC(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function KC(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var qC=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function JC(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8;break}}let s=null;typeof i.settings.foreground==`string`&&BC(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&BC(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new YC(l,u,e,o,s,c)}}return n}var YC=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},XC=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(XC||{});function ZC(e,t){e.sort((e,t)=>{let n=RC(e.scope,t.scope);return n!==0||(n=zC(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new QC(t),o=new qC(n,a.getId(r),a.getId(i)),s=new tw(new ew(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new UC(a,o,s)}var QC=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},$C=Object.freeze([]),ew=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||$C,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},tw=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),ew.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(zC(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new ew(e,t,n,r,i))}},nw=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!=0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=e.containsBalancedBrackets(t)?1:0,d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=iw(r)),i!==null&&(u=i?1:0),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function rw(e){return e}function iw(e){return e}function aw(e,t){let n=[],r=sw(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(ow(i)){let e=[];do e.push(i),i=r.next();while(ow(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function ow(e){return!!e&&!!e.match(/[\w\.:]+/)}function sw(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function cw(e){typeof e.dispose==`function`&&e.dispose()}var lw=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},uw=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},dw=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},fw=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new lw(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new dw;for(let n of e)pw(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof lw){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function pw(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof lw?hw({baseGrammar:a,selfGrammar:i},r):mw(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new lw(e))}function mw(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];gw([r],t,n)}}function hw(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&gw(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&gw(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function gw(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?PC({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&gw(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Sw(i);switch(a.kind){case 0:hw({...t,selfGrammar:t.baseGrammar},n);break;case 1:hw(t,n);break;case 2:mw(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?mw(a.ruleName,i,n):hw(i,n)}else a.kind===4?n.add(new uw(a.scopeName,a.ruleName)):n.add(new lw(a.scopeName));break}}}var _w=class{kind=0},vw=class{kind=1},yw=class{constructor(e){this.ruleName=e}kind=2},bw=class{constructor(e){this.scopeName=e}kind=3},xw=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Sw(e){if(e===`$base`)return new _w;if(e===`$self`)return new vw;let t=e.indexOf(`#`);return t===-1?new bw(e):t===0?new yw(e.substring(1)):new xw(e.substring(0,t),e.substring(t+1))}var Cw=/\\(\d+)/,ww=/\\(\d+)/g,Tw=-1,Ew=-2;function Dw(e){return e}function Ow(e){return e}var kw=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=LC.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=LC.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${FC(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:LC.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:LC.replaceCaptures(this._contentName,e,t)}},Aw=class extends kw{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},jw=class extends kw{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Iw(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Lw,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Mw=class extends kw{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Lw,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Nw=class extends kw{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Iw(i,this.id),this.beginCaptures=a,this._end=new Iw(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Lw;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Pw=class extends kw{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Iw(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Iw(o,Ew),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Lw;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Lw,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},Fw=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Aw(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new jw(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=PC({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Mw(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Pw(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Nw(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=Sw(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Mw||e instanceof Nw||e instanceof Pw)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Iw=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source==`string`?this.hasBackReferences=Cw.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return ww.lastIndex=0,this.source.replace(ww,(e,t)=>VC(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Lw=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){return this._cached||=new Rw(e,this._items.map(e=>e.source),this._items.map(e=>e.ruleId)),this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Rw(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Rw=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
134
|
-
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},
|
|
135
|
-
`;let a=this.createOnigString(e),o=a.content.length,s=new lT(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Ww(this,a,i,0,t,s,!0,r);return cw(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function aT(e,t){return e=AC(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var oT=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=WC.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new WC(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new WC(null,t),o=r.themeProvider.themeMatch(a);return new e(null,a,e.mergeAttributes(n,i,o))}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),nw.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a);return new e(t,a,e.mergeAttributes(t.tokenAttributes,i,o))}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},sT=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?oT.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:Ow(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=oT.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,Dw(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,oT.fromExtension(r,n.contentNameScopesList))}},cT=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):aw(e,nT).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>aw(e,nT).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},lT=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=nw.set(n,0,rw(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=nw.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},uT=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,eT(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},dT=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new uT(UC.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(UC.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new cT(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new fw(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},fT=sT.NULL,pT=/["&'<>`]/g,mT=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,hT=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,gT=/[|\\{}()[\]^$+*?.]/g,_T=new WeakMap;function vT(e,t){if(e=e.replace(t.subset?yT(t.subset):pT,r),t.subset||t.escapeOnly)return e;return e.replace(mT,n).replace(hT,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function yT(e){let t=_T.get(e);return t||(t=bT(e),_T.set(e,t)),t}function bT(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(gT,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var xT=/[\dA-Fa-f]/;function ST(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!xT.test(String.fromCharCode(t))?r:r+`;`}var CT=/\d/;function wT(e,t,n){let r=`&#`+String(e);return n&&t&&!CT.test(String.fromCharCode(t))?r:r+`;`}var TT=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),ET={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},DT=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],OT={}.hasOwnProperty,kT={},AT;for(AT in ET)OT.call(ET,AT)&&(kT[ET[AT]]=AT);var jT=/[^\dA-Za-z]/;function MT(e,t,n,r){let i=String.fromCharCode(e);if(OT.call(kT,i)){let e=kT[i],a=`&`+e;return n&&TT.includes(e)&&!DT.includes(e)&&(!r||t&&t!==61&&jT.test(String.fromCharCode(t)))?a:a+`;`}return``}function NT(e,t,n){let r=ST(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=MT(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=wT(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function PT(e,t){return vT(e,Object.assign({format:NT},t))}var FT=/^>|^->|<!--|-->|--!>|<!-$/g,IT=[`>`],LT=[`<`,`>`];function RT(e,t,n,r){return r.settings.bogusComments?`<?`+PT(e.value,Object.assign({},r.settings.characterReferences,{subset:IT}))+`>`:`<!--`+e.value.replace(FT,i)+`-->`;function i(e){return PT(e,Object.assign({},r.settings.characterReferences,{subset:LT}))}}function zT(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var BT=UT(1),VT=UT(-1),HT=[];function UT(e){return t;function t(t,n,r){let i=t?t.children:HT,a=(n||0)+e,o=i[a];if(!r)for(;o&&$h(o);)a+=e,o=i[a];return o}}var WT={}.hasOwnProperty;function GT(e){return t;function t(t,n,r){return WT.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var KT=GT({body:YT,caption:qT,colgroup:qT,dd:$T,dt:QT,head:qT,html:JT,li:ZT,optgroup:tE,option:nE,p:XT,rp:eE,rt:eE,tbody:iE,td:sE,tfoot:aE,th:sE,thead:rE,tr:oE});function qT(e,t,n){let r=BT(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&$h(r.value.charAt(0)))}function JT(e,t,n){let r=BT(n,t);return!r||r.type!==`comment`}function YT(e,t,n){let r=BT(n,t);return!r||r.type!==`comment`}function XT(e,t,n){let r=BT(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function ZT(e,t,n){let r=BT(n,t);return!r||r.type===`element`&&r.tagName===`li`}function QT(e,t,n){let r=BT(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function $T(e,t,n){let r=BT(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function eE(e,t,n){let r=BT(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function tE(e,t,n){let r=BT(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function nE(e,t,n){let r=BT(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function rE(e,t,n){let r=BT(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function iE(e,t,n){let r=BT(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function aE(e,t,n){return!BT(n,t)}function oE(e,t,n){let r=BT(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function sE(e,t,n){let r=BT(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var cE=GT({body:dE,colgroup:fE,head:uE,html:lE,tbody:pE});function lE(e){let t=BT(e,-1);return!t||t.type!==`comment`}function uE(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function dE(e){let t=BT(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&$h(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function fE(e,t,n){let r=VT(n,t),i=BT(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&KT(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function pE(e,t,n){let r=VT(n,t),i=BT(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&KT(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var mE={name:[[`
|
|
133
|
+
`})}return n},uC=/([\\`*_~[\]|])/g,dC=e=>e.replace(uC,`\\$1`),fC=(e,t)=>{if(!t.length)return e;let n=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${e}\\s*>)`,`gi`);n=n.replace(t,(e,t,n,r)=>t+dC(n).replace(/\n\n/g,` `)+r)}return n},pC=e=>e.type===`text`?e.value:`children`in e&&Array.isArray(e.children)?e.children.map(pC).join(``):``,mC=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(e=>e.toLowerCase()));He(t,`element`,e=>{if(n.has(e.tagName.toLowerCase())){let t=pC(e);e.children=t?[{type:`text`,value:t}]:[]}})},hC=()=>e=>{He(e,`code`,e=>{e.meta&&(e.data=e.data??{},e.data.hProperties={...e.data.hProperties??{},metastring:e.meta})})},gC=/^[ \t]*<[\w!/?-]/,_C=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,vC=e=>typeof e!=`string`||e.length===0||!gC.test(e)?e:e.replace(_C,`$1`),yC={...ms,protocols:{...ms.protocols,href:[...ms.protocols?.href??[],`tel`]},attributes:{...ms.attributes,code:[...ms.attributes?.code??[],`metastring`]}},bC={raw:fs,sanitize:[js,yC],harden:[We,{allowedImagePrefixes:[`*`],allowedLinkPrefixes:[`*`],allowedProtocols:[`*`],defaultOrigin:void 0,allowDataImages:!0}]},xC={gfm:[Kf,{}],codeMeta:hC},SC=Object.values(bC),CC=Object.values(xC),wC={block:` ▋`,circle:` ●`},TC=[`github-light`,`github-dark`],EC={enabled:!0},DC=(0,j.createContext)({shikiTheme:TC,controls:!0,isAnimating:!1,lineNumbers:!0,mode:`streaming`,mermaid:void 0,linkSafety:EC}),OC=(0,j.memo)(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:a,animatePlugin:o,...s})=>{if(o){let e=o.getLastRenderCharCount();o.setPrevContentLength(e)}let c=typeof e==`string`&&n?vC(e):e,l=(0,M.jsx)(HS,{...s,children:c});return(0,M.jsx)(Xb.Provider,{value:i,children:a?(0,M.jsx)(`div`,{dir:a,style:{display:`contents`},children:l}):l})},(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(n=>e.components?.[n]!==t.components?.[n]))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});OC.displayName=`Block`;var kC=(0,j.memo)(({children:e,mode:t=`streaming`,dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:o=SC,remarkPlugins:s=CC,className:c,shikiTheme:l=TC,mermaid:u,controls:d=!0,isAnimating:f=!1,animated:p,BlockComponent:m=OC,parseMarkdownIntoBlocksFn:h=cC,caret:g,plugins:_,remend:v,linkSafety:y=EC,lineNumbers:b=!0,allowedTags:x,literalTagContent:S,translations:C,icons:w,prefix:T,onAnimationStart:E,onAnimationEnd:ee,...D})=>{let te=(0,j.useId)(),[ne,re]=(0,j.useTransition)(),O=(0,j.useMemo)(()=>ex(T),[T]),ie=(0,j.useRef)(null),ae=(0,j.useRef)(E),oe=(0,j.useRef)(ee);ae.current=E,oe.current=ee,(0,j.useEffect)(()=>{var e,n,r;if(t===`static`)return;let i=ie.current;if(ie.current=f,i===null){f&&((e=ae.current)==null||e.call(ae));return}f&&!i?(n=ae.current)==null||n.call(ae):!f&&i&&((r=oe.current)==null||r.call(oe))},[f,t]);let k=(0,j.useMemo)(()=>x?Object.keys(x):[],[x]),se=(0,j.useMemo)(()=>{if(typeof e!=`string`)return``;let n=t===`streaming`&&r?Tm(e,v):e;return S&&S.length>0&&(n=fC(n,S)),k.length>0&&(n=lC(n,k)),n},[e,t,r,v,k,S]),ce=(0,j.useMemo)(()=>h(se),[se,h]),[le,ue]=(0,j.useState)(ce);(0,j.useEffect)(()=>{t===`streaming`&&!me?re(()=>{ue(ce)}):ue(ce)},[ce,t]);let A=t===`streaming`?le:ce,de=(0,j.useMemo)(()=>n===`auto`?A.map(MS):void 0,[A,n]),fe=(0,j.useMemo)(()=>A.map((e,t)=>`${te}-${t}`),[A.length,te]),pe=(0,j.useMemo)(()=>p===!0?`true`:p?JSON.stringify(p):``,[p]),me=(0,j.useMemo)(()=>pe?pe===`true`?Yb():Yb(p):null,[pe]),he=(0,j.useMemo)(()=>({shikiTheme:(_?.code)?.getThemes()??l,controls:d,isAnimating:f,lineNumbers:b,mode:t,mermaid:u,linkSafety:y}),[l,d,f,b,t,u,y,_?.code]),ge=(0,j.useMemo)(()=>({...vx,...C}),[(0,j.useMemo)(()=>C?JSON.stringify(C):``,[C])]),_e=(0,j.useMemo)(()=>{let{inlineCode:e,...t}=a??{},n={...kS,...t};if(e){let t=n.code;n.code=n=>`data-block`in n?t?(0,j.createElement)(t,n):null:(0,j.createElement)(e,n)}return n},[a]),ve=(0,j.useMemo)(()=>{let e=[];return _!=null&&_.cjk&&(e=[...e,..._.cjk.remarkPluginsBefore]),e=[...e,...s],_!=null&&_.cjk&&(e=[...e,..._.cjk.remarkPluginsAfter]),_!=null&&_.math&&(e=[...e,_.math.remarkPlugin]),e},[s,_?.math,_?.cjk]),ye=(0,j.useMemo)(()=>{let e=o;if(x&&Object.keys(x).length>0&&o===SC){let t={...yC,tagNames:[...yC.tagNames??[],...Object.keys(x)],attributes:{...yC.attributes,...x}};e=[bC.raw,[js,t],bC.harden]}return S&&S.length>0&&(e=[...e,[mC,S]]),_!=null&&_.math&&(e=[...e,_.math.rehypePlugin]),me&&f&&(e=[...e,me.rehypePlugin]),e},[o,_?.math,me,f,x,S]),be=(0,j.useMemo)(()=>{if(!f||A.length===0)return!1;let e=A.at(-1);return FS(e)||IS(e)},[f,A]),xe=(0,j.useMemo)(()=>g&&f&&!be?{"--streamdown-caret":`"${wC[g]}"`}:void 0,[g,f,be]);return t===`static`?(0,M.jsx)(yx.Provider,{value:ge,children:(0,M.jsx)(jx.Provider,{value:_??null,children:(0,M.jsx)(DC.Provider,{value:he,children:(0,M.jsx)(gx,{icons:w,children:(0,M.jsx)(nx.Provider,{value:O,children:(0,M.jsx)(`div`,{className:O(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,c),dir:n===`auto`?MS(se):n,children:(0,M.jsx)(HS,{components:_e,rehypePlugins:ye,remarkPlugins:ve,...D,children:se})})})})})})}):(0,M.jsx)(yx.Provider,{value:ge,children:(0,M.jsx)(jx.Provider,{value:_??null,children:(0,M.jsx)(DC.Provider,{value:he,children:(0,M.jsx)(gx,{icons:w,children:(0,M.jsx)(nx.Provider,{value:O,children:(0,M.jsxs)(`div`,{className:O(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,g&&!be?`[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]`:null,c),style:xe,children:[A.length===0&&g&&f&&(0,M.jsx)(`span`,{}),A.map((e,t)=>{let a=t===A.length-1,o=f&&a&&FS(e);return(0,M.jsx)(m,{animatePlugin:me,components:_e,content:e,dir:de?.[t]??(n===`auto`?void 0:n),index:t,isIncomplete:o,rehypePlugins:ye,remarkPlugins:ve,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...D},fe[t])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&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);kC.displayName=`Streamdown`;var AC=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:o=1,fullscreen:s=!1})=>{let{RotateCcwIcon:c,ZoomInIcon:l,ZoomOutIcon:u}=_x(),d=Q(),f=(0,j.useRef)(null),p=(0,j.useRef)(null),[m,h]=(0,j.useState)(o),[g,_]=(0,j.useState)({x:0,y:0}),[v,y]=(0,j.useState)(!1),[b,x]=(0,j.useState)({x:0,y:0}),[S,C]=(0,j.useState)({x:0,y:0}),w=(0,j.useCallback)(e=>{h(t=>Math.max(n,Math.min(r,t+e)))},[n,r]),T=(0,j.useCallback)(()=>{w(i)},[w,i]),E=(0,j.useCallback)(()=>{w(-i)},[w,i]),ee=(0,j.useCallback)(()=>{h(o),_({x:0,y:0})},[o]),D=(0,j.useCallback)(e=>{e.preventDefault(),w(e.deltaY>0?-i:i)},[w,i]),te=(0,j.useCallback)(e=>{if(e.button!==0||e.isPrimary===!1)return;y(!0),x({x:e.clientX,y:e.clientY}),C(g);let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId)},[g]),ne=(0,j.useCallback)(e=>{if(!v)return;e.preventDefault();let t=e.clientX-b.x,n=e.clientY-b.y;_({x:S.x+t,y:S.y+n})},[v,b,S]),re=(0,j.useCallback)(e=>{y(!1);let t=e.currentTarget;t instanceof HTMLElement&&t.releasePointerCapture(e.pointerId)},[]);return(0,j.useEffect)(()=>{let e=f.current;if(e)return e.addEventListener(`wheel`,D,{passive:!1}),()=>{e.removeEventListener(`wheel`,D)}},[D]),(0,j.useEffect)(()=>{let e=p.current;if(e&&v)return document.body.style.userSelect=`none`,e.addEventListener(`pointermove`,ne,{passive:!1}),e.addEventListener(`pointerup`,re),e.addEventListener(`pointercancel`,re),()=>{document.body.style.userSelect=``,e.removeEventListener(`pointermove`,ne),e.removeEventListener(`pointerup`,re),e.removeEventListener(`pointercancel`,re)}},[v,ne,re]),(0,M.jsxs)(`div`,{className:d(`relative flex flex-col`,s?`h-full w-full`:`min-h-28 w-full`,t),ref:f,style:{cursor:v?`grabbing`:`grab`},children:[a?(0,M.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`,s?`bottom-4 left-4`:`bottom-2 left-2`),children:[(0,M.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:m>=r,onClick:T,title:`Zoom in`,type:`button`,children:(0,M.jsx)(l,{size:16})}),(0,M.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:m<=n,onClick:E,title:`Zoom out`,type:`button`,children:(0,M.jsx)(u,{size:16})}),(0,M.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:ee,title:`Reset zoom and pan`,type:`button`,children:(0,M.jsx)(c,{size:16})})]}):null,(0,M.jsx)(`div`,{className:d(`flex-1 origin-center transition-transform duration-150 ease-out`,s?`flex h-full w-full items-center justify-center`:`flex w-full items-center justify-center`),onPointerDown:te,ref:p,role:`application`,style:{transform:`translate(${g.x}px, ${g.y}px) scale(${m})`,transformOrigin:`center center`,touchAction:`none`,willChange:`transform`},children:e})]})},jC=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let a=Q(),[o,s]=(0,j.useState)(null),[c,l]=(0,j.useState)(!1),[u,d]=(0,j.useState)(``),[f,p]=(0,j.useState)(``),[m,h]=(0,j.useState)(0),{mermaid:g}=(0,j.useContext)(DC),_=Px(),v=g?.errorComponent,{shouldRender:y,containerRef:b}=Rb({immediate:r});if((0,j.useEffect)(()=>{if(y){if(!_){s(`Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.`);return}(async()=>{try{s(null),l(!0);let t=_.getMermaid(n),r=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),i=`mermaid-${Math.abs(r)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:a}=await t.render(i,e);d(a),p(a)}catch(e){f||u||s(e instanceof Error?e.message:`Failed to render Mermaid chart`)}finally{l(!1)}})()}},[e,n,m,y,_]),!(y||u||f))return(0,M.jsx)(`div`,{className:a(`my-4 min-h-[200px]`,t),ref:b});if(c&&!u&&!f)return(0,M.jsx)(`div`,{className:a(`my-4 flex justify-center p-4`,t),ref:b,children:(0,M.jsxs)(`div`,{className:a(`flex items-center space-x-2 text-muted-foreground`),children:[(0,M.jsx)(`div`,{className:a(`h-4 w-4 animate-spin rounded-full border-current border-b-2`)}),(0,M.jsx)(`span`,{className:a(`text-sm`),children:`Loading diagram...`})]})});if(o&&!u&&!f)return v?(0,M.jsx)(`div`,{ref:b,children:(0,M.jsx)(v,{chart:e,error:o,retry:()=>h(e=>e+1)})}):(0,M.jsxs)(`div`,{className:a(`rounded-md bg-red-50 p-4`,t),ref:b,children:[(0,M.jsxs)(`p`,{className:a(`font-mono text-red-700 text-sm`),children:[`Mermaid Error: `,o]}),(0,M.jsxs)(`details`,{className:a(`mt-2`),children:[(0,M.jsx)(`summary`,{className:a(`cursor-pointer text-red-600 text-xs`),children:`Show Code`}),(0,M.jsx)(`pre`,{className:a(`mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs`),children:e})]})]});let x=u||f;return(0,M.jsx)(`div`,{className:a(`size-full`,t),"data-streamdown":`mermaid`,ref:b,children:(0,M.jsx)(AC,{className:a(r?`size-full overflow-hidden`:`overflow-hidden`,t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:(0,M.jsx)(`div`,{"aria-label":`Mermaid chart`,className:a(`flex justify-center`,r?`size-full items-center`:null),dangerouslySetInnerHTML:{__html:x},role:`img`})})})},MC=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function NC(e){return PC(e)}function PC(e){return Array.isArray(e)?FC(e):e instanceof RegExp?e:typeof e==`object`?IC(e):e}function FC(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=PC(e[n]);return t}function IC(e){let t={};for(let n in e)t[n]=PC(e[n]);return t}function LC(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function RC(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?RC(e.substring(0,e.length-1)):e.substr(~t+1)}var zC=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,BC=class{static hasCaptures(e){return e===null?!1:(zC.lastIndex=0,zC.test(e))}static replaceCaptures(e,t,n){return e.replace(zC,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function VC(e,t){return e<t?-1:e>t?1:0}function HC(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=VC(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function UC(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function WC(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var GC=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},KC=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(ZC(e),t)}static createFromParsedTheme(e,t){return ew(e,t)}_cachedMatchRoot=new GC(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>JC(e.parent,t.parentScopes));return n?new XC(n.fontStyle,n.foreground,n.background):null}},qC=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function JC(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!YC(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function YC(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var XC=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function ZC(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8;break}}let s=null;typeof i.settings.foreground==`string`&&UC(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&UC(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new QC(l,u,e,o,s,c)}}return n}var QC=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},$C=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))($C||{});function ew(e,t){e.sort((e,t)=>{let n=VC(e.scope,t.scope);return n!==0||(n=HC(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new tw(t),o=new XC(n,a.getId(r),a.getId(i)),s=new iw(new rw(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new KC(a,o,s)}var tw=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},nw=Object.freeze([]),rw=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||nw,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},iw=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),rw.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(HC(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new rw(e,t,n,r,i))}},aw=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!=0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=e.containsBalancedBrackets(t)?1:0,d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=sw(r)),i!==null&&(u=i?1:0),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function ow(e){return e}function sw(e){return e}function cw(e,t){let n=[],r=uw(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(lw(i)){let e=[];do e.push(i),i=r.next();while(lw(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function lw(e){return!!e&&!!e.match(/[\w\.:]+/)}function uw(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function dw(e){typeof e.dispose==`function`&&e.dispose()}var fw=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},pw=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},mw=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},hw=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new fw(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new mw;for(let n of e)gw(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof fw){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function gw(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof fw?vw({baseGrammar:a,selfGrammar:i},r):_w(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new fw(e))}function _w(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];yw([r],t,n)}}function vw(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&yw(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&yw(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function yw(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?LC({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&yw(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Tw(i);switch(a.kind){case 0:vw({...t,selfGrammar:t.baseGrammar},n);break;case 1:vw(t,n);break;case 2:_w(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?_w(a.ruleName,i,n):vw(i,n)}else a.kind===4?n.add(new pw(a.scopeName,a.ruleName)):n.add(new fw(a.scopeName));break}}}var bw=class{kind=0},xw=class{kind=1},Sw=class{constructor(e){this.ruleName=e}kind=2},Cw=class{constructor(e){this.scopeName=e}kind=3},ww=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Tw(e){if(e===`$base`)return new bw;if(e===`$self`)return new xw;let t=e.indexOf(`#`);return t===-1?new Cw(e):t===0?new Sw(e.substring(1)):new ww(e.substring(0,t),e.substring(t+1))}var Ew=/\\(\d+)/,Dw=/\\(\d+)/g,Ow=-1,kw=-2;function Aw(e){return e}function jw(e){return e}var Mw=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=BC.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=BC.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${RC(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:BC.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:BC.replaceCaptures(this._contentName,e,t)}},Nw=class extends Mw{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},Pw=class extends Mw{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new zw(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Bw,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Fw=class extends Mw{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Bw,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Iw=class extends Mw{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new zw(i,this.id),this.beginCaptures=a,this._end=new zw(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Bw;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Lw=class extends Mw{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new zw(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new zw(o,kw),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Bw;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Bw,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},Rw=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Nw(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Pw(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=LC({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Fw(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Lw(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Iw(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=Tw(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Fw||e instanceof Iw||e instanceof Lw)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},zw=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source==`string`?this.hasBackReferences=Ew.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return Dw.lastIndex=0,this.source.replace(Dw,(e,t)=>WC(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Bw=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){return this._cached||=new Vw(e,this._items.map(e=>e.source),this._items.map(e=>e.ruleId)),this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Vw(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Vw=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
134
|
+
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Hw=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Uw=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Hw(e,8),this._embeddedLanguagesMatcher=new Ww(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Hw(0,0);_getBasicScopeAttributes=new GC(e=>new Hw(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Ww=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>WC(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var Gw=!1,Kw=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function qw(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Jw(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new Kw(i,!0);f()}return new Kw(i,!1);function f(){let o=Yw(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===Ow){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),tT(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof Iw){let r=o;tT(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof Lw){let r=o;tT(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(tT(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function Jw(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof Lw&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=$w(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==kw){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),tT(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function Yw(e,t,n,r,i,a){let o=Xw(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=Zw(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function Xw(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=Qw(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Zw(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=Qw(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function Qw(e,t,n,r,i){return Gw?{ruleScanner:e.compile(t,n),findOptions:eT(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function $w(e,t,n,r,i){return Gw?{ruleScanner:e.compileWhile(t,n),findOptions:eT(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function eT(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function tT(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));qw(e,p,n&&d.start===0,d.start,f,i,!1,0),dw(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new nT(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var nT=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function rT(e,t,n,r,i,a,o,s){return new sT(e,t,n,r,i,a,o,s)}function iT(e,t,n,r,i){let a=cw(t,aT),o=Rw.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function aT(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(oT(t[r],e))return n=r+1,!0;return!1})}function oT(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var sT=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new Uw(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=cT(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=cw(e,aT);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)iT(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&iT(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(Aw(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[jw(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=cT(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Rw.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===uT.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=aw.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?lT.createRootAndLookUpScopeName(a,r,this):lT.createRoot(`unknown`,r),t=new uT(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
135
|
+
`;let a=this.createOnigString(e),o=a.content.length,s=new fT(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=qw(this,a,i,0,t,s,!0,r);return dw(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function cT(e,t){return e=NC(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var lT=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=qC.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new qC(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new qC(null,t),o=r.themeProvider.themeMatch(a);return new e(null,a,e.mergeAttributes(n,i,o))}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),aw.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a);return new e(t,a,e.mergeAttributes(t.tokenAttributes,i,o))}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},uT=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?lT.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:jw(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=lT.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,Aw(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,lT.fromExtension(r,n.contentNameScopesList))}},dT=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):cw(e,aT).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>cw(e,aT).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},fT=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=aw.set(n,0,ow(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=aw.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},pT=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,rT(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},mT=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new pT(KC.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(KC.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new dT(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new hw(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},hT=uT.NULL,gT=/["&'<>`]/g,_T=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,vT=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,yT=/[|\\{}()[\]^$+*?.]/g,bT=new WeakMap;function xT(e,t){if(e=e.replace(t.subset?ST(t.subset):gT,r),t.subset||t.escapeOnly)return e;return e.replace(_T,n).replace(vT,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function ST(e){let t=bT.get(e);return t||(t=CT(e),bT.set(e,t)),t}function CT(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(yT,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var wT=/[\dA-Fa-f]/;function TT(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!wT.test(String.fromCharCode(t))?r:r+`;`}var ET=/\d/;function DT(e,t,n){let r=`&#`+String(e);return n&&t&&!ET.test(String.fromCharCode(t))?r:r+`;`}var OT=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),kT={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},AT=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],jT={}.hasOwnProperty,MT={},NT;for(NT in kT)jT.call(kT,NT)&&(MT[kT[NT]]=NT);var PT=/[^\dA-Za-z]/;function FT(e,t,n,r){let i=String.fromCharCode(e);if(jT.call(MT,i)){let e=MT[i],a=`&`+e;return n&&OT.includes(e)&&!AT.includes(e)&&(!r||t&&t!==61&&PT.test(String.fromCharCode(t)))?a:a+`;`}return``}function IT(e,t,n){let r=TT(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=FT(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=DT(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function LT(e,t){return xT(e,Object.assign({format:IT},t))}var RT=/^>|^->|<!--|-->|--!>|<!-$/g,zT=[`>`],BT=[`<`,`>`];function VT(e,t,n,r){return r.settings.bogusComments?`<?`+LT(e.value,Object.assign({},r.settings.characterReferences,{subset:zT}))+`>`:`<!--`+e.value.replace(RT,i)+`-->`;function i(e){return LT(e,Object.assign({},r.settings.characterReferences,{subset:BT}))}}function HT(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var UT=KT(1),WT=KT(-1),GT=[];function KT(e){return t;function t(t,n,r){let i=t?t.children:GT,a=(n||0)+e,o=i[a];if(!r)for(;o&&ng(o);)a+=e,o=i[a];return o}}var qT={}.hasOwnProperty;function JT(e){return t;function t(t,n,r){return qT.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var YT=JT({body:QT,caption:XT,colgroup:XT,dd:nE,dt:tE,head:XT,html:ZT,li:eE,optgroup:iE,option:aE,p:$T,rp:rE,rt:rE,tbody:sE,td:uE,tfoot:cE,th:uE,thead:oE,tr:lE});function XT(e,t,n){let r=UT(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&ng(r.value.charAt(0)))}function ZT(e,t,n){let r=UT(n,t);return!r||r.type!==`comment`}function QT(e,t,n){let r=UT(n,t);return!r||r.type!==`comment`}function $T(e,t,n){let r=UT(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function eE(e,t,n){let r=UT(n,t);return!r||r.type===`element`&&r.tagName===`li`}function tE(e,t,n){let r=UT(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function nE(e,t,n){let r=UT(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function rE(e,t,n){let r=UT(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function iE(e,t,n){let r=UT(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function aE(e,t,n){let r=UT(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function oE(e,t,n){let r=UT(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function sE(e,t,n){let r=UT(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function cE(e,t,n){return!UT(n,t)}function lE(e,t,n){let r=UT(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function uE(e,t,n){let r=UT(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var dE=JT({body:mE,colgroup:hE,head:pE,html:fE,tbody:gE});function fE(e){let t=UT(e,-1);return!t||t.type!==`comment`}function pE(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function mE(e){let t=UT(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&ng(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function hE(e,t,n){let r=WT(n,t),i=UT(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&YT(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function gE(e,t,n){let r=WT(n,t),i=UT(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&YT(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var _E={name:[[`
|
|
136
136
|
\f\r &/=>`.split(``),`
|
|
137
137
|
\f\r "&'/=>\``.split(``)],[`\0
|
|
138
138
|
\f\r "&'/<=>`.split(``),`\0
|
|
@@ -140,10 +140,10 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
|
|
|
140
140
|
\f\r &>`.split(``),`\0
|
|
141
141
|
\f\r "&'<=>\``.split(``)],[`\0
|
|
142
142
|
\f\r "&'<=>\``.split(``),`\0
|
|
143
|
-
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function hE(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=Vt);let l=gE(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!cE(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!KT(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function gE(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=_E(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function _E(e,t,n){let r=Lt(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=e.settings.allowDangerousCharacters?0:1,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=PT(r.attribute,Object.assign({},e.settings.characterReferences,{subset:mE.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Ut:qt)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=PT(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:mE.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&ks(n,o)>ks(n,e.alternative)&&(o=e.alternative),s=o+PT(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?mE.single:mE.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var vE=[`<`,`&`];function yE(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:PT(e.value,Object.assign({},r.settings.characterReferences,{subset:vE}))}function bE(e,t,n,r){return r.settings.allowDangerousHtml?e.value:yE(e,t,n,r)}function xE(e,t,n,r){return r.all(e)}var SE=yn(`type`,{invalid:CE,unknown:wE,handlers:{comment:RT,doctype:zT,element:hE,raw:bE,root:xE,text:yE}});function CE(e){throw Error("Expected node, not `"+e+"`")}function wE(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var TE={},EE={},DE=[];function OE(e,t){let n=t||TE,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:kE,all:AE,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Nn,characterReferences:n.characterReferences||EE,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?Vt:Bt,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function kE(e,t,n){return SE(e,t,n,this)}function AE(e){let t=[],n=e&&e.children||DE,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function jE(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function ME(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function NE(e){return Array.isArray(e)?e:[e]}async function PE(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function FE(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function IE(e){return e===`ansi`||FE(e)}function LE(e){return e===`none`}function RE(e){return LE(e)}function zE(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(/\s+/g);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function BE(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}function VE(e){let t=BE(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function HE(e,t,n){let r=new Set;for(let t of e.matchAll(/:?lang=["']([^"']+)["']/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/(?:```|~~~)([\w-]+)/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/\\begin\{([\w-]+)\}/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return Array.from(r);let i=n.getBundledLanguages();return Array.from(r).filter(e=>e&&i[e])}var UE=`light-dark()`,WE=[`color`,`background-color`];function GE(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function KE(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?GE(e,t):e})):e}function qE(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>JE(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&WE.includes(a))if(r===UE&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new kC('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s;else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function JE(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&XC.Italic&&(t[`font-style`]=`italic`),e.fontStyle&XC.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&XC.Underline&&n.push(`underline`),e.fontStyle&XC.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function YE(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}var XE=new WeakMap;function ZE(e,t){XE.set(e,t)}function QE(e){return XE.get(e)}var $E=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(NE(n).map(e=>[e,fT])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return eD(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function eD(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function tD(e,t){if(!(e instanceof $E))throw new kC(`Invalid grammar state`);return e.getInternalStack(t)}function nD(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new kC(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}else{let t=r.lines[e.line];if(t===void 0)throw new kC(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new kC(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}},r=VE(t.source),i=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));rD(i),e.set(t.meta,{decorations:i,converter:r,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return KE(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new kC(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=iD(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new kC(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new kC(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&zE(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function rD(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new kC(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new kC(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function iD(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(iD).join(``):``}var aD=[nD()];function oD(e){let t=sD(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...aD]}function sD(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var cD=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],lD={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function uD(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function dD(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}else if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function fD(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:`resetAll`});else if(r<=9)lD[r]&&t.push({type:`setDecoration`,value:lD[r]});else if(r<=29){let e=lD[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:cD[r-30]}});else if(r===38){let n=dD(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:cD[r-40]}});else if(r===48){let n=dD(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:cD[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:cD[r-100+8]}})}return t}function pD(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=uD(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=fD(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var mD={black:`#000000`,red:`#bb0000`,green:`#00bb00`,yellow:`#bbbb00`,blue:`#0000bb`,magenta:`#ff00ff`,cyan:`#00bbbb`,white:`#eeeeee`,brightBlack:`#555555`,brightRed:`#ff5555`,brightGreen:`#00ff00`,brightYellow:`#ffff55`,brightBlue:`#5555ff`,brightMagenta:`#ff55ff`,brightCyan:`#55ffff`,brightWhite:`#ffffff`};function hD(e=mD){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<cD.length;e++)r.push(t(cD[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var gD={black:`#000000`,red:`#cd3131`,green:`#0DBC79`,yellow:`#E5E510`,blue:`#2472C8`,magenta:`#BC3FBC`,cyan:`#11A8CD`,white:`#E5E5E5`,brightBlack:`#666666`,brightRed:`#F14C4C`,brightGreen:`#23D18B`,brightYellow:`#F5F543`,brightBlue:`#3B8EEA`,brightMagenta:`#D670D6`,brightCyan:`#29B8DB`,brightWhite:`#FFFFFF`};function _D(e,t,n){let r=jE(e,n),i=BE(t),a=hD(Object.fromEntries(cD.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||gD[t]]}))),o=pD();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=ME(i,r),o=ME(o,r),n.decorations.has(`dim`)&&(i=vD(i));let s=XC.None;return n.decorations.has(`bold`)&&(s|=XC.Bold),n.decorations.has(`italic`)&&(s|=XC.Italic),n.decorations.has(`underline`)&&(s|=XC.Underline),n.decorations.has(`strikethrough`)&&(s|=XC.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function vD(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}else if(e.length===6)return`#${e}80`;else if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}else if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function yD(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||`text`);if(FE(i)||LE(r))return BE(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:a,colorMap:o}=e.setTheme(r);if(i===`ansi`)return _D(a,t,n);let s=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==s.name)throw new kC(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(a.name))throw new kC(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return xD(t,s,a,o,n)}function bD(...e){if(e.length===2)return QE(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(FE(i)||LE(a))throw new kC(`Plain language does not have grammar state`);if(i===`ansi`)throw new kC(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new $E(SD(n,c,o,s,r).stateStack,c.name,o.name)}function xD(e,t,n,r,i){let a=SD(e,t,n,r,i),o=new $E(a.stateStack,t.name,n.name);return ZE(a.tokens,o),a.tokens}function SD(e,t,n,r,i){let a=jE(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=BE(e),l=i.grammarState?tD(i.grammarState,n.name)??fT:i.grammarContextCode==null?fT:SD(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=ME(r[nw.getForeground(s)],a),l=nw.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(/,/).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?CD(t.scopes):wD(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function CD(e){return e.map(e=>({scopeName:e}))}function wD(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:DD(e,i,t.slice(0,r))}}return n}function TD(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function ED(e,t,n){if(!TD(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)TD(e[r],n[i])&&--r,--i;return r===-1}function DD(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(ED(e,t,n)){r.push(a);break}return r}function OD(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=yD(e,t,{...n,theme:r.theme});return{tokens:i,state:QE(i),theme:typeof r.theme==`string`?r.theme:r.theme.name}}),a=kD(...i.map(e=>e.tokens)),o=a[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(o.explanation=e.explanation),a.forEach((e,n)=>{let{content:a,explanation:s,offset:c,...l}=e[t][i];o.variants[r[n].color]=l}),o})),s=i[0].state?new $E(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return s&&ZE(o,s),o}function kD(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}function AD(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:t.color===l?1:0);if(f.length===0)throw new kC("`themes` option must not be empty");let p=OD(e,t,n);if(c=QE(p),l&&UE!==l&&!f.find(e=>e.color===l))throw new kC(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>qE(e,h,u,l,d))),c&&ZE(a,c);let g=f.map(e=>jE(e.theme,n));i=jD(f,m,g,u,l,`fg`,d),r=jD(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=jE(n.theme,n);a=yD(e,t,n);let l=e.getTheme(n.theme);r=ME(l.bg,s),i=ME(l.fg,s),o=l.name,c=QE(a)}else throw new kC("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function jD(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=ME(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===UE&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new kC('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${ME(t[r][a],n[r])||`inherit`}, ${ME(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}function MD(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>MD(e,t,n),codeToTokens:(t,n)=>AD(e,t,n)}){let i=t;for(let e of oD(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=AD(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=PD(a):d===`never`&&(a=FD(a)),f&&(a=ID(a));let p={...r,get source(){return i}};for(let e of oD(n))a=e.tokens?.call(p,a)||a;return ND(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function ND(e,t,n,r=QE(e)){let i=oD(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(t.rootStyle==null?l.style=`background-color:${t.bg};color:${t.fg}`:l.style=t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:zE,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
|
|
144
|
-
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=YE(a.htmlStyle||JE(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&ZE(m,r),m}function PD(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&XC.Underline||i.fontStyle&XC.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function FD(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function ID(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t[t.length-1],r=YE(e.htmlStyle||JE(e)),i=YE(n.htmlStyle||JE(n)),a=e.fontStyle&&(e.fontStyle&XC.Underline||e.fontStyle&XC.Strikethrough),o=n.fontStyle&&(n.fontStyle&XC.Underline||n.fontStyle&XC.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var LD=OE;function RD(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>MD(e,t,n),codeToTokens:(t,n)=>AD(e,t,n)},i=LD(MD(e,t,n,r));for(let e of oD(n))i=e.postprocess?.call(r,i,n)||i;return i}var zD={light:`#333333`,dark:`#bbbbbb`},BD={light:`#fffffe`,dark:`#1e1e1e`},VD=`__shiki_resolved`;function HD(e){if(e?.[VD])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?zD.light:zD.dark,n||=t.type===`light`?BD.light:BD.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,VD,{enumerable:!1,writable:!1,value:!0}),t}async function UD(e){return Array.from(new Set((await Promise.all(e.filter(e=>!IE(e)).map(async e=>await PE(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function WD(e){return(await Promise.all(e.map(async e=>RE(e)?null:HD(await PE(e))))).filter(e=>!!e)}var GD=3,KD=!1;function qD(e,t=3){if(GD&&!(typeof GD==`number`&&t>GD)){if(KD)throw Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}var JD=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function YD(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new JD(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var XD=class extends dT{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=HD(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=UC.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=YD(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new JD(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},ZD=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},QD=0;function $D(e){QD+=1,e.warnings!==!1&&QD>=10&&QD%10==0&&console.warn(`[Shiki] ${QD} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new JD("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(HD),i=new XD(new ZD(e.engine,n),r,n,e.langAlias),a;function o(t){return YD(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new JD(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new JD(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await UD(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await WD(e))}function g(){if(t)throw new JD(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--QD)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function eO(e){e.engine||qD("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([WD(e.themes||[]),UD(e.langs||[]),e.engine]);return $D({...e,themes:t,langs:n,engine:r})}async function tO(e){let t=await eO(e);return{getLastGrammarState:(...e)=>bD(t,...e),codeToTokensBase:(e,n)=>yD(t,e,n),codeToTokensWithThemes:(e,n)=>OD(t,e,n),codeToTokens:(e,n)=>AD(t,e,n),codeToHast:(e,n)=>MD(t,e,n),codeToHtml:(e,n)=>RD(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function nO(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,IE(n))return[];let r=t[n];if(!r)throw new kC(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(RE(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new kC(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await tO({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function rO(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}else{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function iO(e,t){let n=rO(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var aO=[{id:`abap`,name:`ABAP`,import:(()=>Z(()=>import(`./abap-smLpETzL.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>Z(()=>import(`./actionscript-3-o-aRvjY5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>Z(()=>import(`./ada-D5RRX1i4.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>Z(()=>import(`./angular-html-olSuI25H.js`).then(e=>e.n),__vite__mapDeps([2,1,3,4,5])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>Z(()=>import(`./angular-ts-BJPoZ_vo.js`),__vite__mapDeps([6,2,1,3,4,5,7])))},{id:`apache`,name:`Apache Conf`,import:(()=>Z(()=>import(`./apache-DttKlSqg.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>Z(()=>import(`./apex-DL7j-a2n.js`),[]))},{id:`apl`,name:`APL`,import:(()=>Z(()=>import(`./apl-CyVuPSCb.js`),__vite__mapDeps([8,4,1,3,5,9,10,11])))},{id:`applescript`,name:`AppleScript`,import:(()=>Z(()=>import(`./applescript-DCbL_2FX.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>Z(()=>import(`./ara-DqheWJCe.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>Z(()=>import(`./asciidoc-BH2sf2K4.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>Z(()=>import(`./asm-rfjOMz3U.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>Z(()=>import(`./astro-CKc3-gwH.js`),__vite__mapDeps([12,4,1,5,9,13,14,15])))},{id:`awk`,name:`AWK`,import:(()=>Z(()=>import(`./awk-CMV5n9Z7.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>Z(()=>import(`./ballerina-BjMqJjlr.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>Z(()=>import(`./bat-BaVbo_qw.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>Z(()=>import(`./beancount-DBt5Mbc_.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>Z(()=>import(`./berry-Cyjuxiss.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>Z(()=>import(`./bibtex-BV_0nsPq.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>Z(()=>import(`./bicep-C2gEwu4J.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>Z(()=>import(`./bird2-BRyaEJd0.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>Z(()=>import(`./blade-DMAsVBaV.js`),__vite__mapDeps([16,4,1,17,3,5,9,18,10,11])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>Z(()=>import(`./bsl-B1qbqNES.js`),__vite__mapDeps([19,20])))},{id:`c`,name:`C`,import:(()=>Z(()=>import(`./c-BvB8CVo8.js`).then(e=>e.n),__vite__mapDeps([21,1])))},{id:`c3`,name:`C3`,import:(()=>Z(()=>import(`./c3-DTTbp5N2.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>Z(()=>import(`./cadence-CPz83cmI.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>Z(()=>import(`./cairo-BDj8wWhy.js`),__vite__mapDeps([22,23])))},{id:`clarity`,name:`Clarity`,import:(()=>Z(()=>import(`./clarity-CFJ2Yc3q.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>Z(()=>import(`./clojure-6R01QgJC.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>Z(()=>import(`./cmake-D5rSbMir.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>Z(()=>import(`./cobol-hBjMZW-R.js`),__vite__mapDeps([24,3,1,4,5,11])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>Z(()=>import(`./codeowners-_3A-ClkN.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>Z(()=>import(`./codeql-DlIhJTR7.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>Z(()=>import(`./coffee-B4OtR3w-.js`),__vite__mapDeps([25,5,1])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>Z(()=>import(`./common-lisp-BvQzz173.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>Z(()=>import(`./coq-DTNXReIC.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>Z(()=>import(`./cpp-BblbpnyR.js`).then(e=>e.n),__vite__mapDeps([26,1,27,21,28,18])))},{id:`crystal`,name:`Crystal`,import:(()=>Z(()=>import(`./crystal-x3k4USY-.js`),__vite__mapDeps([29,21,1,4,3,5,30,18])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>Z(()=>import(`./csharp-BDKQY1K9.js`),[]))},{id:`css`,name:`CSS`,import:(()=>Z(()=>import(`./css-zY4NE9yA.js`).then(e=>e.n),__vite__mapDeps([4,1])))},{id:`csv`,name:`CSV`,import:(()=>Z(()=>import(`./csv-DNUpVBxl.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>Z(()=>import(`./cue-DDdBc2s3.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>Z(()=>import(`./cypher-CguaznO2.js`),[]))},{id:`d`,name:`D`,import:(()=>Z(()=>import(`./d-CHcoyjv3.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>Z(()=>import(`./dart-RM3aRphk.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>Z(()=>import(`./dax-nbnY1d79.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>Z(()=>import(`./desktop-BD76cvxT.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>Z(()=>import(`./diff-CdkWtnkL.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>Z(()=>import(`./docker-ZyPHc6zB.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>Z(()=>import(`./dotenv-BdJZEwA6.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>Z(()=>import(`./dream-maker-BJL4qlg3.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>Z(()=>import(`./edge-B-9TrlZC.js`),__vite__mapDeps([31,17,3,1,4,5,15])))},{id:`elixir`,name:`Elixir`,import:(()=>Z(()=>import(`./elixir-CXCzbj1r.js`),__vite__mapDeps([32,3,1,4,5])))},{id:`elm`,name:`Elm`,import:(()=>Z(()=>import(`./elm-BdRiwmde.js`),__vite__mapDeps([33,27,1,21])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>Z(()=>import(`./emacs-lisp-_LyYa2Ky.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>Z(()=>import(`./erb-C9tvRzx3.js`),__vite__mapDeps([34,3,1,4,5,35,21,26,27,28,18,36,37,14,15,38,39,30,10,11,40])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>Z(()=>import(`./erlang-Bc4hQuqa.js`),__vite__mapDeps([41,42])))},{id:`fennel`,name:`Fennel`,import:(()=>Z(()=>import(`./fennel-CC2BkRsS.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>Z(()=>import(`./fish-D2ZCzqcE.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>Z(()=>import(`./fluent-DKAm3m7q.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>Z(()=>import(`./fortran-fixed-form-B02FOYI-.js`),__vite__mapDeps([43,44])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>Z(()=>import(`./fortran-free-form-BPTf0lbT.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>Z(()=>import(`./fsharp-DhdR18vN.js`),__vite__mapDeps([45,42])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>Z(()=>import(`./gdresource-DgnrMPIx.js`),__vite__mapDeps([46,47,48])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>Z(()=>import(`./gdscript-CsadCSaZ.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>Z(()=>import(`./gdshader-PfnN_8tR.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>Z(()=>import(`./genie-Bj-orPAV.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>Z(()=>import(`./gherkin-COVWpJ-Q.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>Z(()=>import(`./git-commit-DGJi7qBD.js`),__vite__mapDeps([49,50])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>Z(()=>import(`./git-rebase-HwDSB2qJ.js`),__vite__mapDeps([51,30,1])))},{id:`gleam`,name:`Gleam`,import:(()=>Z(()=>import(`./gleam-BF2NigGj.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>Z(()=>import(`./glimmer-js-B6LF_BMd.js`),__vite__mapDeps([52,4,1,3,5,15])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>Z(()=>import(`./glimmer-ts-Cn42BUKe.js`),__vite__mapDeps([53,4,1,3,5,15])))},{id:`glsl`,name:`GLSL`,import:(()=>Z(()=>import(`./glsl-CEMf-THb.js`).then(e=>e.n),__vite__mapDeps([27,1,21])))},{id:`gn`,name:`GN`,import:(()=>Z(()=>import(`./gn-CMIt9roj.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>Z(()=>import(`./gnuplot-DgWlRTEj.js`),[]))},{id:`go`,name:`Go`,import:(()=>Z(()=>import(`./go-DLnOLj8q.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>Z(()=>import(`./graphql-dBCd2Czl.js`).then(e=>e.n),__vite__mapDeps([36,1,5,37,14,15])))},{id:`groovy`,name:`Groovy`,import:(()=>Z(()=>import(`./groovy-B9qLWIkE.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>Z(()=>import(`./hack-DDEqRjBe.js`),__vite__mapDeps([54,3,1,4,5,18])))},{id:`haml`,name:`Ruby Haml`,import:(()=>Z(()=>import(`./haml-Ck5pVAEG.js`).then(e=>e.n),__vite__mapDeps([38,1,4,5])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>Z(()=>import(`./handlebars-g9Qe0ao2.js`),__vite__mapDeps([55,4,1,3,5,40])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>Z(()=>import(`./haskell-BaGpmm_c.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>Z(()=>import(`./haxe-DfXTCEOz.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>Z(()=>import(`./hcl-CbCtpSbi.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>Z(()=>import(`./hjson-_4-w-pHU.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>Z(()=>import(`./hlsl-DpuYn7pp.js`),[]))},{id:`html`,name:`HTML`,import:(()=>Z(()=>import(`./html-CzX0w7K_.js`).then(e=>e.n),__vite__mapDeps([3,1,4,5])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>Z(()=>import(`./html-derivative-D-XvNBA6.js`),__vite__mapDeps([17,3,1,4,5])))},{id:`http`,name:`HTTP`,import:(()=>Z(()=>import(`./http-qlhghEti.js`),__vite__mapDeps([56,36,1,5,37,14,15,9,30,10,11])))},{id:`hurl`,name:`Hurl`,import:(()=>Z(()=>import(`./hurl-CHIKfBKk.js`),__vite__mapDeps([57,58,36,1,5,37,14,15,10,11])))},{id:`hxml`,name:`HXML`,import:(()=>Z(()=>import(`./hxml-adC65L_J.js`),__vite__mapDeps([59,60])))},{id:`hy`,name:`Hy`,import:(()=>Z(()=>import(`./hy-t9zDXBje.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>Z(()=>import(`./imba-Bxu-TDfw.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>Z(()=>import(`./ini-D-v34c8N.js`),[]))},{id:`java`,name:`Java`,import:(()=>Z(()=>import(`./java-BqKEu7zh.js`).then(e=>e.n),__vite__mapDeps([11,1])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>Z(()=>import(`./javascript-CzjRtS1s.js`).then(e=>e.n),__vite__mapDeps([5,1])))},{id:`jinja`,name:`Jinja`,import:(()=>Z(()=>import(`./jinja-BHZt0_Dn.js`),__vite__mapDeps([61,3,1,4,5])))},{id:`jison`,name:`Jison`,import:(()=>Z(()=>import(`./jison-TqJYWKkW.js`),__vite__mapDeps([62,5,1])))},{id:`json`,name:`JSON`,import:(()=>Z(()=>import(`./json-CdFmZMJc.js`).then(e=>e.n),__vite__mapDeps([9,1])))},{id:`json5`,name:`JSON5`,import:(()=>Z(()=>import(`./json5-D0XL1D5m.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>Z(()=>import(`./jsonc-BBgf3TX3.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>Z(()=>import(`./jsonl-KrKLbtB7.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>Z(()=>import(`./jsonnet-B2ZwWMOt.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>Z(()=>import(`./jssm-ByRpI9-B.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>Z(()=>import(`./jsx-BL6Wh6Qw.js`).then(e=>e.n),__vite__mapDeps([37,1])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>Z(()=>import(`./julia-CW07fy07.js`),__vite__mapDeps([63,26,1,27,21,28,18,5,23,64])))},{id:`just`,name:`Just`,import:(()=>Z(()=>import(`./just-DBcWo9WY.js`),__vite__mapDeps([65,5,1,66,4,3,18,10,11,23,35,21,26,27,28,36,37,14,15,38,39,30,40])))},{id:`kdl`,name:`KDL`,import:(()=>Z(()=>import(`./kdl-6FPPEH4H.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>Z(()=>import(`./kotlin-D4L3Nd2D.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>Z(()=>import(`./kusto-D-mmc07O.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>Z(()=>import(`./latex-D6lXiPTF.js`),__vite__mapDeps([67,68,64,1])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>Z(()=>import(`./lean-BMVMuP2E.js`),[]))},{id:`less`,name:`Less`,import:(()=>Z(()=>import(`./less-C95PyOu0.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>Z(()=>import(`./liquid-DhYYAQ41.js`),__vite__mapDeps([69,4,1,3,5,9])))},{id:`llvm`,name:`LLVM IR`,import:(()=>Z(()=>import(`./llvm-Dy3qORTl.js`),[]))},{id:`log`,name:`Log file`,import:(()=>Z(()=>import(`./log-BQop7fzg.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>Z(()=>import(`./logo-DKtnYmrp.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>Z(()=>import(`./lua-B4ezzssg.js`).then(e=>e.n),__vite__mapDeps([39,1,21])))},{id:`luau`,name:`Luau`,import:(()=>Z(()=>import(`./luau-Dha4KG0q.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>Z(()=>import(`./make-DfmS6buu.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>Z(()=>import(`./markdown-BaI9LyM4.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>Z(()=>import(`./marko-xtrIBdcL.js`),__vite__mapDeps([70,4,1,71,7,15])))},{id:`matlab`,name:`MATLAB`,import:(()=>Z(()=>import(`./matlab-BT79Cq_j.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>Z(()=>import(`./mdc-DyZVNnwP.js`),__vite__mapDeps([72,17,3,1,4,5,42,40])))},{id:`mdx`,name:`MDX`,import:(()=>Z(()=>import(`./mdx-CxGBwLNt.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>Z(()=>import(`./mermaid-DLf3axBN.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>Z(()=>import(`./mipsasm-DXuU_0cI.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>Z(()=>import(`./mojo-1Omp2pIo.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>Z(()=>import(`./moonbit-DZzq699o.js`),[]))},{id:`move`,name:`Move`,import:(()=>Z(()=>import(`./move-DxDAOJVd.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>Z(()=>import(`./narrat-CxDcPPb9.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>Z(()=>import(`./nextflow-JEyYUlIq.js`),__vite__mapDeps([73,74])))},{id:`nextflow-groovy`,name:`nextflow-groovy`,import:(()=>Z(()=>import(`./nextflow-groovy-wvmJO4hi.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>Z(()=>import(`./nginx-CGgm1VOJ.js`),__vite__mapDeps([75,39,1,21])))},{id:`nim`,name:`Nim`,import:(()=>Z(()=>import(`./nim-Br7S817Z.js`),__vite__mapDeps([76,21,1,4,27,3,5,42,10,11])))},{id:`nix`,name:`Nix`,import:(()=>Z(()=>import(`./nix-DsFTDHWT.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>Z(()=>import(`./nushell-BQ_rO0AM.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>Z(()=>import(`./objective-c-BMq6JT_m.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>Z(()=>import(`./objective-cpp-DRwojuGv.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>Z(()=>import(`./ocaml-e4_gKO6E.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>Z(()=>import(`./odin-mdTPwYOg.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>Z(()=>import(`./openscad-D2aTdNfr.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>Z(()=>import(`./pascal-D4n_G8vj.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>Z(()=>import(`./perl-DqDX-7VG.js`),__vite__mapDeps([66,4,1,3,5,18,10,11])))},{id:`php`,name:`PHP`,import:(()=>Z(()=>import(`./php-DYSqNNGJ.js`),__vite__mapDeps([77,4,1,3,5,9,18,10,11])))},{id:`pkl`,name:`Pkl`,import:(()=>Z(()=>import(`./pkl-DcjhAp0L.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>Z(()=>import(`./plsql-BSy3Ag0J.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>Z(()=>import(`./po-Be96RYkA.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>Z(()=>import(`./polar-BmhMKWum.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>Z(()=>import(`./postcss-BTQso3H9.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>Z(()=>import(`./powerquery-DVyQv3M2.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>Z(()=>import(`./powershell-BmtCGJVD.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>Z(()=>import(`./prisma-CCFA9rEj.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>Z(()=>import(`./prolog-DWGEEo78.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>Z(()=>import(`./proto-C3eop1kM.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>Z(()=>import(`./pug-Bob3gNio.js`),__vite__mapDeps([78,4,1,3,5])))},{id:`puppet`,name:`Puppet`,import:(()=>Z(()=>import(`./puppet-C0_7Nv5A.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>Z(()=>import(`./purescript-Bv-B8yRw.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>Z(()=>import(`./python-CKg5r0C3.js`),[]))},{id:`qml`,name:`QML`,import:(()=>Z(()=>import(`./qml-CsMafcqN.js`),__vite__mapDeps([79,5,1])))},{id:`qmldir`,name:`QML Directory`,import:(()=>Z(()=>import(`./qmldir-Cqfb4Lox.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>Z(()=>import(`./qss-Csho9BH8.js`),[]))},{id:`r`,name:`R`,import:(()=>Z(()=>import(`./r-CGji9_vM.js`).then(e=>e.n),__vite__mapDeps([64,1])))},{id:`racket`,name:`Racket`,import:(()=>Z(()=>import(`./racket-D8-uWeQH.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>Z(()=>import(`./raku-Cj4JSa8p.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>Z(()=>import(`./razor-B4PzhaZX.js`),__vite__mapDeps([80,81,3,1,4,5])))},{id:`reg`,name:`Windows Registry Script`,import:(()=>Z(()=>import(`./reg-DXGFiJSl.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>Z(()=>import(`./regexp-CvWG4lI-.js`).then(e=>e.n),__vite__mapDeps([28,1])))},{id:`rel`,name:`Rel`,import:(()=>Z(()=>import(`./rel-CunnVTBK.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>Z(()=>import(`./riscv-C8BcOCkS.js`),[]))},{id:`ron`,name:`RON`,import:(()=>Z(()=>import(`./ron-DiDyR9oa.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>Z(()=>import(`./rosmsg-CHmL1Uyj.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>Z(()=>import(`./rst-BXuz-2b8.js`),__vite__mapDeps([82,83,26,1,27,21,28,18,17,3,4,5,23,35,36,37,14,15,38,39,30,10,11,40])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>Z(()=>import(`./ruby-CXP5_4kq.js`),__vite__mapDeps([35,21,1,26,27,28,18,4,36,5,37,14,15,38,3,39,30,10,11,40])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>Z(()=>import(`./rust-DjJFInu3.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>Z(()=>import(`./sas-Cov9PzAD.js`),__vite__mapDeps([84,18,1])))},{id:`sass`,name:`Sass`,import:(()=>Z(()=>import(`./sass-D3xZ5o-v.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>Z(()=>import(`./scala-B0IRml5w.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>Z(()=>import(`./scheme-BhwcV3Av.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>Z(()=>import(`./scss-Efq7Dmbs.js`).then(e=>e.n),__vite__mapDeps([7,1,4])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>Z(()=>import(`./sdbl-BmWYR-pI.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>Z(()=>import(`./shaderlab-DZ3Lsiak.js`),__vite__mapDeps([85,86])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>Z(()=>import(`./shellscript-BbEstezf.js`).then(e=>e.n),__vite__mapDeps([30,1])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>Z(()=>import(`./shellsession-BHLVblBB.js`),__vite__mapDeps([87,30,1])))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>Z(()=>import(`./smalltalk-DVQuUMII.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>Z(()=>import(`./solidity-gQ4WXILB.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>Z(()=>import(`./soy-e0u3-wIA.js`),__vite__mapDeps([88,3,1,4,5])))},{id:`sparql`,name:`SPARQL`,import:(()=>Z(()=>import(`./sparql-B9c85a_o.js`),__vite__mapDeps([89,90])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>Z(()=>import(`./splunk-OB48_RcD.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>Z(()=>import(`./sql-CB6kO6Km.js`).then(e=>e.n),__vite__mapDeps([18,1])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>Z(()=>import(`./ssh-config-DA9YMRGV.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>Z(()=>import(`./stata-B1mLEMrz.js`),__vite__mapDeps([91,18,1])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>Z(()=>import(`./stylus-sKwvsUaC.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>Z(()=>import(`./surrealql-BTKo2XFY.js`),__vite__mapDeps([92,5,1])))},{id:`svelte`,name:`Svelte`,import:(()=>Z(()=>import(`./svelte-B7URZ-wm.js`),__vite__mapDeps([93,4,1,5,13,15])))},{id:`swift`,name:`Swift`,import:(()=>Z(()=>import(`./swift-C72NbAtg.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>Z(()=>import(`./system-verilog-CnWMF7Nq.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>Z(()=>import(`./systemd-DMzItW5N.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>Z(()=>import(`./talonscript-DopQCWDL.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>Z(()=>import(`./tasl-C28SYKbq.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>Z(()=>import(`./tcl-DHq7zmoF.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>Z(()=>import(`./templ-DVRYIgGq.js`),__vite__mapDeps([94,4,1,95,5])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>Z(()=>import(`./terraform-CogS1YKX.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>Z(()=>import(`./tex-CdJ24HJj.js`),__vite__mapDeps([68,64,1])))},{id:`toml`,name:`TOML`,import:(()=>Z(()=>import(`./toml-BH_iPsgK.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>Z(()=>import(`./ts-tags-CCSbelDn.js`),__vite__mapDeps([96,4,1,27,21,3,5,18,15,10,11])))},{id:`tsv`,name:`TSV`,import:(()=>Z(()=>import(`./tsv-BIkdBZX1.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>Z(()=>import(`./tsx-DrzBggF8.js`).then(e=>e.n),__vite__mapDeps([14,1])))},{id:`turtle`,name:`Turtle`,import:(()=>Z(()=>import(`./turtle-CqNXyJWZ.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>Z(()=>import(`./twig-Dn4ruiVl.js`),__vite__mapDeps([97,4,1,5,77,3,9,18,10,11,23,35,21,26,27,28,36,37,14,15,38,39,30,40,7])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>Z(()=>import(`./typescript-COZIw7xM.js`).then(e=>e.n),__vite__mapDeps([15,1])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>Z(()=>import(`./typespec-CQ9LYD_e.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>Z(()=>import(`./typst-T-Fsk-Sv.js`),[]))},{id:`v`,name:`V`,import:(()=>Z(()=>import(`./v-BhMEOw9x.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>Z(()=>import(`./vala-DzajMnwt.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>Z(()=>import(`./vb-7Xr8dEYW.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>Z(()=>import(`./verilog-AvXtwZir.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>Z(()=>import(`./vhdl-BHu0zg1P.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>Z(()=>import(`./viml-Di0QpLfC.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>Z(()=>import(`./vue-D19cWHwY.js`),__vite__mapDeps([98,4,1,17,3,5,9,15])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>Z(()=>import(`./vue-html-_j-KC7Cs.js`),__vite__mapDeps([99,5,1])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>Z(()=>import(`./vue-vine-BC03MN6c.js`),__vite__mapDeps([100,4,1,5,71,13,7,101])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>Z(()=>import(`./vyper-C3R5yXgx.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>Z(()=>import(`./wasm-Chsuwt1A.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>Z(()=>import(`./wenyan-BonVcr2i.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>Z(()=>import(`./wgsl-D59WYmNq.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>Z(()=>import(`./wikitext-ariTI2Wk.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>Z(()=>import(`./wit-EA4fa3Dt.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>Z(()=>import(`./wolfram-DDp7LhyU.js`),[]))},{id:`xml`,name:`XML`,import:(()=>Z(()=>import(`./xml-BlDEvPia.js`).then(e=>e.n),__vite__mapDeps([10,1,11])))},{id:`xsl`,name:`XSL`,import:(()=>Z(()=>import(`./xsl-DR-zOeBm.js`),__vite__mapDeps([102,10,1,11])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>Z(()=>import(`./yaml-iUXljnLs.js`).then(e=>e.n),__vite__mapDeps([40,1])))},{id:`zenscript`,name:`ZenScript`,import:(()=>Z(()=>import(`./zenscript-4WaROUyc.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>Z(()=>import(`./zig-CJoLJGwV.js`),[]))}],oO=Object.fromEntries(aO.map(e=>[e.id,e.import])),sO=Object.fromEntries(aO.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),cO={...oO,...sO},lO=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>Z(()=>import(`./andromeeda-N4z3YzmR.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>Z(()=>import(`./aurora-x-CND-FqEb.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>Z(()=>import(`./ayu-dark-on7xzq_B.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>Z(()=>import(`./ayu-light-DnGeGGc2.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>Z(()=>import(`./ayu-mirage-DG3LlYC_.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>Z(()=>import(`./catppuccin-frappe-Dr22sraq.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>Z(()=>import(`./catppuccin-latte-C57EeX8c.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>Z(()=>import(`./catppuccin-macchiato-CpheI4uD.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>Z(()=>import(`./catppuccin-mocha-D8Lmdks_.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>Z(()=>import(`./dark-plus-CqeW_0kH.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>Z(()=>import(`./dracula-CtqCPLGa.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>Z(()=>import(`./dracula-soft-DmBpwRAy.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>Z(()=>import(`./everforest-dark-CrbyKk4n.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>Z(()=>import(`./everforest-light-DRbSh8Tm.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>Z(()=>import(`./github-dark-ipGuFGYC.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>Z(()=>import(`./github-dark-default-DX3IG_X0.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>Z(()=>import(`./github-dark-dimmed-CH6p_7ez.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>Z(()=>import(`./github-dark-high-contrast-Bg2sSao5.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>Z(()=>import(`./github-light-BxjqOQl0.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>Z(()=>import(`./github-light-default-DwpDd1IQ.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>Z(()=>import(`./github-light-high-contrast-C0QeixPf.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>Z(()=>import(`./gruvbox-dark-hard-BIMX9ePb.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>Z(()=>import(`./gruvbox-dark-medium-DxuwyVzM.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>Z(()=>import(`./gruvbox-dark-soft-ba2fjht0.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>Z(()=>import(`./gruvbox-light-hard-DAJK2PqC.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>Z(()=>import(`./gruvbox-light-medium-WRifDAJD.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>Z(()=>import(`./gruvbox-light-soft-B0dBOoVB.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>Z(()=>import(`./horizon-C5RtD1fY.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`dark`,import:(()=>Z(()=>import(`./horizon-bright-pEOice34.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>Z(()=>import(`./houston-A0zg9vNP.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>Z(()=>import(`./kanagawa-dragon-CtPmcCMp.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>Z(()=>import(`./kanagawa-lotus-DpOXEGCa.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>Z(()=>import(`./kanagawa-wave-CLVCyc-n.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>Z(()=>import(`./laserwave-7fEj4XGb.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>Z(()=>import(`./light-plus-DHI2dh3p.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>Z(()=>import(`./material-theme-Dm6ETY8i.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>Z(()=>import(`./material-theme-darker-BeyjmM5Z.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>Z(()=>import(`./material-theme-lighter-CCOYYzKL.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>Z(()=>import(`./material-theme-ocean-CUtPiiX3.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>Z(()=>import(`./material-theme-palenight-2L4zMwIM.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>Z(()=>import(`./min-dark-B8TUPGHg.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>Z(()=>import(`./min-light-BDOoBxcA.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>Z(()=>import(`./monokai-E_VBmXGZ.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>Z(()=>import(`./night-owl-DefhalNX.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>Z(()=>import(`./night-owl-light-byb3AbEn.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>Z(()=>import(`./nord-D5rQzHT-.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>Z(()=>import(`./one-dark-pro-DxXww9jg.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>Z(()=>import(`./one-light-D9c03w7t.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>Z(()=>import(`./plastic-uOsw7z1x.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>Z(()=>import(`./poimandres-CyO4HORD.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>Z(()=>import(`./red-z4H4llUY.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>Z(()=>import(`./rose-pine-BADquuIH.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>Z(()=>import(`./rose-pine-dawn-BLcEeBoh.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>Z(()=>import(`./rose-pine-moon-BK_tLY1Y.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>Z(()=>import(`./slack-dark-DOnVms5P.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>Z(()=>import(`./slack-ochin-DcRTft4q.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>Z(()=>import(`./snazzy-light-x9CLJ1W9.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>Z(()=>import(`./solarized-dark-BB1sh-pe.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>Z(()=>import(`./solarized-light-9-RPS998.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>Z(()=>import(`./synthwave-84-eJ9uRN_S.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>Z(()=>import(`./tokyo-night-B9N7LyrF.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>Z(()=>import(`./vesper-CtgQQ2sf.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>Z(()=>import(`./vitesse-black-jXdfyqgD.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>Z(()=>import(`./vitesse-dark-B88PxG1r.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>Z(()=>import(`./vitesse-light-BXxZh2iV.js`),[]))}].map(e=>[e.id,e.import])),uO=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function dO(){return 2147483648}function fO(){return typeof performance<`u`?performance.now():Date.now()}var pO=(e,t)=>e+(t-e%t)%t;async function mO(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=dO();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,pO(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:fO,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var hO=Object.defineProperty,gO=(e,t,n)=>t in e?hO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_O=(e,t,n)=>gO(e,typeof t==`symbol`?t:t+``,n),vO=null;function yO(e){throw new uO(e.UTF8ToString(e.getLastOnigError()))}var bO=class e{constructor(t){_O(this,`utf16Length`),_O(this,`utf8Length`),_O(this,`utf16Value`),_O(this,`utf8Value`),_O(this,`utf16OffsetToUtf8`),_O(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},xO=class e{constructor(t){if(_O(this,`id`,++e.LAST_ID),_O(this,`_onigBinding`),_O(this,`content`),_O(this,`utf16Length`),_O(this,`utf8Length`),_O(this,`utf16OffsetToUtf8`),_O(this,`utf8OffsetToUtf16`),_O(this,`ptr`),!vO)throw new uO(`Must invoke loadWasm first.`);this._onigBinding=vO,this.content=t;let n=new bO(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=vO.omalloc(1e4),e._sharedPtrInUse=!0,vO.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(vO)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};_O(xO,`LAST_ID`,0),_O(xO,`_sharedPtr`,0),_O(xO,`_sharedPtrInUse`,!1);var SO=xO,CO=class{constructor(e){if(_O(this,`_onigBinding`),_O(this,`_ptr`),!vO)throw new uO(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new bO(e[r]);t[r]=i.createString(vO),n[r]=i.utf8Length}let r=vO.omalloc(4*e.length);vO.HEAPU32.set(t,r/4);let i=vO.omalloc(4*e.length);vO.HEAPU32.set(n,i/4);let a=vO.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)vO.ofree(t[n]);vO.ofree(i),vO.ofree(r),a===0&&yO(vO),this._onigBinding=vO,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new SO(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function wO(e){return typeof e.instantiator==`function`}function TO(e){return typeof e.default==`function`}function EO(e){return e.data!==void 0}function DO(e){return typeof Response<`u`&&e instanceof Response}function OO(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var kO;function AO(e){if(kO)return kO;async function t(){vO=await mO(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),wO(n)?n=await n.instantiator(t):TO(n)?n=await n.default(t):(EO(n)&&(n=n.data),DO(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await MO(n)(t):await NO(n)(t):OO(n)||n instanceof WebAssembly.Module?n=await jO(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await jO(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return kO=t(),kO}function jO(e){return t=>WebAssembly.instantiate(e,t)}function MO(e){return t=>WebAssembly.instantiateStreaming(e,t)}function NO(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function PO(e){return e&&await AO(e),{createScanner(e){return new CO(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new SO(e)}}}var FO=nO({langs:cO,themes:lO,engine:()=>PO(Z(()=>import(`./wasm-CEUrWlVz.js`),[]))}),{codeToHtml:IO,codeToHast:LO,codeToTokens:RO,codeToTokensBase:zO,codeToTokensWithThemes:BO,getSingletonHighlighter:VO,getLastGrammarState:HO}=iO(FO,{guessEmbeddedLanguages:HE});function UO(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function WO(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var GO=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),KO=String.raw;function qO(e,t){if(e==null)throw Error(t??`Value expected`);return e}var JO=KO`\[\^?`,YO=`c.? | C(?:-.?)?|${KO`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${KO`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${KO`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${KO`o\{[^\}]*\}?`}|${KO`\d{1,3}`}`,XO=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,ZO=new RegExp(KO`
|
|
143
|
+
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function vE(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=Wt);let l=yE(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!dE(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!YT(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function yE(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=bE(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function bE(e,t,n){let r=Bt(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=e.settings.allowDangerousCharacters?0:1,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=LT(r.attribute,Object.assign({},e.settings.characterReferences,{subset:_E.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Kt:Xt)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=LT(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:_E.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&Ms(n,o)>Ms(n,e.alternative)&&(o=e.alternative),s=o+LT(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?_E.single:_E.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var xE=[`<`,`&`];function SE(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:LT(e.value,Object.assign({},r.settings.characterReferences,{subset:xE}))}function CE(e,t,n,r){return r.settings.allowDangerousHtml?e.value:SE(e,t,n,r)}function wE(e,t,n,r){return r.all(e)}var TE=Sn(`type`,{invalid:EE,unknown:DE,handlers:{comment:VT,doctype:HT,element:vE,raw:CE,root:wE,text:SE}});function EE(e){throw Error("Expected node, not `"+e+"`")}function DE(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var OE={},kE={},AE=[];function jE(e,t){let n=t||OE,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:ME,all:NE,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||In,characterReferences:n.characterReferences||kE,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?Wt:Ut,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function ME(e,t,n){return TE(e,t,n,this)}function NE(e){let t=[],n=e&&e.children||AE,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function PE(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function FE(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function IE(e){return Array.isArray(e)?e:[e]}async function LE(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function RE(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function zE(e){return e===`ansi`||RE(e)}function BE(e){return e===`none`}function VE(e){return BE(e)}function HE(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(/\s+/g);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function UE(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}function WE(e){let t=UE(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function GE(e,t,n){let r=new Set;for(let t of e.matchAll(/:?lang=["']([^"']+)["']/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/(?:```|~~~)([\w-]+)/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/\\begin\{([\w-]+)\}/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return Array.from(r);let i=n.getBundledLanguages();return Array.from(r).filter(e=>e&&i[e])}var KE=`light-dark()`,qE=[`color`,`background-color`];function JE(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function YE(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?JE(e,t):e})):e}function XE(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>ZE(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&qE.includes(a))if(r===KE&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new MC('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s;else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function ZE(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&$C.Italic&&(t[`font-style`]=`italic`),e.fontStyle&$C.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&$C.Underline&&n.push(`underline`),e.fontStyle&$C.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function QE(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}var $E=new WeakMap;function eD(e,t){$E.set(e,t)}function tD(e){return $E.get(e)}var nD=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(IE(n).map(e=>[e,hT])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return rD(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function rD(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function iD(e,t){if(!(e instanceof nD))throw new MC(`Invalid grammar state`);return e.getInternalStack(t)}function aD(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new MC(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}else{let t=r.lines[e.line];if(t===void 0)throw new MC(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new MC(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}},r=WE(t.source),i=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));oD(i),e.set(t.meta,{decorations:i,converter:r,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return YE(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new MC(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=sD(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new MC(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new MC(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&HE(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function oD(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new MC(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new MC(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function sD(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(sD).join(``):``}var cD=[aD()];function lD(e){let t=uD(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...cD]}function uD(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var dD=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],fD={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function pD(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function mD(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}else if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function hD(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:`resetAll`});else if(r<=9)fD[r]&&t.push({type:`setDecoration`,value:fD[r]});else if(r<=29){let e=fD[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:dD[r-30]}});else if(r===38){let n=mD(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:dD[r-40]}});else if(r===48){let n=mD(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:dD[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:dD[r-100+8]}})}return t}function gD(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=pD(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=hD(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var _D={black:`#000000`,red:`#bb0000`,green:`#00bb00`,yellow:`#bbbb00`,blue:`#0000bb`,magenta:`#ff00ff`,cyan:`#00bbbb`,white:`#eeeeee`,brightBlack:`#555555`,brightRed:`#ff5555`,brightGreen:`#00ff00`,brightYellow:`#ffff55`,brightBlue:`#5555ff`,brightMagenta:`#ff55ff`,brightCyan:`#55ffff`,brightWhite:`#ffffff`};function vD(e=_D){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<dD.length;e++)r.push(t(dD[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var yD={black:`#000000`,red:`#cd3131`,green:`#0DBC79`,yellow:`#E5E510`,blue:`#2472C8`,magenta:`#BC3FBC`,cyan:`#11A8CD`,white:`#E5E5E5`,brightBlack:`#666666`,brightRed:`#F14C4C`,brightGreen:`#23D18B`,brightYellow:`#F5F543`,brightBlue:`#3B8EEA`,brightMagenta:`#D670D6`,brightCyan:`#29B8DB`,brightWhite:`#FFFFFF`};function bD(e,t,n){let r=PE(e,n),i=UE(t),a=vD(Object.fromEntries(dD.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||yD[t]]}))),o=gD();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=FE(i,r),o=FE(o,r),n.decorations.has(`dim`)&&(i=xD(i));let s=$C.None;return n.decorations.has(`bold`)&&(s|=$C.Bold),n.decorations.has(`italic`)&&(s|=$C.Italic),n.decorations.has(`underline`)&&(s|=$C.Underline),n.decorations.has(`strikethrough`)&&(s|=$C.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function xD(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}else if(e.length===6)return`#${e}80`;else if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}else if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function SD(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||`text`);if(RE(i)||BE(r))return UE(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:a,colorMap:o}=e.setTheme(r);if(i===`ansi`)return bD(a,t,n);let s=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==s.name)throw new MC(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(a.name))throw new MC(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return wD(t,s,a,o,n)}function CD(...e){if(e.length===2)return tD(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(RE(i)||BE(a))throw new MC(`Plain language does not have grammar state`);if(i===`ansi`)throw new MC(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new nD(TD(n,c,o,s,r).stateStack,c.name,o.name)}function wD(e,t,n,r,i){let a=TD(e,t,n,r,i),o=new nD(a.stateStack,t.name,n.name);return eD(a.tokens,o),a.tokens}function TD(e,t,n,r,i){let a=PE(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=UE(e),l=i.grammarState?iD(i.grammarState,n.name)??hT:i.grammarContextCode==null?hT:TD(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=FE(r[aw.getForeground(s)],a),l=aw.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(/,/).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?ED(t.scopes):DD(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function ED(e){return e.map(e=>({scopeName:e}))}function DD(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:AD(e,i,t.slice(0,r))}}return n}function OD(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function kD(e,t,n){if(!OD(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)OD(e[r],n[i])&&--r,--i;return r===-1}function AD(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(kD(e,t,n)){r.push(a);break}return r}function jD(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=SD(e,t,{...n,theme:r.theme});return{tokens:i,state:tD(i),theme:typeof r.theme==`string`?r.theme:r.theme.name}}),a=MD(...i.map(e=>e.tokens)),o=a[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(o.explanation=e.explanation),a.forEach((e,n)=>{let{content:a,explanation:s,offset:c,...l}=e[t][i];o.variants[r[n].color]=l}),o})),s=i[0].state?new nD(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return s&&eD(o,s),o}function MD(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}function ND(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:t.color===l?1:0);if(f.length===0)throw new MC("`themes` option must not be empty");let p=jD(e,t,n);if(c=tD(p),l&&KE!==l&&!f.find(e=>e.color===l))throw new MC(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>XE(e,h,u,l,d))),c&&eD(a,c);let g=f.map(e=>PE(e.theme,n));i=PD(f,m,g,u,l,`fg`,d),r=PD(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=PE(n.theme,n);a=SD(e,t,n);let l=e.getTheme(n.theme);r=FE(l.bg,s),i=FE(l.fg,s),o=l.name,c=tD(a)}else throw new MC("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function PD(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=FE(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===KE&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new MC('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${FE(t[r][a],n[r])||`inherit`}, ${FE(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}function FD(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>FD(e,t,n),codeToTokens:(t,n)=>ND(e,t,n)}){let i=t;for(let e of lD(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=ND(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=LD(a):d===`never`&&(a=RD(a)),f&&(a=zD(a));let p={...r,get source(){return i}};for(let e of lD(n))a=e.tokens?.call(p,a)||a;return ID(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function ID(e,t,n,r=tD(e)){let i=lD(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(t.rootStyle==null?l.style=`background-color:${t.bg};color:${t.fg}`:l.style=t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:HE,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
|
|
144
|
+
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=QE(a.htmlStyle||ZE(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&eD(m,r),m}function LD(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&$C.Underline||i.fontStyle&$C.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function RD(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function zD(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t[t.length-1],r=QE(e.htmlStyle||ZE(e)),i=QE(n.htmlStyle||ZE(n)),a=e.fontStyle&&(e.fontStyle&$C.Underline||e.fontStyle&$C.Strikethrough),o=n.fontStyle&&(n.fontStyle&$C.Underline||n.fontStyle&$C.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var BD=jE;function VD(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>FD(e,t,n),codeToTokens:(t,n)=>ND(e,t,n)},i=BD(FD(e,t,n,r));for(let e of lD(n))i=e.postprocess?.call(r,i,n)||i;return i}var HD={light:`#333333`,dark:`#bbbbbb`},UD={light:`#fffffe`,dark:`#1e1e1e`},WD=`__shiki_resolved`;function GD(e){if(e?.[WD])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?HD.light:HD.dark,n||=t.type===`light`?UD.light:UD.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,WD,{enumerable:!1,writable:!1,value:!0}),t}async function KD(e){return Array.from(new Set((await Promise.all(e.filter(e=>!zE(e)).map(async e=>await LE(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function qD(e){return(await Promise.all(e.map(async e=>VE(e)?null:GD(await LE(e))))).filter(e=>!!e)}var JD=3,YD=!1;function XD(e,t=3){if(JD&&!(typeof JD==`number`&&t>JD)){if(YD)throw Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}var ZD=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function QD(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new ZD(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var $D=class extends mT{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=GD(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=KC.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=QD(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new ZD(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},eO=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},tO=0;function nO(e){tO+=1,e.warnings!==!1&&tO>=10&&tO%10==0&&console.warn(`[Shiki] ${tO} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new ZD("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(GD),i=new $D(new eO(e.engine,n),r,n,e.langAlias),a;function o(t){return QD(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new ZD(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new ZD(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await KD(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await qD(e))}function g(){if(t)throw new ZD(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--tO)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function rO(e){e.engine||XD("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([qD(e.themes||[]),KD(e.langs||[]),e.engine]);return nO({...e,themes:t,langs:n,engine:r})}async function iO(e){let t=await rO(e);return{getLastGrammarState:(...e)=>CD(t,...e),codeToTokensBase:(e,n)=>SD(t,e,n),codeToTokensWithThemes:(e,n)=>jD(t,e,n),codeToTokens:(e,n)=>ND(t,e,n),codeToHast:(e,n)=>FD(t,e,n),codeToHtml:(e,n)=>VD(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function aO(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,zE(n))return[];let r=t[n];if(!r)throw new MC(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(VE(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new MC(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await iO({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function oO(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}else{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function sO(e,t){let n=oO(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var cO=[{id:`abap`,name:`ABAP`,import:(()=>Z(()=>import(`./abap-smLpETzL.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>Z(()=>import(`./actionscript-3-o-aRvjY5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>Z(()=>import(`./ada-D5RRX1i4.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>Z(()=>import(`./angular-html-olSuI25H.js`).then(e=>e.n),__vite__mapDeps([2,1,3,4,5])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>Z(()=>import(`./angular-ts-BJPoZ_vo.js`),__vite__mapDeps([6,2,1,3,4,5,7])))},{id:`apache`,name:`Apache Conf`,import:(()=>Z(()=>import(`./apache-DttKlSqg.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>Z(()=>import(`./apex-DL7j-a2n.js`),[]))},{id:`apl`,name:`APL`,import:(()=>Z(()=>import(`./apl-CyVuPSCb.js`),__vite__mapDeps([8,4,1,3,5,9,10,11])))},{id:`applescript`,name:`AppleScript`,import:(()=>Z(()=>import(`./applescript-DCbL_2FX.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>Z(()=>import(`./ara-DqheWJCe.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>Z(()=>import(`./asciidoc-BH2sf2K4.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>Z(()=>import(`./asm-rfjOMz3U.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>Z(()=>import(`./astro-CKc3-gwH.js`),__vite__mapDeps([12,4,1,5,9,13,14,15])))},{id:`awk`,name:`AWK`,import:(()=>Z(()=>import(`./awk-CMV5n9Z7.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>Z(()=>import(`./ballerina-BjMqJjlr.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>Z(()=>import(`./bat-BaVbo_qw.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>Z(()=>import(`./beancount-DBt5Mbc_.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>Z(()=>import(`./berry-Cyjuxiss.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>Z(()=>import(`./bibtex-BV_0nsPq.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>Z(()=>import(`./bicep-C2gEwu4J.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>Z(()=>import(`./bird2-BRyaEJd0.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>Z(()=>import(`./blade-DMAsVBaV.js`),__vite__mapDeps([16,4,1,17,3,5,9,18,10,11])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>Z(()=>import(`./bsl-B1qbqNES.js`),__vite__mapDeps([19,20])))},{id:`c`,name:`C`,import:(()=>Z(()=>import(`./c-BvB8CVo8.js`).then(e=>e.n),__vite__mapDeps([21,1])))},{id:`c3`,name:`C3`,import:(()=>Z(()=>import(`./c3-DTTbp5N2.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>Z(()=>import(`./cadence-CPz83cmI.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>Z(()=>import(`./cairo-BDj8wWhy.js`),__vite__mapDeps([22,23])))},{id:`clarity`,name:`Clarity`,import:(()=>Z(()=>import(`./clarity-CFJ2Yc3q.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>Z(()=>import(`./clojure-6R01QgJC.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>Z(()=>import(`./cmake-D5rSbMir.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>Z(()=>import(`./cobol-hBjMZW-R.js`),__vite__mapDeps([24,3,1,4,5,11])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>Z(()=>import(`./codeowners-_3A-ClkN.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>Z(()=>import(`./codeql-DlIhJTR7.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>Z(()=>import(`./coffee-B4OtR3w-.js`),__vite__mapDeps([25,5,1])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>Z(()=>import(`./common-lisp-BvQzz173.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>Z(()=>import(`./coq-DTNXReIC.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>Z(()=>import(`./cpp-BblbpnyR.js`).then(e=>e.n),__vite__mapDeps([26,1,27,21,28,18])))},{id:`crystal`,name:`Crystal`,import:(()=>Z(()=>import(`./crystal-x3k4USY-.js`),__vite__mapDeps([29,21,1,4,3,5,30,18])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>Z(()=>import(`./csharp-BDKQY1K9.js`),[]))},{id:`css`,name:`CSS`,import:(()=>Z(()=>import(`./css-zY4NE9yA.js`).then(e=>e.n),__vite__mapDeps([4,1])))},{id:`csv`,name:`CSV`,import:(()=>Z(()=>import(`./csv-DNUpVBxl.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>Z(()=>import(`./cue-DDdBc2s3.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>Z(()=>import(`./cypher-CguaznO2.js`),[]))},{id:`d`,name:`D`,import:(()=>Z(()=>import(`./d-CHcoyjv3.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>Z(()=>import(`./dart-RM3aRphk.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>Z(()=>import(`./dax-nbnY1d79.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>Z(()=>import(`./desktop-BD76cvxT.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>Z(()=>import(`./diff-CdkWtnkL.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>Z(()=>import(`./docker-ZyPHc6zB.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>Z(()=>import(`./dotenv-BdJZEwA6.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>Z(()=>import(`./dream-maker-BJL4qlg3.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>Z(()=>import(`./edge-B-9TrlZC.js`),__vite__mapDeps([31,17,3,1,4,5,15])))},{id:`elixir`,name:`Elixir`,import:(()=>Z(()=>import(`./elixir-CXCzbj1r.js`),__vite__mapDeps([32,3,1,4,5])))},{id:`elm`,name:`Elm`,import:(()=>Z(()=>import(`./elm-BdRiwmde.js`),__vite__mapDeps([33,27,1,21])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>Z(()=>import(`./emacs-lisp-_LyYa2Ky.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>Z(()=>import(`./erb-C9tvRzx3.js`),__vite__mapDeps([34,3,1,4,5,35,21,26,27,28,18,36,37,14,15,38,39,30,10,11,40])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>Z(()=>import(`./erlang-Bc4hQuqa.js`),__vite__mapDeps([41,42])))},{id:`fennel`,name:`Fennel`,import:(()=>Z(()=>import(`./fennel-CC2BkRsS.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>Z(()=>import(`./fish-D2ZCzqcE.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>Z(()=>import(`./fluent-DKAm3m7q.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>Z(()=>import(`./fortran-fixed-form-B02FOYI-.js`),__vite__mapDeps([43,44])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>Z(()=>import(`./fortran-free-form-BPTf0lbT.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>Z(()=>import(`./fsharp-DhdR18vN.js`),__vite__mapDeps([45,42])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>Z(()=>import(`./gdresource-DgnrMPIx.js`),__vite__mapDeps([46,47,48])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>Z(()=>import(`./gdscript-CsadCSaZ.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>Z(()=>import(`./gdshader-PfnN_8tR.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>Z(()=>import(`./genie-Bj-orPAV.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>Z(()=>import(`./gherkin-COVWpJ-Q.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>Z(()=>import(`./git-commit-DGJi7qBD.js`),__vite__mapDeps([49,50])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>Z(()=>import(`./git-rebase-HwDSB2qJ.js`),__vite__mapDeps([51,30,1])))},{id:`gleam`,name:`Gleam`,import:(()=>Z(()=>import(`./gleam-BF2NigGj.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>Z(()=>import(`./glimmer-js-B6LF_BMd.js`),__vite__mapDeps([52,4,1,3,5,15])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>Z(()=>import(`./glimmer-ts-Cn42BUKe.js`),__vite__mapDeps([53,4,1,3,5,15])))},{id:`glsl`,name:`GLSL`,import:(()=>Z(()=>import(`./glsl-CEMf-THb.js`).then(e=>e.n),__vite__mapDeps([27,1,21])))},{id:`gn`,name:`GN`,import:(()=>Z(()=>import(`./gn-CMIt9roj.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>Z(()=>import(`./gnuplot-DgWlRTEj.js`),[]))},{id:`go`,name:`Go`,import:(()=>Z(()=>import(`./go-DLnOLj8q.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>Z(()=>import(`./graphql-dBCd2Czl.js`).then(e=>e.n),__vite__mapDeps([36,1,5,37,14,15])))},{id:`groovy`,name:`Groovy`,import:(()=>Z(()=>import(`./groovy-B9qLWIkE.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>Z(()=>import(`./hack-DDEqRjBe.js`),__vite__mapDeps([54,3,1,4,5,18])))},{id:`haml`,name:`Ruby Haml`,import:(()=>Z(()=>import(`./haml-Ck5pVAEG.js`).then(e=>e.n),__vite__mapDeps([38,1,4,5])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>Z(()=>import(`./handlebars-g9Qe0ao2.js`),__vite__mapDeps([55,4,1,3,5,40])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>Z(()=>import(`./haskell-BaGpmm_c.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>Z(()=>import(`./haxe-DfXTCEOz.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>Z(()=>import(`./hcl-CbCtpSbi.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>Z(()=>import(`./hjson-_4-w-pHU.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>Z(()=>import(`./hlsl-DpuYn7pp.js`),[]))},{id:`html`,name:`HTML`,import:(()=>Z(()=>import(`./html-CzX0w7K_.js`).then(e=>e.n),__vite__mapDeps([3,1,4,5])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>Z(()=>import(`./html-derivative-D-XvNBA6.js`),__vite__mapDeps([17,3,1,4,5])))},{id:`http`,name:`HTTP`,import:(()=>Z(()=>import(`./http-qlhghEti.js`),__vite__mapDeps([56,36,1,5,37,14,15,9,30,10,11])))},{id:`hurl`,name:`Hurl`,import:(()=>Z(()=>import(`./hurl-CHIKfBKk.js`),__vite__mapDeps([57,58,36,1,5,37,14,15,10,11])))},{id:`hxml`,name:`HXML`,import:(()=>Z(()=>import(`./hxml-adC65L_J.js`),__vite__mapDeps([59,60])))},{id:`hy`,name:`Hy`,import:(()=>Z(()=>import(`./hy-t9zDXBje.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>Z(()=>import(`./imba-Bxu-TDfw.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>Z(()=>import(`./ini-D-v34c8N.js`),[]))},{id:`java`,name:`Java`,import:(()=>Z(()=>import(`./java-BqKEu7zh.js`).then(e=>e.n),__vite__mapDeps([11,1])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>Z(()=>import(`./javascript-CzjRtS1s.js`).then(e=>e.n),__vite__mapDeps([5,1])))},{id:`jinja`,name:`Jinja`,import:(()=>Z(()=>import(`./jinja-BHZt0_Dn.js`),__vite__mapDeps([61,3,1,4,5])))},{id:`jison`,name:`Jison`,import:(()=>Z(()=>import(`./jison-TqJYWKkW.js`),__vite__mapDeps([62,5,1])))},{id:`json`,name:`JSON`,import:(()=>Z(()=>import(`./json-CdFmZMJc.js`).then(e=>e.n),__vite__mapDeps([9,1])))},{id:`json5`,name:`JSON5`,import:(()=>Z(()=>import(`./json5-D0XL1D5m.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>Z(()=>import(`./jsonc-BBgf3TX3.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>Z(()=>import(`./jsonl-KrKLbtB7.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>Z(()=>import(`./jsonnet-B2ZwWMOt.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>Z(()=>import(`./jssm-ByRpI9-B.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>Z(()=>import(`./jsx-BL6Wh6Qw.js`).then(e=>e.n),__vite__mapDeps([37,1])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>Z(()=>import(`./julia-CW07fy07.js`),__vite__mapDeps([63,26,1,27,21,28,18,5,23,64])))},{id:`just`,name:`Just`,import:(()=>Z(()=>import(`./just-DBcWo9WY.js`),__vite__mapDeps([65,5,1,66,4,3,18,10,11,23,35,21,26,27,28,36,37,14,15,38,39,30,40])))},{id:`kdl`,name:`KDL`,import:(()=>Z(()=>import(`./kdl-6FPPEH4H.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>Z(()=>import(`./kotlin-D4L3Nd2D.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>Z(()=>import(`./kusto-D-mmc07O.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>Z(()=>import(`./latex-D6lXiPTF.js`),__vite__mapDeps([67,68,64,1])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>Z(()=>import(`./lean-BMVMuP2E.js`),[]))},{id:`less`,name:`Less`,import:(()=>Z(()=>import(`./less-C95PyOu0.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>Z(()=>import(`./liquid-DhYYAQ41.js`),__vite__mapDeps([69,4,1,3,5,9])))},{id:`llvm`,name:`LLVM IR`,import:(()=>Z(()=>import(`./llvm-Dy3qORTl.js`),[]))},{id:`log`,name:`Log file`,import:(()=>Z(()=>import(`./log-BQop7fzg.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>Z(()=>import(`./logo-DKtnYmrp.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>Z(()=>import(`./lua-B4ezzssg.js`).then(e=>e.n),__vite__mapDeps([39,1,21])))},{id:`luau`,name:`Luau`,import:(()=>Z(()=>import(`./luau-Dha4KG0q.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>Z(()=>import(`./make-DfmS6buu.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>Z(()=>import(`./markdown-BaI9LyM4.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>Z(()=>import(`./marko-xtrIBdcL.js`),__vite__mapDeps([70,4,1,71,7,15])))},{id:`matlab`,name:`MATLAB`,import:(()=>Z(()=>import(`./matlab-BT79Cq_j.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>Z(()=>import(`./mdc-DyZVNnwP.js`),__vite__mapDeps([72,17,3,1,4,5,42,40])))},{id:`mdx`,name:`MDX`,import:(()=>Z(()=>import(`./mdx-CxGBwLNt.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>Z(()=>import(`./mermaid-DLf3axBN.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>Z(()=>import(`./mipsasm-DXuU_0cI.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>Z(()=>import(`./mojo-1Omp2pIo.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>Z(()=>import(`./moonbit-DZzq699o.js`),[]))},{id:`move`,name:`Move`,import:(()=>Z(()=>import(`./move-DxDAOJVd.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>Z(()=>import(`./narrat-CxDcPPb9.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>Z(()=>import(`./nextflow-JEyYUlIq.js`),__vite__mapDeps([73,74])))},{id:`nextflow-groovy`,name:`nextflow-groovy`,import:(()=>Z(()=>import(`./nextflow-groovy-wvmJO4hi.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>Z(()=>import(`./nginx-CGgm1VOJ.js`),__vite__mapDeps([75,39,1,21])))},{id:`nim`,name:`Nim`,import:(()=>Z(()=>import(`./nim-Br7S817Z.js`),__vite__mapDeps([76,21,1,4,27,3,5,42,10,11])))},{id:`nix`,name:`Nix`,import:(()=>Z(()=>import(`./nix-DsFTDHWT.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>Z(()=>import(`./nushell-BQ_rO0AM.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>Z(()=>import(`./objective-c-BMq6JT_m.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>Z(()=>import(`./objective-cpp-DRwojuGv.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>Z(()=>import(`./ocaml-e4_gKO6E.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>Z(()=>import(`./odin-mdTPwYOg.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>Z(()=>import(`./openscad-D2aTdNfr.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>Z(()=>import(`./pascal-D4n_G8vj.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>Z(()=>import(`./perl-DqDX-7VG.js`),__vite__mapDeps([66,4,1,3,5,18,10,11])))},{id:`php`,name:`PHP`,import:(()=>Z(()=>import(`./php-DYSqNNGJ.js`),__vite__mapDeps([77,4,1,3,5,9,18,10,11])))},{id:`pkl`,name:`Pkl`,import:(()=>Z(()=>import(`./pkl-DcjhAp0L.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>Z(()=>import(`./plsql-BSy3Ag0J.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>Z(()=>import(`./po-Be96RYkA.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>Z(()=>import(`./polar-BmhMKWum.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>Z(()=>import(`./postcss-BTQso3H9.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>Z(()=>import(`./powerquery-DVyQv3M2.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>Z(()=>import(`./powershell-BmtCGJVD.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>Z(()=>import(`./prisma-CCFA9rEj.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>Z(()=>import(`./prolog-DWGEEo78.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>Z(()=>import(`./proto-C3eop1kM.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>Z(()=>import(`./pug-Bob3gNio.js`),__vite__mapDeps([78,4,1,3,5])))},{id:`puppet`,name:`Puppet`,import:(()=>Z(()=>import(`./puppet-C0_7Nv5A.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>Z(()=>import(`./purescript-Bv-B8yRw.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>Z(()=>import(`./python-CKg5r0C3.js`),[]))},{id:`qml`,name:`QML`,import:(()=>Z(()=>import(`./qml-CsMafcqN.js`),__vite__mapDeps([79,5,1])))},{id:`qmldir`,name:`QML Directory`,import:(()=>Z(()=>import(`./qmldir-Cqfb4Lox.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>Z(()=>import(`./qss-Csho9BH8.js`),[]))},{id:`r`,name:`R`,import:(()=>Z(()=>import(`./r-CGji9_vM.js`).then(e=>e.n),__vite__mapDeps([64,1])))},{id:`racket`,name:`Racket`,import:(()=>Z(()=>import(`./racket-D8-uWeQH.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>Z(()=>import(`./raku-Cj4JSa8p.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>Z(()=>import(`./razor-B4PzhaZX.js`),__vite__mapDeps([80,81,3,1,4,5])))},{id:`reg`,name:`Windows Registry Script`,import:(()=>Z(()=>import(`./reg-DXGFiJSl.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>Z(()=>import(`./regexp-CvWG4lI-.js`).then(e=>e.n),__vite__mapDeps([28,1])))},{id:`rel`,name:`Rel`,import:(()=>Z(()=>import(`./rel-CunnVTBK.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>Z(()=>import(`./riscv-C8BcOCkS.js`),[]))},{id:`ron`,name:`RON`,import:(()=>Z(()=>import(`./ron-DiDyR9oa.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>Z(()=>import(`./rosmsg-CHmL1Uyj.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>Z(()=>import(`./rst-BXuz-2b8.js`),__vite__mapDeps([82,83,26,1,27,21,28,18,17,3,4,5,23,35,36,37,14,15,38,39,30,10,11,40])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>Z(()=>import(`./ruby-CXP5_4kq.js`),__vite__mapDeps([35,21,1,26,27,28,18,4,36,5,37,14,15,38,3,39,30,10,11,40])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>Z(()=>import(`./rust-DjJFInu3.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>Z(()=>import(`./sas-Cov9PzAD.js`),__vite__mapDeps([84,18,1])))},{id:`sass`,name:`Sass`,import:(()=>Z(()=>import(`./sass-D3xZ5o-v.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>Z(()=>import(`./scala-B0IRml5w.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>Z(()=>import(`./scheme-BhwcV3Av.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>Z(()=>import(`./scss-Efq7Dmbs.js`).then(e=>e.n),__vite__mapDeps([7,1,4])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>Z(()=>import(`./sdbl-BmWYR-pI.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>Z(()=>import(`./shaderlab-DZ3Lsiak.js`),__vite__mapDeps([85,86])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>Z(()=>import(`./shellscript-BbEstezf.js`).then(e=>e.n),__vite__mapDeps([30,1])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>Z(()=>import(`./shellsession-BHLVblBB.js`),__vite__mapDeps([87,30,1])))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>Z(()=>import(`./smalltalk-DVQuUMII.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>Z(()=>import(`./solidity-gQ4WXILB.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>Z(()=>import(`./soy-e0u3-wIA.js`),__vite__mapDeps([88,3,1,4,5])))},{id:`sparql`,name:`SPARQL`,import:(()=>Z(()=>import(`./sparql-B9c85a_o.js`),__vite__mapDeps([89,90])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>Z(()=>import(`./splunk-OB48_RcD.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>Z(()=>import(`./sql-CB6kO6Km.js`).then(e=>e.n),__vite__mapDeps([18,1])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>Z(()=>import(`./ssh-config-DA9YMRGV.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>Z(()=>import(`./stata-B1mLEMrz.js`),__vite__mapDeps([91,18,1])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>Z(()=>import(`./stylus-sKwvsUaC.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>Z(()=>import(`./surrealql-BTKo2XFY.js`),__vite__mapDeps([92,5,1])))},{id:`svelte`,name:`Svelte`,import:(()=>Z(()=>import(`./svelte-B7URZ-wm.js`),__vite__mapDeps([93,4,1,5,13,15])))},{id:`swift`,name:`Swift`,import:(()=>Z(()=>import(`./swift-C72NbAtg.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>Z(()=>import(`./system-verilog-CnWMF7Nq.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>Z(()=>import(`./systemd-DMzItW5N.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>Z(()=>import(`./talonscript-DopQCWDL.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>Z(()=>import(`./tasl-C28SYKbq.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>Z(()=>import(`./tcl-DHq7zmoF.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>Z(()=>import(`./templ-DVRYIgGq.js`),__vite__mapDeps([94,4,1,95,5])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>Z(()=>import(`./terraform-CogS1YKX.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>Z(()=>import(`./tex-CdJ24HJj.js`),__vite__mapDeps([68,64,1])))},{id:`toml`,name:`TOML`,import:(()=>Z(()=>import(`./toml-BH_iPsgK.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>Z(()=>import(`./ts-tags-CCSbelDn.js`),__vite__mapDeps([96,4,1,27,21,3,5,18,15,10,11])))},{id:`tsv`,name:`TSV`,import:(()=>Z(()=>import(`./tsv-BIkdBZX1.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>Z(()=>import(`./tsx-DrzBggF8.js`).then(e=>e.n),__vite__mapDeps([14,1])))},{id:`turtle`,name:`Turtle`,import:(()=>Z(()=>import(`./turtle-CqNXyJWZ.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>Z(()=>import(`./twig-Dn4ruiVl.js`),__vite__mapDeps([97,4,1,5,77,3,9,18,10,11,23,35,21,26,27,28,36,37,14,15,38,39,30,40,7])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>Z(()=>import(`./typescript-COZIw7xM.js`).then(e=>e.n),__vite__mapDeps([15,1])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>Z(()=>import(`./typespec-CQ9LYD_e.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>Z(()=>import(`./typst-T-Fsk-Sv.js`),[]))},{id:`v`,name:`V`,import:(()=>Z(()=>import(`./v-BhMEOw9x.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>Z(()=>import(`./vala-DzajMnwt.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>Z(()=>import(`./vb-7Xr8dEYW.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>Z(()=>import(`./verilog-AvXtwZir.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>Z(()=>import(`./vhdl-BHu0zg1P.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>Z(()=>import(`./viml-Di0QpLfC.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>Z(()=>import(`./vue-D19cWHwY.js`),__vite__mapDeps([98,4,1,17,3,5,9,15])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>Z(()=>import(`./vue-html-_j-KC7Cs.js`),__vite__mapDeps([99,5,1])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>Z(()=>import(`./vue-vine-BC03MN6c.js`),__vite__mapDeps([100,4,1,5,71,13,7,101])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>Z(()=>import(`./vyper-C3R5yXgx.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>Z(()=>import(`./wasm-Chsuwt1A.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>Z(()=>import(`./wenyan-BonVcr2i.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>Z(()=>import(`./wgsl-D59WYmNq.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>Z(()=>import(`./wikitext-ariTI2Wk.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>Z(()=>import(`./wit-EA4fa3Dt.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>Z(()=>import(`./wolfram-DDp7LhyU.js`),[]))},{id:`xml`,name:`XML`,import:(()=>Z(()=>import(`./xml-BlDEvPia.js`).then(e=>e.n),__vite__mapDeps([10,1,11])))},{id:`xsl`,name:`XSL`,import:(()=>Z(()=>import(`./xsl-DR-zOeBm.js`),__vite__mapDeps([102,10,1,11])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>Z(()=>import(`./yaml-iUXljnLs.js`).then(e=>e.n),__vite__mapDeps([40,1])))},{id:`zenscript`,name:`ZenScript`,import:(()=>Z(()=>import(`./zenscript-4WaROUyc.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>Z(()=>import(`./zig-CJoLJGwV.js`),[]))}],lO=Object.fromEntries(cO.map(e=>[e.id,e.import])),uO=Object.fromEntries(cO.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),dO={...lO,...uO},fO=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>Z(()=>import(`./andromeeda-N4z3YzmR.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>Z(()=>import(`./aurora-x-CND-FqEb.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>Z(()=>import(`./ayu-dark-on7xzq_B.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>Z(()=>import(`./ayu-light-DnGeGGc2.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>Z(()=>import(`./ayu-mirage-DG3LlYC_.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>Z(()=>import(`./catppuccin-frappe-Dr22sraq.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>Z(()=>import(`./catppuccin-latte-C57EeX8c.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>Z(()=>import(`./catppuccin-macchiato-CpheI4uD.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>Z(()=>import(`./catppuccin-mocha-D8Lmdks_.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>Z(()=>import(`./dark-plus-CqeW_0kH.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>Z(()=>import(`./dracula-CtqCPLGa.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>Z(()=>import(`./dracula-soft-DmBpwRAy.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>Z(()=>import(`./everforest-dark-CrbyKk4n.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>Z(()=>import(`./everforest-light-DRbSh8Tm.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>Z(()=>import(`./github-dark-ipGuFGYC.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>Z(()=>import(`./github-dark-default-DX3IG_X0.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>Z(()=>import(`./github-dark-dimmed-CH6p_7ez.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>Z(()=>import(`./github-dark-high-contrast-Bg2sSao5.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>Z(()=>import(`./github-light-BxjqOQl0.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>Z(()=>import(`./github-light-default-DwpDd1IQ.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>Z(()=>import(`./github-light-high-contrast-C0QeixPf.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>Z(()=>import(`./gruvbox-dark-hard-BIMX9ePb.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>Z(()=>import(`./gruvbox-dark-medium-DxuwyVzM.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>Z(()=>import(`./gruvbox-dark-soft-ba2fjht0.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>Z(()=>import(`./gruvbox-light-hard-DAJK2PqC.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>Z(()=>import(`./gruvbox-light-medium-WRifDAJD.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>Z(()=>import(`./gruvbox-light-soft-B0dBOoVB.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>Z(()=>import(`./horizon-C5RtD1fY.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`dark`,import:(()=>Z(()=>import(`./horizon-bright-pEOice34.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>Z(()=>import(`./houston-A0zg9vNP.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>Z(()=>import(`./kanagawa-dragon-CtPmcCMp.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>Z(()=>import(`./kanagawa-lotus-DpOXEGCa.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>Z(()=>import(`./kanagawa-wave-CLVCyc-n.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>Z(()=>import(`./laserwave-7fEj4XGb.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>Z(()=>import(`./light-plus-DHI2dh3p.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>Z(()=>import(`./material-theme-Dm6ETY8i.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>Z(()=>import(`./material-theme-darker-BeyjmM5Z.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>Z(()=>import(`./material-theme-lighter-CCOYYzKL.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>Z(()=>import(`./material-theme-ocean-CUtPiiX3.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>Z(()=>import(`./material-theme-palenight-2L4zMwIM.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>Z(()=>import(`./min-dark-B8TUPGHg.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>Z(()=>import(`./min-light-BDOoBxcA.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>Z(()=>import(`./monokai-E_VBmXGZ.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>Z(()=>import(`./night-owl-DefhalNX.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>Z(()=>import(`./night-owl-light-byb3AbEn.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>Z(()=>import(`./nord-D5rQzHT-.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>Z(()=>import(`./one-dark-pro-DxXww9jg.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>Z(()=>import(`./one-light-D9c03w7t.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>Z(()=>import(`./plastic-uOsw7z1x.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>Z(()=>import(`./poimandres-CyO4HORD.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>Z(()=>import(`./red-z4H4llUY.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>Z(()=>import(`./rose-pine-BADquuIH.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>Z(()=>import(`./rose-pine-dawn-BLcEeBoh.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>Z(()=>import(`./rose-pine-moon-BK_tLY1Y.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>Z(()=>import(`./slack-dark-DOnVms5P.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>Z(()=>import(`./slack-ochin-DcRTft4q.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>Z(()=>import(`./snazzy-light-x9CLJ1W9.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>Z(()=>import(`./solarized-dark-BB1sh-pe.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>Z(()=>import(`./solarized-light-9-RPS998.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>Z(()=>import(`./synthwave-84-eJ9uRN_S.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>Z(()=>import(`./tokyo-night-B9N7LyrF.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>Z(()=>import(`./vesper-CtgQQ2sf.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>Z(()=>import(`./vitesse-black-jXdfyqgD.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>Z(()=>import(`./vitesse-dark-B88PxG1r.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>Z(()=>import(`./vitesse-light-BXxZh2iV.js`),[]))}].map(e=>[e.id,e.import])),pO=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function mO(){return 2147483648}function hO(){return typeof performance<`u`?performance.now():Date.now()}var gO=(e,t)=>e+(t-e%t)%t;async function _O(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=mO();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,gO(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:hO,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var vO=Object.defineProperty,yO=(e,t,n)=>t in e?vO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bO=(e,t,n)=>yO(e,typeof t==`symbol`?t:t+``,n),xO=null;function SO(e){throw new pO(e.UTF8ToString(e.getLastOnigError()))}var CO=class e{constructor(t){bO(this,`utf16Length`),bO(this,`utf8Length`),bO(this,`utf16Value`),bO(this,`utf8Value`),bO(this,`utf16OffsetToUtf8`),bO(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},wO=class e{constructor(t){if(bO(this,`id`,++e.LAST_ID),bO(this,`_onigBinding`),bO(this,`content`),bO(this,`utf16Length`),bO(this,`utf8Length`),bO(this,`utf16OffsetToUtf8`),bO(this,`utf8OffsetToUtf16`),bO(this,`ptr`),!xO)throw new pO(`Must invoke loadWasm first.`);this._onigBinding=xO,this.content=t;let n=new CO(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=xO.omalloc(1e4),e._sharedPtrInUse=!0,xO.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(xO)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};bO(wO,`LAST_ID`,0),bO(wO,`_sharedPtr`,0),bO(wO,`_sharedPtrInUse`,!1);var TO=wO,EO=class{constructor(e){if(bO(this,`_onigBinding`),bO(this,`_ptr`),!xO)throw new pO(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new CO(e[r]);t[r]=i.createString(xO),n[r]=i.utf8Length}let r=xO.omalloc(4*e.length);xO.HEAPU32.set(t,r/4);let i=xO.omalloc(4*e.length);xO.HEAPU32.set(n,i/4);let a=xO.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)xO.ofree(t[n]);xO.ofree(i),xO.ofree(r),a===0&&SO(xO),this._onigBinding=xO,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new TO(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function DO(e){return typeof e.instantiator==`function`}function OO(e){return typeof e.default==`function`}function kO(e){return e.data!==void 0}function AO(e){return typeof Response<`u`&&e instanceof Response}function jO(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var MO;function NO(e){if(MO)return MO;async function t(){xO=await _O(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),DO(n)?n=await n.instantiator(t):OO(n)?n=await n.default(t):(kO(n)&&(n=n.data),AO(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await FO(n)(t):await IO(n)(t):jO(n)||n instanceof WebAssembly.Module?n=await PO(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await PO(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return MO=t(),MO}function PO(e){return t=>WebAssembly.instantiate(e,t)}function FO(e){return t=>WebAssembly.instantiateStreaming(e,t)}function IO(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function LO(e){return e&&await NO(e),{createScanner(e){return new EO(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new TO(e)}}}var RO=aO({langs:dO,themes:fO,engine:()=>LO(Z(()=>import(`./wasm-CEUrWlVz.js`),[]))}),{codeToHtml:zO,codeToHast:BO,codeToTokens:VO,codeToTokensBase:HO,codeToTokensWithThemes:UO,getSingletonHighlighter:WO,getLastGrammarState:GO}=sO(RO,{guessEmbeddedLanguages:GE});function KO(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function qO(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var JO=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),YO=String.raw;function XO(e,t){if(e==null)throw Error(t??`Value expected`);return e}var ZO=YO`\[\^?`,QO=`c.? | C(?:-.?)?|${YO`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${YO`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${YO`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${YO`o\{[^\}]*\}?`}|${YO`\d{1,3}`}`,$O=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,ek=new RegExp(YO`
|
|
145
145
|
\\ (?:
|
|
146
|
-
${
|
|
146
|
+
${QO}
|
|
147
147
|
| [gk]<[^>]*>?
|
|
148
148
|
| [gk]'[^']*'?
|
|
149
149
|
| .
|
|
@@ -160,20 +160,20 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
|
|
|
160
160
|
)?
|
|
161
161
|
| \*[^\)]*\)?
|
|
162
162
|
)?
|
|
163
|
-
| (?:${
|
|
164
|
-
| ${
|
|
163
|
+
| (?:${$O.source})+
|
|
164
|
+
| ${ZO}
|
|
165
165
|
| .
|
|
166
|
-
`.replace(/\s+/g,``),`gsu`),
|
|
166
|
+
`.replace(/\s+/g,``),`gsu`),tk=new RegExp(YO`
|
|
167
167
|
\\ (?:
|
|
168
|
-
${
|
|
168
|
+
${QO}
|
|
169
169
|
| .
|
|
170
170
|
)
|
|
171
171
|
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
172
|
-
| ${
|
|
172
|
+
| ${ZO}
|
|
173
173
|
| &&
|
|
174
174
|
| .
|
|
175
|
-
`.replace(/\s+/g,``),`gsu`);function
|
|
176
|
-
`,r);return{lastIndex:e===-1?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return n===`.`?{token:fk(`dot`,n)}:n===`^`||n===`$`?{token:ak(e.singleline?{"^":KO`\A`,$:KO`\Z`}[n]:n,n)}:n===`|`?{token:ik(n)}:XO.test(n)?{tokens:Mk(n)}:{token:sk(UO(n),n)}}function tk(e,t,n){let r=[dk(t[1]===`^`,t)],i=1,a;for(QO.lastIndex=n;a=QO.exec(e);){let e=a[0];if(e[0]===`[`&&e[1]!==`:`)i++,r.push(dk(e[1]===`^`,e));else if(e===`]`){if(r.at(-1).type===`CharacterClassOpen`)r.push(sk(93,e));else if(i--,r.push(ck(e)),!i)break}else{let t=nk(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:QO.lastIndex||e.length}}function nk(e){if(e[0]===`\\`)return rk(e,{inCharClass:!0});if(e[0]===`[`){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!GO.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return fk(`posix`,e,{value:t.groups.name,negate:!!t.groups.negate})}return e===`-`?lk(e):e===`&&`?uk(e):sk(UO(e),e)}function rk(e,{inCharClass:t}){let n=e[1];if(n===`c`||n===`C`)return Sk(e);if(`dDhHsSwW`.includes(n))return Ek(e);if(e.startsWith(KO`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw Error(`Incomplete or invalid Unicode property "${e}"`);return Dk(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=>`\\x${e.toString(16)}`).join(``);return sk(UO(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n===`u`||n===`x`)return sk(Ak(e),e);if(xk.has(n))return sk(xk.get(n),e);if(/\d/.test(n))return mk(t,e);if(e===`\\`)throw Error(KO`Incomplete escape "\"`);if(n===`M`)throw Error(`Unsupported meta "${e}"`);if([...e].length===2)return sk(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function ik(e){return{type:`Alternator`,raw:e}}function ak(e,t){return{type:`Assertion`,kind:e,raw:t}}function ok(e){return{type:`Backreference`,raw:e}}function sk(e,t){return{type:`Character`,value:e,raw:t}}function ck(e){return{type:`CharacterClassClose`,raw:e}}function lk(e){return{type:`CharacterClassHyphen`,raw:e}}function uk(e){return{type:`CharacterClassIntersector`,raw:e}}function dk(e,t){return{type:`CharacterClassOpen`,negate:e,raw:t}}function fk(e,t,n={}){return{type:`CharacterSet`,kind:e,...n,raw:t}}function pk(e,t,n={}){return e===`keep`?{type:`Directive`,kind:e,raw:t}:{type:`Directive`,kind:e,flags:qO(n.flags),raw:t}}function mk(e,t){return{type:`EscapedNumber`,inCharClass:e,raw:t}}function hk(e){return{type:`GroupClose`,raw:e}}function gk(e,t,n={}){return{type:`GroupOpen`,kind:e,...n,raw:t}}function _k(e,t,n,r){return{type:`NamedCallout`,kind:e,tag:t,arguments:n,raw:r}}function vk(e,t,n,r){return{type:`Quantifier`,kind:e,min:t,max:n,raw:r}}function yk(e){return{type:`Subroutine`,raw:e}}var bk=new Set([`COUNT`,`CMP`,`ERROR`,`FAIL`,`MAX`,`MISMATCH`,`SKIP`,`TOTAL_COUNT`]),xk=new Map([[`a`,7],[`b`,8],[`e`,27],[`f`,12],[`n`,10],[`r`,13],[`t`,9],[`v`,11]]);function Sk(e){let t=e[1]===`c`?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${e}"`);return sk(UO(t.toUpperCase())-64,e)}function Ck(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??=``;let i=(t.getCurrentModX()||n.includes(`x`))&&!r.includes(`x`),a=Ok(n),o=Ok(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(`)`))return t.replaceCurrentModX(i),pk(`flags`,e,{flags:s});if(e.endsWith(`:`))return t.pushModX(i),t.numOpenGroups++,gk(`group`,e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}function wk(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(r===``)throw Error(`Named callout tag with empty value not allowed "${e}"`);let a=i?i.split(`,`).filter(e=>e!==``).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,c]=a,l=bk.has(n)?n.toLowerCase():`custom`;switch(l){case`fail`:case`mismatch`:case`skip`:if(a.length>0)throw Error(`Named callout arguments not allowed "${a}"`);break;case`error`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(typeof o==`string`)throw Error(`Named callout argument must be a number "${o}"`);break;case`max`:if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(a.length===2&&(typeof s==`number`||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case`count`:case`total_count`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(a.length===1&&(typeof o==`number`||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case`cmp`:if(a.length!==3)throw Error(`Named callout must have three arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof s==`number`||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if(typeof c==`string`&&!/^[A-Za-z_]\w*$/.test(c))throw Error(`Named callout argument three must be a tag or number "${c}"`);break;case`custom`:throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${l}"`)}return _k(l,r??null,i?.split(`,`)??null,e)}function Tk(e){let t=null,n,r;if(e[0]===`{`){let{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,o=1e5;if(+i>o||a&&+a>o)throw Error(`Quantifier value unsupported in Oniguruma`);if(n=+i,r=a===void 0?+i:a===``?1/0:+a,n>r&&(t=`possessive`,[n,r]=[r,n]),e.endsWith(`?`)){if(t===`possessive`)throw Error(`Unsupported possessive interval quantifier chain with "?"`);t=`lazy`}else t||=`greedy`}else n=e[0]===`+`?1:0,r=e[0]===`?`?1:1/0,t=e[1]===`+`?`possessive`:e[1]===`?`?`lazy`:`greedy`;return vk(t,n,r,e)}function Ek(e){let t=e[1].toLowerCase();return fk({d:`digit`,h:`hex`,s:`space`,w:`word`}[t],e,{negate:e[1]!==t})}function Dk(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return fk(`property`,e,{value:r,negate:t===`P`&&!n||t===`p`&&!!n})}function Ok(e){let t={};return e.includes(`i`)&&(t.ignoreCase=!0),e.includes(`m`)&&(t.dotAll=!0),e.includes(`x`)&&(t.extended=!0),Object.keys(t).length?t:null}function kk(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let r=e[n];if(!`imxDPSWy`.includes(r))throw Error(`Invalid flag "${r}"`);if(r===`y`){if(!/^y{[gw]}/.test(e.slice(n)))throw Error(`Invalid or unspecified flag "y" mode`);t.textSegmentMode=e[n+2]===`g`?`grapheme`:`word`,n+=3;continue}t[{i:`ignoreCase`,m:`dotAll`,x:`extended`,D:`digitIsAscii`,P:`posixIsAscii`,S:`spaceIsAscii`,W:`wordIsAscii`}[r]]=!0}return t}function Ak(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);let t=e[2]===`{`?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function jk(e,t){let{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!==`0`&&i.length===1||i[0]!==`0`&&+i<=t))return[ok(n)];let a=[],o=i.match(/^[0-7]+|\d/g);for(let e=0;e<o.length;e++){let t=o[e],r;if(e===0&&t!==`8`&&t!==`9`){if(r=parseInt(t,8),r>127)throw Error(KO`Octal encoded byte above 177 unsupported "${n}"`)}else r=UO(t);a.push(sk(r,(e===0?`\\`:``)+t))}return a}function Mk(e){let t=[],n=new RegExp(XO,`gy`),r;for(;r=n.exec(e);){let e=r[0];if(e[0]===`{`){let r=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(r){let{min:i,max:a}=r.groups;if(+i>+a&&e.endsWith(`?`)){n.lastIndex--,t.push(Tk(e.slice(0,-1)));continue}}}t.push(Tk(e))}return t}function Nk(e,t){if(!Array.isArray(e.body))throw Error(`Expected node with body array`);if(e.body.length!==1)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}function Pk(e){return Fk.has(e.type)}var Fk=new Set([`AbsenceFunction`,`Backreference`,`CapturingGroup`,`Character`,`CharacterClass`,`CharacterSet`,`Group`,`Quantifier`,`Subroutine`]);function Ik(e,t={}){let n={flags:``,normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=$O(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(e,t)=>{let n=r.tokens[a.nextIndex];switch(a.parent=e,a.nextIndex++,n.type){case`Alternator`:return Kk();case`Assertion`:return Lk(n);case`Backreference`:return Rk(n,a);case`Character`:return Xk(n.value,{useLastValid:!!t.isCheckingRangeEnd});case`CharacterClassHyphen`:return zk(n,a,t);case`CharacterClassOpen`:return Bk(n,a,t);case`CharacterSet`:return Vk(n,a);case`Directive`:return eA(n.kind,{flags:n.flags});case`GroupOpen`:return Hk(n,a,t);case`NamedCallout`:return iA(n.kind,n.tag,n.arguments);case`Quantifier`:return Uk(n,a);case`Subroutine`:return Wk(n,a);default:throw Error(`Unexpected token type "${n.type}"`)}},a={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},o=sA(tA(r.flags)),s=o.body[0];for(;a.nextIndex<r.tokens.length;){let e=i(s,{});e.type===`Alternative`?(o.body.push(e),s=e):s.body.push(e)}let{capturingGroups:c,hasNumberedRef:l,namedGroupsByName:u,subroutines:d}=a;if(l&&u.size&&!n.rules.captureGroup)throw Error(`Numbered backref/subroutine not allowed when using named capture`);for(let{ref:e}of d)if(typeof e==`number`){if(e>c.length)throw Error(`Subroutine uses a group number that's not defined`);e&&(c[e-1].isSubroutined=!0)}else if(u.has(e)){if(u.get(e).length>1)throw Error(KO`Subroutine uses a duplicate group name "\g<${e}>"`);u.get(e)[0].isSubroutined=!0}else throw Error(KO`Subroutine uses a group name that's not defined "\g<${e}>"`);return o}function Lk({kind:e}){return qk(qO({"^":`line_start`,$:`line_end`,"\\A":`string_start`,"\\b":`word_boundary`,"\\B":`word_boundary`,"\\G":`search_start`,"\\y":`text_segment_boundary`,"\\Y":`text_segment_boundary`,"\\z":`string_end`,"\\Z":`string_end_newline`}[e],`Unexpected assertion kind "${e}"`),{negate:e===KO`\B`||e===KO`\Y`})}function Rk({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(n,r=!1)=>{let i=t.capturingGroups.length,a=!1;if(n>i)if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,Jk(r?i+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(n)return i(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(r))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw Error(`Group name not defined to the left "${e}"`);return Jk(r)}return i(+r)}function zk(e,t,n){let{tokens:r,walk:i}=t,a=t.parent,o=a.body.at(-1),s=r[t.nextIndex];if(!n.isCheckingRangeEnd&&o&&o.type!==`CharacterClass`&&o.type!==`CharacterClassRange`&&s&&s.type!==`CharacterClassOpen`&&s.type!==`CharacterClassClose`&&s.type!==`CharacterClassIntersector`){let e=i(a,{...n,isCheckingRangeEnd:!0});if(o.type===`Character`&&e.type===`Character`)return a.body.pop(),Qk(o,e);throw Error(`Invalid character class range`)}return Xk(UO(`-`))}function Bk({negate:e},t,n){let{tokens:r,walk:i}=t,a=r[t.nextIndex],o=[Zk()],s=vA(a);for(;s.type!==`CharacterClassClose`;){if(s.type===`CharacterClassIntersector`)o.push(Zk()),t.nextIndex++;else{let e=o.at(-1);e.body.push(i(e,n))}s=vA(r[t.nextIndex],a)}let c=Zk({negate:e});return o.length===1?c.body=o[0].body:(c.kind=`intersection`,c.body=o.map(e=>e.body.length===1?e.body[0]:e)),t.nextIndex++,c}function Vk({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o}=r;if(e===`property`){let r=_A(n);if(GO.has(r)&&!o?.has(r))e=`posix`,n=r;else return lA(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o})}return e===`posix`?aA(n,{negate:t}):$k(e,{negate:t})}function Hk(e,t,n){let{tokens:r,capturingGroups:i,namedGroupsByName:a,skipLookbehindValidation:o,walk:s}=t,c=uA(e),l=c.type===`AbsenceFunction`,u=mA(c),d=u&&c.negate;if(c.type===`CapturingGroup`&&(i.push(c),c.name&&WO(a,c.name,[]).push(c)),l&&n.isInAbsenceFunction)throw Error(`Nested absence function not supported by Oniguruma`);let f=yA(r[t.nextIndex]);for(;f.type!==`GroupClose`;){if(f.type===`Alternator`)c.body.push(Kk()),t.nextIndex++;else{let e=c.body.at(-1),t=s(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||l,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||d});if(e.body.push(t),(u||n.isInLookbehind)&&!o){let e=`Lookbehind includes a pattern not allowed by Oniguruma`;if(d||n.isInNegLookbehind){if(pA(t)||t.type===`CapturingGroup`)throw Error(e)}else if(pA(t)||mA(t)&&t.negate)throw Error(e)}}f=yA(r[t.nextIndex])}return t.nextIndex++,c}function Uk({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!Pk(a))throw Error(`Quantifier requires a repeatable token`);let o=oA(e,t,n,a);return i.body.pop(),o}function Wk({raw:e},t){let{capturingGroups:n,subroutines:r}=t,i=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){let e=+a.groups.num,r=n.length;if(t.hasNumberedRef=!0,i={"":e,"+":r+e,"-":r+1-e}[a.groups.sign],i<1)throw Error(`Invalid subroutine number`)}else i===`0`&&(i=0);let o=cA(i);return r.push(o),o}function Gk(e,t){if(e!==`repeater`)throw Error(`Unexpected absence function kind "${e}"`);return{type:`AbsenceFunction`,kind:e,body:dA(t?.body)}}function Kk(e){return{type:`Alternative`,body:fA(e?.body)}}function qk(e,t){let n={type:`Assertion`,kind:e};return(e===`word_boundary`||e===`text_segment_boundary`)&&(n.negate=!!t?.negate),n}function Jk(e,t){let n=!!t?.orphan;return{type:`Backreference`,ref:e,...n&&{orphan:n}}}function Yk(e,t){let n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!hA(n.name))throw Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:`CapturingGroup`,number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:dA(t?.body)}}function Xk(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw Error(e>1310719?`Invalid code point out of range "\\x{${t}}"`:`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:`Character`,value:e}}function Zk(e){let t={kind:`union`,negate:!1,...e};return{type:`CharacterClass`,kind:t.kind,negate:t.negate,body:fA(e?.body)}}function Qk(e,t){if(t.value<e.value)throw Error(`Character class range out of order`);return{type:`CharacterClassRange`,min:e,max:t}}function $k(e,t){let n=!!t?.negate,r={type:`CharacterSet`,kind:e};return(e===`digit`||e===`hex`||e===`newline`||e===`space`||e===`word`)&&(r.negate=n),(e===`text_segment`||e===`newline`&&!n)&&(r.variableLength=!0),r}function eA(e,t={}){if(e===`keep`)return{type:`Directive`,kind:e};if(e===`flags`)return{type:`Directive`,kind:e,flags:qO(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}function tA(e){return{type:`Flags`,...e}}function nA(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error(`Atomic group cannot have flags`);return{type:`Group`,...t&&{atomic:t},...n&&{flags:n},body:dA(e?.body)}}function rA(e){let t={behind:!1,negate:!1,...e};return{type:`LookaroundAssertion`,kind:t.behind?`lookbehind`:`lookahead`,negate:t.negate,body:dA(e?.body)}}function iA(e,t,n){return{type:`NamedCallout`,kind:e,tag:t,arguments:n}}function aA(e,t){let n=!!t?.negate;if(!GO.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:`CharacterSet`,kind:`posix`,value:e,negate:n}}function oA(e,t,n,r){if(t>n)throw Error(`Invalid reversed quantifier range`);return{type:`Quantifier`,kind:e,min:t,max:n,body:r}}function sA(e,t){return{type:`Regex`,body:dA(t?.body),flags:e}}function cA(e){return{type:`Subroutine`,ref:e}}function lA(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(_A(e));if(!r){if(n.normalizeUnknownPropertyNames)r=gA(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(KO`Invalid Unicode property "\p{${e}}"`)}return{type:`CharacterSet`,kind:`property`,value:r??e,negate:n.negate}}function uA({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case`absence_repeater`:return Gk(`repeater`);case`atomic`:return nA({atomic:!0});case`capturing`:return Yk(i,{name:n});case`group`:return nA({flags:e});case`lookahead`:case`lookbehind`:return rA({behind:t===`lookbehind`,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}function dA(e){if(e===void 0)e=[Kk()];else if(!Array.isArray(e)||!e.length||!e.every(e=>e.type===`Alternative`))throw Error(`Invalid body; expected array of one or more Alternative nodes`);return e}function fA(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error(`Invalid body; expected array of nodes`);return e}function pA(e){return e.type===`LookaroundAssertion`&&e.kind===`lookahead`}function mA(e){return e.type===`LookaroundAssertion`&&e.kind===`lookbehind`}function hA(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function gA(e){return e.trim().replace(/[- _]+/g,`_`).replace(/[A-Z][a-z]+(?=[A-Z])/g,`$&_`).replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function _A(e){return e.replace(/[- _]+/g,``).toLowerCase()}function vA(e,t){return qO(e,`${t?.type===`Character`&&t.value===93?`Empty`:`Unclosed`} character class`)}function yA(e){return qO(e,`Unclosed group`)}function bA(e,t,n=null){function r(e,t){for(let n=0;n<e.length;n++){let r=i(e[n],t,n,e);n=Math.max(-1,n+r)}}function i(a,o=null,s=null,c=null){let l=0,u=!1,d={node:a,parent:o,key:s,container:c,root:e,remove(){xA(c).splice(Math.max(0,SA(s)+l),1),l--,u=!0},removeAllNextSiblings(){return xA(c).splice(SA(s)+1)},removeAllPrevSiblings(){let e=SA(s)+l;return l-=e,xA(c).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;c?c[Math.max(0,SA(s)+l)]=e:qO(o,`Can't replace root node`)[s]=e,n&&i(e,o,s,c),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(xA(c).splice(Math.max(0,SA(s)+l),1,...e),l+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=i(e[n],o,SA(s)+n+t,c)}u=!0},skip(){u=!0}},{type:f}=a,p=t[`*`],m=t[f],h=typeof p==`function`?p:p?.enter,g=typeof m==`function`?m:m?.enter;if(h?.(d,n),g?.(d,n),!u)switch(f){case`AbsenceFunction`:case`CapturingGroup`:case`Group`:r(a.body,a);break;case`Alternative`:case`CharacterClass`:r(a.body,a);break;case`Assertion`:case`Backreference`:case`Character`:case`CharacterSet`:case`Directive`:case`Flags`:case`NamedCallout`:case`Subroutine`:break;case`CharacterClassRange`:i(a.min,a,`min`),i(a.max,a,`max`);break;case`LookaroundAssertion`:r(a.body,a);break;case`Quantifier`:i(a.body,a,`body`);break;case`Regex`:r(a.body,a),i(a.flags,a,`flags`);break;default:throw Error(`Unexpected node type "${f}"`)}return m?.exit?.(d,n),p?.exit?.(d,n),l}return i(e),e}function xA(e){if(!Array.isArray(e))throw Error(`Container expected`);return e}function SA(e){if(typeof e!=`number`)throw Error(`Numeric key expected`);return e}var CA=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function wA(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function TA(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var EA=Object.freeze({DEFAULT:`DEFAULT`,CHAR_CLASS:`CHAR_CLASS`});function DA(e,t,n,r){let i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,`gsu`),a=[!1],o=0,s=``;for(let t of e.matchAll(i)){let{0:e,groups:{$skip:i}}=t;if(!i&&(!r||r===EA.DEFAULT==!o)){n instanceof Function?s+=n(t,{context:o?EA.CHAR_CLASS:EA.DEFAULT,negated:a[a.length-1]}):s+=n;continue}e[0]===`[`?(o++,a.push(e[1]===`^`)):e===`]`&&o&&(o--,a.pop()),s+=e}return s}function OA(e,t,n,r){DA(e,t,n,r)}function kA(e,t,n=0,r){if(!new RegExp(t,`su`).test(e))return null;let i=RegExp(`${t}|(?<$skip>\\\\?.)`,`gsu`);i.lastIndex=n;let a=0,o;for(;o=i.exec(e);){let{0:e,groups:{$skip:t}}=o;if(!t&&(!r||r===EA.DEFAULT==!a))return o;e===`[`?a++:e===`]`&&a&&a--,i.lastIndex==o.index&&i.lastIndex++}return null}function AA(e,t,n){return!!kA(e,t,0,n)}function jA(e,t){let n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,a=1,o;for(;o=n.exec(e);){let[e]=o;if(e===`[`)i++;else if(i)e===`]`&&i--;else if(e===`(`)a++;else if(e===`)`&&(a--,!a)){r=o.index;break}}return e.slice(t,r)}var MA=new RegExp(String.raw`(?<noncapturingStart>${CA})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,`gsu`);function NA(e,t){let n=t?.hiddenCaptures??[],r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};let i=[0],a=[],o=0,s=0,c=NaN,l;do{l=!1;let t=0,u=0,d=!1,f;for(MA.lastIndex=Number.isNaN(c)?0:c+7;f=MA.exec(e);){let{0:p,index:m,groups:{capturingStart:h,noncapturingStart:g}}=f;if(p===`[`)t++;else if(t)p===`]`&&t--;else if(p===`(?>`&&!d)c=m,d=!0;else if(d&&g)u++;else if(h)d?u++:(o++,i.push(o+s));else if(p===`)`&&d){if(!u){s++;let t=o+s;if(e=`${e.slice(0,c)}(?:(?=(${e.slice(c+3,m)}))<$$${t}>)${e.slice(m+1)}`,l=!0,a.push(t),wA(n,t),r.size){let e=new Map;r.forEach((n,r)=>{e.set(r>=t?r+1:r,n.map(e=>e>=t?e+1:e))}),r=e}break}u--}}}while(l);return n.push(...a),e=DA(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>i.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${i[n]}`}return`\\${n}`},EA.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}var PA=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,FA=new RegExp(String.raw`
|
|
175
|
+
`.replace(/\s+/g,``),`gsu`);function nk(e,t={}){let n={flags:``,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!=`string`)throw Error(`String expected as pattern`);let r=Mk(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(e){i.push(e)},replaceCurrentModX(e){i[i.length-1]=e},singleline:n.rules.singleline},o=[],s;for(ek.lastIndex=0;s=ek.exec(e);){let t=rk(a,e,s[0],ek.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),t.lastIndex!==void 0&&(ek.lastIndex=t.lastIndex)}let c=[],l=0;o.filter(e=>e.type===`GroupOpen`).forEach(e=>{e.kind===`capturing`?e.number=++l:e.raw===`(`&&c.push(e)}),l||c.forEach((e,t)=>{e.kind=`capturing`,e.number=t+1});let u=l||c.length;return{tokens:o.map(e=>e.type===`EscapedNumber`?Pk(e,u):e).flat(),flags:r}}function rk(e,t,n,r){let[i,a]=n;if(n===`[`||n===`[^`){let e=ik(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if(i===`\\`){if(`AbBGyYzZ`.includes(a))return{token:ck(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:Sk(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:lk(n)}}if(a===`K`)return{token:gk(`keep`,n)};if(a===`N`||a===`R`)return{token:hk(`newline`,n,{negate:a===`N`})};if(a===`O`)return{token:hk(`any`,n)};if(a===`X`)return{token:hk(`text_segment`,n)};let e=ok(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if(i===`(`){if(a===`*`)return{token:Dk(n)};if(n===`(?{`)throw Error(`Unsupported callout "${n}"`);if(n.startsWith(`(?#`)){if(t[r]!==`)`)throw Error(`Unclosed comment group "(?#"`);return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:Ek(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n===`(`&&!e.captureGroup||n===`(?:`)return{token:yk(`group`,n)};if(n===`(?>`)return{token:yk(`atomic`,n)};if(n===`(?=`||n===`(?!`||n===`(?<=`||n===`(?<!`)return{token:yk(n[2]===`<`?`lookbehind`:`lookahead`,n,{negate:n.endsWith(`!`)})};if(n===`(`&&e.captureGroup||n.startsWith(`(?<`)&&n.endsWith(`>`)||n.startsWith(`(?'`)&&n.endsWith(`'`))return{token:yk(`capturing`,n,{...n!==`(`&&{name:n.slice(3,-1)}})};if(n.startsWith(`(?~`)){if(n===`(?~|`)throw Error(`Unsupported absence function kind "${n}"`);return{token:yk(`absence_repeater`,n)}}throw Error(n===`(?(`?`Unsupported conditional "${n}"`:`Invalid or unsupported group option "${n}"`)}if(n===`)`){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error(`Unmatched ")"`);return{token:vk(n)}}if(e.getCurrentModX()){if(n===`#`){let e=t.indexOf(`
|
|
176
|
+
`,r);return{lastIndex:e===-1?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return n===`.`?{token:hk(`dot`,n)}:n===`^`||n===`$`?{token:ck(e.singleline?{"^":YO`\A`,$:YO`\Z`}[n]:n,n)}:n===`|`?{token:sk(n)}:$O.test(n)?{tokens:Fk(n)}:{token:uk(KO(n),n)}}function ik(e,t,n){let r=[mk(t[1]===`^`,t)],i=1,a;for(tk.lastIndex=n;a=tk.exec(e);){let e=a[0];if(e[0]===`[`&&e[1]!==`:`)i++,r.push(mk(e[1]===`^`,e));else if(e===`]`){if(r.at(-1).type===`CharacterClassOpen`)r.push(uk(93,e));else if(i--,r.push(dk(e)),!i)break}else{let t=ak(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:tk.lastIndex||e.length}}function ak(e){if(e[0]===`\\`)return ok(e,{inCharClass:!0});if(e[0]===`[`){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!JO.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return hk(`posix`,e,{value:t.groups.name,negate:!!t.groups.negate})}return e===`-`?fk(e):e===`&&`?pk(e):uk(KO(e),e)}function ok(e,{inCharClass:t}){let n=e[1];if(n===`c`||n===`C`)return Tk(e);if(`dDhHsSwW`.includes(n))return kk(e);if(e.startsWith(YO`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw Error(`Incomplete or invalid Unicode property "${e}"`);return Ak(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=>`\\x${e.toString(16)}`).join(``);return uk(KO(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n===`u`||n===`x`)return uk(Nk(e),e);if(wk.has(n))return uk(wk.get(n),e);if(/\d/.test(n))return _k(t,e);if(e===`\\`)throw Error(YO`Incomplete escape "\"`);if(n===`M`)throw Error(`Unsupported meta "${e}"`);if([...e].length===2)return uk(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function sk(e){return{type:`Alternator`,raw:e}}function ck(e,t){return{type:`Assertion`,kind:e,raw:t}}function lk(e){return{type:`Backreference`,raw:e}}function uk(e,t){return{type:`Character`,value:e,raw:t}}function dk(e){return{type:`CharacterClassClose`,raw:e}}function fk(e){return{type:`CharacterClassHyphen`,raw:e}}function pk(e){return{type:`CharacterClassIntersector`,raw:e}}function mk(e,t){return{type:`CharacterClassOpen`,negate:e,raw:t}}function hk(e,t,n={}){return{type:`CharacterSet`,kind:e,...n,raw:t}}function gk(e,t,n={}){return e===`keep`?{type:`Directive`,kind:e,raw:t}:{type:`Directive`,kind:e,flags:XO(n.flags),raw:t}}function _k(e,t){return{type:`EscapedNumber`,inCharClass:e,raw:t}}function vk(e){return{type:`GroupClose`,raw:e}}function yk(e,t,n={}){return{type:`GroupOpen`,kind:e,...n,raw:t}}function bk(e,t,n,r){return{type:`NamedCallout`,kind:e,tag:t,arguments:n,raw:r}}function xk(e,t,n,r){return{type:`Quantifier`,kind:e,min:t,max:n,raw:r}}function Sk(e){return{type:`Subroutine`,raw:e}}var Ck=new Set([`COUNT`,`CMP`,`ERROR`,`FAIL`,`MAX`,`MISMATCH`,`SKIP`,`TOTAL_COUNT`]),wk=new Map([[`a`,7],[`b`,8],[`e`,27],[`f`,12],[`n`,10],[`r`,13],[`t`,9],[`v`,11]]);function Tk(e){let t=e[1]===`c`?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${e}"`);return uk(KO(t.toUpperCase())-64,e)}function Ek(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??=``;let i=(t.getCurrentModX()||n.includes(`x`))&&!r.includes(`x`),a=jk(n),o=jk(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(`)`))return t.replaceCurrentModX(i),gk(`flags`,e,{flags:s});if(e.endsWith(`:`))return t.pushModX(i),t.numOpenGroups++,yk(`group`,e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}function Dk(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(r===``)throw Error(`Named callout tag with empty value not allowed "${e}"`);let a=i?i.split(`,`).filter(e=>e!==``).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,c]=a,l=Ck.has(n)?n.toLowerCase():`custom`;switch(l){case`fail`:case`mismatch`:case`skip`:if(a.length>0)throw Error(`Named callout arguments not allowed "${a}"`);break;case`error`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(typeof o==`string`)throw Error(`Named callout argument must be a number "${o}"`);break;case`max`:if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(a.length===2&&(typeof s==`number`||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case`count`:case`total_count`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(a.length===1&&(typeof o==`number`||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case`cmp`:if(a.length!==3)throw Error(`Named callout must have three arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof s==`number`||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if(typeof c==`string`&&!/^[A-Za-z_]\w*$/.test(c))throw Error(`Named callout argument three must be a tag or number "${c}"`);break;case`custom`:throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${l}"`)}return bk(l,r??null,i?.split(`,`)??null,e)}function Ok(e){let t=null,n,r;if(e[0]===`{`){let{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,o=1e5;if(+i>o||a&&+a>o)throw Error(`Quantifier value unsupported in Oniguruma`);if(n=+i,r=a===void 0?+i:a===``?1/0:+a,n>r&&(t=`possessive`,[n,r]=[r,n]),e.endsWith(`?`)){if(t===`possessive`)throw Error(`Unsupported possessive interval quantifier chain with "?"`);t=`lazy`}else t||=`greedy`}else n=e[0]===`+`?1:0,r=e[0]===`?`?1:1/0,t=e[1]===`+`?`possessive`:e[1]===`?`?`lazy`:`greedy`;return xk(t,n,r,e)}function kk(e){let t=e[1].toLowerCase();return hk({d:`digit`,h:`hex`,s:`space`,w:`word`}[t],e,{negate:e[1]!==t})}function Ak(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return hk(`property`,e,{value:r,negate:t===`P`&&!n||t===`p`&&!!n})}function jk(e){let t={};return e.includes(`i`)&&(t.ignoreCase=!0),e.includes(`m`)&&(t.dotAll=!0),e.includes(`x`)&&(t.extended=!0),Object.keys(t).length?t:null}function Mk(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let r=e[n];if(!`imxDPSWy`.includes(r))throw Error(`Invalid flag "${r}"`);if(r===`y`){if(!/^y{[gw]}/.test(e.slice(n)))throw Error(`Invalid or unspecified flag "y" mode`);t.textSegmentMode=e[n+2]===`g`?`grapheme`:`word`,n+=3;continue}t[{i:`ignoreCase`,m:`dotAll`,x:`extended`,D:`digitIsAscii`,P:`posixIsAscii`,S:`spaceIsAscii`,W:`wordIsAscii`}[r]]=!0}return t}function Nk(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);let t=e[2]===`{`?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function Pk(e,t){let{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!==`0`&&i.length===1||i[0]!==`0`&&+i<=t))return[lk(n)];let a=[],o=i.match(/^[0-7]+|\d/g);for(let e=0;e<o.length;e++){let t=o[e],r;if(e===0&&t!==`8`&&t!==`9`){if(r=parseInt(t,8),r>127)throw Error(YO`Octal encoded byte above 177 unsupported "${n}"`)}else r=KO(t);a.push(uk(r,(e===0?`\\`:``)+t))}return a}function Fk(e){let t=[],n=new RegExp($O,`gy`),r;for(;r=n.exec(e);){let e=r[0];if(e[0]===`{`){let r=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(r){let{min:i,max:a}=r.groups;if(+i>+a&&e.endsWith(`?`)){n.lastIndex--,t.push(Ok(e.slice(0,-1)));continue}}}t.push(Ok(e))}return t}function Ik(e,t){if(!Array.isArray(e.body))throw Error(`Expected node with body array`);if(e.body.length!==1)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}function Lk(e){return Rk.has(e.type)}var Rk=new Set([`AbsenceFunction`,`Backreference`,`CapturingGroup`,`Character`,`CharacterClass`,`CharacterSet`,`Group`,`Quantifier`,`Subroutine`]);function zk(e,t={}){let n={flags:``,normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=nk(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(e,t)=>{let n=r.tokens[a.nextIndex];switch(a.parent=e,a.nextIndex++,n.type){case`Alternator`:return Yk();case`Assertion`:return Bk(n);case`Backreference`:return Vk(n,a);case`Character`:return $k(n.value,{useLastValid:!!t.isCheckingRangeEnd});case`CharacterClassHyphen`:return Hk(n,a,t);case`CharacterClassOpen`:return Uk(n,a,t);case`CharacterSet`:return Wk(n,a);case`Directive`:return rA(n.kind,{flags:n.flags});case`GroupOpen`:return Gk(n,a,t);case`NamedCallout`:return sA(n.kind,n.tag,n.arguments);case`Quantifier`:return Kk(n,a);case`Subroutine`:return qk(n,a);default:throw Error(`Unexpected token type "${n.type}"`)}},a={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},o=uA(iA(r.flags)),s=o.body[0];for(;a.nextIndex<r.tokens.length;){let e=i(s,{});e.type===`Alternative`?(o.body.push(e),s=e):s.body.push(e)}let{capturingGroups:c,hasNumberedRef:l,namedGroupsByName:u,subroutines:d}=a;if(l&&u.size&&!n.rules.captureGroup)throw Error(`Numbered backref/subroutine not allowed when using named capture`);for(let{ref:e}of d)if(typeof e==`number`){if(e>c.length)throw Error(`Subroutine uses a group number that's not defined`);e&&(c[e-1].isSubroutined=!0)}else if(u.has(e)){if(u.get(e).length>1)throw Error(YO`Subroutine uses a duplicate group name "\g<${e}>"`);u.get(e)[0].isSubroutined=!0}else throw Error(YO`Subroutine uses a group name that's not defined "\g<${e}>"`);return o}function Bk({kind:e}){return Xk(XO({"^":`line_start`,$:`line_end`,"\\A":`string_start`,"\\b":`word_boundary`,"\\B":`word_boundary`,"\\G":`search_start`,"\\y":`text_segment_boundary`,"\\Y":`text_segment_boundary`,"\\z":`string_end`,"\\Z":`string_end_newline`}[e],`Unexpected assertion kind "${e}"`),{negate:e===YO`\B`||e===YO`\Y`})}function Vk({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(n,r=!1)=>{let i=t.capturingGroups.length,a=!1;if(n>i)if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,Zk(r?i+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(n)return i(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(r))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw Error(`Group name not defined to the left "${e}"`);return Zk(r)}return i(+r)}function Hk(e,t,n){let{tokens:r,walk:i}=t,a=t.parent,o=a.body.at(-1),s=r[t.nextIndex];if(!n.isCheckingRangeEnd&&o&&o.type!==`CharacterClass`&&o.type!==`CharacterClassRange`&&s&&s.type!==`CharacterClassOpen`&&s.type!==`CharacterClassClose`&&s.type!==`CharacterClassIntersector`){let e=i(a,{...n,isCheckingRangeEnd:!0});if(o.type===`Character`&&e.type===`Character`)return a.body.pop(),tA(o,e);throw Error(`Invalid character class range`)}return $k(KO(`-`))}function Uk({negate:e},t,n){let{tokens:r,walk:i}=t,a=r[t.nextIndex],o=[eA()],s=xA(a);for(;s.type!==`CharacterClassClose`;){if(s.type===`CharacterClassIntersector`)o.push(eA()),t.nextIndex++;else{let e=o.at(-1);e.body.push(i(e,n))}s=xA(r[t.nextIndex],a)}let c=eA({negate:e});return o.length===1?c.body=o[0].body:(c.kind=`intersection`,c.body=o.map(e=>e.body.length===1?e.body[0]:e)),t.nextIndex++,c}function Wk({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o}=r;if(e===`property`){let r=bA(n);if(JO.has(r)&&!o?.has(r))e=`posix`,n=r;else return fA(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o})}return e===`posix`?cA(n,{negate:t}):nA(e,{negate:t})}function Gk(e,t,n){let{tokens:r,capturingGroups:i,namedGroupsByName:a,skipLookbehindValidation:o,walk:s}=t,c=pA(e),l=c.type===`AbsenceFunction`,u=_A(c),d=u&&c.negate;if(c.type===`CapturingGroup`&&(i.push(c),c.name&&qO(a,c.name,[]).push(c)),l&&n.isInAbsenceFunction)throw Error(`Nested absence function not supported by Oniguruma`);let f=SA(r[t.nextIndex]);for(;f.type!==`GroupClose`;){if(f.type===`Alternator`)c.body.push(Yk()),t.nextIndex++;else{let e=c.body.at(-1),t=s(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||l,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||d});if(e.body.push(t),(u||n.isInLookbehind)&&!o){let e=`Lookbehind includes a pattern not allowed by Oniguruma`;if(d||n.isInNegLookbehind){if(gA(t)||t.type===`CapturingGroup`)throw Error(e)}else if(gA(t)||_A(t)&&t.negate)throw Error(e)}}f=SA(r[t.nextIndex])}return t.nextIndex++,c}function Kk({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!Lk(a))throw Error(`Quantifier requires a repeatable token`);let o=lA(e,t,n,a);return i.body.pop(),o}function qk({raw:e},t){let{capturingGroups:n,subroutines:r}=t,i=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){let e=+a.groups.num,r=n.length;if(t.hasNumberedRef=!0,i={"":e,"+":r+e,"-":r+1-e}[a.groups.sign],i<1)throw Error(`Invalid subroutine number`)}else i===`0`&&(i=0);let o=dA(i);return r.push(o),o}function Jk(e,t){if(e!==`repeater`)throw Error(`Unexpected absence function kind "${e}"`);return{type:`AbsenceFunction`,kind:e,body:mA(t?.body)}}function Yk(e){return{type:`Alternative`,body:hA(e?.body)}}function Xk(e,t){let n={type:`Assertion`,kind:e};return(e===`word_boundary`||e===`text_segment_boundary`)&&(n.negate=!!t?.negate),n}function Zk(e,t){let n=!!t?.orphan;return{type:`Backreference`,ref:e,...n&&{orphan:n}}}function Qk(e,t){let n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!vA(n.name))throw Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:`CapturingGroup`,number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:mA(t?.body)}}function $k(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw Error(e>1310719?`Invalid code point out of range "\\x{${t}}"`:`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:`Character`,value:e}}function eA(e){let t={kind:`union`,negate:!1,...e};return{type:`CharacterClass`,kind:t.kind,negate:t.negate,body:hA(e?.body)}}function tA(e,t){if(t.value<e.value)throw Error(`Character class range out of order`);return{type:`CharacterClassRange`,min:e,max:t}}function nA(e,t){let n=!!t?.negate,r={type:`CharacterSet`,kind:e};return(e===`digit`||e===`hex`||e===`newline`||e===`space`||e===`word`)&&(r.negate=n),(e===`text_segment`||e===`newline`&&!n)&&(r.variableLength=!0),r}function rA(e,t={}){if(e===`keep`)return{type:`Directive`,kind:e};if(e===`flags`)return{type:`Directive`,kind:e,flags:XO(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}function iA(e){return{type:`Flags`,...e}}function aA(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error(`Atomic group cannot have flags`);return{type:`Group`,...t&&{atomic:t},...n&&{flags:n},body:mA(e?.body)}}function oA(e){let t={behind:!1,negate:!1,...e};return{type:`LookaroundAssertion`,kind:t.behind?`lookbehind`:`lookahead`,negate:t.negate,body:mA(e?.body)}}function sA(e,t,n){return{type:`NamedCallout`,kind:e,tag:t,arguments:n}}function cA(e,t){let n=!!t?.negate;if(!JO.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:`CharacterSet`,kind:`posix`,value:e,negate:n}}function lA(e,t,n,r){if(t>n)throw Error(`Invalid reversed quantifier range`);return{type:`Quantifier`,kind:e,min:t,max:n,body:r}}function uA(e,t){return{type:`Regex`,body:mA(t?.body),flags:e}}function dA(e){return{type:`Subroutine`,ref:e}}function fA(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(bA(e));if(!r){if(n.normalizeUnknownPropertyNames)r=yA(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(YO`Invalid Unicode property "\p{${e}}"`)}return{type:`CharacterSet`,kind:`property`,value:r??e,negate:n.negate}}function pA({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case`absence_repeater`:return Jk(`repeater`);case`atomic`:return aA({atomic:!0});case`capturing`:return Qk(i,{name:n});case`group`:return aA({flags:e});case`lookahead`:case`lookbehind`:return oA({behind:t===`lookbehind`,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}function mA(e){if(e===void 0)e=[Yk()];else if(!Array.isArray(e)||!e.length||!e.every(e=>e.type===`Alternative`))throw Error(`Invalid body; expected array of one or more Alternative nodes`);return e}function hA(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error(`Invalid body; expected array of nodes`);return e}function gA(e){return e.type===`LookaroundAssertion`&&e.kind===`lookahead`}function _A(e){return e.type===`LookaroundAssertion`&&e.kind===`lookbehind`}function vA(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function yA(e){return e.trim().replace(/[- _]+/g,`_`).replace(/[A-Z][a-z]+(?=[A-Z])/g,`$&_`).replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function bA(e){return e.replace(/[- _]+/g,``).toLowerCase()}function xA(e,t){return XO(e,`${t?.type===`Character`&&t.value===93?`Empty`:`Unclosed`} character class`)}function SA(e){return XO(e,`Unclosed group`)}function CA(e,t,n=null){function r(e,t){for(let n=0;n<e.length;n++){let r=i(e[n],t,n,e);n=Math.max(-1,n+r)}}function i(a,o=null,s=null,c=null){let l=0,u=!1,d={node:a,parent:o,key:s,container:c,root:e,remove(){wA(c).splice(Math.max(0,TA(s)+l),1),l--,u=!0},removeAllNextSiblings(){return wA(c).splice(TA(s)+1)},removeAllPrevSiblings(){let e=TA(s)+l;return l-=e,wA(c).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;c?c[Math.max(0,TA(s)+l)]=e:XO(o,`Can't replace root node`)[s]=e,n&&i(e,o,s,c),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(wA(c).splice(Math.max(0,TA(s)+l),1,...e),l+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=i(e[n],o,TA(s)+n+t,c)}u=!0},skip(){u=!0}},{type:f}=a,p=t[`*`],m=t[f],h=typeof p==`function`?p:p?.enter,g=typeof m==`function`?m:m?.enter;if(h?.(d,n),g?.(d,n),!u)switch(f){case`AbsenceFunction`:case`CapturingGroup`:case`Group`:r(a.body,a);break;case`Alternative`:case`CharacterClass`:r(a.body,a);break;case`Assertion`:case`Backreference`:case`Character`:case`CharacterSet`:case`Directive`:case`Flags`:case`NamedCallout`:case`Subroutine`:break;case`CharacterClassRange`:i(a.min,a,`min`),i(a.max,a,`max`);break;case`LookaroundAssertion`:r(a.body,a);break;case`Quantifier`:i(a.body,a,`body`);break;case`Regex`:r(a.body,a),i(a.flags,a,`flags`);break;default:throw Error(`Unexpected node type "${f}"`)}return m?.exit?.(d,n),p?.exit?.(d,n),l}return i(e),e}function wA(e){if(!Array.isArray(e))throw Error(`Container expected`);return e}function TA(e){if(typeof e!=`number`)throw Error(`Numeric key expected`);return e}var EA=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function DA(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function OA(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var kA=Object.freeze({DEFAULT:`DEFAULT`,CHAR_CLASS:`CHAR_CLASS`});function AA(e,t,n,r){let i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,`gsu`),a=[!1],o=0,s=``;for(let t of e.matchAll(i)){let{0:e,groups:{$skip:i}}=t;if(!i&&(!r||r===kA.DEFAULT==!o)){n instanceof Function?s+=n(t,{context:o?kA.CHAR_CLASS:kA.DEFAULT,negated:a[a.length-1]}):s+=n;continue}e[0]===`[`?(o++,a.push(e[1]===`^`)):e===`]`&&o&&(o--,a.pop()),s+=e}return s}function jA(e,t,n,r){AA(e,t,n,r)}function MA(e,t,n=0,r){if(!new RegExp(t,`su`).test(e))return null;let i=RegExp(`${t}|(?<$skip>\\\\?.)`,`gsu`);i.lastIndex=n;let a=0,o;for(;o=i.exec(e);){let{0:e,groups:{$skip:t}}=o;if(!t&&(!r||r===kA.DEFAULT==!a))return o;e===`[`?a++:e===`]`&&a&&a--,i.lastIndex==o.index&&i.lastIndex++}return null}function NA(e,t,n){return!!MA(e,t,0,n)}function PA(e,t){let n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,a=1,o;for(;o=n.exec(e);){let[e]=o;if(e===`[`)i++;else if(i)e===`]`&&i--;else if(e===`(`)a++;else if(e===`)`&&(a--,!a)){r=o.index;break}}return e.slice(t,r)}var FA=new RegExp(String.raw`(?<noncapturingStart>${EA})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,`gsu`);function IA(e,t){let n=t?.hiddenCaptures??[],r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};let i=[0],a=[],o=0,s=0,c=NaN,l;do{l=!1;let t=0,u=0,d=!1,f;for(FA.lastIndex=Number.isNaN(c)?0:c+7;f=FA.exec(e);){let{0:p,index:m,groups:{capturingStart:h,noncapturingStart:g}}=f;if(p===`[`)t++;else if(t)p===`]`&&t--;else if(p===`(?>`&&!d)c=m,d=!0;else if(d&&g)u++;else if(h)d?u++:(o++,i.push(o+s));else if(p===`)`&&d){if(!u){s++;let t=o+s;if(e=`${e.slice(0,c)}(?:(?=(${e.slice(c+3,m)}))<$$${t}>)${e.slice(m+1)}`,l=!0,a.push(t),DA(n,t),r.size){let e=new Map;r.forEach((n,r)=>{e.set(r>=t?r+1:r,n.map(e=>e>=t?e+1:e))}),r=e}break}u--}}}while(l);return n.push(...a),e=AA(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>i.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${i[n]}`}return`\\${n}`},kA.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}var LA=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,RA=new RegExp(String.raw`
|
|
177
177
|
\\(?: \d+
|
|
178
178
|
| c[A-Za-z]
|
|
179
179
|
| [gk]<[^>]+>
|
|
@@ -186,9 +186,9 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
|
|
|
186
186
|
| [A-Za-z\-]+:
|
|
187
187
|
| \(DEFINE\)
|
|
188
188
|
))?
|
|
189
|
-
| (?<qBase>${
|
|
189
|
+
| (?<qBase>${LA})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
190
190
|
| \\?.
|
|
191
|
-
`.replace(/\s+/g,``),`gsu`);function
|
|
191
|
+
`.replace(/\s+/g,``),`gsu`);function zA(e){if(!RegExp(`${LA}\\+`).test(e))return{pattern:e};let t=[],n=null,r=null,i=``,a=0,o;for(RA.lastIndex=0;o=RA.exec(e);){let{0:s,index:c,groups:{qBase:l,qMod:u,invalidQ:d}}=o;if(s===`[`)a||(r=c),a++;else if(s===`]`)a?a--:r=null;else if(!a)if(u===`+`&&i&&!i.startsWith(`(`)){if(d)throw Error(`Invalid quantifier "${s}"`);let t=-1;if(/^\{\d+\}$/.test(l))e=OA(e,c+l.length,u,``);else{if(i===`)`||i===`]`){let t=i===`)`?n:r;if(t===null)throw Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,t)}(?>${e.slice(t,c)}${l})${e.slice(c+s.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${l})${e.slice(c+s.length)}`;t+=4}RA.lastIndex+=t}else s[0]===`(`?t.push(c):s===`)`&&(n=t.length?t.pop():null);i=s}return{pattern:e}}var BA=String.raw,VA=BA`\(\?R=(?<rDepth>[^\)]+)\)|${BA`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`}`,HA=BA`\(\?<(?![=!])(?<captureName>[^>]+)>`,UA=BA`${HA}|(?<unnamed>\()(?!\?)`,WA=new RegExp(BA`${HA}|${VA}|\(\?|\\?.`,`gsu`),GA=`Cannot use multiple overlapping recursions`;function KA(e,t){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:`plugin`,...t},i=t?.captureTransfers??new Map;if(!new RegExp(VA,`su`).test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r===`plugin`&&NA(e,BA`\(\?\(DEFINE\)`,kA.DEFAULT))throw Error(`DEFINE groups cannot be used with recursion`);let a=[],o=NA(e,BA`\\[1-9]`,kA.DEFAULT),s=new Map,c=[],l=!1,u=0,d=0,f;for(WA.lastIndex=0;f=WA.exec(e);){let{0:t,groups:{captureName:p,rDepth:m,gRNameOrNum:h,gRDepth:g}}=f;if(t===`[`)u++;else if(u)t===`]`&&u--;else if(m){if(qA(m),l)throw Error(GA);if(o)throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with global recursion`);let t=e.slice(0,f.index),s=e.slice(WA.lastIndex);if(NA(s,VA,kA.DEFAULT))throw Error(GA);let c=m-1;e=JA(t,s,c,!1,n,a,d),i=ZA(i,t,c,a.length,0,d);break}else if(h){qA(g);let u=!1;for(let e of c)if(e.name===h||e.num===+h){if(u=!0,e.hasRecursedWithin)throw Error(GA);break}if(!u)throw Error(BA`Recursive \g cannot be used outside the referenced group "${r===`external`?h:BA`\g<${h}&R=${g}>`}"`);let p=s.get(h),m=PA(e,p);if(o&&NA(m,BA`${HA}|\((?!\?)`,kA.DEFAULT))throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with recursion of capturing groups`);let _=e.slice(p,f.index),v=m.slice(_.length+t.length),y=a.length,b=g-1,x=JA(_,v,b,!0,n,a,d);i=ZA(i,_,b,a.length-y,y,d),e=`${e.slice(0,p)}${x}${e.slice(p+m.length)}`,WA.lastIndex+=x.length-t.length-_.length-v.length,c.forEach(e=>e.hasRecursedWithin=!0),l=!0}else if(p)d++,s.set(String(d),WA.lastIndex),s.set(p,WA.lastIndex),c.push({num:d,name:p});else if(t[0]===`(`){let e=t===`(`;e&&(d++,s.set(String(d),WA.lastIndex)),c.push(e?{num:d}:{})}else t===`)`&&c.pop()}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function qA(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e=+e,e<2||e>100))throw Error(t)}function JA(e,t,n,r,i,a,o){let s=new Set;r&&jA(e+t,HA,({groups:{captureName:e}})=>{s.add(e)},kA.DEFAULT);let c=[n,r?s:null,i,a,o];return`${e}${YA(`(?:${e}`,`forward`,...c)}(?:)${YA(`${t})`,`backward`,...c)}${t}`}function YA(e,t,n,r,i,a,o){let s=e=>t===`forward`?e+2:n-e+2-1,c=``;for(let t=0;t<n;t++){let n=s(t);c+=AA(e,BA`${UA}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:c}})=>{if(c&&r&&!r.has(c))return e;let l=`_$${n}`;if(s||t){let n=o+a.length+1;return a.push(n),XA(i,n),s?e:`(?<${t}${l}>`}return BA`\k<${c}${l}>`},kA.DEFAULT)}return c}function XA(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function ZA(e,t,n,r,i,a){if(e.size&&r){let o=0;jA(t,UA,()=>o++,kA.DEFAULT);let s=a-o+i,c=new Map;return e.forEach((e,t)=>{let i=(r-o*n)/n,a=o*n,l=t>s+o?t+r:t,u=[];for(let t of e)if(t<=s)u.push(t);else if(t>s+o+i)u.push(t+r);else if(t<=s+o)for(let e=0;e<=n;e++)u.push(t+o*e);else for(let e=0;e<=n;e++)u.push(t+a+i*e);c.set(l,u)}),c}return e}var QA=String.fromCodePoint,$=String.raw,$A={},ej=globalThis.RegExp;$A.flagGroups=(()=>{try{new ej(`(?i:)`)}catch{return!1}return!0})(),$A.unicodeSets=(()=>{try{new ej(`[[]]`,`v`)}catch{return!1}return!0})(),$A.bugFlagVLiteralHyphenIsRange=$A.unicodeSets?(()=>{try{new ej($`[\d\-a]`,`v`)}catch{return!0}return!1})():!1,$A.bugNestedClassIgnoresNegation=$A.unicodeSets&&new ej(`[[^a]]`,`v`).test(`a`);function tj(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function nj(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function rj(e,t){return aj[e]>=aj[t]}function ij(e,t){if(e==null)throw Error(t??`Value expected`);return e}var aj={ES2025:2025,ES2024:2024,ES2018:2018},oj={auto:`auto`,ES2025:`ES2025`,ES2024:`ES2024`,ES2018:`ES2018`};function sj(e={}){if({}.toString.call(e)!==`[object Object]`)throw Error(`Unexpected options`);if(e.target!==void 0&&!oj[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:`default`,avoidSubclass:!1,flags:``,global:!1,hasIndices:!1,lazyCompileLength:1/0,target:`auto`,verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target===`auto`&&(t.target=$A.flagGroups?`ES2025`:$A.unicodeSets?`ES2024`:`ES2018`),t}var cj=`[ -\r ]`,lj=new Set([QA(304),QA(305)]),uj=$`[\p{L}\p{M}\p{N}\p{Pc}]`;function dj(e){if(lj.has(e))return[e];let t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=hj.get(n),a=pj.get(n),o=mj.get(n);return[...r].length===1&&t.add(r),o&&t.add(o),i&&t.add(i),t.add(n),a&&t.add(a),[...t]}var fj=new Map(`C Other
|
|
192
192
|
Cc Control cntrl
|
|
193
193
|
Cf Format
|
|
194
194
|
Cn Unassigned
|
|
@@ -278,17 +278,17 @@ Uppercase Upper
|
|
|
278
278
|
Variation_Selector VS
|
|
279
279
|
White_Space space
|
|
280
280
|
XID_Continue XIDC
|
|
281
|
-
XID_Start XIDS`.split(/\s/).map(e=>[
|
|
281
|
+
XID_Start XIDS`.split(/\s/).map(e=>[bA(e),e])),pj=new Map([[`s`,QA(383)],[QA(383),`s`]]),mj=new Map([[QA(223),QA(7838)],[QA(107),QA(8490)],[QA(229),QA(8491)],[QA(969),QA(8486)]]),hj=new Map([vj(453),vj(456),vj(459),vj(498),...yj(8072,8079),...yj(8088,8095),...yj(8104,8111),vj(8124),vj(8140),vj(8188)]),gj=new Map([[`alnum`,$`[\p{Alpha}\p{Nd}]`],[`alpha`,$`\p{Alpha}`],[`ascii`,$`\p{ASCII}`],[`blank`,$`[\p{Zs}\t]`],[`cntrl`,$`\p{Cc}`],[`digit`,$`\p{Nd}`],[`graph`,$`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],[`lower`,$`\p{Lower}`],[`print`,$`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],[`punct`,$`[\p{P}\p{S}]`],[`space`,$`\p{space}`],[`upper`,$`\p{Upper}`],[`word`,$`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],[`xdigit`,$`\p{AHex}`]]);function _j(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function vj(e){let t=QA(e);return[t.toLowerCase(),t]}function yj(e,t){return _j(e,t).map(e=>vj(e))}var bj=new Set([`Lower`,`Lowercase`,`Upper`,`Uppercase`,`Ll`,`Lowercase_Letter`,`Lt`,`Titlecase_Letter`,`Lu`,`Uppercase_Letter`]);function xj(e,t){let n={accuracy:`default`,asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:`ES2025`,...t};Tj(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:rj(n.bestEffortTarget,`ES2024`),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};CA(e,Sj,r);let i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},a={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};return CA(e,Cj,a),CA(e,wj,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var Sj={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if(i===`repeater`){let e=aA();e.body[0].body.push(oA({negate:!0,body:r}),fA(`Any`));let i=aA();i.body[0].body.push(lA(`greedy`,0,1/0,e)),n(Wj(i,t),{traverse:!0})}else throw Error(`Unsupported absence function "(?~|"`)},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>e.kind===`flags`);for(let e=n+1;e<t.body.length;e++){let n=t.body[e];nj(r,n,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=Mj(t.get(e));if(n){let t=aA({flags:n});t.body[0].body=e.body,e.body=[Wj(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:o},s){let{kind:c,negate:l}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:f,wordIsAscii:p}=s;if(c===`text_segment_boundary`)throw Error(`Unsupported text segment boundary "\\${l?`Y`:`y`}"`);if(c===`line_end`)o(Wj(oA({body:[Yk({body:[Xk(`string_end`)]}),Yk({body:[$k(10)]})]}),t));else if(c===`line_start`)o(Wj(Vj($`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c===`search_start`)if(f.has(e))i.flags.sticky=!0,a();else{let e=r[n-1];if(e&&Rj(e))o(Wj(oA({negate:!0}),t));else if(d)throw Error($`Uses "\G" in a way that requires a subclass`);else o(Uj(Xk(`string_start`),t)),s.strategy=`clip_search`}else if(!(c===`string_end`||c===`string_start`))if(c===`string_end_newline`)o(Wj(Vj($`(?=\n?\z)`),t));else if(c===`word_boundary`){if(!p&&!u){let e=`(?:(?<=${uj})(?!${uj})|(?<!${uj})(?=${uj}))`,n=`(?:(?<=${uj})(?=${uj})|(?<!${uj})(?!${uj}))`;o(Wj(Vj(l?n:e),t))}}else throw Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!Bj(n)&&(n=jj(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!Bj(r)&&(r=jj(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){t.kind===`intersection`&&n(Wj(eA({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:o,wordIsAscii:s}){let{kind:c,negate:l,value:u}=e;if(a&&(c===`digit`||u===`digit`)){n(Uj(nA(`digit`,{negate:l}),t));return}if(o&&(c===`space`||u===`space`)){n(Wj(Hj(Vj(cj),l),t));return}if(s&&(c===`word`||u===`word`)){n(Uj(nA(`word`,{negate:l}),t));return}if(c===`any`)n(Uj(fA(`Any`),t));else if(c===`digit`)n(Uj(fA(`Nd`,{negate:l}),t));else if(c!==`dot`)if(c===`text_segment`){if(r===`strict`)throw Error($`Use of "\X" requires non-strict accuracy`);let e=`\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?`,a=$`\p{RI}{2}|${e}(?:\u200D${e})*`;n(Wj(Vj($`(?>\r\n|${i?$`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c===`hex`)n(Uj(fA(`AHex`,{negate:l}),t));else if(c===`newline`)n(Wj(Vj(l?`[^
|
|
282
282
|
]`:`(?>\r
|
|
283
283
|
?|[
|
|
284
|
-
\v\f
\u2028\u2029])`),t));else if(c===`posix`)if(!i&&(u===`graph`||u===`print`)){if(r===`strict`)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:`!-~`,print:` -~`}[u];l&&(e=`\0-${YA(e.codePointAt(0)-1)}${YA(e.codePointAt(2)+1)}-\u{10FFFF}`),n(Vj(Rj(`[${e}]`),t))}else n(Vj(zj(Rj(pj.get(u)),l),t));else if(c===`property`)lj.has(_A(u))||(e.key=`sc`);else if(c===`space`)n(Bj(lA(`space`,{negate:l}),t));else if(c===`word`)n(Vj(zj(Rj(sj),l),t));else throw Error(`Unexpected character set kind "${c}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:c}=e;if(s===`flags`)if(!c.enable&&!c.disable)r();else{let e=nA({flags:c});e.body[0].body=o(),i(Vj(e,t),{traverse:!0})}else if(s===`keep`){let e=n.body[0],r=n.body.length===1&&Nk(e,{type:`Group`})&&e.body[0].body.length===1?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error($`Uses "\K" in a way that's unsupported`);let o=rA({behind:!0});o.body[0].body=a(),i(Vj(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error(`Unsupported flag "P"`);if(e.textSegmentMode===`word`)throw Error(`Unsupported flag "y{w}"`);[`digitIsAscii`,`extended`,`posixIsAscii`,`spaceIsAscii`,`wordIsAscii`,`textSegmentMode`].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;n===`lookbehind`&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if(r===`fail`)n(Vj(rA({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type===`Quantifier`){let t=nA();t.body[0].body.push(e.body),e.body=Vj(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(t.body.length===1&&t.body[0].kind===`search_start`)t.body.pop();else{let e=Mj(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t===`strict`&&n&&r)throw Error($`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!Lj(n)&&(n=Oj(n,t),e.ref=n)}},bj={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:c}){let l=i.get(e);if(l&&s.has(e.number)){let r=Bj(Ej(e.number),t);c.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&$A(o,e.name,[]);let u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(l===n.node||l&&l===n.origin||e===n.origin){u.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:l}),e.name&&o.get(e.name).push({node:e,origin:l}),e.name){let t=$A(a,e.name,new Map),n=!1;if(l)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=QA(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&!(n.type===`CapturingGroup`&&(n.name===a||n.number===a)););r.reffedNodesByReferencer.set(e,n);return}let o=r.subroutineRefMap.get(a),s=a===0,c=s?Ej(0):Tj(o,r.groupOriginByCopy,null),l=c;if(!s){let e=kj(Dj(o,e=>e.type===`Group`&&!!e.flags)),t=e?QA(r.globalFlags,e):r.globalFlags;Cj(t,r.currentFlags)||(l=nA({flags:Aj(t)}),l.body[0].body.push(c))}n(Vj(l,t),{traverse:!s})}},xj={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>wj(t,e));i.length?i.length>1?n(Vj(nA({atomic:!0,body:i.reverse().map(e=>Kk({body:[Jk(e.number)]}))}),t)):e.ref=i[0].number:n(Vj(rA({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=Yk();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function Sj(e){bA(e,{"*"({node:e,parent:t}){e.parent=t}})}function Cj(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function wj(e,t){let n=t;do{if(n.type===`Regex`)return!1;if(n.type===`Alternative`)continue;if(n===e)return!1;let t=jj(n.parent);for(let r of t){if(r===n)break;if(r===e||Nj(r,e))return!0}}while(n=n.parent);throw Error(`Unexpected path`)}function Tj(e,t,n,r){let i=Array.isArray(e)?[]:{};for(let[a,o]of Object.entries(e))a===`parent`?i.parent=Array.isArray(n)?r:n:o&&typeof o==`object`?i[a]=Tj(o,t,i,n):(a===`type`&&o===`CapturingGroup`&&t.set(i,t.get(e)??e),i[a]=o);return i}function Ej(e){let t=cA(e);return t.isRecursive=!0,t}function Dj(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Oj(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/gu,`_`)}`;return t.set(e,n),n}function kj(e){let t=[`dotAll`,`ignoreCase`],n={enable:{},disable:{}};return e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function Aj({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function jj(e){if(!e)throw Error(`Node expected`);let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function Mj(e){let t=e.find(e=>e.kind===`search_start`||Ij(e,{negate:!1})||!Pj(e));if(!t)return null;if(t.kind===`search_start`)return t;if(t.type===`LookaroundAssertion`)return t.body[0].body[0];if(t.type===`CapturingGroup`||t.type===`Group`){let e=[];for(let n of t.body){let t=Mj(n.body);if(!t)return null;Array.isArray(t)?e.push(...t):e.push(t)}return e}return null}function Nj(e,t){let n=jj(e)??[];for(let e of n)if(e===t||Nj(e,t))return!0;return!1}function Pj({type:e}){return e===`Assertion`||e===`Directive`||e===`LookaroundAssertion`}function Fj(e){let t=[`Character`,`CharacterClass`,`CharacterSet`];return t.includes(e.type)||e.type===`Quantifier`&&e.min&&t.includes(e.body.type)}function Ij(e,t){let n={negate:null,...t};return e.type===`LookaroundAssertion`&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&Nk(e.body[0],{type:`Assertion`,kind:`search_start`})}function Lj(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Rj(e,t){let n=Ik(e,{...t,unicodePropertyMap:lj}).body;return n.length>1||n[0].body.length>1?nA({body:n}):n[0].body[0]}function zj(e,t){return e.negate=t,e}function Bj(e,t){return e.parent=t,e}function Vj(e,t){return Sj(e),e.parent=t,e}function Hj(e,t){let n=ij(t),r=ej(n.target,`ES2024`),i=ej(n.target,`ES2025`),a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error(`Invalid recursionLimit; use 2-20`);let o=null,s=null;if(!i){let t=[e.flags.ignoreCase];bA(e,Uj,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!s)},l=e,u={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&o&&s),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(e){return u.lastNode=l,l=e,tj(Wj[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let f={pattern:e.body.map(d).join(`|`),flags:d(e.flags),options:{...e.options}};return r||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&f._hiddenCaptures.push(t),e.transferTo&&$A(f._captureTransfers,e.transferTo,[]).push(t)}),f}var Uj={"*":{enter({node:e},t){if(nM(e)){let n=t.getCurrentModI();t.pushModI(e.flags?QA({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){nM(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){Xj(YA(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),Zj(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind===`property`&&_j.has(e.value)&&t.setHasCasedChar()}},Wj={Alternative({body:e},t,n){return e.map(n).join(``)},Assertion({kind:e,negate:t}){if(e===`string_end`)return`$`;if(e===`string_start`)return`^`;if(e===`word_boundary`)return t?$`\B`:$`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!=`number`)throw Error(`Unexpected named backref in transformed AST`);if(!t.useFlagMods&&t.accuracy===`strict`&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error(`Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy`);return`\\`+e},CapturingGroup(e,t,n){let{body:r,name:i,number:a}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,a>s.number&&(o.transferTo=s.number)),t.captureMap.set(a,o),`(${i?`?<${i}>`:``}${r.map(n).join(`|`)})`},Character({value:e},t){let n=YA(e),r=Qj(e,{escDigit:t.lastNode.type===`Backreference`,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Xj(n)){let e=cj(n);return t.inCharClass?e.join(``):e.length>1?`[${e.join(``)}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:i,parent:a}=e,{body:o}=e;if(r===`intersection`&&!t.useFlagV)throw Error(`Use of character class intersection requires min target ES2024`);XA.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(iM)&&(o=[Xk(45),...o.filter(e=>!iM(e))]);let s=()=>`[${i?`^`:``}${o.map(n).join(r===`intersection`?`&&`:``)}]`;if(!t.inCharClass){if((!t.useFlagV||XA.bugNestedClassIgnoresNegation)&&!i){let t=o.filter(e=>e.type===`CharacterClass`&&e.kind===`union`&&e.negate);if(t.length){let r=nA(),i=r.body[0];return r.parent=a,i.parent=r,o=o.filter(e=>!t.includes(e)),e.body=o,o.length?(e.parent=i,i.body.push(e)):r.body.pop(),t.forEach(e=>{let t=Kk({body:[e]});e.parent=t,t.parent=r,r.body.push(t)}),n(r)}}t.inCharClass=!0;let r=s();return t.inCharClass=!1,r}let c=o[0];if(r===`union`&&!i&&c&&((!t.useFlagV||!t.verbose)&&a.kind===`union`&&!(XA.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&a.kind===`intersection`&&o.length===1&&c.type!==`CharacterClassRange`))return o.map(n).join(``);if(!t.useFlagV&&a.type===`CharacterClass`)throw Error(`Uses nested character class in a way that requires min target ES2024`);return s()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=Qj(n,i),o=Qj(r,i),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&$j(Zj(e)).forEach(e=>{s.add(Array.isArray(e)?`${Qj(e[0],i)}-${Qj(e[1],i)}`:Qj(e,i))}),`${a}-${o}${[...s].join(``)}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e===`dot`)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?`.`:`[^]`:$`[^\n]`;if(e===`digit`)return t?$`\D`:$`\d`;if(e===`property`){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&_j.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?$`\P`:$`\p`}{${r?`${r}=`:``}${n}}`}if(e===`word`)return t?$`\W`:$`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?`i`:``)+(e.dotAll?`s`:``)+(e.sticky?`y`:``)},Group({atomic:e,body:t,flags:n,parent:r},i,a){let o=i.currentFlags;n&&(i.currentFlags=QA(o,n));let s=t.map(a).join(`|`),c=!i.verbose&&t.length===1&&r.type!==`Quantifier`&&!e&&(!i.useFlagMods||!n)?s:`(?${eM(e,n,i.useFlagMods)}${s})`;return i.currentFlags=o,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t===`lookahead`?``:`<`}${n?`!`:`=`}`}${e.map(i).join(`|`)})`},Quantifier(e,t,n){return n(e.body)+tM(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error(`Unexpected non-recursive subroutine in transformed AST`);let r=n.recursionLimit;return t===0?`(?R=${r})`:$`\g<${t}&R=${r}>`}},Gj=new Set([`$`,`(`,`)`,`*`,`+`,`.`,`?`,`[`,`\\`,`]`,`^`,`{`,`|`,`}`]),Kj=new Set([`-`,`\\`,`]`,`^`,`[`]),qj=new Set("()-/[\\]^{|}!#$%&*+,.:;<=>?@`~".split(``)),Jj=new Map([[9,$`\t`],[10,$`\n`],[11,$`\v`],[12,$`\f`],[13,$`\r`],[8232,$`\u2028`],[8233,$`\u2029`],[65279,$`\uFEFF`]]),Yj=/^\p{Cased}$/u;function Xj(e){return Yj.test(e)}function Zj(e,t){let n=!!t?.firstOnly,r=e.min.value,i=e.max.value,a=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return a;for(let e=r;e<=i;e++){let t=YA(e);if(!Xj(t))continue;let o=cj(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(o.length&&(a.push(...o),n))break}return a}function Qj(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(Jj.has(e))return Jj.get(e);if(e<32||e>126&&e<160||e>262143||t&&rM(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,`0`)}`;let i=n?r?qj:Kj:Gj,a=YA(e);return(i.has(a)?`\\`:``)+a}function $j(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],r=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?r??=t[e]:r===null?n.push(t[e]):(n.push([r,t[e]]),r=null);return n}function eM(e,t,n){if(e)return`>`;let r=``;if(t&&n){let{enable:e,disable:n}=t;r=(e?.ignoreCase?`i`:``)+(e?.dotAll?`s`:``)+(n?`-`:``)+(n?.ignoreCase?`i`:``)+(n?.dotAll?`s`:``)}return`${r}:`}function tM({kind:e,max:t,min:n}){let r;return r=!n&&t===1?`?`:!n&&t===1/0?`*`:n===1&&t===1/0?`+`:n===t?`{${n}}`:`{${n},${t===1/0?``:t}}`,r+{greedy:``,lazy:`?`,possessive:`+`}[e]}function nM({type:e}){return e===`CapturingGroup`||e===`Group`||e===`LookaroundAssertion`}function rM(e){return e>47&&e<58}function iM({type:e,value:t}){return e===`Character`&&t===45}var aM=class e extends RegExp{#e=new Map;#t=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||`(?:)`}constructor(t,n,r){let i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw Error(`Cannot provide options when copying a regexp`);let i=t;super(i,n),this.#n=i.source,i instanceof e&&(this.#e=i.#e,this.#r=i.#r,this.#i=i.#i,this.rawOptions=i.rawOptions)}else{let e={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?``:t,n),this.#n=t,this.#e=sM(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=r??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#i===`clip_search`&&n&&r){this.lastIndex=0;let e=this.#a(t.slice(r));return e&&(oM(e,r,t,this.hasIndices),this.lastIndex+=r),e}return this.#a(t)}#a(e){this.#t.lastIndex=this.lastIndex;let t=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!t||!this.#e.size)return t;let n=[...t];t.length=1;let r;this.hasIndices&&(r=[...t.indices],t.indices.length=1);let i=[0];for(let e=1;e<n.length;e++){let{hidden:a,transferTo:o}=this.#e.get(e)??{};if(a?i.push(null):(i.push(t.length),t.push(n[e]),this.hasIndices&&t.indices.push(r[e])),o&&n[e]!==void 0){let a=i[o];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(t[a]=n[e],this.hasIndices&&(t.indices[a]=r[e]),t.groups){this.#r||=cM(this.source);let i=this.#r.get(o);i&&(t.groups[i]=n[e],this.hasIndices&&(t.indices.groups[i]=r[e]))}}}return t}};function oM(e,t,n,r){if(e.index+=t,e.input=n,r){let n=e.indices;for(let e=0;e<n.length;e++){let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])}let r=n.groups;r&&Object.keys(r).forEach(e=>{let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])})}}function sM(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,r]of t)for(let t of r)$A(n,t,{}).transferTo=e;return n}function cM(e){let t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,i=0,a;for(;a=t.exec(e);){let{0:e,groups:{capture:t,name:o}}=a;e===`[`?r++:r?e===`]`&&r--:t&&(i++,o&&n.set(i,o))}return n}function lM(e,t){let n=uM(e,t);return n.options?new aM(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function uM(e,t){let n=ij(t),r=vj(Ik(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:lj}),{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=Hj(r,n),a=UA(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:`external`}),o=NA(IA(a.pattern).pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),s={pattern:o.pattern,flags:`${n.hasIndices?`d`:``}${n.global?`g`:``}${i.flags}${i.options.disable.v?`u`:`v`}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw Error(`Lazy compilation requires subclass`)}else{let e=o.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(o.captureTransfers),i=r._strategy,a=s.pattern.length>=n.lazyCompileLength;(e.length||t.length||i||a)&&(s.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...i&&{strategy:i},...a&&{lazyCompile:a}})}return s}var dM=4294967295,fM=class{constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}regexps;findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:dM,end:dM,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function pM(e,t){return lM(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function mM(e={}){let t=Object.assign({target:`auto`,cache:new Map},e);return t.regexConstructor||=e=>pM(e,{target:t.target}),{createScanner(e){return new fM(e,t)},createString(e){return{content:e}}}}var hM=mM({forgiving:!0}),gM=Object.fromEntries(aO.flatMap(e=>(e.aliases??[]).map(t=>[t,e.id]))),_M=new Set(Object.keys(cO)),vM=e=>{let t=e.trim().toLowerCase();return gM[t]||(_M.has(t),t)},yM=new Map,bM=new Map,xM=new Map,SM=e=>typeof e==`string`?e:e.name??`custom`,CM=(e,t)=>`${e}-${SM(t[0])}-${SM(t[1])}`,wM=(e,t,n)=>{let r=e.slice(0,100),i=e.length>100?e.slice(-100):``;return`${t}:${n[0]}:${n[1]}:${e.length}:${r}:${i}`},TM=(e,t)=>{let n=CM(e,t);if(yM.has(n))return yM.get(n);let r=FO({themes:t,langs:[e],engine:hM});return yM.set(n,r),r};function EM(e={}){let t=e.themes??[`github-light`,`github-dark`];return{name:`shiki`,type:`code-highlighter`,supportsLanguage(e){let t=vM(e);return _M.has(t)},getSupportedLanguages(){return Array.from(_M)},getThemes(){return t},highlight({code:e,language:t,themes:n},r){let i=vM(t),a=[SM(n[0]),SM(n[1])],o=wM(e,i,a);return bM.has(o)?bM.get(o):(r&&(xM.has(o)||xM.set(o,new Set),xM.get(o).add(r)),TM(_M.has(i)?i:`text`,n).then(t=>{let n=t.getLoadedLanguages().includes(i)?i:`text`,r=t.codeToTokens(e,{lang:n,themes:{light:a[0],dark:a[1]}});bM.set(o,r);let s=xM.get(o);if(s){for(let e of s)e(r);xM.delete(o)}}).catch(e=>{console.error(`[Streamdown Code] Failed to highlight code:`,e),xM.delete(o)}),null)}}}var DM=EM();function OM(e){return!isFinite(e)||isNaN(e)?`0:00`:`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,`0`)}`}function kM({audioData:e}){let[t,n]=(0,j.useState)(!1),[r,i]=(0,j.useState)(0),[a,o]=(0,j.useState)(0),s=(0,j.useRef)(null),c=(0,j.useRef)(null);(0,j.useEffect)(()=>{let t=new Audio(e);return t.addEventListener(`durationchange`,()=>{isFinite(t.duration)&&o(t.duration)}),t.addEventListener(`timeupdate`,()=>{isFinite(t.duration)&&t.duration>0&&(i(t.currentTime/t.duration),a===0&&o(t.duration))}),t.addEventListener(`ended`,()=>{n(!1),i(0)}),t.addEventListener(`loadedmetadata`,()=>{isFinite(t.duration)||(t.currentTime=1e10,t.addEventListener(`timeupdate`,function e(){isFinite(t.duration)&&(o(t.duration),t.currentTime=0,t.removeEventListener(`timeupdate`,e))}))}),s.current=t,()=>{t.pause(),t.src=``}},[e]);let l=(0,j.useCallback)(()=>{let e=s.current;e&&(t?(e.pause(),n(!1)):(e.play(),n(!0)))},[t]),u=(0,j.useCallback)(e=>{let t=s.current,n=c.current;if(!t||!n||!isFinite(t.duration))return;let r=n.getBoundingClientRect(),a=Math.max(0,Math.min(1,(e.clientX-r.left)/r.width));t.currentTime=a*t.duration,i(a)},[]);return(0,M.jsxs)(`div`,{className:`flex items-center gap-2.5 min-w-[180px]`,children:[(0,M.jsx)(`button`,{onClick:l,className:`flex items-center justify-center h-8 w-8 shrink-0 rounded-full bg-white/20 hover:bg-white/30 transition-colors`,children:t?(0,M.jsx)(se,{className:`h-3.5 w-3.5 fill-current`}):(0,M.jsx)(ce,{className:`h-3.5 w-3.5 fill-current ml-0.5`})}),(0,M.jsxs)(`div`,{className:`flex-1 flex flex-col gap-1`,children:[(0,M.jsx)(`div`,{ref:c,onClick:u,className:`h-1 bg-white/20 rounded-full cursor-pointer relative`,children:(0,M.jsx)(`div`,{className:`absolute inset-y-0 left-0 bg-white/70 rounded-full transition-[width] duration-100`,style:{width:`${r*100}%`}})}),(0,M.jsx)(`span`,{className:`text-[10px] opacity-60 tabular-nums`,children:OM(t?r*a:a)})]})]})}function AM({group:e}){let[t,n]=(0,j.useState)({}),[r,i]=(0,j.useState)(`idle`),[a,o]=(0,j.useState)(``),s=(e,t)=>{n(n=>({...n,[e]:t}))},l=async()=>{let e=Object.entries(t).filter(([,e])=>e.trim());if(e.length!==0){i(`submitting`),o(``);try{let t=await fetch(`/api/env`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({vars:Object.fromEntries(e)})});if(!t.ok){let e=await t.json().catch(()=>({error:`Request failed`}));throw Error(e.error||`Request failed`)}i(`submitted`)}catch(e){o(e.message||`Failed to save`),i(`error`)}}},u=Object.values(t).filter(e=>e.trim()).length;return r===`submitted`?(0,M.jsx)(`div`,{className:`my-3 rounded-xl border border-emerald-500/20 bg-emerald-500/5 overflow-hidden`,children:(0,M.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-3`,children:[(0,M.jsx)(`div`,{className:`flex items-center justify-center w-8 h-8 rounded-lg bg-emerald-500 shrink-0`,children:(0,M.jsx)(c,{className:`w-4 h-4 text-white`,strokeWidth:3})}),(0,M.jsxs)(`div`,{className:`flex flex-col min-w-0`,children:[(0,M.jsx)(`span`,{className:`text-emerald-400 font-medium text-sm`,children:e.title}),(0,M.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[u,` variable`,u===1?``:`s`,` saved — backend restarting`]})]})]})}):(0,M.jsxs)(`div`,{className:`my-3 rounded-xl border border-border/60 bg-card/50 overflow-hidden`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2.5 px-4 py-3 border-b border-border/40 bg-muted/30`,children:[(0,M.jsx)(`div`,{className:`flex items-center justify-center w-7 h-7 rounded-lg bg-primary/10 shrink-0`,children:(0,M.jsx)(re,{className:`w-3.5 h-3.5 text-primary`})}),(0,M.jsx)(`span`,{className:`font-medium text-sm text-foreground`,children:e.title})]}),(0,M.jsx)(`div`,{className:`px-4 py-3 space-y-3`,children:e.fields.map(e=>(0,M.jsxs)(`div`,{className:`space-y-1`,children:[(0,M.jsxs)(`label`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,M.jsx)(`span`,{children:e.label}),(0,M.jsx)(`code`,{className:`text-[10px] px-1 py-0.5 rounded bg-muted text-muted-foreground/70`,children:e.name})]}),(0,M.jsx)(`input`,{type:`text`,placeholder:e.placeholder,value:t[e.name]||``,onChange:t=>s(e.name,t.target.value),disabled:r===`submitting`,className:`w-full px-3 py-2 rounded-lg text-sm bg-background border border-border/60 text-foreground placeholder:text-muted-foreground/40 focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary/50 disabled:opacity-50 transition-colors font-mono`,spellCheck:!1,autoComplete:`off`})]},e.name))}),r===`error`&&(0,M.jsxs)(`div`,{className:`px-4 pb-2 flex items-center gap-1.5 text-xs text-red-400`,children:[(0,M.jsx)(ee,{className:`w-3 h-3 shrink-0`}),(0,M.jsx)(`span`,{children:a})]}),(0,M.jsxs)(`div`,{className:`px-4 py-3 border-t border-border/40 bg-muted/20 flex items-center justify-between`,children:[(0,M.jsxs)(`span`,{className:`text-[11px] text-muted-foreground/60`,children:[`Values are written to `,(0,M.jsx)(`code`,{className:`text-[10px]`,children:`.env`})]}),(0,M.jsx)(`button`,{onClick:l,disabled:u===0||r===`submitting`,className:`inline-flex items-center gap-1.5 px-4 py-1.5 rounded-lg text-xs font-medium bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-40 disabled:cursor-not-allowed transition-all`,children:r===`submitting`?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(v,{className:`w-3 h-3 animate-spin`}),`Saving...`]}):`Submit`})]})]})}function jM(e){let t=e.split(`/`);return t[t.length-1]||`bloby-image`}function MM({src:e,alt:t}){let[n,r]=(0,j.useState)(!1);return n?(0,M.jsxs)(`div`,{className:`my-2 flex items-center gap-2.5 px-3.5 py-2.5 rounded-xl border border-border/30 bg-black/10 text-muted-foreground/50 text-xs`,children:[(0,M.jsx)(ne,{className:`h-4 w-4 shrink-0`}),(0,M.jsx)(`span`,{className:`truncate`,children:t||`Image not found`})]}):(0,M.jsxs)(`div`,{className:`relative group/img my-2 rounded-xl overflow-hidden border border-border/30 bg-black/20 w-fit max-w-full`,children:[(0,M.jsx)(`img`,{src:e,alt:t||`Generated image`,className:`max-w-full max-h-80 object-contain`,loading:`lazy`,onError:()=>r(!0)}),(0,M.jsx)(`div`,{className:`absolute top-2 right-2 flex gap-1.5 opacity-0 group-hover/img:opacity-100 transition-opacity`,children:(0,M.jsx)(`button`,{onClick:async()=>{try{let t=await(await fetch(e)).blob(),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=jM(e),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)}catch{window.open(e,`_blank`)}},className:`p-1.5 rounded-lg bg-black/60 hover:bg-black/80 text-white/80 hover:text-white transition-colors backdrop-blur-sm`,title:`Download original`,children:(0,M.jsx)(D,{className:`h-4 w-4`})})}),t&&(0,M.jsx)(`div`,{className:`px-3 py-1.5 text-xs text-muted-foreground/70 truncate`,children:t})]})}function NM(e){return e.split(`
|
|
284
|
+
\v\f
\u2028\u2029])`),t));else if(c===`posix`)if(!i&&(u===`graph`||u===`print`)){if(r===`strict`)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:`!-~`,print:` -~`}[u];l&&(e=`\0-${QA(e.codePointAt(0)-1)}${QA(e.codePointAt(2)+1)}-\u{10FFFF}`),n(Wj(Vj(`[${e}]`),t))}else n(Wj(Hj(Vj(gj.get(u)),l),t));else if(c===`property`)fj.has(bA(u))||(e.key=`sc`);else if(c===`space`)n(Uj(fA(`space`,{negate:l}),t));else if(c===`word`)n(Wj(Hj(Vj(uj),l),t));else throw Error(`Unexpected character set kind "${c}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:c}=e;if(s===`flags`)if(!c.enable&&!c.disable)r();else{let e=aA({flags:c});e.body[0].body=o(),i(Wj(e,t),{traverse:!0})}else if(s===`keep`){let e=n.body[0],r=n.body.length===1&&Ik(e,{type:`Group`})&&e.body[0].body.length===1?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error($`Uses "\K" in a way that's unsupported`);let o=oA({behind:!0});o.body[0].body=a(),i(Wj(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error(`Unsupported flag "P"`);if(e.textSegmentMode===`word`)throw Error(`Unsupported flag "y{w}"`);[`digitIsAscii`,`extended`,`posixIsAscii`,`spaceIsAscii`,`wordIsAscii`,`textSegmentMode`].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;n===`lookbehind`&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if(r===`fail`)n(Wj(oA({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type===`Quantifier`){let t=aA();t.body[0].body.push(e.body),e.body=Wj(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(t.body.length===1&&t.body[0].kind===`search_start`)t.body.pop();else{let e=Fj(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t===`strict`&&n&&r)throw Error($`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!Bj(n)&&(n=jj(n,t),e.ref=n)}},Cj={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:c}){let l=i.get(e);if(l&&s.has(e.number)){let r=Uj(kj(e.number),t);c.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&nj(o,e.name,[]);let u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(l===n.node||l&&l===n.origin||e===n.origin){u.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:l}),e.name&&o.get(e.name).push({node:e,origin:l}),e.name){let t=nj(a,e.name,new Map),n=!1;if(l)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=tj(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&!(n.type===`CapturingGroup`&&(n.name===a||n.number===a)););r.reffedNodesByReferencer.set(e,n);return}let o=r.subroutineRefMap.get(a),s=a===0,c=s?kj(0):Oj(o,r.groupOriginByCopy,null),l=c;if(!s){let e=Mj(Aj(o,e=>e.type===`Group`&&!!e.flags)),t=e?tj(r.globalFlags,e):r.globalFlags;Ej(t,r.currentFlags)||(l=aA({flags:Nj(t)}),l.body[0].body.push(c))}n(Wj(l,t),{traverse:!s})}},wj={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>Dj(t,e));i.length?i.length>1?n(Wj(aA({atomic:!0,body:i.reverse().map(e=>Yk({body:[Zk(e.number)]}))}),t)):e.ref=i[0].number:n(Wj(oA({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=Qk();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function Tj(e){CA(e,{"*"({node:e,parent:t}){e.parent=t}})}function Ej(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function Dj(e,t){let n=t;do{if(n.type===`Regex`)return!1;if(n.type===`Alternative`)continue;if(n===e)return!1;let t=Pj(n.parent);for(let r of t){if(r===n)break;if(r===e||Ij(r,e))return!0}}while(n=n.parent);throw Error(`Unexpected path`)}function Oj(e,t,n,r){let i=Array.isArray(e)?[]:{};for(let[a,o]of Object.entries(e))a===`parent`?i.parent=Array.isArray(n)?r:n:o&&typeof o==`object`?i[a]=Oj(o,t,i,n):(a===`type`&&o===`CapturingGroup`&&t.set(i,t.get(e)??e),i[a]=o);return i}function kj(e){let t=dA(e);return t.isRecursive=!0,t}function Aj(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function jj(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/gu,`_`)}`;return t.set(e,n),n}function Mj(e){let t=[`dotAll`,`ignoreCase`],n={enable:{},disable:{}};return e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function Nj({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function Pj(e){if(!e)throw Error(`Node expected`);let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function Fj(e){let t=e.find(e=>e.kind===`search_start`||zj(e,{negate:!1})||!Lj(e));if(!t)return null;if(t.kind===`search_start`)return t;if(t.type===`LookaroundAssertion`)return t.body[0].body[0];if(t.type===`CapturingGroup`||t.type===`Group`){let e=[];for(let n of t.body){let t=Fj(n.body);if(!t)return null;Array.isArray(t)?e.push(...t):e.push(t)}return e}return null}function Ij(e,t){let n=Pj(e)??[];for(let e of n)if(e===t||Ij(e,t))return!0;return!1}function Lj({type:e}){return e===`Assertion`||e===`Directive`||e===`LookaroundAssertion`}function Rj(e){let t=[`Character`,`CharacterClass`,`CharacterSet`];return t.includes(e.type)||e.type===`Quantifier`&&e.min&&t.includes(e.body.type)}function zj(e,t){let n={negate:null,...t};return e.type===`LookaroundAssertion`&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&Ik(e.body[0],{type:`Assertion`,kind:`search_start`})}function Bj(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Vj(e,t){let n=zk(e,{...t,unicodePropertyMap:fj}).body;return n.length>1||n[0].body.length>1?aA({body:n}):n[0].body[0]}function Hj(e,t){return e.negate=t,e}function Uj(e,t){return e.parent=t,e}function Wj(e,t){return Tj(e),e.parent=t,e}function Gj(e,t){let n=sj(t),r=rj(n.target,`ES2024`),i=rj(n.target,`ES2025`),a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error(`Invalid recursionLimit; use 2-20`);let o=null,s=null;if(!i){let t=[e.flags.ignoreCase];CA(e,Kj,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!s)},l=e,u={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&o&&s),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(e){return u.lastNode=l,l=e,ij(qj[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let f={pattern:e.body.map(d).join(`|`),flags:d(e.flags),options:{...e.options}};return r||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&f._hiddenCaptures.push(t),e.transferTo&&nj(f._captureTransfers,e.transferTo,[]).push(t)}),f}var Kj={"*":{enter({node:e},t){if(aM(e)){let n=t.getCurrentModI();t.pushModI(e.flags?tj({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){aM(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){$j(QA(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),eM(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind===`property`&&bj.has(e.value)&&t.setHasCasedChar()}},qj={Alternative({body:e},t,n){return e.map(n).join(``)},Assertion({kind:e,negate:t}){if(e===`string_end`)return`$`;if(e===`string_start`)return`^`;if(e===`word_boundary`)return t?$`\B`:$`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!=`number`)throw Error(`Unexpected named backref in transformed AST`);if(!t.useFlagMods&&t.accuracy===`strict`&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error(`Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy`);return`\\`+e},CapturingGroup(e,t,n){let{body:r,name:i,number:a}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,a>s.number&&(o.transferTo=s.number)),t.captureMap.set(a,o),`(${i?`?<${i}>`:``}${r.map(n).join(`|`)})`},Character({value:e},t){let n=QA(e),r=tM(e,{escDigit:t.lastNode.type===`Backreference`,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&$j(n)){let e=dj(n);return t.inCharClass?e.join(``):e.length>1?`[${e.join(``)}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:i,parent:a}=e,{body:o}=e;if(r===`intersection`&&!t.useFlagV)throw Error(`Use of character class intersection requires min target ES2024`);$A.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(sM)&&(o=[$k(45),...o.filter(e=>!sM(e))]);let s=()=>`[${i?`^`:``}${o.map(n).join(r===`intersection`?`&&`:``)}]`;if(!t.inCharClass){if((!t.useFlagV||$A.bugNestedClassIgnoresNegation)&&!i){let t=o.filter(e=>e.type===`CharacterClass`&&e.kind===`union`&&e.negate);if(t.length){let r=aA(),i=r.body[0];return r.parent=a,i.parent=r,o=o.filter(e=>!t.includes(e)),e.body=o,o.length?(e.parent=i,i.body.push(e)):r.body.pop(),t.forEach(e=>{let t=Yk({body:[e]});e.parent=t,t.parent=r,r.body.push(t)}),n(r)}}t.inCharClass=!0;let r=s();return t.inCharClass=!1,r}let c=o[0];if(r===`union`&&!i&&c&&((!t.useFlagV||!t.verbose)&&a.kind===`union`&&!($A.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&a.kind===`intersection`&&o.length===1&&c.type!==`CharacterClassRange`))return o.map(n).join(``);if(!t.useFlagV&&a.type===`CharacterClass`)throw Error(`Uses nested character class in a way that requires min target ES2024`);return s()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=tM(n,i),o=tM(r,i),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&nM(eM(e)).forEach(e=>{s.add(Array.isArray(e)?`${tM(e[0],i)}-${tM(e[1],i)}`:tM(e,i))}),`${a}-${o}${[...s].join(``)}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e===`dot`)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?`.`:`[^]`:$`[^\n]`;if(e===`digit`)return t?$`\D`:$`\d`;if(e===`property`){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&bj.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?$`\P`:$`\p`}{${r?`${r}=`:``}${n}}`}if(e===`word`)return t?$`\W`:$`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?`i`:``)+(e.dotAll?`s`:``)+(e.sticky?`y`:``)},Group({atomic:e,body:t,flags:n,parent:r},i,a){let o=i.currentFlags;n&&(i.currentFlags=tj(o,n));let s=t.map(a).join(`|`),c=!i.verbose&&t.length===1&&r.type!==`Quantifier`&&!e&&(!i.useFlagMods||!n)?s:`(?${rM(e,n,i.useFlagMods)}${s})`;return i.currentFlags=o,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t===`lookahead`?``:`<`}${n?`!`:`=`}`}${e.map(i).join(`|`)})`},Quantifier(e,t,n){return n(e.body)+iM(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error(`Unexpected non-recursive subroutine in transformed AST`);let r=n.recursionLimit;return t===0?`(?R=${r})`:$`\g<${t}&R=${r}>`}},Jj=new Set([`$`,`(`,`)`,`*`,`+`,`.`,`?`,`[`,`\\`,`]`,`^`,`{`,`|`,`}`]),Yj=new Set([`-`,`\\`,`]`,`^`,`[`]),Xj=new Set("()-/[\\]^{|}!#$%&*+,.:;<=>?@`~".split(``)),Zj=new Map([[9,$`\t`],[10,$`\n`],[11,$`\v`],[12,$`\f`],[13,$`\r`],[8232,$`\u2028`],[8233,$`\u2029`],[65279,$`\uFEFF`]]),Qj=/^\p{Cased}$/u;function $j(e){return Qj.test(e)}function eM(e,t){let n=!!t?.firstOnly,r=e.min.value,i=e.max.value,a=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return a;for(let e=r;e<=i;e++){let t=QA(e);if(!$j(t))continue;let o=dj(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(o.length&&(a.push(...o),n))break}return a}function tM(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(Zj.has(e))return Zj.get(e);if(e<32||e>126&&e<160||e>262143||t&&oM(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,`0`)}`;let i=n?r?Xj:Yj:Jj,a=QA(e);return(i.has(a)?`\\`:``)+a}function nM(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],r=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?r??=t[e]:r===null?n.push(t[e]):(n.push([r,t[e]]),r=null);return n}function rM(e,t,n){if(e)return`>`;let r=``;if(t&&n){let{enable:e,disable:n}=t;r=(e?.ignoreCase?`i`:``)+(e?.dotAll?`s`:``)+(n?`-`:``)+(n?.ignoreCase?`i`:``)+(n?.dotAll?`s`:``)}return`${r}:`}function iM({kind:e,max:t,min:n}){let r;return r=!n&&t===1?`?`:!n&&t===1/0?`*`:n===1&&t===1/0?`+`:n===t?`{${n}}`:`{${n},${t===1/0?``:t}}`,r+{greedy:``,lazy:`?`,possessive:`+`}[e]}function aM({type:e}){return e===`CapturingGroup`||e===`Group`||e===`LookaroundAssertion`}function oM(e){return e>47&&e<58}function sM({type:e,value:t}){return e===`Character`&&t===45}var cM=class e extends RegExp{#e=new Map;#t=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||`(?:)`}constructor(t,n,r){let i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw Error(`Cannot provide options when copying a regexp`);let i=t;super(i,n),this.#n=i.source,i instanceof e&&(this.#e=i.#e,this.#r=i.#r,this.#i=i.#i,this.rawOptions=i.rawOptions)}else{let e={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?``:t,n),this.#n=t,this.#e=uM(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=r??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#i===`clip_search`&&n&&r){this.lastIndex=0;let e=this.#a(t.slice(r));return e&&(lM(e,r,t,this.hasIndices),this.lastIndex+=r),e}return this.#a(t)}#a(e){this.#t.lastIndex=this.lastIndex;let t=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!t||!this.#e.size)return t;let n=[...t];t.length=1;let r;this.hasIndices&&(r=[...t.indices],t.indices.length=1);let i=[0];for(let e=1;e<n.length;e++){let{hidden:a,transferTo:o}=this.#e.get(e)??{};if(a?i.push(null):(i.push(t.length),t.push(n[e]),this.hasIndices&&t.indices.push(r[e])),o&&n[e]!==void 0){let a=i[o];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(t[a]=n[e],this.hasIndices&&(t.indices[a]=r[e]),t.groups){this.#r||=dM(this.source);let i=this.#r.get(o);i&&(t.groups[i]=n[e],this.hasIndices&&(t.indices.groups[i]=r[e]))}}}return t}};function lM(e,t,n,r){if(e.index+=t,e.input=n,r){let n=e.indices;for(let e=0;e<n.length;e++){let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])}let r=n.groups;r&&Object.keys(r).forEach(e=>{let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])})}}function uM(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,r]of t)for(let t of r)nj(n,t,{}).transferTo=e;return n}function dM(e){let t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,i=0,a;for(;a=t.exec(e);){let{0:e,groups:{capture:t,name:o}}=a;e===`[`?r++:r?e===`]`&&r--:t&&(i++,o&&n.set(i,o))}return n}function fM(e,t){let n=pM(e,t);return n.options?new cM(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function pM(e,t){let n=sj(t),r=xj(zk(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:fj}),{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=Gj(r,n),a=KA(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:`external`}),o=IA(zA(a.pattern).pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),s={pattern:o.pattern,flags:`${n.hasIndices?`d`:``}${n.global?`g`:``}${i.flags}${i.options.disable.v?`u`:`v`}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw Error(`Lazy compilation requires subclass`)}else{let e=o.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(o.captureTransfers),i=r._strategy,a=s.pattern.length>=n.lazyCompileLength;(e.length||t.length||i||a)&&(s.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...i&&{strategy:i},...a&&{lazyCompile:a}})}return s}var mM=4294967295,hM=class{constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}regexps;findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:mM,end:mM,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function gM(e,t){return fM(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function _M(e={}){let t=Object.assign({target:`auto`,cache:new Map},e);return t.regexConstructor||=e=>gM(e,{target:t.target}),{createScanner(e){return new hM(e,t)},createString(e){return{content:e}}}}var vM=_M({forgiving:!0}),yM=Object.fromEntries(cO.flatMap(e=>(e.aliases??[]).map(t=>[t,e.id]))),bM=new Set(Object.keys(dO)),xM=e=>{let t=e.trim().toLowerCase();return yM[t]||(bM.has(t),t)},SM=new Map,CM=new Map,wM=new Map,TM=e=>typeof e==`string`?e:e.name??`custom`,EM=(e,t)=>`${e}-${TM(t[0])}-${TM(t[1])}`,DM=(e,t,n)=>{let r=e.slice(0,100),i=e.length>100?e.slice(-100):``;return`${t}:${n[0]}:${n[1]}:${e.length}:${r}:${i}`},OM=(e,t)=>{let n=EM(e,t);if(SM.has(n))return SM.get(n);let r=RO({themes:t,langs:[e],engine:vM});return SM.set(n,r),r};function kM(e={}){let t=e.themes??[`github-light`,`github-dark`];return{name:`shiki`,type:`code-highlighter`,supportsLanguage(e){let t=xM(e);return bM.has(t)},getSupportedLanguages(){return Array.from(bM)},getThemes(){return t},highlight({code:e,language:t,themes:n},r){let i=xM(t),a=[TM(n[0]),TM(n[1])],o=DM(e,i,a);return CM.has(o)?CM.get(o):(r&&(wM.has(o)||wM.set(o,new Set),wM.get(o).add(r)),OM(bM.has(i)?i:`text`,n).then(t=>{let n=t.getLoadedLanguages().includes(i)?i:`text`,r=t.codeToTokens(e,{lang:n,themes:{light:a[0],dark:a[1]}});CM.set(o,r);let s=wM.get(o);if(s){for(let e of s)e(r);wM.delete(o)}}).catch(e=>{console.error(`[Streamdown Code] Failed to highlight code:`,e),wM.delete(o)}),null)}}}var AM=kM();function jM(e){let[t,n]=(0,j.useState)(e&&e.startsWith(`/api/files/`)?void 0:e);return(0,j.useEffect)(()=>{if(!e||!e.startsWith(`/api/files/`)){n(e);return}let t=null,r=!1;return n(void 0),(async()=>{try{let i=await Ee(e);if(!i.ok)return;let a=await i.blob();if(r)return;t=URL.createObjectURL(a),n(t)}catch{}})(),()=>{r=!0,t&&URL.revokeObjectURL(t)}},[e]),t}function MM(e){return!isFinite(e)||isNaN(e)?`0:00`:`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,`0`)}`}function NM({audioData:e}){let[t,n]=(0,j.useState)(!1),[r,i]=(0,j.useState)(0),[a,o]=(0,j.useState)(0),s=(0,j.useRef)(null),c=(0,j.useRef)(null),l=jM(e);(0,j.useEffect)(()=>{if(!l)return;let e=new Audio(l);return e.addEventListener(`durationchange`,()=>{isFinite(e.duration)&&o(e.duration)}),e.addEventListener(`timeupdate`,()=>{isFinite(e.duration)&&e.duration>0&&(i(e.currentTime/e.duration),a===0&&o(e.duration))}),e.addEventListener(`ended`,()=>{n(!1),i(0)}),e.addEventListener(`loadedmetadata`,()=>{isFinite(e.duration)||(e.currentTime=1e10,e.addEventListener(`timeupdate`,function t(){isFinite(e.duration)&&(o(e.duration),e.currentTime=0,e.removeEventListener(`timeupdate`,t))}))}),s.current=e,()=>{e.pause(),e.src=``}},[l]);let u=(0,j.useCallback)(()=>{let e=s.current;e&&(t?(e.pause(),n(!1)):(e.play(),n(!0)))},[t]),d=(0,j.useCallback)(e=>{let t=s.current,n=c.current;if(!t||!n||!isFinite(t.duration))return;let r=n.getBoundingClientRect(),a=Math.max(0,Math.min(1,(e.clientX-r.left)/r.width));t.currentTime=a*t.duration,i(a)},[]);return(0,M.jsxs)(`div`,{className:`flex items-center gap-2.5 min-w-[180px]`,children:[(0,M.jsx)(`button`,{onClick:u,className:`flex items-center justify-center h-8 w-8 shrink-0 rounded-full bg-white/20 hover:bg-white/30 transition-colors`,children:t?(0,M.jsx)(le,{className:`h-3.5 w-3.5 fill-current`}):(0,M.jsx)(ue,{className:`h-3.5 w-3.5 fill-current ml-0.5`})}),(0,M.jsxs)(`div`,{className:`flex-1 flex flex-col gap-1`,children:[(0,M.jsx)(`div`,{ref:c,onClick:d,className:`h-1 bg-white/20 rounded-full cursor-pointer relative`,children:(0,M.jsx)(`div`,{className:`absolute inset-y-0 left-0 bg-white/70 rounded-full transition-[width] duration-100`,style:{width:`${r*100}%`}})}),(0,M.jsx)(`span`,{className:`text-[10px] opacity-60 tabular-nums`,children:MM(t?r*a:a)})]})]})}function PM({src:e,alt:t,className:n,onClick:r}){let i=jM(e);return i?(0,M.jsx)(`img`,{src:i,alt:t,className:n,onClick:r}):(0,M.jsx)(`div`,{className:`${n??``} bg-white/10 animate-pulse`,onClick:r})}function FM({group:e}){let[t,n]=(0,j.useState)({}),[r,i]=(0,j.useState)(`idle`),[a,o]=(0,j.useState)(``),s=(e,t)=>{n(n=>({...n,[e]:t}))},l=async()=>{let e=Object.entries(t).filter(([,e])=>e.trim());if(e.length!==0){i(`submitting`),o(``);try{let t=await Ee(`/api/env`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({vars:Object.fromEntries(e)})});if(!t.ok){let e=await t.json().catch(()=>({error:`Request failed`}));throw Error(e.error||`Request failed`)}i(`submitted`)}catch(e){o(e.message||`Failed to save`),i(`error`)}}},u=Object.values(t).filter(e=>e.trim()).length;return r===`submitted`?(0,M.jsx)(`div`,{className:`my-3 rounded-xl border border-emerald-500/20 bg-emerald-500/5 overflow-hidden`,children:(0,M.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-3`,children:[(0,M.jsx)(`div`,{className:`flex items-center justify-center w-8 h-8 rounded-lg bg-emerald-500 shrink-0`,children:(0,M.jsx)(c,{className:`w-4 h-4 text-white`,strokeWidth:3})}),(0,M.jsxs)(`div`,{className:`flex flex-col min-w-0`,children:[(0,M.jsx)(`span`,{className:`text-emerald-400 font-medium text-sm`,children:e.title}),(0,M.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[u,` variable`,u===1?``:`s`,` saved — backend restarting`]})]})]})}):(0,M.jsxs)(`div`,{className:`my-3 rounded-xl border border-border/60 bg-card/50 overflow-hidden`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2.5 px-4 py-3 border-b border-border/40 bg-muted/30`,children:[(0,M.jsx)(`div`,{className:`flex items-center justify-center w-7 h-7 rounded-lg bg-primary/10 shrink-0`,children:(0,M.jsx)(O,{className:`w-3.5 h-3.5 text-primary`})}),(0,M.jsx)(`span`,{className:`font-medium text-sm text-foreground`,children:e.title})]}),(0,M.jsx)(`div`,{className:`px-4 py-3 space-y-3`,children:e.fields.map(e=>(0,M.jsxs)(`div`,{className:`space-y-1`,children:[(0,M.jsxs)(`label`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,M.jsx)(`span`,{children:e.label}),(0,M.jsx)(`code`,{className:`text-[10px] px-1 py-0.5 rounded bg-muted text-muted-foreground/70`,children:e.name})]}),(0,M.jsx)(`input`,{type:`text`,placeholder:e.placeholder,value:t[e.name]||``,onChange:t=>s(e.name,t.target.value),disabled:r===`submitting`,className:`w-full px-3 py-2 rounded-lg text-sm bg-background border border-border/60 text-foreground placeholder:text-muted-foreground/40 focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary/50 disabled:opacity-50 transition-colors font-mono`,spellCheck:!1,autoComplete:`off`})]},e.name))}),r===`error`&&(0,M.jsxs)(`div`,{className:`px-4 pb-2 flex items-center gap-1.5 text-xs text-red-400`,children:[(0,M.jsx)(ee,{className:`w-3 h-3 shrink-0`}),(0,M.jsx)(`span`,{children:a})]}),(0,M.jsxs)(`div`,{className:`px-4 py-3 border-t border-border/40 bg-muted/20 flex items-center justify-between`,children:[(0,M.jsxs)(`span`,{className:`text-[11px] text-muted-foreground/60`,children:[`Values are written to `,(0,M.jsx)(`code`,{className:`text-[10px]`,children:`.env`})]}),(0,M.jsx)(`button`,{onClick:l,disabled:u===0||r===`submitting`,className:`inline-flex items-center gap-1.5 px-4 py-1.5 rounded-lg text-xs font-medium bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-40 disabled:cursor-not-allowed transition-all`,children:r===`submitting`?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(v,{className:`w-3 h-3 animate-spin`}),`Saving...`]}):`Submit`})]})]})}function IM(e){let t=e.split(`/`);return t[t.length-1]||`bloby-image`}function LM({src:e,alt:t}){let[n,r]=(0,j.useState)(!1),i=jM(e);return n?(0,M.jsxs)(`div`,{className:`my-2 flex items-center gap-2.5 px-3.5 py-2.5 rounded-xl border border-border/30 bg-black/10 text-muted-foreground/50 text-xs`,children:[(0,M.jsx)(re,{className:`h-4 w-4 shrink-0`}),(0,M.jsx)(`span`,{className:`truncate`,children:t||`Image not found`})]}):(0,M.jsxs)(`div`,{className:`relative group/img my-2 rounded-xl overflow-hidden border border-border/30 bg-black/20 w-fit max-w-full`,children:[i?(0,M.jsx)(`img`,{src:i,alt:t||`Generated image`,className:`max-w-full max-h-80 object-contain`,loading:`lazy`,onError:()=>r(!0)}):(0,M.jsx)(`div`,{className:`h-40 w-40 bg-white/10 animate-pulse`}),(0,M.jsx)(`div`,{className:`absolute top-2 right-2 flex gap-1.5 opacity-0 group-hover/img:opacity-100 transition-opacity`,children:(0,M.jsx)(`button`,{onClick:async()=>{try{let t=await(e.startsWith(`/api/files/`)?await Ee(e):await fetch(e)).blob(),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=IM(e),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)}catch{window.open(e,`_blank`)}},className:`p-1.5 rounded-lg bg-black/60 hover:bg-black/80 text-white/80 hover:text-white transition-colors backdrop-blur-sm`,title:`Download original`,children:(0,M.jsx)(te,{className:`h-4 w-4`})})}),t&&(0,M.jsx)(`div`,{className:`px-3 py-1.5 text-xs text-muted-foreground/70 truncate`,children:t})]})}function RM(e){return e.split(`
|
|
285
285
|
`).join(`
|
|
286
286
|
|
|
287
|
-
`)}function
|
|
287
|
+
`)}function zM(e){return e<1024?`${e} chars`:`${(e/1024).toFixed(1)} KB`}function BM({title:e,content:t}){let[n,r]=(0,j.useState)(!1),[i,a]=(0,j.useState)(!1);return(0,M.jsxs)(`div`,{className:`my-2 rounded-xl border border-border/30 overflow-hidden`,children:[(0,M.jsxs)(`div`,{onClick:()=>r(e=>!e),className:`flex items-center gap-2.5 px-3.5 py-2.5 bg-white/[0.03] hover:bg-white/[0.05] transition-colors cursor-pointer select-none`,children:[(0,M.jsx)(E,{className:`h-3.5 w-3.5 text-muted-foreground/50 shrink-0 transition-transform duration-200 ${n?`rotate-90`:``}`}),(0,M.jsx)(`span`,{className:`text-[13px] font-medium text-foreground/80 truncate min-w-0`,children:e}),(0,M.jsxs)(`div`,{className:`flex items-center gap-2 ml-auto shrink-0`,children:[(0,M.jsx)(`span`,{className:`text-[11px] text-muted-foreground/35 tabular-nums`,children:zM(t.length)}),(0,M.jsx)(`button`,{onClick:async e=>{e.stopPropagation();try{await navigator.clipboard.writeText(t),a(!0),setTimeout(()=>a(!1),1500)}catch{}},className:`p-1 rounded-md hover:bg-white/[0.08] text-muted-foreground/40 hover:text-muted-foreground/70 transition-colors`,title:`Copy text`,children:i?(0,M.jsx)(c,{className:`h-3.5 w-3.5`}):(0,M.jsx)(b,{className:`h-3.5 w-3.5`})})]})]}),n&&(0,M.jsx)(`div`,{className:`border-t border-border/15 max-h-[500px] overflow-y-auto px-4 py-3 text-sm leading-relaxed prose prose-sm prose-invert max-w-none [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,children:(0,M.jsx)(kC,{mode:`static`,plugins:{code:AM},controls:{code:{copy:!0,download:!1}},shikiTheme:[`github-dark`,`github-dark`],lineNumbers:!1,children:RM(t)})})]})}function VM(e){return`<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><style>html,body{margin:0;padding:0;background:#000;color:#fff;font-family:-apple-system,BlinkMacSystemFont,system-ui,sans-serif;}*{box-sizing:border-box;}</style></head><body>${e}</body></html>`}function HM(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e.trim()}}function UM({format:e,content:t,cardType:n}){let[r,i]=(0,j.useState)(!1),a=n?`Sent to your Mac · ${n}`:`Sent to your Mac`;return(0,M.jsxs)(`div`,{className:`my-2 rounded-xl border border-[#0069FE]/25 overflow-hidden`,children:[(0,M.jsxs)(`div`,{onClick:()=>i(e=>!e),className:`flex items-center gap-2.5 px-3.5 py-2.5 bg-[#0069FE]/10 hover:bg-[#0069FE]/[0.16] transition-colors cursor-pointer select-none`,children:[(0,M.jsx)(E,{className:`h-3.5 w-3.5 text-[#4AA8FF] shrink-0 transition-transform duration-200 ${r?`rotate-90`:``}`}),(0,M.jsx)(ie,{className:`h-4 w-4 text-[#4AA8FF] shrink-0`}),(0,M.jsx)(`span`,{className:`text-[13px] font-medium text-[#9ecbff] truncate min-w-0`,children:a})]}),r&&(0,M.jsx)(`div`,{className:`border-t border-[#0069FE]/15 p-3 bg-black/40`,children:e===`html`?(0,M.jsx)(`iframe`,{title:`Mac notch card preview`,sandbox:``,srcDoc:VM(t),className:`w-full rounded-lg border border-white/10 bg-black block`,style:{height:147}}):(0,M.jsx)(`pre`,{className:`text-[12px] leading-relaxed text-foreground/80 overflow-x-auto whitespace-pre-wrap break-words font-mono max-h-[300px]`,children:HM(t)})})]})}var WM={spotlight:{label:`Spotlight`,icon:D},point:{label:`Point`,icon:se}};function GM(e){return e.charAt(0).toUpperCase()+e.slice(1)}function KM(e){try{let t=JSON.parse(e);return typeof t?.screen==`number`?t.screen:null}catch{return null}}function qM({actionType:e,content:t}){let n=WM[e.toLowerCase()]??{label:GM(e),icon:fe},r=KM(t),i=n.icon;return(0,M.jsxs)(`div`,{className:`my-2 inline-flex items-center gap-2 rounded-xl border border-[#0069FE]/25 bg-[#0069FE]/10 px-3 py-1.5`,children:[(0,M.jsx)(i,{className:`h-3.5 w-3.5 text-[#4AA8FF] shrink-0`}),(0,M.jsxs)(`span`,{className:`text-[13px] text-[#9ecbff]`,children:[(0,M.jsx)(`span`,{className:`text-[#9ecbff]/55`,children:`Agent actions:`}),` `,(0,M.jsx)(`span`,{className:`font-medium`,children:n.label}),r!==null&&(0,M.jsxs)(`span`,{className:`text-[#9ecbff]/80`,children:[` at screen `,r]})]})]})}function JM(e){try{return new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}catch{return``}}function YM(e){let t=e.match(/^\[([^\]]+)\]\n([\s\S]*)$/),n,r=`Chat`;if(t){n=t[2];let e=t[1].split(`|`)[0].trim();r=e===`PWA`?`Chat`:e.toLowerCase()===`workspace`?`Workspace`:e}else n=e;return n.startsWith(`[voice] `)&&(n=n.slice(8)),n=n.replace(/^\[(Mac|Alexa|WhatsApp|Chat|PWA|Workspace|workspace)\]\s*/i,``),{tag:r,body:n}}function XM({tag:e}){let t=`h-3 w-3 opacity-60`;return e===`Mac`?(0,M.jsx)(ie,{className:t}):e===`WhatsApp`?(0,M.jsx)(d,{className:t}):e===`Workspace`?(0,M.jsx)(k,{className:t}):e===`Chat`?(0,M.jsx)(s,{className:t}):e===`Alexa`?(0,M.jsx)(he,{className:t}):(0,M.jsx)(s,{className:t})}function ZM(e){let t=e,n=`[pair-whatsapp](/api/channels/whatsapp/qr-page)`;t.includes(n)||(t=t.replace(/`?(?:http:\/\/localhost:\d+)?\/api\/channels\/whatsapp\/qr-page`?/g,n));let r=`[connect-alexa](/api/channels/alexa/pair-page)`;return t.includes(r)||(t=t.replace(/`?(?:http:\/\/localhost:\d+)?\/api\/channels\/alexa\/pair-page`?/g,r)),t}function QM(e){let t=[],n=/<EnvGroup\s+title="([^"]+)">([\s\S]*?)<\/EnvGroup>/g,r;for(;(r=n.exec(e))!==null;){let e=r[1],n=r[2],i=[],a=/<EnvInput\s+name="([^"]+)"\s+label="([^"]+)"\s+placeholder="([^"]+)"\s*\/>/g,o;for(;(o=a.exec(n))!==null;)i.push({name:o[1],label:o[2],placeholder:o[3]});i.length>0&&t.push({start:r.index,end:r.index+r[0].length,segment:{type:`env`,group:{title:e,fields:i}}})}let i=/<BlobyImage\s+src="([^"]+)"(?:\s+alt="([^"]*)")?\s*\/>/g;for(;(r=i.exec(e))!==null;)t.push({start:r.index,end:r.index+r[0].length,segment:{type:`bloby-image`,src:r[1],alt:r[2]||``}});let a=/<BlobyText\s+title="([^"]+)">([\s\S]*?)<\/BlobyText>/g;for(;(r=a.exec(e))!==null;)t.push({start:r.index,end:r.index+r[0].length,segment:{type:`bloby-text`,title:r[1],content:r[2].trim()}});let o=/<notch_html>([\s\S]*?)<\/notch_html>/gi;for(;(r=o.exec(e))!==null;)t.push({start:r.index,end:r.index+r[0].length,segment:{type:`notch`,format:`html`,content:r[1].trim()}});let s=/<notch_card\s+type="([^"]+)">([\s\S]*?)<\/notch_card>/gi;for(;(r=s.exec(e))!==null;)t.push({start:r.index,end:r.index+r[0].length,segment:{type:`notch`,format:`card`,content:r[2].trim(),cardType:r[1]}});let c=/<morphy_action\s+type="([^"]+)">([\s\S]*?)<\/morphy_action>/gi;for(;(r=c.exec(e))!==null;)t.push({start:r.index,end:r.index+r[0].length,segment:{type:`morphy-action`,actionType:r[1],content:r[2].trim()}});t.sort((e,t)=>e.start-t.start);let l=[],u=0;for(let n of t){if(n.start>u){let t=e.slice(u,n.start).trim();t&&l.push({type:`text`,value:t})}l.push(n.segment),u=n.end}if(u<e.length){let t=e.slice(u).trim();t&&l.push({type:`text`,value:t})}return l}function $M(e){return/<EnvGroup\s+title="[^"]+">/i.test(e)||/<BlobyImage\s+src="/i.test(e)||/<BlobyText\s+title="/i.test(e)||/<notch_html>/i.test(e)||/<notch_card\s+type="/i.test(e)||/<morphy_action\s+type="/i.test(e)}function eN({text:e}){let[t,n]=(0,j.useState)(!1);return(0,M.jsx)(`button`,{onClick:async()=>{try{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)}catch{}},className:`absolute -top-2.5 right-2 z-10 opacity-0 group-hover:opacity-100 transition-opacity p-1 rounded-md bg-background/80 border border-border/40 shadow-sm hover:bg-muted text-muted-foreground/60 hover:text-muted-foreground`,title:`Copy message`,children:t?(0,M.jsx)(c,{className:`h-3 w-3`}):(0,M.jsx)(b,{className:`h-3 w-3`})})}function tN(e){let t=e.outerHTML,n=window.open(``,`_blank`);n&&(n.document.write(`<!DOCTYPE html><html><head><meta charset="utf-8"><title>Table</title>
|
|
288
288
|
<style>
|
|
289
289
|
body{background:#1a1a1a;color:#f5f5f5;font-family:system-ui,-apple-system,sans-serif;padding:2rem;margin:0}
|
|
290
290
|
table{border-collapse:collapse;width:100%}
|
|
291
291
|
th,td{border:1px solid rgba(255,255,255,.12);padding:.6rem .85rem;text-align:left;font-size:.875rem}
|
|
292
292
|
th{background:rgba(255,255,255,.05);font-weight:600}
|
|
293
293
|
tr:hover td{background:rgba(255,255,255,.03)}
|
|
294
|
-
</style></head><body>${t}</body></html>`),n.document.close())}function qM(e){let t=e.target.closest(`[title="View fullscreen"]`);if(t){e.stopPropagation(),e.preventDefault();let n=t.closest(`[data-streamdown]`)?.querySelector(`table`)??t.closest(`.group`)?.querySelector(`table`);n&&KM(n)}}function JM({role:e,content:t,timestamp:n,hasAttachments:r,audioData:i,attachments:a,onImageClick:o,transcribing:s}){let c=e===`user`,l=n?zM(n):``,{tag:u,body:d}=BM(t),p=a?.filter(e=>e.mediaType?.startsWith(`image/`))||[],m=a?.filter(e=>!e.mediaType?.startsWith(`image/`))||[],h=p.filter(e=>e.filePath).map(e=>e.filePath.startsWith(`data:`)?e.filePath:`/api/files/${e.filePath}`);if(c)return(0,M.jsxs)(`div`,{className:`flex flex-col items-end gap-0.5`,children:[(0,M.jsxs)(`div`,{className:`group relative max-w-[85%]`,children:[(0,M.jsx)(GM,{text:d}),(0,M.jsxs)(`div`,{className:`rounded-2xl px-4 py-2.5 text-sm leading-relaxed whitespace-pre-wrap bg-primary text-primary-foreground break-words`,children:[h.length>0&&(0,M.jsx)(`div`,{className:`flex gap-1.5 flex-wrap mb-2`,children:h.map((e,t)=>(0,M.jsx)(`img`,{src:e,alt:p[t]?.name||`attachment`,className:`w-28 h-28 rounded-lg object-cover cursor-pointer border border-white/10 hover:opacity-80 transition-opacity`,onClick:()=>o?.(h,t)},t))}),m.length>0&&(0,M.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-primary-foreground/60 mr-1.5`,children:[(0,M.jsx)(k,{className:`h-3 w-3`}),m.length>1&&(0,M.jsx)(`span`,{className:`text-xs`,children:m.length})]}),!a?.length&&r&&(0,M.jsx)(`span`,{className:`inline-flex items-center gap-1 text-primary-foreground/60 mr-1.5`,children:(0,M.jsx)(k,{className:`h-3 w-3`})}),s&&(0,M.jsxs)(`div`,{className:`flex flex-col gap-1.5 mb-1`,children:[(0,M.jsx)(`div`,{className:`h-3 w-48 max-w-full rounded bg-white/15 animate-pulse`}),(0,M.jsx)(`div`,{className:`h-3 w-32 max-w-full rounded bg-white/10 animate-pulse`})]}),d,i&&(0,M.jsx)(`div`,{className:`mt-2 pt-2 border-t border-white/10`,children:(0,M.jsx)(kM,{audioData:i})})]})]}),(0,M.jsxs)(`div`,{className:`flex items-center gap-1 px-1 self-end`,children:[(0,M.jsxs)(`span`,{className:`flex items-center gap-0.5 text-[10px] text-muted-foreground/40`,children:[(0,M.jsx)(VM,{tag:u}),u]}),l&&(0,M.jsx)(`span`,{className:`text-[10px] text-muted-foreground/50`,children:l})]})]});let g=e=>(0,M.jsx)(EC,{mode:`static`,plugins:{code:DM},controls:{code:{copy:!0,download:!1},table:{copy:!0,download:!0,fullscreen:!0}},shikiTheme:[`github-dark`,`github-dark`],lineNumbers:!1,components:{a({href:e,children:t}){return e?.includes(`/api/channels/whatsapp/qr-page`)?(0,M.jsxs)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-3 my-2 px-3.5 py-2.5 rounded-xl bg-[#25D366]/10 border border-[#25D366]/20 hover:bg-[#25D366]/15 transition-colors no-underline`,children:[(0,M.jsx)(`div`,{className:`flex items-center justify-center w-8 h-8 rounded-lg bg-[#25D366] shrink-0`,children:(0,M.jsx)(`svg`,{viewBox:`0 0 24 24`,className:`w-4 h-4 fill-white`,children:(0,M.jsx)(`path`,{d:`M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z`})})}),(0,M.jsxs)(`div`,{className:`flex flex-col min-w-0`,children:[(0,M.jsx)(`span`,{className:`text-[#25D366] font-medium text-sm`,children:`Click here to pair your WhatsApp`}),(0,M.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`Opens QR code pairing page`})]}),(0,M.jsx)(f,{className:`w-3.5 h-3.5 text-muted-foreground/50 ml-auto shrink-0`})]}):e?.includes(`/api/channels/alexa/pair-page`)?(0,M.jsxs)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-3 my-2 px-3.5 py-2.5 rounded-xl bg-[#00CAFF]/10 border border-[#00CAFF]/20 hover:bg-[#00CAFF]/15 transition-colors no-underline`,children:[(0,M.jsx)(`div`,{className:`flex items-center justify-center w-8 h-8 rounded-lg bg-[#00CAFF] shrink-0`,children:(0,M.jsx)(`svg`,{viewBox:`0 0 24 24`,className:`w-4 h-4 fill-white`,children:(0,M.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z`})})}),(0,M.jsxs)(`div`,{className:`flex flex-col min-w-0`,children:[(0,M.jsx)(`span`,{className:`text-[#00CAFF] font-medium text-sm`,children:`Click here to connect Alexa`}),(0,M.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`Generates a one-time linking code`})]}),(0,M.jsx)(f,{className:`w-3.5 h-3.5 text-muted-foreground/50 ml-auto shrink-0`})]}):(0,M.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,className:`text-[#0069FE] underline decoration-[#0069FE]/30 underline-offset-2 hover:decoration-[#0069FE] transition-colors`,children:t})}},children:HM(e)});if(WM(d)){let e=UM(d);return(0,M.jsxs)(`div`,{className:`flex flex-col items-start gap-0.5`,children:[(0,M.jsxs)(`div`,{className:`group relative w-full`,children:[(0,M.jsx)(GM,{text:d}),(0,M.jsx)(`div`,{className:`rounded-2xl px-4 py-2.5 text-sm leading-relaxed bg-muted text-foreground prose prose-sm prose-invert max-w-none [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 break-words`,onClickCapture:qM,children:e.map((e,t)=>e.type===`text`?(0,M.jsx)(`div`,{children:g(e.value)},t):e.type===`env`?(0,M.jsx)(AM,{group:e.group},t):e.type===`bloby-image`?(0,M.jsx)(MM,{src:e.src,alt:e.alt},t):e.type===`bloby-text`?(0,M.jsx)(FM,{title:e.title,content:e.content},t):e.type===`notch`?(0,M.jsx)(RM,{format:e.format,content:e.content,cardType:e.cardType},t):null)})]}),l&&(0,M.jsx)(`span`,{className:`text-[10px] text-muted-foreground/50 px-1`,children:l})]})}return(0,M.jsxs)(`div`,{className:`flex flex-col items-start gap-0.5`,children:[(0,M.jsxs)(`div`,{className:`group relative w-full`,children:[(0,M.jsx)(GM,{text:d}),(0,M.jsx)(`div`,{className:`rounded-2xl px-4 py-2.5 text-sm leading-relaxed bg-muted text-foreground prose prose-sm prose-invert max-w-none [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 break-words`,onClickCapture:qM,children:g(d)})]}),l&&(0,M.jsx)(`span`,{className:`text-[10px] text-muted-foreground/50 px-1`,children:l})]})}function YM({text:e,toolName:t}){return e?(0,M.jsx)(`div`,{className:`flex flex-col items-start`,children:(0,M.jsx)(`div`,{className:`w-full rounded-2xl px-4 py-2.5 text-sm leading-relaxed bg-muted text-foreground prose prose-sm prose-invert max-w-none [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 break-words`,children:(0,M.jsx)(EC,{mode:`streaming`,isAnimating:!0,caret:`block`,plugins:{code:DM},controls:!1,shikiTheme:[`github-dark`,`github-dark`],lineNumbers:!1,children:e})})}):(0,M.jsx)(`div`,{className:`flex justify-start`,children:(0,M.jsx)(`div`,{className:`rounded-2xl px-4 py-2.5 text-sm bg-muted text-foreground`,children:(0,M.jsxs)(`span`,{className:`inline-flex items-center gap-1 h-5`,children:[(0,M.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-muted-foreground/60 animate-bounce`,style:{animationDelay:`0ms`}}),(0,M.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-muted-foreground/60 animate-bounce`,style:{animationDelay:`150ms`}}),(0,M.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-muted-foreground/60 animate-bounce`,style:{animationDelay:`300ms`}})]})})})}function XM({images:e,index:t,onClose:n,onNavigate:r}){let i=(0,j.useCallback)(()=>{t>0&&r(t-1)},[t,r]),a=(0,j.useCallback)(()=>{t<e.length-1&&r(t+1)},[t,e.length,r]);return(0,j.useEffect)(()=>{let e=e=>{e.key===`Escape`&&n(),e.key===`ArrowLeft`&&i(),e.key===`ArrowRight`&&a()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n,i,a]),(0,M.jsx)(_,{children:(0,M.jsxs)(m.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:`fixed inset-0 z-50 flex items-center justify-center bg-black/90`,onClick:n,children:[(0,M.jsxs)(`div`,{className:`absolute top-4 right-4 z-10 flex gap-2`,children:[(0,M.jsx)(`button`,{onClick:async n=>{n.stopPropagation();try{let n=await(await fetch(e[t])).blob(),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=e[t].split(`/`).pop()||`image`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)}catch{window.open(e[t],`_blank`)}},className:`p-2 rounded-full bg-white/10 hover:bg-white/20 transition-colors text-white`,title:`Download`,children:(0,M.jsx)(D,{className:`h-5 w-5`})}),(0,M.jsx)(`button`,{onClick:n,className:`p-2 rounded-full bg-white/10 hover:bg-white/20 transition-colors text-white`,children:(0,M.jsx)(me,{className:`h-5 w-5`})})]}),e.length>1&&(0,M.jsxs)(`div`,{className:`absolute top-4 left-1/2 -translate-x-1/2 text-white/70 text-sm tabular-nums`,children:[t+1,` / `,e.length]}),t>0&&(0,M.jsx)(`button`,{onClick:e=>{e.stopPropagation(),i()},className:`absolute left-3 top-1/2 -translate-y-1/2 z-10 p-2 rounded-full bg-white/10 hover:bg-white/20 transition-colors text-white`,children:(0,M.jsx)(T,{className:`h-6 w-6`})}),t<e.length-1&&(0,M.jsx)(`button`,{onClick:e=>{e.stopPropagation(),a()},className:`absolute right-3 top-1/2 -translate-y-1/2 z-10 p-2 rounded-full bg-white/10 hover:bg-white/20 transition-colors text-white`,children:(0,M.jsx)(E,{className:`h-6 w-6`})}),(0,M.jsx)(`img`,{src:e[t],alt:``,className:`max-h-[85vh] max-w-[90vw] object-contain rounded-lg`,onClick:e=>e.stopPropagation()})]})})}function ZM({messages:e,streaming:t,streamBuffer:n,tools:r,hasMore:i,onLoadOlder:a}){let o=(0,j.useRef)(null),s=(0,j.useRef)(null),c=(0,j.useRef)(null),l=(0,j.useRef)(!0),[u,d]=(0,j.useState)(!1),[f,p]=(0,j.useState)(null),m=(0,j.useCallback)((e,t)=>{p({images:e,index:t})},[]);(0,j.useEffect)(()=>{o.current&&(l.current&&e.length>0?(o.current.scrollIntoView({behavior:`instant`}),l.current=!1):l.current||o.current.scrollIntoView({behavior:`smooth`}))},[e,n,r,t]),(0,j.useEffect)(()=>{if(!c.current||!a)return;let e=c.current,t=new IntersectionObserver(async e=>{if(e[0].isIntersecting&&i&&!u){let e=s.current;if(!e)return;let t=e.scrollHeight;d(!0),await a(),d(!1),requestAnimationFrame(()=>{let n=e.scrollHeight;e.scrollTop+=n-t})}},{root:s.current,threshold:.1});return t.observe(e),()=>t.disconnect()},[i,u,a]);let h=r.length>0?r[r.length-1]:null,g=h?.status===`running`?h.name:void 0;return(0,M.jsxs)(`div`,{ref:s,className:`flex-1 overflow-y-auto overflow-x-hidden p-4 flex flex-col min-h-0`,children:[(0,M.jsx)(`div`,{className:`flex-1`}),i&&(0,M.jsx)(`div`,{ref:c,className:`flex justify-center py-2`,children:u&&(0,M.jsx)(`div`,{className:`w-5 h-5 border-2 border-muted-foreground/20 border-t-muted-foreground/60 rounded-full animate-spin`})}),e.length===0&&!t&&(0,M.jsx)(`div`,{className:`flex items-center justify-center py-8 text-muted-foreground text-sm`,children:`Start a conversation with your Bloby..`}),(0,M.jsxs)(`div`,{className:`space-y-3`,children:[e.map(e=>(0,M.jsx)(JM,{role:e.role,content:e.content,timestamp:e.timestamp,hasAttachments:e.hasAttachments,audioData:e.audioData,attachments:e.attachments,onImageClick:m,transcribing:e.transcribing},e.id)),t&&(0,M.jsx)(YM,{text:n.replace(/^\[(Mac|Alexa|WhatsApp|Chat|PWA|Workspace|workspace)\]\s*/i,``).replace(/<notch_card\s+type="[^"]*">[\s\S]*?<\/notch_card>/gi,``).replace(/<notch_html>[\s\S]*?<\/notch_html>/gi,``).replace(/<notch_(?:html|card)\b[\s\S]*$/i,``).trimEnd(),toolName:g})]}),(0,M.jsx)(`div`,{ref:o}),f&&(0,M.jsx)(XM,{images:f.images,index:f.index,onClose:()=>p(null),onNavigate:e=>p(t=>t?{...t,index:e}:null)})]})}var QM=()=>typeof window>`u`?null:window.SpeechRecognition??window.webkitSpeechRecognition??null,$M=QM()!==null;function eN(){let e=(0,j.useRef)(null),t=(0,j.useRef)(``),n=(0,j.useRef)(null),r=(0,j.useMemo)(()=>$M,[]);return{start:(0,j.useCallback)((r=!1)=>{let i=QM();if(!i)return;if(e.current)try{e.current.abort()}catch{}let a=new i;a.continuous=r,a.interimResults=!0,a.lang=navigator.language||`en-US`,t.current=``,e.current=a,a.onresult=e=>{t.current=e.results[e.results.length-1][0].transcript},a.onend=()=>{e.current=null,n.current&&=(n.current(t.current),null)},a.onerror=r=>{console.error(`[SpeechRecognition] error:`,r.error),e.current=null,n.current&&=(n.current(t.current),null)};try{a.start()}catch(e){console.error(`[SpeechRecognition] start failed:`,e)}},[]),stop:(0,j.useCallback)(()=>new Promise(r=>{let i=e.current;if(!i){r(t.current);return}n.current=r;try{i.stop()}catch{e.current=null,r(t.current),n.current=null}setTimeout(()=>{n.current&&(n.current(t.current),n.current=null,e.current=null)},2e3)}),[]),abort:(0,j.useCallback)(()=>{t.current=``;let r=e.current;if(r){try{r.abort()}catch{}e.current=null}n.current&&=(n.current(``),null)},[]),isSupported:r}}function tN(e){return`${Math.floor(e/60)}:${(e%60).toString().padStart(2,`0`)}`}function nN(e,t=4*1024*1024){return new Promise(n=>{let r=new Image;r.onload=()=>{let e=1600,{width:i,height:a}=r;if(i>e||a>e){let t=Math.min(e/i,e/a);i=Math.round(i*t),a=Math.round(a*t)}let o=document.createElement(`canvas`);o.width=i,o.height=a,o.getContext(`2d`).drawImage(r,0,0,i,a);for(let e of[.8,.6,.4,.3]){let r=o.toDataURL(`image/jpeg`,e);if(Math.round((r.length-23)*.75)<=t){n(r);return}}n(o.toDataURL(`image/jpeg`,.2))},r.onerror=()=>n(e),r.src=e})}var rN=`bloby_draft`;function iN({onSend:e,onStop:t,streaming:n,whisperEnabled:r,onTranscribe:i,onRecordingChange:a,onAudioReady:o}){let{start:s,stop:c,abort:l,isSupported:u}=eN(),d=r||u,[f,p]=(0,j.useState)(()=>{try{return localStorage.getItem(rN)||``}catch{return``}}),[g,v]=(0,j.useState)([]),y=(0,j.useRef)(null),[b,x]=(0,j.useState)(!1),S=(0,j.useCallback)(e=>{x(e),a?.(e)},[a]),[C,T]=(0,j.useState)(0),E=f.trim().length>0,ee=E||g.length>0,D=(0,j.useRef)(null),te=(0,j.useRef)(null),ne=(0,j.useRef)(null),re=(0,j.useRef)(null),O=(0,j.useRef)(null),ie=(0,j.useRef)(0),ae=(0,j.useRef)(0),oe=(0,j.useRef)(null),se=(0,j.useRef)(!1),ce=(0,j.useRef)(!1),ue=(0,j.useRef)(null),fe=(0,j.useRef)(null),pe=(0,j.useRef)([]),he=(0,j.useRef)(null);(0,j.useEffect)(()=>{let e=D.current;e&&(e.style.height=`0px`,e.style.height=`${Math.min(e.scrollHeight,88)}px`)},[f]),(0,j.useEffect)(()=>(y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{try{localStorage.setItem(rN,f)}catch{}},500),()=>{y.current&&clearTimeout(y.current)}),[f]),(0,j.useEffect)(()=>{if(b)return ue.current=setInterval(()=>T(e=>e+1),1e3),()=>{ue.current&&clearInterval(ue.current)}},[b]);let ge=(0,j.useCallback)(async t=>{ue.current&&clearInterval(ue.current),oe.current&&=(clearTimeout(oe.current),null),se.current=!1;let n=fe.current,r=he.current;if(t)r?.getTracks().forEach(e=>e.stop()),fe.current=null,he.current=null,pe.current=[],l();else if(n&&n.state!==`inactive`)n.onstop=async()=>{r?.getTracks().forEach(e=>e.stop());let t=new Blob(pe.current,{type:`audio/webm`});if(pe.current=[],fe.current=null,he.current=null,t.size<1e3)return;let n=new FileReader;n.onloadend=async()=>{let t=n.result,r=t.split(`,`)[1];if(!r)return;o?.(t);let a=g.length>0?g:void 0;try{let n;n=i?await i(r):await(await fetch(`/api/whisper/transcribe`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({audio:r})})).json(),e(n.transcript?.trim()||``,a,t)}catch(n){console.error(`[InputBar] Whisper transcription error:`,n),e(``,a,t)}a&&v([])},n.readAsDataURL(t)},n.stop();else{r?.getTracks().forEach(e=>e.stop()),fe.current=null,he.current=null,pe.current=[];try{let t=await c();if(t.trim()){let n=g.length>0?g:void 0;e(t.trim(),n),n&&v([])}}catch(e){console.error(`[InputBar] Web Speech stop error:`,e)}}O.current&&(O.current.style.transform=``),S(!1),T(0),ae.current=0},[e,i,g,r,l,c]),_e=(0,j.useCallback)(e=>{let t=e.type.startsWith(`image/`),n=e.type===`application/pdf`;if(!t&&!n)return;let r=new FileReader;r.onload=async n=>{let r=n.target?.result;t&&(r=await nN(r)),v(n=>[...n,{id:Math.random().toString(36).slice(2),type:t?`image`:`file`,name:e.name,preview:r}])},r.readAsDataURL(e)},[]),ve=(0,j.useCallback)(e=>{let t=e.target.files;if(t){for(let e=0;e<t.length;e++)_e(t[e]);e.target.value=``}},[_e]),ye=(0,j.useCallback)(e=>{v(t=>t.filter(t=>t.id!==e))},[]);(0,j.useEffect)(()=>{let e=e=>{if(e.clipboardData?.items){for(let t of e.clipboardData.items)if(t.type.startsWith(`image/`)){e.preventDefault();let n=t.getAsFile();n&&_e(n)}}};return document.addEventListener(`paste`,e),()=>document.removeEventListener(`paste`,e)},[_e]);let be=()=>{if(ee){e(f,g.length>0?g:void 0),p(``),v([]);try{localStorage.removeItem(rN)}catch{}requestAnimationFrame(()=>D.current?.focus())}},xe=`ontouchstart`in window||navigator.maxTouchPoints>0,Se=(0,j.useCallback)(async()=>{if(d)try{if(r){let e=await navigator.mediaDevices.getUserMedia({audio:!0});if(!(!xe&&!ce.current)&&xe&&!ce.current){e.getTracks().forEach(e=>e.stop());return}he.current=e;let t=MediaRecorder.isTypeSupported(`audio/webm;codecs=opus`)?`audio/webm;codecs=opus`:`audio/webm`,n=new MediaRecorder(e,{mimeType:t});pe.current=[],n.ondataavailable=e=>{e.data.size>0&&pe.current.push(e.data)},fe.current=n,n.start()}else if(s(!xe),xe&&!ce.current){l();return}se.current=!0,S(!0),T(0)}catch(e){console.error(`[InputBar] recording setup failed:`,e)}},[d,r,s,l]),Ce=(0,j.useCallback)(e=>{if(e.preventDefault(),!xe){if(b){ge(!1);return}ce.current=!0,Se();return}ce.current=!0,ie.current=e.clientX,ae.current=0,e.currentTarget.setPointerCapture(e.pointerId),oe.current=setTimeout(()=>{try{navigator.vibrate?.(50)}catch{}Se()},200)},[xe,b,d,Se,ge]),we=(0,j.useCallback)(e=>{if(!xe||!se.current)return;let t=Math.min(0,e.clientX-ie.current);if(ae.current=t,O.current&&(O.current.style.transform=`translateX(${t}px)`),re.current){let t=re.current.getBoundingClientRect(),n=t.left+t.width/2;Math.abs(e.clientX-n)<36&&ge(!0)}},[xe,ge]),Te=(0,j.useCallback)(()=>{ce.current=!1,oe.current&&=(clearTimeout(oe.current),null),xe&&se.current&&ge(!1)},[xe,ge]),Ee=(0,j.useCallback)(()=>{ce.current=!1,oe.current&&=(clearTimeout(oe.current),null),se.current&&ge(!0)},[ge]);return(0,M.jsxs)(`div`,{className:`shrink-0 p-3 relative`,children:[(0,M.jsxs)(`div`,{className:`flex flex-col transition-opacity duration-100 ${b?`opacity-0 pointer-events-none`:`opacity-100`}`,children:[(0,M.jsx)(_,{children:g.length>0&&(0,M.jsx)(m.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},className:`overflow-hidden`,children:(0,M.jsx)(`div`,{className:`flex gap-2 px-3 pt-2.5 pb-2 flex-wrap bg-white/[0.04] border border-white/[0.08] rounded-2xl mb-2`,children:g.map(e=>(0,M.jsxs)(`div`,{className:`relative group flex-shrink-0`,children:[e.type===`image`?(0,M.jsx)(`img`,{src:e.preview,alt:e.name,className:`w-14 h-14 rounded-lg object-cover border border-white/10`}):(0,M.jsxs)(`div`,{className:`w-14 h-14 rounded-lg bg-white/5 border border-white/10 flex flex-col items-center justify-center gap-0.5 px-1`,children:[(0,M.jsx)(`svg`,{className:`w-5 h-5 text-muted-foreground`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:1.5,children:(0,M.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z`})}),(0,M.jsx)(`span`,{className:`text-[8px] text-muted-foreground truncate w-full text-center`,children:e.name.split(`.`).pop()})]}),(0,M.jsx)(`button`,{onClick:()=>ye(e.id),className:`absolute -top-1.5 -right-1.5 w-4 h-4 bg-black/80 border border-white/20 rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity`,children:(0,M.jsx)(me,{className:`w-2.5 h-2.5 text-white`})})]},e.id))})})}),(0,M.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,M.jsxs)(`div`,{className:`flex-1 flex items-end bg-white rounded-2xl px-4`,children:[(0,M.jsx)(`textarea`,{ref:D,value:f,onChange:e=>p(e.target.value),onKeyDown:e=>{let t=`ontouchstart`in window||navigator.maxTouchPoints>0;e.key===`Enter`&&!e.shiftKey&&!t&&(e.preventDefault(),ee&&be())},placeholder:`Type a message...`,rows:1,className:`flex-1 resize-none bg-transparent text-gray-900 py-3 text-sm outline-none placeholder:text-gray-400 overflow-y-auto`,style:{maxHeight:88}}),(0,M.jsx)(`input`,{ref:te,type:`file`,className:`hidden`,accept:`image/*,.pdf`,multiple:!0,onChange:ve}),(0,M.jsx)(`input`,{ref:ne,type:`file`,className:`hidden`,accept:`image/*`,capture:`environment`,onChange:ve}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>te.current?.click(),className:`shrink-0 p-1.5 mb-2 text-gray-400 hover:text-gray-600 transition-colors`,children:(0,M.jsx)(k,{className:`h-4 w-4`})}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>ne.current?.click(),className:`shrink-0 p-1.5 mb-2 text-gray-400 hover:text-gray-600 transition-colors`,children:(0,M.jsx)(w,{className:`h-4 w-4`})})]}),E?(0,M.jsx)(`button`,{onClick:be,className:`flex items-center justify-center h-12 w-12 shrink-0 rounded-full bg-white text-gray-900 transition-colors hover:bg-gray-100`,children:(0,M.jsx)(le,{className:`h-4 w-4`})}):(0,M.jsx)(`div`,{className:`flex items-center justify-center h-12 w-12 shrink-0 rounded-full transition-colors touch-none select-none ${d?`bg-gradient-brand text-white cursor-pointer`:`bg-gray-200 text-gray-400 cursor-default`}`,title:d?void 0:`Voice input requires Chrome, Edge, or Safari. Enable Whisper in Settings for any browser.`,onPointerDown:d?Ce:void 0,onPointerMove:d?we:void 0,onPointerUp:d?Te:void 0,onPointerCancel:d?Ee:void 0,children:(0,M.jsx)(h,{className:`h-4 w-4`})})]})]}),(0,M.jsx)(_,{children:b&&(0,M.jsx)(m.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.1},className:`absolute inset-0 p-3 flex items-center touch-none`,children:(0,M.jsxs)(`div`,{className:`flex items-center w-full gap-2`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,M.jsxs)(`span`,{className:`relative flex h-2 w-2 shrink-0`,children:[(0,M.jsx)(`span`,{className:`animate-ping absolute inline-flex h-full w-full rounded-full bg-destructive opacity-75`}),(0,M.jsx)(`span`,{className:`relative inline-flex rounded-full h-2 w-2 bg-destructive`})]}),(0,M.jsx)(`span`,{className:`text-sm font-medium tabular-nums`,children:tN(C)})]}),(0,M.jsx)(`div`,{className:`flex-1 flex items-center bg-muted rounded-full h-12 pl-1 pr-0.5`,children:xe?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{ref:re,className:`flex items-center justify-center h-9 w-9 shrink-0 rounded-full bg-destructive/10 text-destructive`,children:(0,M.jsx)(de,{className:`h-4 w-4`})}),(0,M.jsx)(`div`,{className:`flex-1 flex justify-center min-w-0`,children:(0,M.jsx)(m.span,{className:`text-[13px] whitespace-nowrap select-none font-medium`,style:{backgroundImage:`linear-gradient(90deg, #999 0%, #999 35%, #fff 50%, #999 65%, #999 100%)`,backgroundSize:`200% 100%`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},animate:{backgroundPosition:[`200% center`,`-200% center`]},transition:{duration:2.5,repeat:1/0,ease:`linear`},children:`◄◄ slide to cancel`})}),(0,M.jsx)(`div`,{ref:O,className:`shrink-0 touch-none select-none will-change-transform relative z-10`,style:{transition:`none`},onPointerDown:Ce,onPointerMove:we,onPointerUp:Te,onPointerCancel:Ee,children:(0,M.jsx)(`div`,{className:`flex items-center justify-center h-11 w-11 rounded-full bg-destructive text-destructive-foreground`,style:{animation:`mic-pulse-scale 2s ease-in-out infinite`},children:(0,M.jsx)(h,{className:`h-5 w-5`})})})]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`button`,{onClick:()=>ge(!0),className:`flex items-center justify-center h-9 w-9 shrink-0 rounded-full bg-destructive/10 text-destructive hover:bg-destructive/20 transition-colors`,children:(0,M.jsx)(de,{className:`h-4 w-4`})}),(0,M.jsx)(`div`,{className:`flex-1 flex justify-center min-w-0`,children:(0,M.jsx)(`span`,{className:`text-[13px] whitespace-nowrap select-none font-medium text-muted-foreground`,children:`Click mic to stop`})}),(0,M.jsx)(`button`,{onClick:()=>ge(!1),className:`shrink-0`,children:(0,M.jsx)(`div`,{className:`flex items-center justify-center h-11 w-11 rounded-full bg-destructive text-destructive-foreground hover:bg-destructive/90 transition-colors`,children:(0,M.jsx)(A,{className:`h-4 w-4`})})})]})})]})})})]})}var aN=`/morphy/headphones.json`,oN=`/morphy/`,sN=null,cN=null;function lN(){return sN&&cN?Promise.resolve({img:sN,cfg:cN}):fetch(aN).then(e=>{if(!e.ok)throw Error(`hp config `+e.status);return e.json()}).then(e=>new Promise((t,n)=>{let r=new Image;r.onload=()=>{sN=r,cN=e,t({img:r,cfg:e})},r.onerror=n,r.src=oN+e.spritesheet}))}function uN({recording:e,height:t=36,onDone:n}){let r=(0,j.useRef)(null),i=(0,j.useRef)(sN),a=(0,j.useRef)(cN),o=(0,j.useRef)(`idle`),s=(0,j.useRef)(0),c=(0,j.useRef)(1),l=(0,j.useRef)(0),u=(0,j.useRef)(0),d=(0,j.useRef)(!1),f=(0,j.useRef)(n);f.current=n;let p=a.current,m=p?p.frame.w:180,h=p?p.frame.h:180,g=t,_=Math.round(m/h*g);(0,j.useEffect)(()=>{lN().then(({img:e,cfg:t})=>{i.current=e,a.current=t,o.current===`idle`&&(s.current=t.clips.idle.from)})},[]),(0,j.useEffect)(()=>{let t=a.current;t&&(e&&!d.current?(o.current=`activating`,s.current=t.clips.enter.from,c.current=1,l.current=performance.now()):!e&&d.current&&(o.current===`activating`?o.current=`activating_then_deactivate`:o.current===`recording`&&(o.current=`deactivating`,s.current=t.clips.exit.from,l.current=performance.now())),d.current=e)},[e]);let v=(0,j.useCallback)(e=>{let t=r.current,n=i.current,d=a.current;if(!t){u.current=requestAnimationFrame(v);return}let p=t.getContext(`2d`),m=o.current;if(!n||!d){p.clearRect(0,0,_,g),u.current=requestAnimationFrame(v);return}if(m===`idle`){let e=d.grid.cols,t=d.frame.w,r=d.frame.h,i=d.clips.idle.from,a=i%e,o=Math.floor(i/e);p.clearRect(0,0,_,g),p.imageSmoothingEnabled=!0,p.imageSmoothingQuality=`high`,p.drawImage(n,a*t,o*r,t,r,0,0,_,g),u.current=requestAnimationFrame(v);return}let h=d.fps,y=1e3/(m===`activating`||m===`activating_then_deactivate`?d.clips.enter.fps??h:m===`deactivating`?d.clips.exit.fps??h:d.clips.active.fps??h),b=e-l.current;if(b>=y){if(l.current=e-b%y,m===`activating`||m===`activating_then_deactivate`)s.current++,s.current>d.clips.enter.to&&(m===`activating_then_deactivate`?(o.current=`deactivating`,s.current=d.clips.exit.from):(o.current=`recording`,s.current=d.clips.active.from,c.current=1));else if(m===`recording`)s.current+=c.current,s.current>=d.clips.active.to?(s.current=d.clips.active.to,c.current=-1):s.current<=d.clips.active.from&&(s.current=d.clips.active.from,c.current=1);else if(m===`deactivating`&&(s.current++,s.current>d.clips.exit.to)){o.current=`idle`,s.current=d.clips.idle.from,p.clearRect(0,0,_,g),f.current?.(),u.current=requestAnimationFrame(v);return}}let x=d.grid.cols,S=d.frame.w,C=d.frame.h,w=s.current%x,T=Math.floor(s.current/x);p.clearRect(0,0,_,g),p.imageSmoothingEnabled=!0,p.imageSmoothingQuality=`high`,p.drawImage(n,w*S,T*C,S,C,0,0,_,g),u.current=requestAnimationFrame(v)},[_,g]);return(0,j.useEffect)(()=>{let e=r.current;if(!e)return;let t=window.devicePixelRatio||1;return e.width=_*t,e.height=g*t,e.getContext(`2d`).setTransform(t,0,0,t,0,0),u.current=requestAnimationFrame(v),()=>cancelAnimationFrame(u.current)},[v,_,g]),(0,M.jsx)(`canvas`,{ref:r,style:{width:_,height:g,display:`block`}})}function dN(){let e=(0,j.useRef)(null),[t,n]=(0,j.useState)(!1),[r,i]=(0,j.useState)(`Bloby`),[a,o]=(0,j.useState)(!1),[s,c]=(0,j.useState)(!1),[l,u]=(0,j.useState)(!1),[d,f]=(0,j.useState)(!1),[p,m]=(0,j.useState)(0),h=(0,j.useRef)(null),_=(0,j.useRef)(!1),[v,b]=(0,j.useState)(!0),[w,T]=(0,j.useState)(null),[E,ee]=(0,j.useState)(null),[ne,re]=(0,j.useState)(!1),[O,ie]=(0,j.useState)(!1),[oe,k]=(0,j.useState)(`loading`);function se(e){let t=(e+`=`.repeat((4-e.length%4)%4)).replace(/-/g,`+`).replace(/_/g,`/`),n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r}async function ce(){try{if(await Notification.requestPermission()!==`granted`){k(`denied`);return}let t=await navigator.serviceWorker.ready,{publicKey:n}=await(await fetch(`/api/push/vapid-public-key`)).json(),r=(await t.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:se(n)})).toJSON(),i=e.current;i&&i.send(`push:subscribe`,{endpoint:r.endpoint,keys:r.keys}),k(`subscribed`)}catch(e){console.error(`[push] Subscribe failed:`,e)}}async function le(){try{let t=await(await navigator.serviceWorker.ready).pushManager.getSubscription();if(t){let n=t.endpoint;await t.unsubscribe();let r=e.current;r&&r.send(`push:unsubscribe`,{endpoint:n})}k(`unsubscribed`)}catch(e){console.error(`[push] Unsubscribe failed:`,e)}}let[A,de]=(0,j.useState)(!1),fe=/iPad|iPhone|iPod/.test(navigator.userAgent),he=window.matchMedia(`(display-mode: standalone)`).matches||navigator.standalone,_e=/Android|iPhone|iPad|iPod|webOS|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),ve=window.self!==window.top;(0,j.useEffect)(()=>{let e=e=>{e.data?.type===`bloby:show-ios-install`&&de(!0)};return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[]);let[Te,De]=(0,j.useState)(!1),[Oe,ke]=(0,j.useState)(!1),[Ae,je]=(0,j.useState)(!1),[Me,Ne]=(0,j.useState)(!1);(0,j.useEffect)(()=>{(async()=>{try{let e=await(await fetch(`/api/onboard/status`)).json();if(e.totpEnabled&&Ne(!0),!e.portalConfigured){ke(!1),je(!0),De(!0);return}ke(!0);let t=ye();if(t){if((await(await fetch(`/api/portal/validate-token?token=${encodeURIComponent(t)}`)).json()).valid){je(!0),De(!0);return}xe()}je(!1),De(!0)}catch{je(!0),De(!0)}})()},[]);let Pe=e=>{be(e),je(!0)};(0,j.useEffect)(()=>{Se(()=>{je(!1),ke(!0)})},[]),(0,j.useEffect)(()=>{if(!Ae)return;let e=()=>{fetch(`/app/api/health`).then(e=>b(e.ok)).catch(()=>b(!1))};e();let t=setInterval(e,1e4);return()=>clearInterval(t)},[Ae]),(0,j.useEffect)(()=>{Ae&&(async()=>{if(!(`PushManager`in window)||!(`serviceWorker`in navigator)){k(`unsupported`);return}if(Notification.permission===`denied`){k(`denied`);return}try{let e=await(await navigator.serviceWorker.ready).pushManager.getSubscription();k(e&&(await(await fetch(`/api/push/status?endpoint=${encodeURIComponent(e.endpoint)}`)).json()).subscribed?`subscribed`:`unsubscribed`)}catch{k(`unsupported`)}})()},[Ae]),(0,j.useEffect)(()=>{if(!Ae)return;let t=location.protocol===`https:`?`wss:`:`ws:`,r=location.host,i=new ge(`${t}//${r}/bloby/ws`,ye);e.current=i;let a=i.onStatus(e=>{n(e),e&&_.current&&m(e=>e+1),_.current=e}),o=i.on(`app:rebuilding`,()=>{window.parent?.postMessage({type:`bloby:rebuilding`},`*`)}),s=i.on(`app:rebuilt`,()=>{window.parent?.postMessage({type:`bloby:rebuilt`},`*`)}),c=i.on(`app:build-error`,e=>{window.parent?.postMessage({type:`bloby:build-error`,error:e.error},`*`)}),l=i.on(`app:hmr-update`,()=>{window.parent?.postMessage({type:`bloby:hmr-update`},`*`)}),u=i.on(`bot:response`,()=>{window.parent?.postMessage({type:`bloby:new-message`},`*`)}),d=i.on(`chat:sync`,()=>{window.parent?.postMessage({type:`bloby:new-message`},`*`)});return i.connect(),()=>{a(),o(),s(),c(),l(),u(),d(),i.disconnect()}},[Ae]),(0,j.useEffect)(()=>{Ae&&(Ce(`/api/settings`).then(e=>e.json()).then(e=>{e.agent_name&&i(e.agent_name),e.whisper_enabled===`true`&&o(!0)}).catch(()=>{}),Ce(`/api/wallet/balance`).then(e=>e.json()).then(e=>{e.address&&(T(e.tempo??`0.00`),ee(e.base??`0.00`))}).catch(()=>{}))},[Ae]),(0,j.useEffect)(()=>{if(!s)return;let e=e=>{h.current&&!h.current.contains(e.target)&&(c(!1),u(!1))};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[s]);let{messages:Fe,streaming:Ie,streamBuffer:Le,tools:Re,hasMore:ze,loadOlder:Be,sendMessage:Ve,addPendingAudio:He,stopStreaming:Ue,clearContext:We}=we(e.current,p,Ae);return(0,j.useEffect)(()=>{let t=async t=>{if(t.data?.type!==`bloby:voice-record`)return;let{audio:n,transcript:r}=t.data;if(n&&a){let t=e.current;if(!t?.connected)return;try{let e=await new Promise((e,r)=>{let i=t.on(`whisper:result`,t=>{i(),clearTimeout(a),e(t)}),a=setTimeout(()=>{i(),r(Error(`Timeout`))},3e4);t.send(`whisper:transcribe`,{audio:n})});e.transcript?.trim()&&Ve(e.transcript.trim(),void 0,`data:audio/webm;base64,${n}`)}catch(e){console.error(`[BlobyApp] widget voice transcription error:`,e)}}else r?.trim()&&Ve(r.trim())};return window.addEventListener(`message`,t),()=>window.removeEventListener(`message`,t)},[Ve,a]),Te?Oe&&!Ae?(0,M.jsx)(Ee,{onLogin:Pe,totpEnabled:Me}):(0,M.jsxs)(`div`,{className:`flex flex-col h-dvh overflow-hidden`,children:[(0,M.jsxs)(`div`,{className:`flex items-center px-4 py-3.5 border-b border-white/[0.06] shrink-0`,children:[(0,M.jsx)(`button`,{onClick:()=>window.parent?.postMessage({type:`bloby:close`},`*`),className:`flex items-center justify-center h-8 w-8 -ml-1 rounded-full text-muted-foreground hover:text-foreground hover:bg-white/[0.06] transition-colors`,"aria-label":`Close chat`,children:(0,M.jsx)(g,{className:`h-[18px] w-[18px]`})}),(0,M.jsx)(`div`,{className:`relative ml-1.5 shrink-0 -translate-y-[5px]`,children:(0,M.jsx)(uN,{recording:O,height:36})}),(0,M.jsxs)(`div`,{className:`flex flex-col ml-2.5 min-w-0`,children:[(0,M.jsx)(`span`,{className:`text-[15px] font-semibold leading-tight tracking-[-0.01em]`,children:r}),(0,M.jsx)(`div`,{className:`flex items-center gap-1.5 mt-0.5`,children:(0,M.jsxs)(`span`,{className:`flex items-center gap-1 text-[11px] text-muted-foreground`,children:[(0,M.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full ${t?`bg-emerald-500`:`bg-red-500`}`}),t?`Online`:`Offline`]})})]}),(0,M.jsx)(`div`,{className:`flex-1`}),(w!==null||E!==null)&&(0,M.jsxs)(`div`,{className:`relative mr-1.5`,onMouseEnter:()=>re(!0),onMouseLeave:()=>re(!1),children:[(0,M.jsxs)(`div`,{className:`flex items-center rounded-xl bg-white/[0.04] border border-white/[0.06] pl-3 pr-1 py-1`,children:[(0,M.jsxs)(`span`,{className:`text-[11px] text-muted-foreground/70 mr-1.5`,children:[(0,M.jsx)(`span`,{className:`hidden sm:inline`,children:`My `}),`Wallet:`]}),(0,M.jsxs)(`span`,{className:`text-[13px] font-semibold font-mono tracking-tight`,children:[`$`,(Number(w??0)+Number(E??0)).toFixed(2)]}),(0,M.jsx)(`div`,{className:`w-px h-4 bg-white/[0.08] mx-2`}),(0,M.jsxs)(`a`,{href:`https://www.bloby.bot/dashboard`,target:`_blank`,rel:`noopener noreferrer`,className:`text-[11px] font-semibold text-primary bg-primary/10 hover:bg-primary/20 px-2.5 py-1 rounded-lg transition-colors`,children:[(0,M.jsx)(`span`,{className:`sm:hidden`,children:`+`}),(0,M.jsx)(`span`,{className:`hidden sm:inline`,children:`+ Add`})]})]}),ne&&(0,M.jsx)(`div`,{className:`absolute right-0 top-full pt-1.5 z-50`,children:(0,M.jsxs)(`div`,{className:`min-w-[220px] rounded-xl border border-white/[0.06] bg-popover py-2 shadow-xl`,children:[(0,M.jsx)(`div`,{className:`px-3.5 pb-2 text-[10px] uppercase tracking-wider text-muted-foreground/60`,children:`Balances`}),(0,M.jsxs)(`div`,{className:`flex items-center justify-between px-3.5 py-1.5`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(`img`,{src:`https://cdn.jsdelivr.net/gh/atomiclabs/cryptocurrency-icons@master/svg/color/usdc.svg`,alt:`USDC`,className:`h-5 w-5`}),(0,M.jsxs)(`span`,{className:`text-[13px] font-semibold font-mono tracking-tight`,children:[`$`,Number(w??0).toFixed(2)]})]}),(0,M.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:`on Tempo`})]}),(0,M.jsxs)(`div`,{className:`flex items-center justify-between px-3.5 py-1.5`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(`img`,{src:`https://cdn.jsdelivr.net/gh/atomiclabs/cryptocurrency-icons@master/svg/color/usdc.svg`,alt:`USDC`,className:`h-5 w-5`}),(0,M.jsxs)(`span`,{className:`text-[13px] font-semibold font-mono tracking-tight`,children:[`$`,Number(E??0).toFixed(2)]})]}),(0,M.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:`on Base`})]})]})})]}),(0,M.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[oe!==`loading`&&oe!==`unsupported`&&(0,M.jsx)(`button`,{onClick:()=>{oe===`subscribed`?le():oe===`unsubscribed`&&ce()},disabled:oe===`denied`,className:`flex items-center justify-center h-8 w-8 rounded-full text-muted-foreground hover:text-foreground hover:bg-white/[0.06] transition-colors disabled:opacity-40 disabled:cursor-not-allowed`,title:oe===`denied`?`Notifications blocked — enable in browser settings`:oe===`subscribed`?`Disable push notifications`:`Enable push notifications`,children:oe===`denied`?(0,M.jsx)(x,{className:`h-[18px] w-[18px]`}):oe===`subscribed`?(0,M.jsx)(S,{className:`h-[18px] w-[18px] text-primary`}):(0,M.jsx)(C,{className:`h-[18px] w-[18px]`})}),(0,M.jsxs)(`div`,{className:`relative`,ref:h,children:[(0,M.jsx)(`button`,{onClick:()=>c(e=>{let t=!e;return t||u(!1),t}),className:`flex items-center justify-center h-8 w-8 rounded-full text-muted-foreground hover:text-foreground hover:bg-white/[0.06] transition-colors`,children:(0,M.jsx)(te,{className:`h-[18px] w-[18px]`})}),s&&(0,M.jsxs)(`div`,{className:`absolute right-0 top-full mt-1.5 min-w-[200px] rounded-xl border border-white/[0.06] bg-popover py-1.5 shadow-xl z-50`,children:[(0,M.jsxs)(`button`,{onClick:()=>{f(!0),c(!1),u(!1)},className:`flex w-full items-center gap-2.5 px-3.5 py-2 text-sm text-muted-foreground hover:text-foreground hover:bg-white/[0.06] transition-colors`,children:[(0,M.jsx)(pe,{className:`h-4 w-4`}),`Settings`]}),l?(0,M.jsxs)(`div`,{className:`px-3.5 py-2`,children:[(0,M.jsx)(`p`,{className:`text-[12px] text-muted-foreground/70 mb-2 leading-snug`,children:`Start fresh? This clears the agent's context — your past messages stay saved.`}),(0,M.jsxs)(`div`,{className:`flex gap-2`,children:[(0,M.jsx)(`button`,{onClick:()=>{We(),u(!1),c(!1)},className:`flex-1 text-[12px] font-medium text-white bg-[#0069FE] hover:bg-[#0069FE]/90 px-2.5 py-1.5 rounded-lg transition-colors`,children:`New chat`}),(0,M.jsx)(`button`,{onClick:()=>u(!1),className:`flex-1 text-[12px] font-medium text-muted-foreground bg-white/[0.06] hover:bg-white/[0.1] px-2.5 py-1.5 rounded-lg transition-colors`,children:`Cancel`})]})]}):(0,M.jsxs)(`button`,{onClick:()=>u(!0),className:`flex w-full items-center gap-2.5 px-3.5 py-2 text-sm text-muted-foreground hover:text-foreground hover:bg-white/[0.06] transition-colors`,children:[(0,M.jsx)(ae,{className:`h-4 w-4`}),`New conversation`]}),_e&&!he&&(0,M.jsxs)(`button`,{onClick:()=>{c(!1),u(!1),ve?window.parent.postMessage({type:`bloby:install-app`},`*`):de(!0)},className:`flex w-full items-center gap-2.5 px-3.5 py-2 text-sm text-muted-foreground hover:text-foreground hover:bg-white/[0.06] transition-colors`,children:[(0,M.jsx)(D,{className:`h-4 w-4`}),`Install App`]})]})]})]})]}),(0,M.jsxs)(`div`,{className:`flex-1 min-h-0 flex flex-col overflow-hidden`,children:[(0,M.jsx)(ZM,{messages:Fe,streaming:Ie,streamBuffer:Le,tools:Re,hasMore:ze,onLoadOlder:Be}),(0,M.jsx)(iN,{onSend:Ve,onStop:Ue,streaming:Ie,whisperEnabled:a,onTranscribe:t=>new Promise((n,r)=>{let i=e.current;if(!i?.connected){r(Error(`WebSocket not connected`));return}let a=i.on(`whisper:result`,e=>{a(),clearTimeout(o),n(e)}),o=setTimeout(()=>{a(),r(Error(`Transcription timeout`))},3e4);i.send(`whisper:transcribe`,{audio:t})}),onAudioReady:He,onRecordingChange:ie})]}),d&&(0,M.jsx)(y,{onSave:t=>new Promise((n,r)=>{let i=e.current;if(!i?.connected){r(Error(`WebSocket not connected`));return}let a=i.on(`settings:saved`,e=>{a(),clearTimeout(s),n(e)}),o=i.on(`settings:save-error`,e=>{o(),clearTimeout(s),r(Error(e.error||`Save failed`))}),s=setTimeout(()=>{a(),o(),r(Error(`Save timeout`))},1e4);i.send(`settings:save`,t)}),onTunnelSwitch:t=>new Promise((n,r)=>{let i=e.current;if(!i?.connected){r(Error(`Not connected`));return}let a=i.on(`tunnel:switched`,e=>{a(),o(),clearTimeout(s),n(e)}),o=i.on(`tunnel:switch-error`,e=>{a(),o(),clearTimeout(s),r(Error(e.error))}),s=setTimeout(()=>{a(),o(),r(Error(`Timeout`))},3e4);i.send(`tunnel:switch`,{mode:t})}),onComplete:()=>{f(!1),Ce(`/api/settings`).then(e=>e.json()).then(e=>{e.agent_name&&i(e.agent_name),o(e.whisper_enabled===`true`)}).catch(()=>{}),window.parent?.postMessage({type:`bloby:onboard-complete`},`*`)}}),A&&(0,M.jsxs)(`div`,{className:`fixed inset-0 z-[300] flex items-end sm:items-center justify-center p-4`,children:[(0,M.jsx)(`div`,{className:`absolute inset-0 bg-black/60 backdrop-blur-sm`,onClick:()=>de(!1)}),(0,M.jsxs)(`div`,{className:`relative w-full max-w-[360px] bg-[#1c1c1e] border border-white/[0.08] rounded-2xl shadow-2xl overflow-hidden`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between px-5 pt-5 pb-2`,children:[(0,M.jsx)(`h2`,{className:`text-[17px] font-semibold text-white`,children:`Install App`}),(0,M.jsx)(`button`,{onClick:()=>de(!1),className:`h-7 w-7 rounded-full bg-white/[0.08] flex items-center justify-center text-white/50 hover:text-white/80 transition-colors`,children:(0,M.jsx)(me,{className:`h-4 w-4`})})]}),(0,M.jsxs)(`div`,{className:`px-5 pb-6 pt-1`,children:[(0,M.jsx)(`p`,{className:`text-white/50 text-[13px] mb-5 leading-relaxed`,children:`Add Bloby to your home screen for a full-screen app experience.`}),fe?(0,M.jsxs)(`div`,{className:`space-y-3.5`,children:[(0,M.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(`span`,{className:`flex-shrink-0 w-7 h-7 rounded-full bg-[#007AFF]/15 text-[#007AFF] text-[13px] font-semibold flex items-center justify-center mt-0.5`,children:`1`}),(0,M.jsxs)(`div`,{className:`flex-1`,children:[(0,M.jsx)(`p`,{className:`text-white text-[14px] font-medium`,children:`Tap the Share button`}),(0,M.jsxs)(`p`,{className:`text-white/40 text-[12px] mt-0.5 flex items-center gap-1.5`,children:[`The `,(0,M.jsx)(ue,{className:`h-3.5 w-3.5 inline`}),` icon at the bottom of Safari`]})]})]}),(0,M.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(`span`,{className:`flex-shrink-0 w-7 h-7 rounded-full bg-[#007AFF]/15 text-[#007AFF] text-[13px] font-semibold flex items-center justify-center mt-0.5`,children:`2`}),(0,M.jsxs)(`div`,{className:`flex-1`,children:[(0,M.jsx)(`p`,{className:`text-white text-[14px] font-medium`,children:`Scroll down and tap`}),(0,M.jsx)(`p`,{className:`text-white/40 text-[12px] mt-0.5`,children:`"Add to Home Screen"`})]})]}),(0,M.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(`span`,{className:`flex-shrink-0 w-7 h-7 rounded-full bg-[#007AFF]/15 text-[#007AFF] text-[13px] font-semibold flex items-center justify-center mt-0.5`,children:`3`}),(0,M.jsxs)(`div`,{className:`flex-1`,children:[(0,M.jsx)(`p`,{className:`text-white text-[14px] font-medium`,children:`Tap "Add"`}),(0,M.jsx)(`p`,{className:`text-white/40 text-[12px] mt-0.5`,children:`Bloby will appear on your home screen`})]})]})]}):(0,M.jsxs)(`div`,{className:`space-y-3.5`,children:[(0,M.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(`span`,{className:`flex-shrink-0 w-7 h-7 rounded-full bg-[#007AFF]/15 text-[#007AFF] text-[13px] font-semibold flex items-center justify-center mt-0.5`,children:`1`}),(0,M.jsxs)(`div`,{className:`flex-1`,children:[(0,M.jsx)(`p`,{className:`text-white text-[14px] font-medium`,children:`Open browser menu`}),(0,M.jsx)(`p`,{className:`text-white/40 text-[12px] mt-0.5`,children:`Tap the three-dot menu in your browser`})]})]}),(0,M.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(`span`,{className:`flex-shrink-0 w-7 h-7 rounded-full bg-[#007AFF]/15 text-[#007AFF] text-[13px] font-semibold flex items-center justify-center mt-0.5`,children:`2`}),(0,M.jsxs)(`div`,{className:`flex-1`,children:[(0,M.jsx)(`p`,{className:`text-white text-[14px] font-medium`,children:`Tap "Install app" or "Add to Home screen"`}),(0,M.jsx)(`p`,{className:`text-white/40 text-[12px] mt-0.5`,children:`Bloby will be installed as a standalone app`})]})]})]}),(0,M.jsx)(`button`,{onClick:()=>de(!1),className:`w-full mt-5 py-2.5 bg-white/[0.06] hover:bg-white/[0.1] text-white text-[14px] font-medium rounded-xl transition-colors`,children:`Got it`})]})]})]})]}):(0,M.jsx)(`div`,{className:`flex items-center justify-center h-dvh`,children:(0,M.jsx)(`div`,{className:`w-6 h-6 border-2 border-white/10 border-t-white/50 rounded-full animate-spin`})})}he.createRoot(document.getElementById(`root`)).render((0,M.jsx)(j.StrictMode,{children:(0,M.jsx)(dN,{})}));export{OC as i,Ax as n,wC as r,nx as t};
|
|
294
|
+
</style></head><body>${t}</body></html>`),n.document.close())}function nN(e){let t=e.target.closest(`[title="View fullscreen"]`);if(t){e.stopPropagation(),e.preventDefault();let n=t.closest(`[data-streamdown]`)?.querySelector(`table`)??t.closest(`.group`)?.querySelector(`table`);n&&tN(n)}}function rN({role:e,content:t,timestamp:n,hasAttachments:r,audioData:i,attachments:a,onImageClick:o,transcribing:s}){let c=e===`user`,l=n?JM(n):``,{tag:u,body:d}=YM(t),p=a?.filter(e=>e.mediaType?.startsWith(`image/`))||[],m=a?.filter(e=>!e.mediaType?.startsWith(`image/`))||[],h=p.filter(e=>e.filePath).map(e=>e.filePath.startsWith(`data:`)?e.filePath:`/api/files/${e.filePath}`);if(c)return(0,M.jsxs)(`div`,{className:`flex flex-col items-end gap-0.5`,children:[(0,M.jsxs)(`div`,{className:`group relative max-w-[85%]`,children:[(0,M.jsx)(eN,{text:d}),(0,M.jsxs)(`div`,{className:`rounded-2xl px-4 py-2.5 text-sm leading-relaxed whitespace-pre-wrap bg-primary text-primary-foreground break-words`,children:[h.length>0&&(0,M.jsx)(`div`,{className:`flex gap-1.5 flex-wrap mb-2`,children:h.map((e,t)=>(0,M.jsx)(PM,{src:e,alt:p[t]?.name||`attachment`,className:`w-28 h-28 rounded-lg object-cover cursor-pointer border border-white/10 hover:opacity-80 transition-opacity`,onClick:()=>o?.(h,t)},t))}),m.length>0&&(0,M.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-primary-foreground/60 mr-1.5`,children:[(0,M.jsx)(ce,{className:`h-3 w-3`}),m.length>1&&(0,M.jsx)(`span`,{className:`text-xs`,children:m.length})]}),!a?.length&&r&&(0,M.jsx)(`span`,{className:`inline-flex items-center gap-1 text-primary-foreground/60 mr-1.5`,children:(0,M.jsx)(ce,{className:`h-3 w-3`})}),s&&(0,M.jsxs)(`div`,{className:`flex flex-col gap-1.5 mb-1`,children:[(0,M.jsx)(`div`,{className:`h-3 w-48 max-w-full rounded bg-white/15 animate-pulse`}),(0,M.jsx)(`div`,{className:`h-3 w-32 max-w-full rounded bg-white/10 animate-pulse`})]}),d,i&&(0,M.jsx)(`div`,{className:`mt-2 pt-2 border-t border-white/10`,children:(0,M.jsx)(NM,{audioData:i})})]})]}),(0,M.jsxs)(`div`,{className:`flex items-center gap-1 px-1 self-end`,children:[(0,M.jsxs)(`span`,{className:`flex items-center gap-0.5 text-[10px] text-muted-foreground/40`,children:[(0,M.jsx)(XM,{tag:u}),u]}),l&&(0,M.jsx)(`span`,{className:`text-[10px] text-muted-foreground/50`,children:l})]})]});let g=e=>(0,M.jsx)(kC,{mode:`static`,plugins:{code:AM},controls:{code:{copy:!0,download:!1},table:{copy:!0,download:!0,fullscreen:!0}},shikiTheme:[`github-dark`,`github-dark`],lineNumbers:!1,components:{a({href:e,children:t}){return e?.includes(`/api/channels/whatsapp/qr-page`)?(0,M.jsxs)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-3 my-2 px-3.5 py-2.5 rounded-xl bg-[#25D366]/10 border border-[#25D366]/20 hover:bg-[#25D366]/15 transition-colors no-underline`,children:[(0,M.jsx)(`div`,{className:`flex items-center justify-center w-8 h-8 rounded-lg bg-[#25D366] shrink-0`,children:(0,M.jsx)(`svg`,{viewBox:`0 0 24 24`,className:`w-4 h-4 fill-white`,children:(0,M.jsx)(`path`,{d:`M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z`})})}),(0,M.jsxs)(`div`,{className:`flex flex-col min-w-0`,children:[(0,M.jsx)(`span`,{className:`text-[#25D366] font-medium text-sm`,children:`Click here to pair your WhatsApp`}),(0,M.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`Opens QR code pairing page`})]}),(0,M.jsx)(f,{className:`w-3.5 h-3.5 text-muted-foreground/50 ml-auto shrink-0`})]}):e?.includes(`/api/channels/alexa/pair-page`)?(0,M.jsxs)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-3 my-2 px-3.5 py-2.5 rounded-xl bg-[#00CAFF]/10 border border-[#00CAFF]/20 hover:bg-[#00CAFF]/15 transition-colors no-underline`,children:[(0,M.jsx)(`div`,{className:`flex items-center justify-center w-8 h-8 rounded-lg bg-[#00CAFF] shrink-0`,children:(0,M.jsx)(`svg`,{viewBox:`0 0 24 24`,className:`w-4 h-4 fill-white`,children:(0,M.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z`})})}),(0,M.jsxs)(`div`,{className:`flex flex-col min-w-0`,children:[(0,M.jsx)(`span`,{className:`text-[#00CAFF] font-medium text-sm`,children:`Click here to connect Alexa`}),(0,M.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`Generates a one-time linking code`})]}),(0,M.jsx)(f,{className:`w-3.5 h-3.5 text-muted-foreground/50 ml-auto shrink-0`})]}):(0,M.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,className:`text-[#0069FE] underline decoration-[#0069FE]/30 underline-offset-2 hover:decoration-[#0069FE] transition-colors`,children:t})}},children:ZM(e)});if($M(d)){let e=QM(d);return(0,M.jsxs)(`div`,{className:`flex flex-col items-start gap-0.5`,children:[(0,M.jsxs)(`div`,{className:`group relative w-full`,children:[(0,M.jsx)(eN,{text:d}),(0,M.jsx)(`div`,{className:`rounded-2xl px-4 py-2.5 text-sm leading-relaxed bg-muted text-foreground prose prose-sm prose-invert max-w-none [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 break-words`,onClickCapture:nN,children:e.map((e,t)=>e.type===`text`?(0,M.jsx)(`div`,{children:g(e.value)},t):e.type===`env`?(0,M.jsx)(FM,{group:e.group},t):e.type===`bloby-image`?(0,M.jsx)(LM,{src:e.src,alt:e.alt},t):e.type===`bloby-text`?(0,M.jsx)(BM,{title:e.title,content:e.content},t):e.type===`notch`?(0,M.jsx)(UM,{format:e.format,content:e.content,cardType:e.cardType},t):e.type===`morphy-action`?(0,M.jsx)(qM,{actionType:e.actionType,content:e.content},t):null)})]}),l&&(0,M.jsx)(`span`,{className:`text-[10px] text-muted-foreground/50 px-1`,children:l})]})}return(0,M.jsxs)(`div`,{className:`flex flex-col items-start gap-0.5`,children:[(0,M.jsxs)(`div`,{className:`group relative w-full`,children:[(0,M.jsx)(eN,{text:d}),(0,M.jsx)(`div`,{className:`rounded-2xl px-4 py-2.5 text-sm leading-relaxed bg-muted text-foreground prose prose-sm prose-invert max-w-none [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 break-words`,onClickCapture:nN,children:g(d)})]}),l&&(0,M.jsx)(`span`,{className:`text-[10px] text-muted-foreground/50 px-1`,children:l})]})}function iN({text:e,toolName:t}){return e?(0,M.jsx)(`div`,{className:`flex flex-col items-start`,children:(0,M.jsx)(`div`,{className:`w-full rounded-2xl px-4 py-2.5 text-sm leading-relaxed bg-muted text-foreground prose prose-sm prose-invert max-w-none [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 break-words`,children:(0,M.jsx)(kC,{mode:`streaming`,isAnimating:!0,caret:`block`,plugins:{code:AM},controls:!1,shikiTheme:[`github-dark`,`github-dark`],lineNumbers:!1,children:e})})}):(0,M.jsx)(`div`,{className:`flex justify-start`,children:(0,M.jsx)(`div`,{className:`rounded-2xl px-4 py-2.5 text-sm bg-muted text-foreground`,children:(0,M.jsxs)(`span`,{className:`inline-flex items-center gap-1 h-5`,children:[(0,M.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-muted-foreground/60 animate-bounce`,style:{animationDelay:`0ms`}}),(0,M.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-muted-foreground/60 animate-bounce`,style:{animationDelay:`150ms`}}),(0,M.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-muted-foreground/60 animate-bounce`,style:{animationDelay:`300ms`}})]})})})}function aN({images:e,index:t,onClose:n,onNavigate:r}){let i=(0,j.useCallback)(()=>{t>0&&r(t-1)},[t,r]),a=(0,j.useCallback)(()=>{t<e.length-1&&r(t+1)},[t,e.length,r]),o=jM(e[t]);return(0,j.useEffect)(()=>{let e=e=>{e.key===`Escape`&&n(),e.key===`ArrowLeft`&&i(),e.key===`ArrowRight`&&a()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n,i,a]),(0,M.jsx)(_,{children:(0,M.jsxs)(m.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:`fixed inset-0 z-50 flex items-center justify-center bg-black/90`,onClick:n,children:[(0,M.jsxs)(`div`,{className:`absolute top-4 right-4 z-10 flex gap-2`,children:[(0,M.jsx)(`button`,{onClick:async n=>{n.stopPropagation();try{let n=await(await Ee(e[t])).blob(),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=e[t].split(`/`).pop()||`image`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)}catch{window.open(e[t],`_blank`)}},className:`p-2 rounded-full bg-white/10 hover:bg-white/20 transition-colors text-white`,title:`Download`,children:(0,M.jsx)(te,{className:`h-5 w-5`})}),(0,M.jsx)(`button`,{onClick:n,className:`p-2 rounded-full bg-white/10 hover:bg-white/20 transition-colors text-white`,children:(0,M.jsx)(_e,{className:`h-5 w-5`})})]}),e.length>1&&(0,M.jsxs)(`div`,{className:`absolute top-4 left-1/2 -translate-x-1/2 text-white/70 text-sm tabular-nums`,children:[t+1,` / `,e.length]}),t>0&&(0,M.jsx)(`button`,{onClick:e=>{e.stopPropagation(),i()},className:`absolute left-3 top-1/2 -translate-y-1/2 z-10 p-2 rounded-full bg-white/10 hover:bg-white/20 transition-colors text-white`,children:(0,M.jsx)(T,{className:`h-6 w-6`})}),t<e.length-1&&(0,M.jsx)(`button`,{onClick:e=>{e.stopPropagation(),a()},className:`absolute right-3 top-1/2 -translate-y-1/2 z-10 p-2 rounded-full bg-white/10 hover:bg-white/20 transition-colors text-white`,children:(0,M.jsx)(E,{className:`h-6 w-6`})}),o?(0,M.jsx)(`img`,{src:o,alt:``,className:`max-h-[85vh] max-w-[90vw] object-contain rounded-lg`,onClick:e=>e.stopPropagation()}):(0,M.jsx)(`div`,{className:`h-40 w-40 rounded-lg bg-white/10 animate-pulse`,onClick:e=>e.stopPropagation()})]})})}function oN({messages:e,streaming:t,streamBuffer:n,tools:r,hasMore:i,onLoadOlder:a}){let o=(0,j.useRef)(null),s=(0,j.useRef)(null),c=(0,j.useRef)(null),l=(0,j.useRef)(!0),[u,d]=(0,j.useState)(!1),[f,p]=(0,j.useState)(null),m=(0,j.useCallback)((e,t)=>{p({images:e,index:t})},[]);(0,j.useEffect)(()=>{o.current&&(l.current&&e.length>0?(o.current.scrollIntoView({behavior:`instant`}),l.current=!1):l.current||o.current.scrollIntoView({behavior:`smooth`}))},[e,n,r,t]),(0,j.useEffect)(()=>{if(!c.current||!a)return;let e=c.current,t=new IntersectionObserver(async e=>{if(e[0].isIntersecting&&i&&!u){let e=s.current;if(!e)return;let t=e.scrollHeight;d(!0),await a(),d(!1),requestAnimationFrame(()=>{let n=e.scrollHeight;e.scrollTop+=n-t})}},{root:s.current,threshold:.1});return t.observe(e),()=>t.disconnect()},[i,u,a]);let h=r.length>0?r[r.length-1]:null,g=h?.status===`running`?h.name:void 0;return(0,M.jsxs)(`div`,{ref:s,className:`flex-1 overflow-y-auto overflow-x-hidden p-4 flex flex-col min-h-0`,children:[(0,M.jsx)(`div`,{className:`flex-1`}),i&&(0,M.jsx)(`div`,{ref:c,className:`flex justify-center py-2`,children:u&&(0,M.jsx)(`div`,{className:`w-5 h-5 border-2 border-muted-foreground/20 border-t-muted-foreground/60 rounded-full animate-spin`})}),e.length===0&&!t&&(0,M.jsx)(`div`,{className:`flex items-center justify-center py-8 text-muted-foreground text-sm`,children:`Start a conversation with your Bloby..`}),(0,M.jsxs)(`div`,{className:`space-y-3`,children:[e.map(e=>(0,M.jsx)(rN,{role:e.role,content:e.content,timestamp:e.timestamp,hasAttachments:e.hasAttachments,audioData:e.audioData,attachments:e.attachments,onImageClick:m,transcribing:e.transcribing},e.id)),t&&(0,M.jsx)(iN,{text:n.replace(/^\[(Mac|Alexa|WhatsApp|Chat|PWA|Workspace|workspace)\]\s*/i,``).replace(/<notch_card\s+type="[^"]*">[\s\S]*?<\/notch_card>/gi,``).replace(/<notch_html>[\s\S]*?<\/notch_html>/gi,``).replace(/<notch_(?:html|card)\b[\s\S]*$/i,``).replace(/<morphy_action\s+type="[^"]*">[\s\S]*?<\/morphy_action>/gi,``).replace(/<morphy_action\b[\s\S]*$/i,``).trimEnd(),toolName:g})]}),(0,M.jsx)(`div`,{ref:o}),f&&(0,M.jsx)(aN,{images:f.images,index:f.index,onClose:()=>p(null),onNavigate:e=>p(t=>t?{...t,index:e}:null)})]})}var sN=()=>typeof window>`u`?null:window.SpeechRecognition??window.webkitSpeechRecognition??null,cN=sN()!==null;function lN(){let e=(0,j.useRef)(null),t=(0,j.useRef)(``),n=(0,j.useRef)(null),r=(0,j.useMemo)(()=>cN,[]);return{start:(0,j.useCallback)((r=!1)=>{let i=sN();if(!i)return;if(e.current)try{e.current.abort()}catch{}let a=new i;a.continuous=r,a.interimResults=!0,a.lang=navigator.language||`en-US`,t.current=``,e.current=a,a.onresult=e=>{t.current=e.results[e.results.length-1][0].transcript},a.onend=()=>{e.current=null,n.current&&=(n.current(t.current),null)},a.onerror=r=>{console.error(`[SpeechRecognition] error:`,r.error),e.current=null,n.current&&=(n.current(t.current),null)};try{a.start()}catch(e){console.error(`[SpeechRecognition] start failed:`,e)}},[]),stop:(0,j.useCallback)(()=>new Promise(r=>{let i=e.current;if(!i){r(t.current);return}n.current=r;try{i.stop()}catch{e.current=null,r(t.current),n.current=null}setTimeout(()=>{n.current&&(n.current(t.current),n.current=null,e.current=null)},2e3)}),[]),abort:(0,j.useCallback)(()=>{t.current=``;let r=e.current;if(r){try{r.abort()}catch{}e.current=null}n.current&&=(n.current(``),null)},[]),isSupported:r}}function uN(e){return`${Math.floor(e/60)}:${(e%60).toString().padStart(2,`0`)}`}function dN(e,t=4*1024*1024){return new Promise(n=>{let r=new Image;r.onload=()=>{let e=1600,{width:i,height:a}=r;if(i>e||a>e){let t=Math.min(e/i,e/a);i=Math.round(i*t),a=Math.round(a*t)}let o=document.createElement(`canvas`);o.width=i,o.height=a,o.getContext(`2d`).drawImage(r,0,0,i,a);for(let e of[.8,.6,.4,.3]){let r=o.toDataURL(`image/jpeg`,e);if(Math.round((r.length-23)*.75)<=t){n(r);return}}n(o.toDataURL(`image/jpeg`,.2))},r.onerror=()=>n(e),r.src=e})}var fN=`bloby_draft`;function pN({onSend:e,onStop:t,streaming:n,whisperEnabled:r,onTranscribe:i,onRecordingChange:a,onAudioReady:o}){let{start:s,stop:c,abort:l,isSupported:u}=lN(),d=r||u,[f,p]=(0,j.useState)(()=>{try{return localStorage.getItem(fN)||``}catch{return``}}),[g,v]=(0,j.useState)([]),y=(0,j.useRef)(null),[b,x]=(0,j.useState)(!1),S=(0,j.useCallback)(e=>{x(e),a?.(e)},[a]),[C,T]=(0,j.useState)(0),E=f.trim().length>0,ee=E||g.length>0,D=(0,j.useRef)(null),te=(0,j.useRef)(null),ne=(0,j.useRef)(null),re=(0,j.useRef)(null),O=(0,j.useRef)(null),ie=(0,j.useRef)(0),ae=(0,j.useRef)(0),oe=(0,j.useRef)(null),k=(0,j.useRef)(!1),se=(0,j.useRef)(!1),le=(0,j.useRef)(null),ue=(0,j.useRef)(null),de=(0,j.useRef)([]),fe=(0,j.useRef)(null);(0,j.useEffect)(()=>{let e=D.current;e&&(e.style.height=`0px`,e.style.height=`${Math.min(e.scrollHeight,88)}px`)},[f]),(0,j.useEffect)(()=>(y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{try{localStorage.setItem(fN,f)}catch{}},500),()=>{y.current&&clearTimeout(y.current)}),[f]),(0,j.useEffect)(()=>{if(b)return le.current=setInterval(()=>T(e=>e+1),1e3),()=>{le.current&&clearInterval(le.current)}},[b]);let he=(0,j.useCallback)(async t=>{le.current&&clearInterval(le.current),oe.current&&=(clearTimeout(oe.current),null),k.current=!1;let n=ue.current,r=fe.current;if(t)r?.getTracks().forEach(e=>e.stop()),ue.current=null,fe.current=null,de.current=[],l();else if(n&&n.state!==`inactive`)n.onstop=async()=>{r?.getTracks().forEach(e=>e.stop());let t=new Blob(de.current,{type:`audio/webm`});if(de.current=[],ue.current=null,fe.current=null,t.size<1e3)return;let n=new FileReader;n.onloadend=async()=>{let t=n.result,r=t.split(`,`)[1];if(!r)return;o?.(t);let a=g.length>0?g:void 0;try{let n;n=i?await i(r):await(await fetch(`/api/whisper/transcribe`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({audio:r})})).json(),e(n.transcript?.trim()||``,a,t)}catch(n){console.error(`[InputBar] Whisper transcription error:`,n),e(``,a,t)}a&&v([])},n.readAsDataURL(t)},n.stop();else{r?.getTracks().forEach(e=>e.stop()),ue.current=null,fe.current=null,de.current=[];try{let t=await c();if(t.trim()){let n=g.length>0?g:void 0;e(t.trim(),n),n&&v([])}}catch(e){console.error(`[InputBar] Web Speech stop error:`,e)}}O.current&&(O.current.style.transform=``),S(!1),T(0),ae.current=0},[e,i,g,r,l,c]),ge=(0,j.useCallback)(e=>{let t=e.type.startsWith(`image/`),n=e.type===`application/pdf`;if(!t&&!n)return;let r=new FileReader;r.onload=async n=>{let r=n.target?.result;t&&(r=await dN(r)),v(n=>[...n,{id:Math.random().toString(36).slice(2),type:t?`image`:`file`,name:e.name,preview:r}])},r.readAsDataURL(e)},[]),ve=(0,j.useCallback)(e=>{let t=e.target.files;if(t){for(let e=0;e<t.length;e++)ge(t[e]);e.target.value=``}},[ge]),ye=(0,j.useCallback)(e=>{v(t=>t.filter(t=>t.id!==e))},[]);(0,j.useEffect)(()=>{let e=e=>{if(e.clipboardData?.items){for(let t of e.clipboardData.items)if(t.type.startsWith(`image/`)){e.preventDefault();let n=t.getAsFile();n&&ge(n)}}};return document.addEventListener(`paste`,e),()=>document.removeEventListener(`paste`,e)},[ge]);let be=()=>{if(ee){e(f,g.length>0?g:void 0),p(``),v([]);try{localStorage.removeItem(fN)}catch{}requestAnimationFrame(()=>D.current?.focus())}},xe=`ontouchstart`in window||navigator.maxTouchPoints>0,Se=(0,j.useCallback)(async()=>{if(d)try{if(r){let e=await navigator.mediaDevices.getUserMedia({audio:!0});if(!(!xe&&!se.current)&&xe&&!se.current){e.getTracks().forEach(e=>e.stop());return}fe.current=e;let t=MediaRecorder.isTypeSupported(`audio/webm;codecs=opus`)?`audio/webm;codecs=opus`:`audio/webm`,n=new MediaRecorder(e,{mimeType:t});de.current=[],n.ondataavailable=e=>{e.data.size>0&&de.current.push(e.data)},ue.current=n,n.start()}else if(s(!xe),xe&&!se.current){l();return}k.current=!0,S(!0),T(0)}catch(e){console.error(`[InputBar] recording setup failed:`,e)}},[d,r,s,l]),Ce=(0,j.useCallback)(e=>{if(e.preventDefault(),!xe){if(b){he(!1);return}se.current=!0,Se();return}se.current=!0,ie.current=e.clientX,ae.current=0,e.currentTarget.setPointerCapture(e.pointerId),oe.current=setTimeout(()=>{try{navigator.vibrate?.(50)}catch{}Se()},200)},[xe,b,d,Se,he]),we=(0,j.useCallback)(e=>{if(!xe||!k.current)return;let t=Math.min(0,e.clientX-ie.current);if(ae.current=t,O.current&&(O.current.style.transform=`translateX(${t}px)`),re.current){let t=re.current.getBoundingClientRect(),n=t.left+t.width/2;Math.abs(e.clientX-n)<36&&he(!0)}},[xe,he]),Te=(0,j.useCallback)(()=>{se.current=!1,oe.current&&=(clearTimeout(oe.current),null),xe&&k.current&&he(!1)},[xe,he]),Ee=(0,j.useCallback)(()=>{se.current=!1,oe.current&&=(clearTimeout(oe.current),null),k.current&&he(!0)},[he]);return(0,M.jsxs)(`div`,{className:`shrink-0 p-3 relative`,children:[(0,M.jsxs)(`div`,{className:`flex flex-col transition-opacity duration-100 ${b?`opacity-0 pointer-events-none`:`opacity-100`}`,children:[(0,M.jsx)(_,{children:g.length>0&&(0,M.jsx)(m.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},className:`overflow-hidden`,children:(0,M.jsx)(`div`,{className:`flex gap-2 px-3 pt-2.5 pb-2 flex-wrap bg-white/[0.04] border border-white/[0.08] rounded-2xl mb-2`,children:g.map(e=>(0,M.jsxs)(`div`,{className:`relative group flex-shrink-0`,children:[e.type===`image`?(0,M.jsx)(`img`,{src:e.preview,alt:e.name,className:`w-14 h-14 rounded-lg object-cover border border-white/10`}):(0,M.jsxs)(`div`,{className:`w-14 h-14 rounded-lg bg-white/5 border border-white/10 flex flex-col items-center justify-center gap-0.5 px-1`,children:[(0,M.jsx)(`svg`,{className:`w-5 h-5 text-muted-foreground`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:1.5,children:(0,M.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z`})}),(0,M.jsx)(`span`,{className:`text-[8px] text-muted-foreground truncate w-full text-center`,children:e.name.split(`.`).pop()})]}),(0,M.jsx)(`button`,{onClick:()=>ye(e.id),className:`absolute -top-1.5 -right-1.5 w-4 h-4 bg-black/80 border border-white/20 rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity`,children:(0,M.jsx)(_e,{className:`w-2.5 h-2.5 text-white`})})]},e.id))})})}),(0,M.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,M.jsxs)(`div`,{className:`flex-1 flex items-end bg-white rounded-2xl px-4`,children:[(0,M.jsx)(`textarea`,{ref:D,value:f,onChange:e=>p(e.target.value),onKeyDown:e=>{let t=`ontouchstart`in window||navigator.maxTouchPoints>0;e.key===`Enter`&&!e.shiftKey&&!t&&(e.preventDefault(),ee&&be())},placeholder:`Type a message...`,rows:1,className:`flex-1 resize-none bg-transparent text-gray-900 py-3 text-sm outline-none placeholder:text-gray-400 overflow-y-auto`,style:{maxHeight:88}}),(0,M.jsx)(`input`,{ref:te,type:`file`,className:`hidden`,accept:`image/*,.pdf`,multiple:!0,onChange:ve}),(0,M.jsx)(`input`,{ref:ne,type:`file`,className:`hidden`,accept:`image/*`,capture:`environment`,onChange:ve}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>te.current?.click(),className:`shrink-0 p-1.5 mb-2 text-gray-400 hover:text-gray-600 transition-colors`,children:(0,M.jsx)(ce,{className:`h-4 w-4`})}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>ne.current?.click(),className:`shrink-0 p-1.5 mb-2 text-gray-400 hover:text-gray-600 transition-colors`,children:(0,M.jsx)(w,{className:`h-4 w-4`})})]}),E?(0,M.jsx)(`button`,{onClick:be,className:`flex items-center justify-center h-12 w-12 shrink-0 rounded-full bg-white text-gray-900 transition-colors hover:bg-gray-100`,children:(0,M.jsx)(A,{className:`h-4 w-4`})}):(0,M.jsx)(`div`,{className:`flex items-center justify-center h-12 w-12 shrink-0 rounded-full transition-colors touch-none select-none ${d?`bg-gradient-brand text-white cursor-pointer`:`bg-gray-200 text-gray-400 cursor-default`}`,title:d?void 0:`Voice input requires Chrome, Edge, or Safari. Enable Whisper in Settings for any browser.`,onPointerDown:d?Ce:void 0,onPointerMove:d?we:void 0,onPointerUp:d?Te:void 0,onPointerCancel:d?Ee:void 0,children:(0,M.jsx)(h,{className:`h-4 w-4`})})]})]}),(0,M.jsx)(_,{children:b&&(0,M.jsx)(m.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.1},className:`absolute inset-0 p-3 flex items-center touch-none`,children:(0,M.jsxs)(`div`,{className:`flex items-center w-full gap-2`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,M.jsxs)(`span`,{className:`relative flex h-2 w-2 shrink-0`,children:[(0,M.jsx)(`span`,{className:`animate-ping absolute inline-flex h-full w-full rounded-full bg-destructive opacity-75`}),(0,M.jsx)(`span`,{className:`relative inline-flex rounded-full h-2 w-2 bg-destructive`})]}),(0,M.jsx)(`span`,{className:`text-sm font-medium tabular-nums`,children:uN(C)})]}),(0,M.jsx)(`div`,{className:`flex-1 flex items-center bg-muted rounded-full h-12 pl-1 pr-0.5`,children:xe?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{ref:re,className:`flex items-center justify-center h-9 w-9 shrink-0 rounded-full bg-destructive/10 text-destructive`,children:(0,M.jsx)(me,{className:`h-4 w-4`})}),(0,M.jsx)(`div`,{className:`flex-1 flex justify-center min-w-0`,children:(0,M.jsx)(m.span,{className:`text-[13px] whitespace-nowrap select-none font-medium`,style:{backgroundImage:`linear-gradient(90deg, #999 0%, #999 35%, #fff 50%, #999 65%, #999 100%)`,backgroundSize:`200% 100%`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},animate:{backgroundPosition:[`200% center`,`-200% center`]},transition:{duration:2.5,repeat:1/0,ease:`linear`},children:`◄◄ slide to cancel`})}),(0,M.jsx)(`div`,{ref:O,className:`shrink-0 touch-none select-none will-change-transform relative z-10`,style:{transition:`none`},onPointerDown:Ce,onPointerMove:we,onPointerUp:Te,onPointerCancel:Ee,children:(0,M.jsx)(`div`,{className:`flex items-center justify-center h-11 w-11 rounded-full bg-destructive text-destructive-foreground`,style:{animation:`mic-pulse-scale 2s ease-in-out infinite`},children:(0,M.jsx)(h,{className:`h-5 w-5`})})})]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`button`,{onClick:()=>he(!0),className:`flex items-center justify-center h-9 w-9 shrink-0 rounded-full bg-destructive/10 text-destructive hover:bg-destructive/20 transition-colors`,children:(0,M.jsx)(me,{className:`h-4 w-4`})}),(0,M.jsx)(`div`,{className:`flex-1 flex justify-center min-w-0`,children:(0,M.jsx)(`span`,{className:`text-[13px] whitespace-nowrap select-none font-medium text-muted-foreground`,children:`Click mic to stop`})}),(0,M.jsx)(`button`,{onClick:()=>he(!1),className:`shrink-0`,children:(0,M.jsx)(`div`,{className:`flex items-center justify-center h-11 w-11 rounded-full bg-destructive text-destructive-foreground hover:bg-destructive/90 transition-colors`,children:(0,M.jsx)(pe,{className:`h-4 w-4`})})})]})})]})})})]})}var mN=`/morphy/headphones.json`,hN=`/morphy/`,gN=null,_N=null;function vN(){return gN&&_N?Promise.resolve({img:gN,cfg:_N}):fetch(mN).then(e=>{if(!e.ok)throw Error(`hp config `+e.status);return e.json()}).then(e=>new Promise((t,n)=>{let r=new Image;r.onload=()=>{gN=r,_N=e,t({img:r,cfg:e})},r.onerror=n,r.src=hN+e.spritesheet}))}function yN({recording:e,height:t=36,onDone:n}){let r=(0,j.useRef)(null),i=(0,j.useRef)(gN),a=(0,j.useRef)(_N),o=(0,j.useRef)(`idle`),s=(0,j.useRef)(0),c=(0,j.useRef)(1),l=(0,j.useRef)(0),u=(0,j.useRef)(0),d=(0,j.useRef)(!1),f=(0,j.useRef)(n);f.current=n;let p=a.current,m=p?p.frame.w:180,h=p?p.frame.h:180,g=t,_=Math.round(m/h*g);(0,j.useEffect)(()=>{vN().then(({img:e,cfg:t})=>{i.current=e,a.current=t,o.current===`idle`&&(s.current=t.clips.idle.from)})},[]),(0,j.useEffect)(()=>{let t=a.current;t&&(e&&!d.current?(o.current=`activating`,s.current=t.clips.enter.from,c.current=1,l.current=performance.now()):!e&&d.current&&(o.current===`activating`?o.current=`activating_then_deactivate`:o.current===`recording`&&(o.current=`deactivating`,s.current=t.clips.exit.from,l.current=performance.now())),d.current=e)},[e]);let v=(0,j.useCallback)(e=>{let t=r.current,n=i.current,d=a.current;if(!t){u.current=requestAnimationFrame(v);return}let p=t.getContext(`2d`),m=o.current;if(!n||!d){p.clearRect(0,0,_,g),u.current=requestAnimationFrame(v);return}if(m===`idle`){let e=d.grid.cols,t=d.frame.w,r=d.frame.h,i=d.clips.idle.from,a=i%e,o=Math.floor(i/e);p.clearRect(0,0,_,g),p.imageSmoothingEnabled=!0,p.imageSmoothingQuality=`high`,p.drawImage(n,a*t,o*r,t,r,0,0,_,g),u.current=requestAnimationFrame(v);return}let h=d.fps,y=1e3/(m===`activating`||m===`activating_then_deactivate`?d.clips.enter.fps??h:m===`deactivating`?d.clips.exit.fps??h:d.clips.active.fps??h),b=e-l.current;if(b>=y){if(l.current=e-b%y,m===`activating`||m===`activating_then_deactivate`)s.current++,s.current>d.clips.enter.to&&(m===`activating_then_deactivate`?(o.current=`deactivating`,s.current=d.clips.exit.from):(o.current=`recording`,s.current=d.clips.active.from,c.current=1));else if(m===`recording`)s.current+=c.current,s.current>=d.clips.active.to?(s.current=d.clips.active.to,c.current=-1):s.current<=d.clips.active.from&&(s.current=d.clips.active.from,c.current=1);else if(m===`deactivating`&&(s.current++,s.current>d.clips.exit.to)){o.current=`idle`,s.current=d.clips.idle.from,p.clearRect(0,0,_,g),f.current?.(),u.current=requestAnimationFrame(v);return}}let x=d.grid.cols,S=d.frame.w,C=d.frame.h,w=s.current%x,T=Math.floor(s.current/x);p.clearRect(0,0,_,g),p.imageSmoothingEnabled=!0,p.imageSmoothingQuality=`high`,p.drawImage(n,w*S,T*C,S,C,0,0,_,g),u.current=requestAnimationFrame(v)},[_,g]);return(0,j.useEffect)(()=>{let e=r.current;if(!e)return;let t=window.devicePixelRatio||1;return e.width=_*t,e.height=g*t,e.getContext(`2d`).setTransform(t,0,0,t,0,0),u.current=requestAnimationFrame(v),()=>cancelAnimationFrame(u.current)},[v,_,g]),(0,M.jsx)(`canvas`,{ref:r,style:{width:_,height:g,display:`block`}})}function bN(){let e=(0,j.useRef)(null),[t,n]=(0,j.useState)(!1),[r,i]=(0,j.useState)(`Bloby`),[a,o]=(0,j.useState)(!1),[s,c]=(0,j.useState)(!1),[l,u]=(0,j.useState)(!1),[d,f]=(0,j.useState)(!1),[p,m]=(0,j.useState)(0),h=(0,j.useRef)(null),_=(0,j.useRef)(!1),[v,b]=(0,j.useState)(!0),[w,T]=(0,j.useState)(null),[E,ee]=(0,j.useState)(null),[D,re]=(0,j.useState)(!1),[O,ie]=(0,j.useState)(!1),[ae,k]=(0,j.useState)(`loading`);function se(e){let t=(e+`=`.repeat((4-e.length%4)%4)).replace(/-/g,`+`).replace(/_/g,`/`),n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r}async function ce(){try{if(await Notification.requestPermission()!==`granted`){k(`denied`);return}let t=await navigator.serviceWorker.ready,{publicKey:n}=await(await fetch(`/api/push/vapid-public-key`)).json(),r=(await t.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:se(n)})).toJSON(),i=e.current;i&&i.send(`push:subscribe`,{endpoint:r.endpoint,keys:r.keys}),k(`subscribed`)}catch(e){console.error(`[push] Subscribe failed:`,e)}}async function le(){try{let t=await(await navigator.serviceWorker.ready).pushManager.getSubscription();if(t){let n=t.endpoint;await t.unsubscribe();let r=e.current;r&&r.send(`push:unsubscribe`,{endpoint:n})}k(`unsubscribed`)}catch(e){console.error(`[push] Unsubscribe failed:`,e)}}let[ue,A]=(0,j.useState)(!1),fe=/iPad|iPhone|iPod/.test(navigator.userAgent),pe=window.matchMedia(`(display-mode: standalone)`).matches||navigator.standalone,me=/Android|iPhone|iPad|iPod|webOS|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),he=window.self!==window.top;(0,j.useEffect)(()=>{let e=e=>{e.data?.type===`bloby:show-ios-install`&&A(!0)};return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[]);let[ve,be]=(0,j.useState)(!1),[xe,Oe]=(0,j.useState)(!1),[Ae,je]=(0,j.useState)(!1),[Me,Ne]=(0,j.useState)(!1);(0,j.useEffect)(()=>{(async()=>{try{let e=await(await fetch(`/api/onboard/status`)).json();if(e.totpEnabled&&Ne(!0),!e.portalConfigured){Oe(!1),je(!0),be(!0);return}Oe(!0);let t=Se();if(t){if((await(await fetch(`/api/portal/validate-token?token=${encodeURIComponent(t)}`)).json()).valid){je(!0),be(!0);return}we()}je(!1),be(!0)}catch{je(!0),be(!0)}})()},[]);let Pe=e=>{Ce(e),je(!0)};(0,j.useEffect)(()=>{Te(()=>{je(!1),Oe(!0)})},[]),(0,j.useEffect)(()=>{if(!Ae)return;let e=()=>{fetch(`/app/api/health`).then(e=>b(e.ok)).catch(()=>b(!1))};e();let t=setInterval(e,1e4);return()=>clearInterval(t)},[Ae]),(0,j.useEffect)(()=>{Ae&&(async()=>{if(!(`PushManager`in window)||!(`serviceWorker`in navigator)){k(`unsupported`);return}if(Notification.permission===`denied`){k(`denied`);return}try{let e=await(await navigator.serviceWorker.ready).pushManager.getSubscription();k(e&&(await(await Ee(`/api/push/status?endpoint=${encodeURIComponent(e.endpoint)}`)).json()).subscribed?`subscribed`:`unsubscribed`)}catch{k(`unsupported`)}})()},[Ae]),(0,j.useEffect)(()=>{if(!Ae)return;let t=location.protocol===`https:`?`wss:`:`ws:`,r=location.host,i=new ye(`${t}//${r}/bloby/ws`,Se);e.current=i;let a=i.onStatus(e=>{n(e),e&&_.current&&m(e=>e+1),_.current=e}),o=i.on(`app:rebuilding`,()=>{window.parent?.postMessage({type:`bloby:rebuilding`},`*`)}),s=i.on(`app:rebuilt`,()=>{window.parent?.postMessage({type:`bloby:rebuilt`},`*`)}),c=i.on(`app:build-error`,e=>{window.parent?.postMessage({type:`bloby:build-error`,error:e.error},`*`)}),l=i.on(`app:hmr-update`,()=>{window.parent?.postMessage({type:`bloby:hmr-update`},`*`)}),u=i.on(`bot:response`,()=>{window.parent?.postMessage({type:`bloby:new-message`},`*`)}),d=i.on(`chat:sync`,()=>{window.parent?.postMessage({type:`bloby:new-message`},`*`)});return i.connect(),()=>{a(),o(),s(),c(),l(),u(),d(),i.disconnect()}},[Ae]),(0,j.useEffect)(()=>{Ae&&(Ee(`/api/settings`).then(e=>e.json()).then(e=>{e.agent_name&&i(e.agent_name),e.whisper_enabled===`true`&&o(!0)}).catch(()=>{}),Ee(`/api/wallet/balance`).then(e=>e.json()).then(e=>{e.address&&(T(e.tempo??`0.00`),ee(e.base??`0.00`))}).catch(()=>{}))},[Ae]),(0,j.useEffect)(()=>{if(!s)return;let e=e=>{h.current&&!h.current.contains(e.target)&&(c(!1),u(!1))};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[s]);let{messages:Fe,streaming:Ie,streamBuffer:Le,tools:Re,hasMore:ze,loadOlder:Be,sendMessage:Ve,addPendingAudio:He,stopStreaming:Ue,clearContext:We}=De(e.current,p,Ae);return(0,j.useEffect)(()=>{let t=async t=>{if(t.data?.type!==`bloby:voice-record`)return;let{audio:n,transcript:r}=t.data;if(n&&a){let t=e.current;if(!t?.connected)return;try{let e=await new Promise((e,r)=>{let i=t.on(`whisper:result`,t=>{i(),clearTimeout(a),e(t)}),a=setTimeout(()=>{i(),r(Error(`Timeout`))},3e4);t.send(`whisper:transcribe`,{audio:n})});e.transcript?.trim()&&Ve(e.transcript.trim(),void 0,`data:audio/webm;base64,${n}`)}catch(e){console.error(`[BlobyApp] widget voice transcription error:`,e)}}else r?.trim()&&Ve(r.trim())};return window.addEventListener(`message`,t),()=>window.removeEventListener(`message`,t)},[Ve,a]),ve?xe&&!Ae?(0,M.jsx)(ke,{onLogin:Pe,totpEnabled:Me}):(0,M.jsxs)(`div`,{className:`flex flex-col h-dvh overflow-hidden`,children:[(0,M.jsxs)(`div`,{className:`flex items-center px-4 py-3.5 border-b border-white/[0.06] shrink-0`,children:[(0,M.jsx)(`button`,{onClick:()=>window.parent?.postMessage({type:`bloby:close`},`*`),className:`flex items-center justify-center h-8 w-8 -ml-1 rounded-full text-muted-foreground hover:text-foreground hover:bg-white/[0.06] transition-colors`,"aria-label":`Close chat`,children:(0,M.jsx)(g,{className:`h-[18px] w-[18px]`})}),(0,M.jsx)(`div`,{className:`relative ml-1.5 shrink-0 -translate-y-[5px]`,children:(0,M.jsx)(yN,{recording:O,height:36})}),(0,M.jsxs)(`div`,{className:`flex flex-col ml-2.5 min-w-0`,children:[(0,M.jsx)(`span`,{className:`text-[15px] font-semibold leading-tight tracking-[-0.01em]`,children:r}),(0,M.jsx)(`div`,{className:`flex items-center gap-1.5 mt-0.5`,children:(0,M.jsxs)(`span`,{className:`flex items-center gap-1 text-[11px] text-muted-foreground`,children:[(0,M.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full ${t?`bg-emerald-500`:`bg-red-500`}`}),t?`Online`:`Offline`]})})]}),(0,M.jsx)(`div`,{className:`flex-1`}),(w!==null||E!==null)&&(0,M.jsxs)(`div`,{className:`relative mr-1.5`,onMouseEnter:()=>re(!0),onMouseLeave:()=>re(!1),children:[(0,M.jsxs)(`div`,{className:`flex items-center rounded-xl bg-white/[0.04] border border-white/[0.06] pl-3 pr-1 py-1`,children:[(0,M.jsxs)(`span`,{className:`text-[11px] text-muted-foreground/70 mr-1.5`,children:[(0,M.jsx)(`span`,{className:`hidden sm:inline`,children:`My `}),`Wallet:`]}),(0,M.jsxs)(`span`,{className:`text-[13px] font-semibold font-mono tracking-tight`,children:[`$`,(Number(w??0)+Number(E??0)).toFixed(2)]}),(0,M.jsx)(`div`,{className:`w-px h-4 bg-white/[0.08] mx-2`}),(0,M.jsxs)(`a`,{href:`https://www.bloby.bot/dashboard`,target:`_blank`,rel:`noopener noreferrer`,className:`text-[11px] font-semibold text-primary bg-primary/10 hover:bg-primary/20 px-2.5 py-1 rounded-lg transition-colors`,children:[(0,M.jsx)(`span`,{className:`sm:hidden`,children:`+`}),(0,M.jsx)(`span`,{className:`hidden sm:inline`,children:`+ Add`})]})]}),D&&(0,M.jsx)(`div`,{className:`absolute right-0 top-full pt-1.5 z-50`,children:(0,M.jsxs)(`div`,{className:`min-w-[220px] rounded-xl border border-white/[0.06] bg-popover py-2 shadow-xl`,children:[(0,M.jsx)(`div`,{className:`px-3.5 pb-2 text-[10px] uppercase tracking-wider text-muted-foreground/60`,children:`Balances`}),(0,M.jsxs)(`div`,{className:`flex items-center justify-between px-3.5 py-1.5`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(`img`,{src:`https://cdn.jsdelivr.net/gh/atomiclabs/cryptocurrency-icons@master/svg/color/usdc.svg`,alt:`USDC`,className:`h-5 w-5`}),(0,M.jsxs)(`span`,{className:`text-[13px] font-semibold font-mono tracking-tight`,children:[`$`,Number(w??0).toFixed(2)]})]}),(0,M.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:`on Tempo`})]}),(0,M.jsxs)(`div`,{className:`flex items-center justify-between px-3.5 py-1.5`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(`img`,{src:`https://cdn.jsdelivr.net/gh/atomiclabs/cryptocurrency-icons@master/svg/color/usdc.svg`,alt:`USDC`,className:`h-5 w-5`}),(0,M.jsxs)(`span`,{className:`text-[13px] font-semibold font-mono tracking-tight`,children:[`$`,Number(E??0).toFixed(2)]})]}),(0,M.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:`on Base`})]})]})})]}),(0,M.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[ae!==`loading`&&ae!==`unsupported`&&(0,M.jsx)(`button`,{onClick:()=>{ae===`subscribed`?le():ae===`unsubscribed`&&ce()},disabled:ae===`denied`,className:`flex items-center justify-center h-8 w-8 rounded-full text-muted-foreground hover:text-foreground hover:bg-white/[0.06] transition-colors disabled:opacity-40 disabled:cursor-not-allowed`,title:ae===`denied`?`Notifications blocked — enable in browser settings`:ae===`subscribed`?`Disable push notifications`:`Enable push notifications`,children:ae===`denied`?(0,M.jsx)(x,{className:`h-[18px] w-[18px]`}):ae===`subscribed`?(0,M.jsx)(S,{className:`h-[18px] w-[18px] text-primary`}):(0,M.jsx)(C,{className:`h-[18px] w-[18px]`})}),(0,M.jsxs)(`div`,{className:`relative`,ref:h,children:[(0,M.jsx)(`button`,{onClick:()=>c(e=>{let t=!e;return t||u(!1),t}),className:`flex items-center justify-center h-8 w-8 rounded-full text-muted-foreground hover:text-foreground hover:bg-white/[0.06] transition-colors`,children:(0,M.jsx)(ne,{className:`h-[18px] w-[18px]`})}),s&&(0,M.jsxs)(`div`,{className:`absolute right-0 top-full mt-1.5 min-w-[200px] rounded-xl border border-white/[0.06] bg-popover py-1.5 shadow-xl z-50`,children:[(0,M.jsxs)(`button`,{onClick:()=>{f(!0),c(!1),u(!1)},className:`flex w-full items-center gap-2.5 px-3.5 py-2 text-sm text-muted-foreground hover:text-foreground hover:bg-white/[0.06] transition-colors`,children:[(0,M.jsx)(ge,{className:`h-4 w-4`}),`Settings`]}),l?(0,M.jsxs)(`div`,{className:`px-3.5 py-2`,children:[(0,M.jsx)(`p`,{className:`text-[12px] text-muted-foreground/70 mb-2 leading-snug`,children:`Start fresh? This clears the agent's context — your past messages stay saved.`}),(0,M.jsxs)(`div`,{className:`flex gap-2`,children:[(0,M.jsx)(`button`,{onClick:()=>{We(),u(!1),c(!1)},className:`flex-1 text-[12px] font-medium text-white bg-[#0069FE] hover:bg-[#0069FE]/90 px-2.5 py-1.5 rounded-lg transition-colors`,children:`New chat`}),(0,M.jsx)(`button`,{onClick:()=>u(!1),className:`flex-1 text-[12px] font-medium text-muted-foreground bg-white/[0.06] hover:bg-white/[0.1] px-2.5 py-1.5 rounded-lg transition-colors`,children:`Cancel`})]})]}):(0,M.jsxs)(`button`,{onClick:()=>u(!0),className:`flex w-full items-center gap-2.5 px-3.5 py-2 text-sm text-muted-foreground hover:text-foreground hover:bg-white/[0.06] transition-colors`,children:[(0,M.jsx)(oe,{className:`h-4 w-4`}),`New conversation`]}),me&&!pe&&(0,M.jsxs)(`button`,{onClick:()=>{c(!1),u(!1),he?window.parent.postMessage({type:`bloby:install-app`},`*`):A(!0)},className:`flex w-full items-center gap-2.5 px-3.5 py-2 text-sm text-muted-foreground hover:text-foreground hover:bg-white/[0.06] transition-colors`,children:[(0,M.jsx)(te,{className:`h-4 w-4`}),`Install App`]})]})]})]})]}),(0,M.jsxs)(`div`,{className:`flex-1 min-h-0 flex flex-col overflow-hidden`,children:[(0,M.jsx)(oN,{messages:Fe,streaming:Ie,streamBuffer:Le,tools:Re,hasMore:ze,onLoadOlder:Be}),(0,M.jsx)(pN,{onSend:Ve,onStop:Ue,streaming:Ie,whisperEnabled:a,onTranscribe:t=>new Promise((n,r)=>{let i=e.current;if(!i?.connected){r(Error(`WebSocket not connected`));return}let a=i.on(`whisper:result`,e=>{a(),clearTimeout(o),n(e)}),o=setTimeout(()=>{a(),r(Error(`Transcription timeout`))},3e4);i.send(`whisper:transcribe`,{audio:t})}),onAudioReady:He,onRecordingChange:ie})]}),d&&(0,M.jsx)(y,{onSave:t=>new Promise((n,r)=>{let i=e.current;if(!i?.connected){r(Error(`WebSocket not connected`));return}let a=i.on(`settings:saved`,e=>{a(),clearTimeout(s),n(e)}),o=i.on(`settings:save-error`,e=>{o(),clearTimeout(s),r(Error(e.error||`Save failed`))}),s=setTimeout(()=>{a(),o(),r(Error(`Save timeout`))},1e4);i.send(`settings:save`,t)}),onTunnelSwitch:t=>new Promise((n,r)=>{let i=e.current;if(!i?.connected){r(Error(`Not connected`));return}let a=i.on(`tunnel:switched`,e=>{a(),o(),clearTimeout(s),n(e)}),o=i.on(`tunnel:switch-error`,e=>{a(),o(),clearTimeout(s),r(Error(e.error))}),s=setTimeout(()=>{a(),o(),r(Error(`Timeout`))},3e4);i.send(`tunnel:switch`,{mode:t})}),onComplete:()=>{f(!1),Ee(`/api/settings`).then(e=>e.json()).then(e=>{e.agent_name&&i(e.agent_name),o(e.whisper_enabled===`true`)}).catch(()=>{}),window.parent?.postMessage({type:`bloby:onboard-complete`},`*`)}}),ue&&(0,M.jsxs)(`div`,{className:`fixed inset-0 z-[300] flex items-end sm:items-center justify-center p-4`,children:[(0,M.jsx)(`div`,{className:`absolute inset-0 bg-black/60 backdrop-blur-sm`,onClick:()=>A(!1)}),(0,M.jsxs)(`div`,{className:`relative w-full max-w-[360px] bg-[#1c1c1e] border border-white/[0.08] rounded-2xl shadow-2xl overflow-hidden`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between px-5 pt-5 pb-2`,children:[(0,M.jsx)(`h2`,{className:`text-[17px] font-semibold text-white`,children:`Install App`}),(0,M.jsx)(`button`,{onClick:()=>A(!1),className:`h-7 w-7 rounded-full bg-white/[0.08] flex items-center justify-center text-white/50 hover:text-white/80 transition-colors`,children:(0,M.jsx)(_e,{className:`h-4 w-4`})})]}),(0,M.jsxs)(`div`,{className:`px-5 pb-6 pt-1`,children:[(0,M.jsx)(`p`,{className:`text-white/50 text-[13px] mb-5 leading-relaxed`,children:`Add Bloby to your home screen for a full-screen app experience.`}),fe?(0,M.jsxs)(`div`,{className:`space-y-3.5`,children:[(0,M.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(`span`,{className:`flex-shrink-0 w-7 h-7 rounded-full bg-[#007AFF]/15 text-[#007AFF] text-[13px] font-semibold flex items-center justify-center mt-0.5`,children:`1`}),(0,M.jsxs)(`div`,{className:`flex-1`,children:[(0,M.jsx)(`p`,{className:`text-white text-[14px] font-medium`,children:`Tap the Share button`}),(0,M.jsxs)(`p`,{className:`text-white/40 text-[12px] mt-0.5 flex items-center gap-1.5`,children:[`The `,(0,M.jsx)(de,{className:`h-3.5 w-3.5 inline`}),` icon at the bottom of Safari`]})]})]}),(0,M.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(`span`,{className:`flex-shrink-0 w-7 h-7 rounded-full bg-[#007AFF]/15 text-[#007AFF] text-[13px] font-semibold flex items-center justify-center mt-0.5`,children:`2`}),(0,M.jsxs)(`div`,{className:`flex-1`,children:[(0,M.jsx)(`p`,{className:`text-white text-[14px] font-medium`,children:`Scroll down and tap`}),(0,M.jsx)(`p`,{className:`text-white/40 text-[12px] mt-0.5`,children:`"Add to Home Screen"`})]})]}),(0,M.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(`span`,{className:`flex-shrink-0 w-7 h-7 rounded-full bg-[#007AFF]/15 text-[#007AFF] text-[13px] font-semibold flex items-center justify-center mt-0.5`,children:`3`}),(0,M.jsxs)(`div`,{className:`flex-1`,children:[(0,M.jsx)(`p`,{className:`text-white text-[14px] font-medium`,children:`Tap "Add"`}),(0,M.jsx)(`p`,{className:`text-white/40 text-[12px] mt-0.5`,children:`Bloby will appear on your home screen`})]})]})]}):(0,M.jsxs)(`div`,{className:`space-y-3.5`,children:[(0,M.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(`span`,{className:`flex-shrink-0 w-7 h-7 rounded-full bg-[#007AFF]/15 text-[#007AFF] text-[13px] font-semibold flex items-center justify-center mt-0.5`,children:`1`}),(0,M.jsxs)(`div`,{className:`flex-1`,children:[(0,M.jsx)(`p`,{className:`text-white text-[14px] font-medium`,children:`Open browser menu`}),(0,M.jsx)(`p`,{className:`text-white/40 text-[12px] mt-0.5`,children:`Tap the three-dot menu in your browser`})]})]}),(0,M.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(`span`,{className:`flex-shrink-0 w-7 h-7 rounded-full bg-[#007AFF]/15 text-[#007AFF] text-[13px] font-semibold flex items-center justify-center mt-0.5`,children:`2`}),(0,M.jsxs)(`div`,{className:`flex-1`,children:[(0,M.jsx)(`p`,{className:`text-white text-[14px] font-medium`,children:`Tap "Install app" or "Add to Home screen"`}),(0,M.jsx)(`p`,{className:`text-white/40 text-[12px] mt-0.5`,children:`Bloby will be installed as a standalone app`})]})]})]}),(0,M.jsx)(`button`,{onClick:()=>A(!1),className:`w-full mt-5 py-2.5 bg-white/[0.06] hover:bg-white/[0.1] text-white text-[14px] font-medium rounded-xl transition-colors`,children:`Got it`})]})]})]})]}):(0,M.jsx)(`div`,{className:`flex items-center justify-center h-dvh`,children:(0,M.jsx)(`div`,{className:`w-6 h-6 border-2 border-white/10 border-t-white/50 rounded-full animate-spin`})})}ve.createRoot(document.getElementById(`root`)).render((0,M.jsx)(j.StrictMode,{children:(0,M.jsx)(bN,{})}));export{jC as i,Nx as n,DC as r,ax as t};
|