md2x 0.4.0 → 0.5.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.
Files changed (42) hide show
  1. package/dist/chunks/chunk-2LPNL4GA.js +1 -0
  2. package/dist/chunks/chunk-3P5X57NT.js +262 -0
  3. package/dist/chunks/chunk-3VL755NO.js +1 -0
  4. package/dist/chunks/chunk-5DPTQTJJ.js +1 -0
  5. package/dist/chunks/chunk-5DRL26RK.js +108 -0
  6. package/dist/chunks/chunk-AK6TXLWO.js +1 -0
  7. package/dist/chunks/chunk-CN4F5HOV.js +5 -0
  8. package/dist/chunks/chunk-CVKZIRZW.js +5 -0
  9. package/dist/chunks/chunk-DFROP2PD.js +11 -0
  10. package/dist/chunks/chunk-DJGIYXVP.js +3 -0
  11. package/dist/chunks/chunk-IENSDROB.js +1 -0
  12. package/dist/chunks/chunk-LLCWR7UA.js +1 -0
  13. package/dist/chunks/chunk-MHCTK6WW.js +1 -0
  14. package/dist/chunks/chunk-NM6J3ND7.js +1 -0
  15. package/dist/chunks/chunk-PARPCLXM.js +1 -0
  16. package/dist/chunks/chunk-PUOHPY5L.js +16 -0
  17. package/dist/chunks/chunk-PXO7VHRW.js +723 -0
  18. package/dist/chunks/chunk-R65AQGTF.js +1 -0
  19. package/dist/chunks/chunk-R6G2575A.js +3 -0
  20. package/dist/chunks/chunk-TRGQPVRY.js +2 -0
  21. package/dist/chunks/chunk-URO5RPHJ.js +9 -0
  22. package/dist/chunks/chunk-YFL3W3OS.js +1 -0
  23. package/dist/chunks/chunk-Z4LVGK7Y.js +1 -0
  24. package/dist/chunks/docx-exporter-FGXU5MTK.js +1 -0
  25. package/dist/chunks/rehype-highlight-Y4Q4RX67.js +1 -0
  26. package/dist/chunks/rehype-katex-FXTCTSUE.js +1 -0
  27. package/dist/chunks/rehype-stringify-4CQSSRDL.js +1 -0
  28. package/dist/chunks/remark-gfm-BUZ4SLP3.js +1 -0
  29. package/dist/chunks/remark-math-HEZQAPFK.js +1 -0
  30. package/dist/chunks/remark-parse-QC7TSXTK.js +1 -0
  31. package/dist/chunks/remark-rehype-C2LX643P.js +1 -0
  32. package/dist/chunks/remark-super-sub-EP2AQS54.js +1 -0
  33. package/dist/chunks/theme-manager-AZBU2SLL.js +1 -0
  34. package/dist/chunks/theme-to-css-GLV3WYDU.js +85 -0
  35. package/dist/chunks/unified-PU53JLVJ.js +1 -0
  36. package/dist/chunks/unist-util-visit-SBSD62C6.js +1 -0
  37. package/dist/index.js +1 -0
  38. package/dist/md2x.js +37 -0
  39. package/dist/renderer/puppeteer-render.html +1 -2812
  40. package/package.json +4 -4
  41. package/dist/index.mjs +0 -131248
  42. package/dist/md2x.mjs +0 -131485
@@ -0,0 +1,11 @@
1
+ import{b as P}from"./chunk-IENSDROB.js";import{f as H}from"./chunk-Z4LVGK7Y.js";function V(e,t){let r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function _(e,t){let r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
2
+ `}]}function q(e,t){let r=t.value?t.value+`
3
+ `:"",n={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(n.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function G(e,t){let r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function J(e,t){let r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function y(e){let t=[],r=-1,n=0,i=0;for(;++r<e.length;){let l=e.charCodeAt(r),o="";if(l===37&&P(e.charCodeAt(r+1))&&P(e.charCodeAt(r+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){let c=e.charCodeAt(r+1);l<56320&&c>56319&&c<57344?(o=String.fromCharCode(l,c),i=1):o="\uFFFD"}else o=String.fromCharCode(l);o&&(t.push(e.slice(n,r),encodeURIComponent(o)),n=r+i+1,o=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function Y(e,t){let r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),i=y(n.toLowerCase()),l=e.footnoteOrder.indexOf(n),o,c=e.footnoteCounts.get(n);c===void 0?(c=0,e.footnoteOrder.push(n),o=e.footnoteOrder.length):o=l+1,c+=1,e.footnoteCounts.set(n,c);let a={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,a);let h={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,h),e.applyData(t,h)}function v(e,t){let r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function X(e,t){if(e.options.allowDangerousHtml){let r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function C(e,t){let r=t.referenceType,n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];let i=e.all(t),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});let o=i[i.length-1];return o&&o.type==="text"?o.value+=n:i.push({type:"text",value:n}),i}function Z(e,t){let r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return C(e,t);let i={src:y(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);let l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function K(e,t){let r={src:y(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);let n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function Q(e,t){let r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);let n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function W(e,t){let r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return C(e,t);let i={href:y(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);let l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function $(e,t){let r={href:y(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);let n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ee(e,t,r){let n=e.all(t),i=r?Ce(r):te(t),l={},o=[];if(typeof t.checked=="boolean"){let s=n[0],p;s&&s.type==="element"&&s.tagName==="p"?p=s:(p={type:"element",tagName:"p",properties:{},children:[]},n.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let c=-1;for(;++c<n.length;){let s=n[c];(i||c!==0||s.type!=="element"||s.tagName!=="p")&&o.push({type:"text",value:`
4
+ `}),s.type==="element"&&s.tagName==="p"&&!i?o.push(...s.children):o.push(s)}let a=n[n.length-1];a&&(i||a.type!=="element"||a.tagName!=="p")&&o.push({type:"text",value:`
5
+ `});let h={type:"element",tagName:"li",properties:l,children:o};return e.patch(t,h),e.applyData(t,h)}function Ce(e){let t=!1;if(e.type==="list"){t=e.spread||!1;let r=e.children,n=-1;for(;!t&&++n<r.length;)t=te(r[n])}return t}function te(e){let t=e.spread;return t??e.children.length>1}function re(e,t){let r={},n=e.all(t),i=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++i<n.length;){let o=n[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}let l={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,l),e.applyData(t,l)}function ne(e,t){let r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function oe(e,t){let r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function ie(e,t){let r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}var D=le("end"),A=le("start");function le(e){return t;function t(r){let n=r&&r.position&&r.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 E(e){let t=A(e),r=D(e);if(t&&r)return{start:t,end:r}}function ce(e,t){let r=e.all(t),n=r.shift(),i=[];if(n){let o={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],o),i.push(o)}if(r.length>0){let o={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},c=A(t.children[1]),a=D(t.children[t.children.length-1]);c&&a&&(o.position={start:c,end:a}),i.push(o)}let l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function se(e,t,r){let n=r?r.children:void 0,l=(n?n.indexOf(t):1)===0?"th":"td",o=r&&r.type==="table"?r.align:void 0,c=o?o.length:t.children.length,a=-1,h=[];for(;++a<c;){let p=t.children[a],f={},m=o?o[a]:void 0;m&&(f.align=m);let u={type:"element",tagName:l,properties:f,children:[]};p&&(u.children=e.all(p),e.patch(p,u),u=e.applyData(p,u)),h.push(u)}let s={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,s),e.applyData(t,s)}function ae(e,t){let r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function fe(e){let t=String(e),r=/\r?\n|\r/g,n=r.exec(t),i=0,l=[];for(;n;)l.push(pe(t.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return l.push(pe(t.slice(i),i>0,!1)),l.join("")}function pe(e,t,r){let n=0,i=e.length;if(t){let l=e.codePointAt(n);for(;l===9||l===32;)n++,l=e.codePointAt(n)}if(r){let l=e.codePointAt(i-1);for(;l===9||l===32;)i--,l=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}function ue(e,t){let r={type:"text",value:fe(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function he(e,t){let r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}var S={blockquote:V,break:_,code:q,delete:G,emphasis:J,footnoteReference:Y,heading:v,html:X,imageReference:Z,image:K,inlineCode:Q,linkReference:W,link:$,listItem:ee,list:re,paragraph:ne,root:oe,strong:ie,table:ce,tableCell:ae,tableRow:se,text:ue,thematicBreak:he,toml:I,yaml:I,definition:I,footnoteDefinition:I};function I(){}var me=typeof self=="object"?self:globalThis,Se=(e,t)=>{let r=(i,l)=>(e.set(l,i),i),n=i=>{if(e.has(i))return e.get(i);let[l,o]=t[i];switch(l){case 0:case-1:return r(o,i);case 1:{let c=r([],i);for(let a of o)c.push(n(a));return c}case 2:{let c=r({},i);for(let[a,h]of o)c[n(a)]=n(h);return c}case 3:return r(new Date(o),i);case 4:{let{source:c,flags:a}=o;return r(new RegExp(c,a),i)}case 5:{let c=r(new Map,i);for(let[a,h]of o)c.set(n(a),n(h));return c}case 6:{let c=r(new Set,i);for(let a of o)c.add(n(a));return c}case 7:{let{name:c,message:a}=o;return r(new me[c](a),i)}case 8:return r(BigInt(o),i);case"BigInt":return r(Object(BigInt(o)),i);case"ArrayBuffer":return r(new Uint8Array(o).buffer,o);case"DataView":{let{buffer:c}=new Uint8Array(o);return r(new DataView(c),o)}}return r(new me[l](o),i)};return n},U=e=>Se(new Map,e)(0);var b="",{toString:Be}={},{keys:Re}=Object,k=e=>{let t=typeof e;if(t!=="object"||!e)return[0,t];let r=Be.call(e).slice(8,-1);switch(r){case"Array":return[1,b];case"Object":return[2,b];case"Date":return[3,b];case"RegExp":return[4,b];case"Map":return[5,b];case"Set":return[6,b];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},R=([e,t])=>e===0&&(t==="function"||t==="symbol"),Oe=(e,t,r,n)=>{let i=(o,c)=>{let a=n.push(o)-1;return r.set(c,a),a},l=o=>{if(r.has(o))return r.get(o);let[c,a]=k(o);switch(c){case 0:{let s=o;switch(a){case"bigint":c=8,s=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);s=null;break;case"undefined":return i([-1],o)}return i([c,s],o)}case 1:{if(a){let f=o;return a==="DataView"?f=new Uint8Array(o.buffer):a==="ArrayBuffer"&&(f=new Uint8Array(o)),i([a,[...f]],o)}let s=[],p=i([c,s],o);for(let f of o)s.push(l(f));return p}case 2:{if(a)switch(a){case"BigInt":return i([a,o.toString()],o);case"Boolean":case"Number":case"String":return i([a,o.valueOf()],o)}if(t&&"toJSON"in o)return l(o.toJSON());let s=[],p=i([c,s],o);for(let f of Re(o))(e||!R(k(o[f])))&&s.push([l(f),l(o[f])]);return p}case 3:return i([c,o.toISOString()],o);case 4:{let{source:s,flags:p}=o;return i([c,{source:s,flags:p}],o)}case 5:{let s=[],p=i([c,s],o);for(let[f,m]of o)(e||!(R(k(f))||R(k(m))))&&s.push([l(f),l(m)]);return p}case 6:{let s=[],p=i([c,s],o);for(let f of o)(e||!R(k(f)))&&s.push(l(f));return p}}let{message:h}=o;return i([c,{name:a,message:h}],o)};return l},z=(e,{json:t,lossy:r}={})=>{let n=[];return Oe(!(t||r),!!t,new Map,n)(e),n};var w=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?U(z(e,t)):structuredClone(e):(e,t)=>U(z(e,t));function M(e,t){let r=[{type:"text",value:"\u21A9"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function F(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function be(e){let t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||M,n=e.options.footnoteBackLabel||F,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[],a=-1;for(;++a<e.footnoteOrder.length;){let h=e.footnoteById.get(e.footnoteOrder[a]);if(!h)continue;let s=e.all(h),p=String(h.identifier).toUpperCase(),f=y(p.toLowerCase()),m=0,u=[],x=e.footnoteCounts.get(p);for(;x!==void 0&&++m<=x;){u.length>0&&u.push({type:"text",value:" "});let d=typeof r=="string"?r:r(a,m);typeof d=="string"&&(d={type:"text",value:d}),u.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(a,m),className:["data-footnote-backref"]},children:Array.isArray(d)?d:[d]})}let g=s[s.length-1];if(g&&g.type==="element"&&g.tagName==="p"){let d=g.children[g.children.length-1];d&&d.type==="text"?d.value+=" ":g.children.push({type:"text",value:" "}),g.children.push(...u)}else s.push(...u);let N={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(s,!0)};e.patch(h,N),c.push(N)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...w(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
6
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
7
+ `}]}}var j={}.hasOwnProperty,Pe={};function Ne(e,t){let r=t||Pe,n=new Map,i=new Map,l=new Map,o={...S,...r.handlers},c={all:h,applyData:Te,definitionById:n,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:o,one:a,options:r,patch:Ee,wrap:Ue};return H(e,function(s){if(s.type==="definition"||s.type==="footnoteDefinition"){let p=s.type==="definition"?n:i,f=String(s.identifier).toUpperCase();p.has(f)||p.set(f,s)}}),c;function a(s,p){let f=s.type,m=c.handlers[f];if(j.call(c.handlers,f)&&m)return m(c,s,p);if(c.options.passThrough&&c.options.passThrough.includes(f)){if("children"in s){let{children:x,...g}=s,N=w(g);return N.children=c.all(s),N}return w(s)}return(c.options.unknownHandler||Le)(c,s,p)}function h(s){let p=[];if("children"in s){let f=s.children,m=-1;for(;++m<f.length;){let u=c.one(f[m],s);if(u){if(m&&f[m-1].type==="break"&&(!Array.isArray(u)&&u.type==="text"&&(u.value=we(u.value)),!Array.isArray(u)&&u.type==="element")){let x=u.children[0];x&&x.type==="text"&&(x.value=we(x.value))}Array.isArray(u)?p.push(...u):p.push(u)}}}return p}}function Ee(e,t){e.position&&(t.position=E(e))}function Te(e,t){let r=t;if(e&&e.data){let n=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{let o="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:o}}r.type==="element"&&l&&Object.assign(r.properties,w(l)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}function Le(e,t){let r=t.data||{},n="value"in t&&!(j.call(r,"hProperties")||j.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ue(e,t){let r=[],n=-1;for(t&&r.push({type:"text",value:`
8
+ `});++n<e.length;)n&&r.push({type:"text",value:`
9
+ `}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:`
10
+ `}),r}function we(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function O(e,t){let r=Ne(e,t),n=r.one(e,void 0),i=be(r),l=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&("children"in l,l.children.push({type:"text",value:`
11
+ `},i)),l}function ke(e,t){return e&&"run"in e?async function(r,n){let i=O(r,{file:n,...t});await e.run(i,n)}:function(r,n){return O(r,{file:n,...e||t})}}export{S as a,M as b,F as c,ke as d};
@@ -0,0 +1,3 @@
1
+ import{a as m}from"./chunk-Z4LVGK7Y.js";var h=(function(e,t,n){let r=m(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]});var f=(function(e){if(e==null)return T;if(typeof e=="string")return I(e);if(typeof e=="object")return A(e);if(typeof e=="function")return p(e);throw new Error("Expected function, string, or array as `test`")});function A(e){let t=[],n=-1;for(;++n<e.length;)t[n]=f(e[n]);return p(r);function r(...o){let c=-1;for(;++c<t.length;)if(t[c].apply(this,o))return!0;return!1}}function I(e){return p(t);function t(n){return n.tagName===e}}function p(e){return t;function t(n,r,o){return!!(B(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function T(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function B(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}var g=/\n/g,w=/[\t ]+/g,d=f("br"),b=f(P),C=f("p"),x=f("tr"),F=f(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",_,L]),y=f(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function j(e,t){let n=t||{},r="children"in e?e.children:[],o=y(e),c=N(e,{whitespace:n.whitespace||"normal",breakBefore:!1,breakAfter:!1}),i=[];(e.type==="text"||e.type==="comment")&&i.push(...k(e,{whitespace:c,breakBefore:!0,breakAfter:!0}));let l=-1;for(;++l<r.length;)i.push(...E(r[l],e,{whitespace:c,breakBefore:l?void 0:o,breakAfter:l<r.length-1?d(r[l+1]):o}));let s=[],u;for(l=-1;++l<i.length;){let a=i[l];typeof a=="number"?u!==void 0&&a>u&&(u=a):a&&(u!==void 0&&u>-1&&s.push(`
2
+ `.repeat(u)||" "),u=-1,s.push(a))}return s.join("")}function E(e,t,n){return e.type==="element"?v(e,t,n):e.type==="text"?n.whitespace==="normal"?k(e,n):S(e):[]}function v(e,t,n){let r=N(e,n),o=e.children||[],c=-1,i=[];if(F(e))return i;let l,s;for(d(e)||x(e)&&h(t,e,x)?s=`
3
+ `:C(e)?(l=2,s=2):y(e)&&(l=1,s=1);++c<o.length;)i=i.concat(E(o[c],e,{whitespace:r,breakBefore:c?void 0:l,breakAfter:c<o.length-1?d(o[c+1]):s}));return b(e)&&h(t,e,b)&&i.push(" "),l&&i.unshift(l),s&&i.push(s),i}function k(e,t){let n=String(e.value),r=[],o=[],c=0;for(;c<=n.length;){g.lastIndex=c;let s=g.exec(n),u=s&&"index"in s?s.index:n.length;r.push(O(n.slice(c,u).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),c===0?t.breakBefore:!0,u===n.length?t.breakAfter:!0)),c=u+1}let i=-1,l;for(;++i<r.length;)r[i].charCodeAt(r[i].length-1)===8203||i<r.length-1&&r[i+1].charCodeAt(0)===8203?(o.push(r[i]),l=void 0):r[i]?(typeof l=="number"&&o.push(l),o.push(r[i]),l=0):(i===0||i===r.length-1)&&o.push(0);return o}function S(e){return[String(e.value)]}function O(e,t,n){let r=[],o=0,c;for(;o<e.length;){w.lastIndex=o;let i=w.exec(e);c=i?i.index:e.length,!o&&!c&&i&&!t&&r.push(""),o!==c&&r.push(e.slice(o,c)),o=i?c+i[0].length:c}return o!==c&&!n&&r.push(""),r.join(" ")}function N(e,t){if(e.type==="element"){let n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap";default:}}return t.whitespace}function _(e){return!!(e.properties||{}).hidden}function P(e){return e.tagName==="td"||e.tagName==="th"}function L(e){return e.tagName==="dialog"&&!(e.properties||{}).open}export{j as a};
@@ -0,0 +1 @@
1
+ var o=t(/[A-Za-z]/),e=t(/[\dA-Za-z]/),u=t(/[#-'*+\--9=?A-Z^-~]/);function c(n){return n!==null&&(n<32||n===127)}var a=t(/\d/),p=t(/[\dA-Fa-f]/),s=t(/[!-/:-@[-`{-~]/);function x(n){return n!==null&&n<-2}function l(n){return n!==null&&(n<0||n===32)}function f(n){return n===-2||n===-1||n===32}var A=t(new RegExp("\\p{P}|\\p{S}","u")),g=t(/\s/);function t(n){return r;function r(i){return i!==null&&i>-1&&n.test(String.fromCharCode(i))}}export{o as a,e as b,u as c,c as d,a as e,p as f,s as g,x as h,l as i,f as j,A as k,g as l};
@@ -0,0 +1 @@
1
+ function f(l,t){let i=String(l),e=i.indexOf(t),n=e,o=0,r=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;e!==-1;)e===n?++o>r&&(r=o):o=1,n=e+t.length,e=i.indexOf(t,n);return r}export{f as a};
@@ -0,0 +1 @@
1
+ import{a as y}from"./chunk-AK6TXLWO.js";var o=class extends Error{constructor(e,s,r){super(),typeof s=="string"&&(r=s,s=void 0);let n="",t={},l=!1;if(s&&("line"in s&&"column"in s?t={place:s}:"start"in s&&"end"in s?t={place:s}:"type"in s?t={ancestors:[s],place:s.position}:t={...s}),typeof e=="string"?n=e:!t.cause&&e&&(l=!0,n=e.message,t.cause=e),!t.ruleId&&!t.source&&typeof r=="string"){let d=r.indexOf(":");d===-1?t.ruleId=r:(t.source=r.slice(0,d),t.ruleId=r.slice(d+1))}if(!t.place&&t.ancestors&&t.ancestors){let d=t.ancestors[t.ancestors.length-1];d&&(t.place=d.position)}let h=t.place&&"start"in t.place?t.place.start:t.place;this.ancestors=t.ancestors||void 0,this.cause=t.cause||void 0,this.column=h?h.column:void 0,this.fatal=void 0,this.file="",this.message=n,this.line=h?h.line:void 0,this.name=y(t.place)||"1:1",this.place=t.place||void 0,this.reason=this.message,this.ruleId=t.ruleId||void 0,this.source=t.source||void 0,this.stack=l&&t.cause&&typeof t.cause.stack=="string"?t.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};o.prototype.file="";o.prototype.name="";o.prototype.reason="";o.prototype.message="";o.prototype.stack="";o.prototype.column=void 0;o.prototype.line=void 0;o.prototype.ancestors=void 0;o.prototype.cause=void 0;o.prototype.fatal=void 0;o.prototype.place=void 0;o.prototype.ruleId=void 0;o.prototype.source=void 0;import{default as a}from"node:path";import{default as g}from"node:process";import{fileURLToPath as x}from"node:url";function f(i){return!!(i!==null&&typeof i=="object"&&"href"in i&&i.href&&"protocol"in i&&i.protocol&&i.auth===void 0)}var p=["history","path","basename","stem","extname","dirname"],m=class{constructor(e){let s;e?f(e)?s={path:e}:typeof e=="string"||b(e)?s={value:e}:s=e:s={},this.cwd="cwd"in s?"":g.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<p.length;){let t=p[r];t in s&&s[t]!==void 0&&s[t]!==null&&(this[t]=t==="history"?[...s[t]]:s[t])}let n;for(n in s)p.includes(n)||(this[n]=s[n])}get basename(){return typeof this.path=="string"?a.basename(this.path):void 0}set basename(e){c(e,"basename"),u(e,"basename"),this.path=a.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?a.dirname(this.path):void 0}set dirname(e){w(this.basename,"dirname"),this.path=a.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?a.extname(this.path):void 0}set extname(e){if(u(e,"extname"),w(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=a.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){f(e)&&(e=x(e)),c(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?a.basename(this.path,this.extname):void 0}set stem(e){c(e,"stem"),u(e,"stem"),this.path=a.join(this.dirname||"",e+(this.extname||""))}fail(e,s,r){let n=this.message(e,s,r);throw n.fatal=!0,n}info(e,s,r){let n=this.message(e,s,r);return n.fatal=void 0,n}message(e,s,r){let n=new o(e,s,r);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function u(i,e){if(i&&i.includes(a.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+a.sep+"`")}function c(i,e){if(!i)throw new Error("`"+e+"` cannot be empty")}function w(i,e){if(!i)throw new Error("Setting `"+e+"` requires `path` to be set too")}function b(i){return!!(i&&typeof i=="object"&&"byteLength"in i&&"byteOffset"in i)}export{o as a,m as b};
@@ -0,0 +1 @@
1
+ var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports),o=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0})},l=(a,b,c,f)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&e(a,d,{get:()=>b[d],enumerable:!(f=h(b,d))||f.enumerable});return a};var p=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c,p as d};
@@ -0,0 +1 @@
1
+ import{j as t}from"./chunk-IENSDROB.js";function p(n,i,u,e){let o=e?e-1:Number.POSITIVE_INFINITY,I=0;return a;function a(r){return t(r)?(n.enter(u),m(r)):i(r)}function m(r){return t(r)&&I++<o?(n.consume(r),m):(n.exit(u),i(r))}}export{p as a};
@@ -0,0 +1,16 @@
1
+ import{a as X}from"./chunk-R65AQGTF.js";import{a as V,c as Q,e as Be,f as M,g as P,h as je,k as We}from"./chunk-TRGQPVRY.js";import{a as Ue}from"./chunk-LLCWR7UA.js";import{a as v}from"./chunk-PARPCLXM.js";import{a as E,b as G,d as He,h as z,i as C,j as S,k as W,l as D}from"./chunk-IENSDROB.js";import{a as N,c as qe,e as $e,f as Ve}from"./chunk-Z4LVGK7Y.js";function Y(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function ee(e,n,t){let l=N((t||{}).ignore||[]),a=Et(n),r=-1;for(;++r<a.length;)$e(e,"text",u);function u(s,m){let f=-1,p;for(;++f<m.length;){let k=m[f],h=p?p.children:void 0;if(l(k,h?h.indexOf(k):void 0,p))return;p=k}if(p)return o(s,m)}function o(s,m){let f=m[m.length-1],p=a[r][0],k=a[r][1],h=0,b=f.children.indexOf(s),g=!1,d=[];p.lastIndex=0;let w=p.exec(s.value);for(;w;){let F=w.index,A={index:w.index,input:w.input,stack:[...m,s]},y=k(...w,A);if(typeof y=="string"&&(y=y.length>0?{type:"text",value:y}:void 0),y===!1?p.lastIndex=F+1:(h!==F&&d.push({type:"text",value:s.value.slice(h,F)}),Array.isArray(y)?d.push(...y):y&&d.push(y),h=F+w[0].length,g=!0),!p.global)break;w=p.exec(s.value)}return g?(h<s.value.length&&d.push({type:"text",value:s.value.slice(h)}),f.children.splice(b,1,...d)):d=[s],b+d.length}}function Et(e){let n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let t=!e[0]||Array.isArray(e[0])?e:[e],i=-1;for(;++i<t.length;){let l=t[i];n.push([Pt(l[0]),_t(l[1])])}return n}function Pt(e){return typeof e=="string"?new RegExp(Y(e),"g"):e}function _t(e){return typeof e=="function"?e:function(){return e}}var te="phrasing",ne=["autolink","link","image","label"];function ie(){return{transforms:[qt],enter:{literalAutolink:Ot,literalAutolinkEmail:re,literalAutolinkHttp:re,literalAutolinkWww:re},exit:{literalAutolink:Wt,literalAutolinkEmail:jt,literalAutolinkHttp:Bt,literalAutolinkWww:Ht}}}function oe(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:te,notInConstruct:ne},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:te,notInConstruct:ne},{character:":",before:"[ps]",after:"\\/",inConstruct:te,notInConstruct:ne}]}}function Ot(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function re(e){this.config.enter.autolinkProtocol.call(this,e)}function Bt(e){this.config.exit.autolinkProtocol.call(this,e)}function Ht(e){this.config.exit.data.call(this,e);let n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function jt(e){this.config.exit.autolinkEmail.call(this,e)}function Wt(e){this.exit(e)}function qt(e){ee(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,$t],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Ut]],{ignore:["link","linkReference"]})}function $t(e,n,t,i,l){let a="";if(!Qe(l)||(/^w/i.test(n)&&(t=n+t,n="",a="http://"),!Vt(t)))return!1;let r=Qt(t+i);if(!r[0])return!1;let u={type:"link",title:null,url:a+n+r[0],children:[{type:"text",value:n+r[0]}]};return r[1]?[u,{type:"text",value:r[1]}]:u}function Ut(e,n,t,i){return!Qe(i,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function Vt(e){let n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function Qt(e){let n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],i=t.indexOf(")"),l=X(e,"("),a=X(e,")");for(;i!==-1&&l>a;)e+=t.slice(0,i+1),t=t.slice(i+1),i=t.indexOf(")"),a++;return[e,t]}function Qe(e,n){let t=e.input.charCodeAt(e.index-1);return(e.index===0||D(t)||W(t))&&(!n||t!==47)}Ge.peek=tn;function Gt(){this.buffer()}function Nt(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Zt(){this.buffer()}function Jt(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Kt(e){let n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=M(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Xt(e){this.exit(e)}function Yt(e){let n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=M(this.sliceSerialize(e)).toLowerCase(),t.label=n}function en(e){this.exit(e)}function tn(){return"["}function Ge(e,n,t,i){let l=t.createTracker(i),a=l.move("[^"),r=t.enter("footnoteReference"),u=t.enter("reference");return a+=l.move(t.safe(t.associationId(e),{after:"]",before:a})),u(),r(),a+=l.move("]"),a}function le(){return{enter:{gfmFootnoteCallString:Gt,gfmFootnoteCall:Nt,gfmFootnoteDefinitionLabelString:Zt,gfmFootnoteDefinition:Jt},exit:{gfmFootnoteCallString:Kt,gfmFootnoteCall:Xt,gfmFootnoteDefinitionLabelString:Yt,gfmFootnoteDefinition:en}}}function ae(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:Ge},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,l,a,r){let u=a.createTracker(r),o=u.move("[^"),s=a.enter("footnoteDefinition"),m=a.enter("label");return o+=u.move(a.safe(a.associationId(i),{before:o,after:"]"})),m(),o+=u.move("]:"),i.children&&i.children.length>0&&(u.shift(4),o+=u.move((n?`
2
+ `:" ")+a.indentLines(a.containerFlow(i,u.current()),n?Ne:nn))),s(),o}}function nn(e,n,t){return n===0?e:Ne(e,n,t)}function Ne(e,n,t){return(t?"":" ")+e}var rn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ze.peek=an;function ue(){return{canContainEols:["delete"],enter:{strikethrough:on},exit:{strikethrough:ln}}}function se(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:rn}],handlers:{delete:Ze}}}function on(e){this.enter({type:"delete",children:[]},e)}function ln(e){this.exit(e)}function Ze(e,n,t,i){let l=t.createTracker(i),a=t.enter("strikethrough"),r=l.move("~~");return r+=t.containerPhrasing(e,{...l.current(),before:r,after:"~"}),r+=l.move("~~"),a(),r}function an(){return"~"}function un(e){return e.length}function Ke(e,n){let t=n||{},i=(t.align||[]).concat(),l=t.stringLength||un,a=[],r=[],u=[],o=[],s=0,m=-1;for(;++m<e.length;){let x=[],b=[],g=-1;for(e[m].length>s&&(s=e[m].length);++g<e[m].length;){let d=sn(e[m][g]);if(t.alignDelimiters!==!1){let w=l(d);b[g]=w,(o[g]===void 0||w>o[g])&&(o[g]=w)}x.push(d)}r[m]=x,u[m]=b}let f=-1;if(typeof i=="object"&&"length"in i)for(;++f<s;)a[f]=Je(i[f]);else{let x=Je(i);for(;++f<s;)a[f]=x}f=-1;let p=[],k=[];for(;++f<s;){let x=a[f],b="",g="";x===99?(b=":",g=":"):x===108?b=":":x===114&&(g=":");let d=t.alignDelimiters===!1?1:Math.max(1,o[f]-b.length-g.length),w=b+"-".repeat(d)+g;t.alignDelimiters!==!1&&(d=b.length+d+g.length,d>o[f]&&(o[f]=d),k[f]=d),p[f]=w}r.splice(1,0,p),u.splice(1,0,k),m=-1;let h=[];for(;++m<r.length;){let x=r[m],b=u[m];f=-1;let g=[];for(;++f<s;){let d=x[f]||"",w="",F="";if(t.alignDelimiters!==!1){let A=o[f]-(b[f]||0),y=a[f];y===114?w=" ".repeat(A):y===99?A%2?(w=" ".repeat(A/2+.5),F=" ".repeat(A/2-.5)):(w=" ".repeat(A/2),F=w):F=" ".repeat(A)}t.delimiterStart!==!1&&!f&&g.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&d==="")&&(t.delimiterStart!==!1||f)&&g.push(" "),t.alignDelimiters!==!1&&g.push(w),g.push(d),t.alignDelimiters!==!1&&g.push(F),t.padding!==!1&&g.push(" "),(t.delimiterEnd!==!1||f!==s-1)&&g.push("|")}h.push(t.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return h.join(`
3
+ `)}function sn(e){return e==null?"":String(e)}function Je(e){let n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function Xe(e,n,t,i){let l=t.enter("blockquote"),a=t.createTracker(i);a.move("> "),a.shift(2);let r=t.indentLines(t.containerFlow(e,a.current()),fn);return l(),r}function fn(e,n,t){return">"+(t?"":" ")+e}function et(e,n){return Ye(e,n.inConstruct,!0)&&!Ye(e,n.notInConstruct,!1)}function Ye(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let i=-1;for(;++i<n.length;)if(e.includes(n[i]))return!0;return!1}function fe(e,n,t,i){let l=-1;for(;++l<t.unsafe.length;)if(t.unsafe[l].character===`
4
+ `&&et(t.stack,t.unsafe[l]))return/[ \t]/.test(i.before)?"":" ";return`\\
5
+ `}function tt(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function nt(e){let n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function rt(e,n,t,i){let l=nt(t),a=e.value||"",r=l==="`"?"GraveAccent":"Tilde";if(tt(e,t)){let f=t.enter("codeIndented"),p=t.indentLines(a,cn);return f(),p}let u=t.createTracker(i),o=l.repeat(Math.max(Ue(a,l)+1,3)),s=t.enter("codeFenced"),m=u.move(o);if(e.lang){let f=t.enter(`codeFencedLang${r}`);m+=u.move(t.safe(e.lang,{before:m,after:" ",encode:["`"],...u.current()})),f()}if(e.lang&&e.meta){let f=t.enter(`codeFencedMeta${r}`);m+=u.move(" "),m+=u.move(t.safe(e.meta,{before:m,after:`
6
+ `,encode:["`"],...u.current()})),f()}return m+=u.move(`
7
+ `),a&&(m+=u.move(a+`
8
+ `)),m+=u.move(o),s(),m}function cn(e,n,t){return(t?"":" ")+e}function _(e){let n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function it(e,n,t,i){let l=_(t),a=l==='"'?"Quote":"Apostrophe",r=t.enter("definition"),u=t.enter("label"),o=t.createTracker(i),s=o.move("[");return s+=o.move(t.safe(t.associationId(e),{before:s,after:"]",...o.current()})),s+=o.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=t.enter("destinationLiteral"),s+=o.move("<"),s+=o.move(t.safe(e.url,{before:s,after:">",...o.current()})),s+=o.move(">")):(u=t.enter("destinationRaw"),s+=o.move(t.safe(e.url,{before:s,after:e.title?" ":`
9
+ `,...o.current()}))),u(),e.title&&(u=t.enter(`title${a}`),s+=o.move(" "+l),s+=o.move(t.safe(e.title,{before:s,after:l,...o.current()})),s+=o.move(l),u()),r(),s}function ot(e){let n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function I(e){return"&#x"+e.toString(16).toUpperCase()+";"}function O(e,n,t){let i=P(e),l=P(n);return i===void 0?l===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ce.peek=mn;function ce(e,n,t,i){let l=ot(t),a=t.enter("emphasis"),r=t.createTracker(i),u=r.move(l),o=r.move(t.containerPhrasing(e,{after:l,before:u,...r.current()})),s=o.charCodeAt(0),m=O(i.before.charCodeAt(i.before.length-1),s,l);m.inside&&(o=I(s)+o.slice(1));let f=o.charCodeAt(o.length-1),p=O(i.after.charCodeAt(0),f,l);p.inside&&(o=o.slice(0,-1)+I(f));let k=r.move(l);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:m.outside},u+o+k}function mn(e,n,t){return t.options.emphasis||"*"}function lt(e,n){let t=!1;return Ve(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return t=!0,qe}),!!((!e.depth||e.depth<3)&&V(e)&&(n.options.setext||t))}function at(e,n,t,i){let l=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(i);if(lt(e,t)){let m=t.enter("headingSetext"),f=t.enter("phrasing"),p=t.containerPhrasing(e,{...a.current(),before:`
10
+ `,after:`
11
+ `});return f(),m(),p+`
12
+ `+(l===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
13
+ `))+1))}let r="#".repeat(l),u=t.enter("headingAtx"),o=t.enter("phrasing");a.move(r+" ");let s=t.containerPhrasing(e,{before:"# ",after:`
14
+ `,...a.current()});return/^[\t ]/.test(s)&&(s=I(s.charCodeAt(0))+s.slice(1)),s=s?r+" "+s:r,t.options.closeAtx&&(s+=" "+r),o(),u(),s}me.peek=hn;function me(e){return e.value||""}function hn(){return"<"}he.peek=pn;function he(e,n,t,i){let l=_(t),a=l==='"'?"Quote":"Apostrophe",r=t.enter("image"),u=t.enter("label"),o=t.createTracker(i),s=o.move("![");return s+=o.move(t.safe(e.alt,{before:s,after:"]",...o.current()})),s+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=t.enter("destinationLiteral"),s+=o.move("<"),s+=o.move(t.safe(e.url,{before:s,after:">",...o.current()})),s+=o.move(">")):(u=t.enter("destinationRaw"),s+=o.move(t.safe(e.url,{before:s,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=t.enter(`title${a}`),s+=o.move(" "+l),s+=o.move(t.safe(e.title,{before:s,after:l,...o.current()})),s+=o.move(l),u()),s+=o.move(")"),r(),s}function pn(){return"!"}pe.peek=kn;function pe(e,n,t,i){let l=e.referenceType,a=t.enter("imageReference"),r=t.enter("label"),u=t.createTracker(i),o=u.move("!["),s=t.safe(e.alt,{before:o,after:"]",...u.current()});o+=u.move(s+"]["),r();let m=t.stack;t.stack=[],r=t.enter("reference");let f=t.safe(t.associationId(e),{before:o,after:"]",...u.current()});return r(),t.stack=m,a(),l==="full"||!s||s!==f?o+=u.move(f+"]"):l==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function kn(){return"!"}ke.peek=gn;function ke(e,n,t){let i=e.value||"",l="`",a=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(i);)l+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++a<t.unsafe.length;){let r=t.unsafe[a],u=t.compilePattern(r),o;if(r.atBreak)for(;o=u.exec(i);){let s=o.index;i.charCodeAt(s)===10&&i.charCodeAt(s-1)===13&&s--,i=i.slice(0,s)+" "+i.slice(o.index+1)}}return l+i+l}function gn(){return"`"}function ge(e,n){let t=V(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}xe.peek=xn;function xe(e,n,t,i){let l=_(t),a=l==='"'?"Quote":"Apostrophe",r=t.createTracker(i),u,o;if(ge(e,t)){let m=t.stack;t.stack=[],u=t.enter("autolink");let f=r.move("<");return f+=r.move(t.containerPhrasing(e,{before:f,after:">",...r.current()})),f+=r.move(">"),u(),t.stack=m,f}u=t.enter("link"),o=t.enter("label");let s=r.move("[");return s+=r.move(t.containerPhrasing(e,{before:s,after:"](",...r.current()})),s+=r.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),s+=r.move("<"),s+=r.move(t.safe(e.url,{before:s,after:">",...r.current()})),s+=r.move(">")):(o=t.enter("destinationRaw"),s+=r.move(t.safe(e.url,{before:s,after:e.title?" ":")",...r.current()}))),o(),e.title&&(o=t.enter(`title${a}`),s+=r.move(" "+l),s+=r.move(t.safe(e.title,{before:s,after:l,...r.current()})),s+=r.move(l),o()),s+=r.move(")"),u(),s}function xn(e,n,t){return ge(e,t)?"<":"["}be.peek=bn;function be(e,n,t,i){let l=e.referenceType,a=t.enter("linkReference"),r=t.enter("label"),u=t.createTracker(i),o=u.move("["),s=t.containerPhrasing(e,{before:o,after:"]",...u.current()});o+=u.move(s+"]["),r();let m=t.stack;t.stack=[],r=t.enter("reference");let f=t.safe(t.associationId(e),{before:o,after:"]",...u.current()});return r(),t.stack=m,a(),l==="full"||!s||s!==f?o+=u.move(f+"]"):l==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function bn(){return"["}function B(e){let n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function ut(e){let n=B(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function st(e){let n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Z(e){let n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function ft(e,n,t,i){let l=t.enter("list"),a=t.bulletCurrent,r=e.ordered?st(t):B(t),u=e.ordered?r==="."?")":".":ut(t),o=n&&t.bulletLastUsed?r===t.bulletLastUsed:!1;if(!e.ordered){let m=e.children?e.children[0]:void 0;if((r==="*"||r==="-")&&m&&(!m.children||!m.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(o=!0),Z(t)===r&&m){let f=-1;for(;++f<e.children.length;){let p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(r=u),t.bulletCurrent=r;let s=t.containerFlow(e,i);return t.bulletLastUsed=r,t.bulletCurrent=a,l(),s}function ct(e){let n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function mt(e,n,t,i){let l=ct(t),a=t.bulletCurrent||B(t);n&&n.type==="list"&&n.ordered&&(a=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let r=a.length+1;(l==="tab"||l==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(r=Math.ceil(r/4)*4);let u=t.createTracker(i);u.move(a+" ".repeat(r-a.length)),u.shift(r);let o=t.enter("listItem"),s=t.indentLines(t.containerFlow(e,u.current()),m);return o(),s;function m(f,p,k){return p?(k?"":" ".repeat(r))+f:(k?a:a+" ".repeat(r-a.length))+f}}function ht(e,n,t,i){let l=t.enter("paragraph"),a=t.enter("phrasing"),r=t.containerPhrasing(e,i);return a(),l(),r}var de=N(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function pt(e,n,t,i){return(e.children.some(function(r){return de(r)})?t.containerPhrasing:t.containerFlow).call(t,e,i)}function kt(e){let n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}we.peek=dn;function we(e,n,t,i){let l=kt(t),a=t.enter("strong"),r=t.createTracker(i),u=r.move(l+l),o=r.move(t.containerPhrasing(e,{after:l,before:u,...r.current()})),s=o.charCodeAt(0),m=O(i.before.charCodeAt(i.before.length-1),s,l);m.inside&&(o=I(s)+o.slice(1));let f=o.charCodeAt(o.length-1),p=O(i.after.charCodeAt(0),f,l);p.inside&&(o=o.slice(0,-1)+I(f));let k=r.move(l+l);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:m.outside},u+o+k}function dn(e,n,t){return t.options.strong||"*"}function gt(e,n,t,i){return t.safe(e.value,i)}function xt(e){let n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function bt(e,n,t){let i=(Z(t)+(t.options.ruleSpaces?" ":"")).repeat(xt(t));return t.options.ruleSpaces?i.slice(0,-1):i}var q={blockquote:Xe,break:fe,code:rt,definition:it,emphasis:ce,hardBreak:fe,heading:at,html:me,image:he,imageReference:pe,inlineCode:ke,link:xe,linkReference:be,list:ft,listItem:mt,paragraph:ht,root:pt,strong:we,text:gt,thematicBreak:bt};function ye(){return{enter:{table:wn,tableData:dt,tableHeader:dt,tableRow:yn},exit:{codeText:An,table:Cn,tableData:Ce,tableHeader:Ce,tableRow:Ce}}}function wn(e){let n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function Cn(e){this.exit(e),this.data.inTable=void 0}function yn(e){this.enter({type:"tableRow",children:[]},e)}function Ce(e){this.exit(e)}function dt(e){this.enter({type:"tableCell",children:[]},e)}function An(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Fn));let t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Fn(e,n){return n==="|"?n:e}function Ae(e){let n=e||{},t=n.tableCellPadding,i=n.tablePipeAlign,l=n.stringLength,a=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
15
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:r,tableCell:o,tableRow:u}};function r(k,h,x,b){return s(m(k,x,b),k.align)}function u(k,h,x,b){let g=f(k,x,b),d=s([g]);return d.slice(0,d.indexOf(`
16
+ `))}function o(k,h,x,b){let g=x.enter("tableCell"),d=x.enter("phrasing"),w=x.containerPhrasing(k,{...b,before:a,after:a});return d(),g(),w}function s(k,h){return Ke(k,{align:h,alignDelimiters:i,padding:t,stringLength:l})}function m(k,h,x){let b=k.children,g=-1,d=[],w=h.enter("table");for(;++g<b.length;)d[g]=f(b[g],h,x);return w(),d}function f(k,h,x){let b=k.children,g=-1,d=[],w=h.enter("tableRow");for(;++g<b.length;)d[g]=o(b[g],k,h,x);return w(),d}function p(k,h,x){let b=q.inlineCode(k,h,x);return x.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function Fe(){return{exit:{taskListCheckValueChecked:wt,taskListCheckValueUnchecked:wt,paragraph:vn}}}function ve(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Tn}}}function wt(e){let n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function vn(e){let n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){let t=this.stack[this.stack.length-1];t.type;let i=t.children[0];if(i&&i.type==="text"){let l=n.children,a=-1,r;for(;++a<l.length;){let u=l[a];if(u.type==="paragraph"){r=u;break}}r===t&&(i.value=i.value.slice(1),i.value.length===0?t.children.shift():t.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,t.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function Tn(e,n,t,i){let l=e.children[0],a=typeof e.checked=="boolean"&&l&&l.type==="paragraph",r="["+(e.checked?"x":" ")+"] ",u=t.createTracker(i);a&&u.move(r);let o=q.listItem(e,n,t,{...i,...u.current()});return a&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,s)),o;function s(m){return m+r}}function Te(){return[ie(),le(),ue(),ye(),Fe()]}function Le(e){return{extensions:[oe(),ae(e),se(),Ae(e),ve()]}}var Ln={tokenize:zn,partial:!0},Ct={tokenize:Rn,partial:!0},yt={tokenize:En,partial:!0},At={tokenize:Pn,partial:!0},Sn={tokenize:_n,partial:!0},Ft={name:"wwwAutolink",tokenize:In,previous:Tt},vt={name:"protocolAutolink",tokenize:Mn,previous:Lt},L={name:"emailAutolink",tokenize:Dn,previous:St},T={};function De(){return{text:T}}var R=48;for(;R<123;)T[R]=L,R++,R===58?R=65:R===91&&(R=97);T[43]=L;T[45]=L;T[46]=L;T[95]=L;T[72]=[L,vt];T[104]=[L,vt];T[87]=[L,Ft];T[119]=[L,Ft];function Dn(e,n,t){let i=this,l,a;return r;function r(f){return!Se(f)||!St.call(i,i.previous)||Ie(i.events)?t(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(f))}function u(f){return Se(f)?(e.consume(f),u):f===64?(e.consume(f),o):t(f)}function o(f){return f===46?e.check(Sn,m,s)(f):f===45||f===95||G(f)?(a=!0,e.consume(f),o):m(f)}function s(f){return e.consume(f),l=!0,o}function m(f){return a&&l&&E(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(f)):t(f)}}function In(e,n,t){let i=this;return l;function l(r){return r!==87&&r!==119||!Tt.call(i,i.previous)||Ie(i.events)?t(r):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Ln,e.attempt(Ct,e.attempt(yt,a),t),t)(r))}function a(r){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(r)}}function Mn(e,n,t){let i=this,l="",a=!1;return r;function r(f){return(f===72||f===104)&&Lt.call(i,i.previous)&&!Ie(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(f),e.consume(f),u):t(f)}function u(f){if(E(f)&&l.length<5)return l+=String.fromCodePoint(f),e.consume(f),u;if(f===58){let p=l.toLowerCase();if(p==="http"||p==="https")return e.consume(f),o}return t(f)}function o(f){return f===47?(e.consume(f),a?s:(a=!0,o)):t(f)}function s(f){return f===null||He(f)||C(f)||D(f)||W(f)?t(f):e.attempt(Ct,e.attempt(yt,m),t)(f)}function m(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(f)}}function zn(e,n,t){let i=0;return l;function l(r){return(r===87||r===119)&&i<3?(i++,e.consume(r),l):r===46&&i===3?(e.consume(r),a):t(r)}function a(r){return r===null?t(r):n(r)}}function Rn(e,n,t){let i,l,a;return r;function r(s){return s===46||s===95?e.check(At,o,u)(s):s===null||C(s)||D(s)||s!==45&&W(s)?o(s):(a=!0,e.consume(s),r)}function u(s){return s===95?i=!0:(l=i,i=void 0),e.consume(s),r}function o(s){return l||i||!a?t(s):n(s)}}function En(e,n){let t=0,i=0;return l;function l(r){return r===40?(t++,e.consume(r),l):r===41&&i<t?a(r):r===33||r===34||r===38||r===39||r===41||r===42||r===44||r===46||r===58||r===59||r===60||r===63||r===93||r===95||r===126?e.check(At,n,a)(r):r===null||C(r)||D(r)?n(r):(e.consume(r),l)}function a(r){return r===41&&i++,e.consume(r),l}}function Pn(e,n,t){return i;function i(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),i):u===38?(e.consume(u),a):u===93?(e.consume(u),l):u===60||u===null||C(u)||D(u)?n(u):t(u)}function l(u){return u===null||u===40||u===91||C(u)||D(u)?n(u):i(u)}function a(u){return E(u)?r(u):t(u)}function r(u){return u===59?(e.consume(u),i):E(u)?(e.consume(u),r):t(u)}}function _n(e,n,t){return i;function i(a){return e.consume(a),l}function l(a){return G(a)?t(a):n(a)}}function Tt(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||C(e)}function Lt(e){return!E(e)}function St(e){return!(e===47||Se(e))}function Se(e){return e===43||e===45||e===46||e===95||G(e)}function Ie(e){let n=e.length,t=!1;for(;n--;){let i=e[n][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){t=!0;break}if(i._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}var On={tokenize:Un,partial:!0};function Me(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Wn,continuation:{tokenize:qn},exit:$n}},text:{91:{name:"gfmFootnoteCall",tokenize:jn},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Bn,resolveTo:Hn}}}}function Bn(e,n,t){let i=this,l=i.events.length,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),r;for(;l--;){let o=i.events[l][1];if(o.type==="labelImage"){r=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return u;function u(o){if(!r||!r._balanced)return t(o);let s=M(i.sliceSerialize({start:r.end,end:i.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?t(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),n(o))}}function Hn(e,n){let t=e.length,i;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){i=e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";let l={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;let r={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},r.start),end:Object.assign({},r.end)},o=[e[t+1],e[t+2],["enter",l,n],e[t+3],e[t+4],["enter",a,n],["exit",a,n],["enter",r,n],["enter",u,n],["exit",u,n],["exit",r,n],e[e.length-2],e[e.length-1],["exit",l,n]];return e.splice(t,e.length-t+1,...o),e}function jn(e,n,t){let i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),a=0,r;return u;function u(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),o}function o(f){return f!==94?t(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(f){if(a>999||f===93&&!r||f===null||f===91||C(f))return t(f);if(f===93){e.exit("chunkString");let p=e.exit("gfmFootnoteCallString");return l.includes(M(i.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(f)}return C(f)||(r=!0),a++,e.consume(f),f===92?m:s}function m(f){return f===91||f===92||f===93?(e.consume(f),a++,s):s(f)}}function Wn(e,n,t){let i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),a,r=0,u;return o;function o(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),s}function s(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):t(h)}function m(h){if(r>999||h===93&&!u||h===null||h===91||C(h))return t(h);if(h===93){e.exit("chunkString");let x=e.exit("gfmFootnoteDefinitionLabelString");return a=M(i.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return C(h)||(u=!0),r++,e.consume(h),h===92?f:m}function f(h){return h===91||h===92||h===93?(e.consume(h),r++,m):m(h)}function p(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),l.includes(a)||l.push(a),v(e,k,"gfmFootnoteDefinitionWhitespace")):t(h)}function k(h){return n(h)}}function qn(e,n,t){return e.check(We,n,e.attempt(On,n,t))}function $n(e){e.exit("gfmFootnoteDefinition")}function Un(e,n,t){let i=this;return v(e,l,"gfmFootnoteDefinitionIndent",5);function l(a){let r=i.events[i.events.length-1];return r&&r[1].type==="gfmFootnoteDefinitionIndent"&&r[2].sliceSerialize(r[1],!0).length===4?n(a):t(a)}}function ze(e){let t=(e||{}).singleTilde,i={name:"strikethrough",tokenize:a,resolveAll:l};return t==null&&(t=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function l(r,u){let o=-1;for(;++o<r.length;)if(r[o][0]==="enter"&&r[o][1].type==="strikethroughSequenceTemporary"&&r[o][1]._close){let s=o;for(;s--;)if(r[s][0]==="exit"&&r[s][1].type==="strikethroughSequenceTemporary"&&r[s][1]._open&&r[o][1].end.offset-r[o][1].start.offset===r[s][1].end.offset-r[s][1].start.offset){r[o][1].type="strikethroughSequence",r[s][1].type="strikethroughSequence";let m={type:"strikethrough",start:Object.assign({},r[s][1].start),end:Object.assign({},r[o][1].end)},f={type:"strikethroughText",start:Object.assign({},r[s][1].end),end:Object.assign({},r[o][1].start)},p=[["enter",m,u],["enter",r[s][1],u],["exit",r[s][1],u],["enter",f,u]],k=u.parser.constructs.insideSpan.null;k&&Q(p,p.length,0,je(k,r.slice(s+1,o),u)),Q(p,p.length,0,[["exit",f,u],["enter",r[o][1],u],["exit",r[o][1],u],["exit",m,u]]),Q(r,s-1,o-s+3,p),o=s+p.length-2;break}}for(o=-1;++o<r.length;)r[o][1].type==="strikethroughSequenceTemporary"&&(r[o][1].type="data");return r}function a(r,u,o){let s=this.previous,m=this.events,f=0;return p;function p(h){return s===126&&m[m.length-1][1].type!=="characterEscape"?o(h):(r.enter("strikethroughSequenceTemporary"),k(h))}function k(h){let x=P(s);if(h===126)return f>1?o(h):(r.consume(h),f++,k);if(f<2&&!t)return o(h);let b=r.exit("strikethroughSequenceTemporary"),g=P(h);return b._open=!g||g===2&&!!x,b._close=!x||x===2&&!!g,u(h)}}}var J=class{constructor(){this.map=[]}add(n,t,i){Vn(this,n,t,i)}consume(n){if(this.map.sort(function(a,r){return a[0]-r[0]}),this.map.length===0)return;let t=this.map.length,i=[];for(;t>0;)t-=1,i.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];i.push(n.slice()),n.length=0;let l=i.pop();for(;l;){for(let a of l)n.push(a);l=i.pop()}this.map.length=0}};function Vn(e,n,t,i){let l=0;if(!(t===0&&i.length===0)){for(;l<e.map.length;){if(e.map[l][0]===n){e.map[l][1]+=t,e.map[l][2].push(...i);return}l+=1}e.map.push([n,t,i])}}function Dt(e,n){let t=!1,i=[];for(;n<e.length;){let l=e[n];if(t){if(l[0]==="enter")l[1].type==="tableContent"&&i.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){let a=i.length-1;i[a]=i[a]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return i}function Re(){return{flow:{null:{name:"table",tokenize:Qn,resolveAll:Gn}}}}function Qn(e,n,t){let i=this,l=0,a=0,r;return u;function u(c){let j=i.events.length-1;for(;j>-1;){let Oe=i.events[j][1].type;if(Oe==="lineEnding"||Oe==="linePrefix")j--;else break}let Pe=j>-1?i.events[j][1].type:null,_e=Pe==="tableHead"||Pe==="tableRow"?y:o;return _e===y&&i.parser.lazy[i.now().line]?t(c):_e(c)}function o(c){return e.enter("tableHead"),e.enter("tableRow"),s(c)}function s(c){return c===124||(r=!0,a+=1),m(c)}function m(c){return c===null?t(c):z(c)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),k):t(c):S(c)?v(e,m,"whitespace")(c):(a+=1,r&&(r=!1,l+=1),c===124?(e.enter("tableCellDivider"),e.consume(c),e.exit("tableCellDivider"),r=!0,m):(e.enter("data"),f(c)))}function f(c){return c===null||c===124||C(c)?(e.exit("data"),m(c)):(e.consume(c),c===92?p:f)}function p(c){return c===92||c===124?(e.consume(c),f):f(c)}function k(c){return i.interrupt=!1,i.parser.lazy[i.now().line]?t(c):(e.enter("tableDelimiterRow"),r=!1,S(c)?v(e,h,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):h(c))}function h(c){return c===45||c===58?b(c):c===124?(r=!0,e.enter("tableCellDivider"),e.consume(c),e.exit("tableCellDivider"),x):A(c)}function x(c){return S(c)?v(e,b,"whitespace")(c):b(c)}function b(c){return c===58?(a+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(c),e.exit("tableDelimiterMarker"),g):c===45?(a+=1,g(c)):c===null||z(c)?F(c):A(c)}function g(c){return c===45?(e.enter("tableDelimiterFiller"),d(c)):A(c)}function d(c){return c===45?(e.consume(c),d):c===58?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(c),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(c))}function w(c){return S(c)?v(e,F,"whitespace")(c):F(c)}function F(c){return c===124?h(c):c===null||z(c)?!r||l!==a?A(c):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(c)):A(c)}function A(c){return t(c)}function y(c){return e.enter("tableRow"),$(c)}function $(c){return c===124?(e.enter("tableCellDivider"),e.consume(c),e.exit("tableCellDivider"),$):c===null||z(c)?(e.exit("tableRow"),n(c)):S(c)?v(e,$,"whitespace")(c):(e.enter("data"),U(c))}function U(c){return c===null||c===124||C(c)?(e.exit("data"),$(c)):(e.consume(c),c===92?Rt:U)}function Rt(c){return c===92||c===124?(e.consume(c),U):U(c)}}function Gn(e,n){let t=-1,i=!0,l=0,a=[0,0,0,0],r=[0,0,0,0],u=!1,o=0,s,m,f,p=new J;for(;++t<e.length;){let k=e[t],h=k[1];k[0]==="enter"?h.type==="tableHead"?(u=!1,o!==0&&(It(p,n,o,s,m),m=void 0,o=0),s={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(t,0,[["enter",s,n]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(i=!0,f=void 0,a=[0,0,0,0],r=[0,t+1,0,0],u&&(u=!1,m={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(t,0,[["enter",m,n]])),l=h.type==="tableDelimiterRow"?2:m?3:1):l&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(i=!1,r[2]===0&&(a[1]!==0&&(r[0]=r[1],f=K(p,n,a,l,void 0,f),a=[0,0,0,0]),r[2]=t)):h.type==="tableCellDivider"&&(i?i=!1:(a[1]!==0&&(r[0]=r[1],f=K(p,n,a,l,void 0,f)),a=r,r=[a[1],t,0,0])):h.type==="tableHead"?(u=!0,o=t):h.type==="tableRow"||h.type==="tableDelimiterRow"?(o=t,a[1]!==0?(r[0]=r[1],f=K(p,n,a,l,t,f)):r[1]!==0&&(f=K(p,n,r,l,t,f)),l=0):l&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(r[3]=t)}for(o!==0&&It(p,n,o,s,m),p.consume(n.events),t=-1;++t<n.events.length;){let k=n.events[t];k[0]==="enter"&&k[1].type==="table"&&(k[1]._align=Dt(n.events,t))}return e}function K(e,n,t,i,l,a){let r=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",u="tableContent";t[0]!==0&&(a.end=Object.assign({},H(n.events,t[0])),e.add(t[0],0,[["exit",a,n]]));let o=H(n.events,t[1]);if(a={type:r,start:Object.assign({},o),end:Object.assign({},o)},e.add(t[1],0,[["enter",a,n]]),t[2]!==0){let s=H(n.events,t[2]),m=H(n.events,t[3]),f={type:u,start:Object.assign({},s),end:Object.assign({},m)};if(e.add(t[2],0,[["enter",f,n]]),i!==2){let p=n.events[t[2]],k=n.events[t[3]];if(p[1].end=Object.assign({},k[1].end),p[1].type="chunkText",p[1].contentType="text",t[3]>t[2]+1){let h=t[2]+1,x=t[3]-t[2]-1;e.add(h,x,[])}}e.add(t[3]+1,0,[["exit",f,n]])}return l!==void 0&&(a.end=Object.assign({},H(n.events,l)),e.add(l,0,[["exit",a,n]]),a=void 0),a}function It(e,n,t,i,l){let a=[],r=H(n.events,t);l&&(l.end=Object.assign({},r),a.push(["exit",l,n])),i.end=Object.assign({},r),a.push(["exit",i,n]),e.add(t+1,0,a)}function H(e,n){let t=e[n],i=t[0]==="enter"?"start":"end";return t[1][i]}var Nn={name:"tasklistCheck",tokenize:Zn};function Ee(){return{text:{91:Nn}}}function Zn(e,n,t){let i=this;return l;function l(o){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?t(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return C(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),r):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),r):t(o)}function r(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):t(o)}function u(o){return z(o)?n(o):S(o)?e.check({tokenize:Jn},n,t)(o):t(o)}}function Jn(e,n,t){return v(e,i,"whitespace");function i(l){return l===null?t(l):n(l)}}function Mt(e){return Be([De(),Me(),ze(e),Re(),Ee()])}var Kn={};function zt(e){let n=this,t=e||Kn,i=n.data(),l=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),r=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);l.push(Mt(t)),a.push(Te()),r.push(Le(t))}export{ee as a,zt as b};