@likec4/core 1.47.0 → 1.49.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 (152) hide show
  1. package/LICENSE +1 -1
  2. package/dist/THIRD-PARTY-LICENSES.md +1012 -0
  3. package/dist/_chunks/Builder.view-element.mjs +2 -0
  4. package/dist/_chunks/LikeC4Model.d.mts +1283 -0
  5. package/dist/_chunks/RichText.mjs +1 -0
  6. package/dist/_chunks/_types.d.mts +777 -0
  7. package/dist/_chunks/_types2.d.mts +36 -0
  8. package/dist/_chunks/assignTagColors.mjs +1 -0
  9. package/dist/_chunks/calcDriftsFromSnapshot.mjs +1 -0
  10. package/dist/_chunks/guards.d.mts +2026 -0
  11. package/dist/_chunks/guards.mjs +4 -0
  12. package/dist/_chunks/index.d.mts +288 -0
  13. package/dist/_chunks/libs/@mantine/colors-generator.mjs +15 -0
  14. package/dist/_chunks/libs/@radix-ui/colors.mjs +1 -0
  15. package/dist/_chunks/libs/@ungap/structured-clone.mjs +1 -0
  16. package/dist/_chunks/libs/bail.mjs +1 -0
  17. package/dist/_chunks/libs/ccount.mjs +1 -0
  18. package/dist/_chunks/libs/character-entities-html4.mjs +1 -0
  19. package/dist/_chunks/libs/character-entities-legacy.mjs +1 -0
  20. package/dist/_chunks/libs/character-entities.mjs +2 -0
  21. package/dist/_chunks/libs/comma-separated-tokens.mjs +1 -0
  22. package/dist/_chunks/libs/decode-named-character-reference.mjs +1 -0
  23. package/dist/_chunks/libs/defu.mjs +1 -0
  24. package/dist/_chunks/libs/devlop.mjs +1 -0
  25. package/dist/_chunks/libs/escape-string-regexp.mjs +1 -0
  26. package/dist/_chunks/libs/extend.mjs +1 -0
  27. package/dist/_chunks/libs/graphology-dag.mjs +1 -0
  28. package/dist/_chunks/libs/graphology.mjs +1 -0
  29. package/dist/_chunks/libs/hast-util-sanitize.mjs +1 -0
  30. package/dist/_chunks/libs/hast-util-to-html.mjs +9 -0
  31. package/dist/_chunks/libs/is-plain-obj.mjs +1 -0
  32. package/dist/_chunks/libs/longest-streak.mjs +1 -0
  33. package/dist/_chunks/libs/markdown-table.mjs +2 -0
  34. package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +1 -0
  35. package/dist/_chunks/libs/mdast-util-from-markdown.mjs +3 -0
  36. package/dist/_chunks/libs/mdast-util-gfm.mjs +15 -0
  37. package/dist/_chunks/libs/mdast-util-to-hast.mjs +11 -0
  38. package/dist/_chunks/libs/micromark-extension-gfm.mjs +1 -0
  39. package/dist/_chunks/libs/mnemonist.d.mts +164 -0
  40. package/dist/_chunks/libs/mnemonist.mjs +1 -0
  41. package/dist/_chunks/libs/natural-compare-lite.mjs +9 -0
  42. package/dist/_chunks/libs/ohash.mjs +1 -0
  43. package/dist/_chunks/libs/rehype-sanitize.mjs +1 -0
  44. package/dist/_chunks/libs/rehype-stringify.mjs +1 -0
  45. package/dist/_chunks/libs/remark-gfm.mjs +1 -0
  46. package/dist/_chunks/libs/remark-github-blockquote-alert.mjs +3 -0
  47. package/dist/_chunks/libs/remark-parse.mjs +1 -0
  48. package/dist/_chunks/libs/remark-rehype.mjs +1 -0
  49. package/dist/_chunks/libs/remeda.mjs +1 -0
  50. package/dist/_chunks/libs/trough.mjs +1 -0
  51. package/dist/_chunks/libs/unified.mjs +1 -0
  52. package/dist/_chunks/rolldown-runtime.mjs +1 -0
  53. package/dist/_chunks/theme.d.mts +148 -0
  54. package/dist/_chunks/to-text.d.mts +404 -0
  55. package/dist/_chunks/to-text.mjs +1 -0
  56. package/dist/_chunks/vector.d.mts +198 -0
  57. package/dist/_chunks/vector.mjs +1 -0
  58. package/dist/builder/index.d.mts +5 -775
  59. package/dist/builder/index.mjs +1 -1053
  60. package/dist/compute-view/index.d.mts +156 -56
  61. package/dist/compute-view/index.mjs +2 -229
  62. package/dist/geometry/index.d.mts +2 -109
  63. package/dist/geometry/index.mjs +1 -328
  64. package/dist/index.d.mts +14 -20
  65. package/dist/index.mjs +1 -18
  66. package/dist/model/index.d.mts +5 -57
  67. package/dist/model/index.mjs +1 -4
  68. package/dist/styles/index.d.mts +3 -117
  69. package/dist/styles/index.mjs +1 -63
  70. package/dist/types/index.d.mts +3 -47
  71. package/dist/types/index.mjs +1 -17
  72. package/dist/utils/graphology/index.d.mts +2 -1864
  73. package/dist/utils/graphology/index.mjs +1 -1
  74. package/dist/utils/index.d.mts +4 -124
  75. package/dist/utils/index.mjs +1 -44
  76. package/package.json +20 -24
  77. package/compute-view/relationships/package.json +0 -4
  78. package/dist/compute-view/relationships-view/index.d.mts +0 -51
  79. package/dist/compute-view/relationships-view/index.mjs +0 -185
  80. package/dist/model/connection/deployment/index.d.mts +0 -15
  81. package/dist/model/connection/deployment/index.mjs +0 -2
  82. package/dist/model/connection/index.d.mts +0 -75
  83. package/dist/model/connection/index.mjs +0 -3
  84. package/dist/model/connection/model/index.d.mts +0 -15
  85. package/dist/model/connection/model/index.mjs +0 -2
  86. package/dist/shared/core.3ZhnKAlZ.mjs +0 -106
  87. package/dist/shared/core.78IWAHAE.mjs +0 -332
  88. package/dist/shared/core.B85MJLTf.mjs +0 -5
  89. package/dist/shared/core.BFd1lU9R.mjs +0 -29
  90. package/dist/shared/core.BKlholso.mjs +0 -3
  91. package/dist/shared/core.BNN-3vPH.mjs +0 -1255
  92. package/dist/shared/core.BPGOjone.d.mts +0 -46
  93. package/dist/shared/core.BP_QHEXs.mjs +0 -785
  94. package/dist/shared/core.BbE4y-yl.mjs +0 -177
  95. package/dist/shared/core.Bdy3hhTc.mjs +0 -28382
  96. package/dist/shared/core.BfCKSW-g.d.mts +0 -1266
  97. package/dist/shared/core.BhNcrwzK.mjs +0 -7
  98. package/dist/shared/core.BkVA6gjl.mjs +0 -5
  99. package/dist/shared/core.BoYfZOBm.mjs +0 -3
  100. package/dist/shared/core.BsSXS-_R.mjs +0 -7
  101. package/dist/shared/core.C3JowhaZ.mjs +0 -32
  102. package/dist/shared/core.C4x8aaWa.mjs +0 -27
  103. package/dist/shared/core.CAgYpDtM.d.mts +0 -98
  104. package/dist/shared/core.CHf8VEa3.mjs +0 -1206
  105. package/dist/shared/core.CLSZtnFh.mjs +0 -69
  106. package/dist/shared/core.C_3y3eqV.d.mts +0 -139
  107. package/dist/shared/core.CbT8JVYL.mjs +0 -5
  108. package/dist/shared/core.CdNCAwq7.mjs +0 -176
  109. package/dist/shared/core.CmGY9blO.mjs +0 -6717
  110. package/dist/shared/core.CmPXpJ8l.mjs +0 -21
  111. package/dist/shared/core.Coi_LOUZ.mjs +0 -7
  112. package/dist/shared/core.CqAJJpK_.mjs +0 -3
  113. package/dist/shared/core.CywrQs86.d.mts +0 -31
  114. package/dist/shared/core.D00YbOhQ.d.mts +0 -300
  115. package/dist/shared/core.D0WZutNd.mjs +0 -94
  116. package/dist/shared/core.D4npX2q8.mjs +0 -18
  117. package/dist/shared/core.DB0Ue5Wx.d.mts +0 -70
  118. package/dist/shared/core.DC5IAaDT.d.mts +0 -334
  119. package/dist/shared/core.DE9qzhn8.d.mts +0 -83
  120. package/dist/shared/core.DGcIbsj4.mjs +0 -3946
  121. package/dist/shared/core.DH7TXqXf.mjs +0 -136
  122. package/dist/shared/core.DKhRkHRN.d.mts +0 -41
  123. package/dist/shared/core.DRJma0Ol.mjs +0 -22
  124. package/dist/shared/core.DU5SRqNF.mjs +0 -2209
  125. package/dist/shared/core.DXhDWKFZ.d.mts +0 -3
  126. package/dist/shared/core.DbfO90vF.mjs +0 -434
  127. package/dist/shared/core.DcS-0zys.mjs +0 -10
  128. package/dist/shared/core.Dh119QSP.mjs +0 -4995
  129. package/dist/shared/core.DjcWextK.mjs +0 -1371
  130. package/dist/shared/core.Dojz4bvg.d.mts +0 -504
  131. package/dist/shared/core.FZ305VYd.mjs +0 -21
  132. package/dist/shared/core.OtRNdMxy.d.mts +0 -352
  133. package/dist/shared/core.RfnaEmgA.mjs +0 -7
  134. package/dist/shared/core.btEq3i3f.mjs +0 -300
  135. package/dist/shared/core.oSV6SRfk.mjs +0 -13
  136. package/dist/shared/core.om36dXXW.mjs +0 -41
  137. package/dist/shared/core.osFs8tU7.d.mts +0 -466
  138. package/dist/shared/core.q10OP9oJ.mjs +0 -5
  139. package/dist/shared/core.tpvDGvdC.d.mts +0 -87
  140. package/dist/shared/core.uFk_o9X6.mjs +0 -13
  141. package/dist/types/_aux.d.mts +0 -4
  142. package/dist/types/_aux.mjs +0 -8
  143. package/dist/types/expression-model.d.mts +0 -190
  144. package/dist/types/expression-model.mjs +0 -109
  145. package/dist/types/expression.d.mts +0 -6
  146. package/dist/types/expression.mjs +0 -113
  147. package/dist/types/fqnRef.d.mts +0 -60
  148. package/dist/types/fqnRef.mjs +0 -45
  149. package/dist/types/scalar.d.mts +0 -2
  150. package/dist/types/scalar.mjs +0 -4
  151. package/dist/utils/iterable/index.d.mts +0 -132
  152. package/dist/utils/iterable/index.mjs +0 -62
@@ -0,0 +1,15 @@
1
+ import{t as ccount}from"./ccount.mjs";import{t as ok}from"./devlop.mjs";import{_ as unicodePunctuation,c as toString,l as classifyCharacter,u as normalizeIdentifier,v as unicodeWhitespace}from"./mdast-util-from-markdown.mjs";import{i as convert,n as EXIT,r as visitParents,t as findAndReplace}from"./mdast-util-find-and-replace.mjs";import{t as markdownTable}from"./markdown-table.mjs";import{t as longestStreak}from"./longest-streak.mjs";const inConstruct=`phrasing`,notInConstruct=[`autolink`,`link`,`image`,`label`];function gfmAutolinkLiteralFromMarkdown(){return{transforms:[transformGfmAutolinkLiterals],enter:{literalAutolink:enterLiteralAutolink,literalAutolinkEmail:enterLiteralAutolinkValue,literalAutolinkHttp:enterLiteralAutolinkValue,literalAutolinkWww:enterLiteralAutolinkValue},exit:{literalAutolink:exitLiteralAutolink,literalAutolinkEmail:exitLiteralAutolinkEmail,literalAutolinkHttp:exitLiteralAutolinkHttp,literalAutolinkWww:exitLiteralAutolinkWww}}}function gfmAutolinkLiteralToMarkdown(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct,notInConstruct},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct,notInConstruct},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct,notInConstruct}]}}function enterLiteralAutolink(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function enterLiteralAutolinkValue(e){this.config.enter.autolinkProtocol.call(this,e)}function exitLiteralAutolinkHttp(e){this.config.exit.autolinkProtocol.call(this,e)}function exitLiteralAutolinkWww(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 exitLiteralAutolinkEmail(e){this.config.exit.autolinkEmail.call(this,e)}function exitLiteralAutolink(e){this.exit(e)}function transformGfmAutolinkLiterals(e){findAndReplace(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,findUrl],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,findEmail]],{ignore:[`link`,`linkReference`]})}function findUrl(e,t,n,r,i){let a=``;if(!previous(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!isCorrectDomain(n)))return!1;let o=splitUrl(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 findEmail(e,t,n,r){return!previous(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function isCorrectDomain(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 splitUrl(t){let n=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!n)return[t,void 0];t=t.slice(0,n.index);let r=n[0],i=r.indexOf(`)`),a=ccount(t,`(`),o=ccount(t,`)`);for(;i!==-1&&a>o;)t+=r.slice(0,i+1),r=r.slice(i+1),i=r.indexOf(`)`),o++;return[t,r]}function previous(e,t){let r=e.input.charCodeAt(e.index-1);return(e.index===0||unicodeWhitespace(r)||unicodePunctuation(r))&&(!t||r!==47)}footnoteReference.peek=footnoteReferencePeek;function enterFootnoteCallString(){this.buffer()}function enterFootnoteCall(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function enterFootnoteDefinitionLabelString(){this.buffer()}function enterFootnoteDefinition(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function exitFootnoteCallString(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=normalizeIdentifier(this.sliceSerialize(e)).toLowerCase(),n.label=t}function exitFootnoteCall(e){this.exit(e)}function exitFootnoteDefinitionLabelString(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=normalizeIdentifier(this.sliceSerialize(e)).toLowerCase(),n.label=t}function exitFootnoteDefinition(e){this.exit(e)}function footnoteReferencePeek(){return`[`}function footnoteReference(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 gfmFootnoteFromMarkdown(){return{enter:{gfmFootnoteCallString:enterFootnoteCallString,gfmFootnoteCall:enterFootnoteCall,gfmFootnoteDefinitionLabelString:enterFootnoteDefinitionLabelString,gfmFootnoteDefinition:enterFootnoteDefinition},exit:{gfmFootnoteCallString:exitFootnoteCallString,gfmFootnoteCall:exitFootnoteCall,gfmFootnoteDefinitionLabelString:exitFootnoteDefinitionLabelString,gfmFootnoteDefinition:exitFootnoteDefinition}}}function gfmFootnoteToMarkdown(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference},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?`
2
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?mapAll:mapExceptFirst))),s(),o}}function mapExceptFirst(e,t,n){return t===0?e:mapAll(e,t,n)}function mapAll(e,t,n){return(n?``:` `)+e}const constructsWithoutStrikethrough=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];handleDelete.peek=peekDelete;function gfmStrikethroughFromMarkdown(){return{canContainEols:[`delete`],enter:{strikethrough:enterStrikethrough},exit:{strikethrough:exitStrikethrough}}}function gfmStrikethroughToMarkdown(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:constructsWithoutStrikethrough}],handlers:{delete:handleDelete}}}function enterStrikethrough(e){this.enter({type:`delete`,children:[]},e)}function exitStrikethrough(e){this.exit(e)}function handleDelete(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 peekDelete(){return`~`}function blockquote(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()),map$1);return i(),o}function map$1(e,t,n){return`>`+(n?``:` `)+e}function patternInScope(e,t){return listInScope(e,t.inConstruct,!0)&&!listInScope(e,t.notInConstruct,!1)}function listInScope(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 hardBreak(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
3
+ `&&patternInScope(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
4
+ `}function formatCodeAsIndented(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 checkFence(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function code(e,t,n,r){let i=checkFence(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(formatCodeAsIndented(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,map);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(longestStreak(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:`
5
+ `,encode:["`"],...s.current()})),t()}return u+=s.move(`
6
+ `),a&&(u+=s.move(a+`
7
+ `)),u+=s.move(c),l(),u}function map(e,t,n){return(n?``:` `)+e}function checkQuote(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function definition(e,t,n,r){let i=checkQuote(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?` `:`
8
+ `,...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 checkEmphasis(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function encodeCharacterReference(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function encodeInfo(e,t,n){let r=classifyCharacter(e),a=classifyCharacter(t);return r===void 0?a===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}emphasis.peek=emphasisPeek;function emphasis(e,t,n,r){let i=checkEmphasis(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=encodeInfo(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=encodeCharacterReference(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=encodeInfo(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+encodeCharacterReference(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function emphasisPeek(e,t,n){return n.options.emphasis||`*`}function visit(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),visitParents(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)}}function formatHeadingAsSetext(e,t){let n=!1;return visit(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,EXIT}),!!((!e.depth||e.depth<3)&&toString(e)&&(t.options.setext||n))}function heading(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(formatHeadingAsSetext(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
9
+ `,after:`
10
+ `});return r(),t(),o+`
11
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
12
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
13
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=encodeCharacterReference(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}html.peek=htmlPeek;function html(e){return e.value||``}function htmlPeek(){return`<`}image.peek=imagePeek;function image(e,t,n,r){let i=checkQuote(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 imagePeek(){return`!`}imageReference.peek=imageReferencePeek;function imageReference(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 imageReferencePeek(){return`!`}inlineCode.peek=inlineCodePeek;function inlineCode(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 inlineCodePeek(){return"`"}function formatLinkAsAutolink(e,t){let n=toString(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))}link.peek=linkPeek;function link(e,t,n,r){let i=checkQuote(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(formatLinkAsAutolink(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 linkPeek(e,t,n){return formatLinkAsAutolink(e,n)?`<`:`[`}linkReference.peek=linkReferencePeek;function linkReference(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 linkReferencePeek(){return`[`}function checkBullet(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 checkBulletOther(e){let t=checkBullet(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 checkBulletOrdered(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function checkRule(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 list(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?checkBulletOrdered(n):checkBullet(n),s=e.ordered?o===`.`?`)`:`.`:checkBulletOther(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),checkRule(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 checkListItemIndent(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 listItem(e,t,n,r){let i=checkListItemIndent(n),a=n.bulletCurrent||checkBullet(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 paragraph(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}const phrasing=convert([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function root(e,t,n,r){return(e.children.some(function(e){return phrasing(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function checkStrong(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}strong.peek=strongPeek;function strong(e,t,n,r){let i=checkStrong(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=encodeInfo(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=encodeCharacterReference(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=encodeInfo(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+encodeCharacterReference(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function strongPeek(e,t,n){return n.options.strong||`*`}function text(e,t,n,r){return n.safe(e.value,r)}function checkRuleRepetition(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 thematicBreak(e,t,n){let r=(checkRule(n)+(n.options.ruleSpaces?` `:``)).repeat(checkRuleRepetition(n));return n.options.ruleSpaces?r.slice(0,-1):r}const handle={blockquote,break:hardBreak,code,definition,emphasis,hardBreak,heading,html,image,imageReference,inlineCode,link,linkReference,list,listItem,paragraph,root,strong,text,thematicBreak};function gfmTableFromMarkdown(){return{enter:{table:enterTable,tableData:enterCell,tableHeader:enterCell,tableRow:enterRow},exit:{codeText:exitCodeText,table:exitTable,tableData:exit,tableHeader:exit,tableRow:exit}}}function enterTable(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 exitTable(e){this.exit(e),this.data.inTable=void 0}function enterRow(e){this.enter({type:`tableRow`,children:[]},e)}function exit(e){this.exit(e)}function enterCell(e){this.enter({type:`tableCell`,children:[]},e)}function exitCodeText(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,replace));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function replace(e,t){return t===`|`?t:e}function gfmTableToMarkdown(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
14
+ `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:p,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([f(e,n,r)]);return i.slice(0,i.indexOf(`
15
+ `))}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 markdownTable(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]=f(r[i],t,n);return o(),a}function f(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 p(e,t,n){let r=handle.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function gfmTaskListItemFromMarkdown(){return{exit:{taskListCheckValueChecked:exitCheck,taskListCheckValueUnchecked:exitCheck,paragraph:exitParagraphWithTaskListItem}}}function gfmTaskListItemToMarkdown(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:listItemWithTaskListItem}}}function exitCheck(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function exitParagraphWithTaskListItem(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 listItemWithTaskListItem(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=handle.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 gfmFromMarkdown(){return[gfmAutolinkLiteralFromMarkdown(),gfmFootnoteFromMarkdown(),gfmStrikethroughFromMarkdown(),gfmTableFromMarkdown(),gfmTaskListItemFromMarkdown()]}function gfmToMarkdown(e){return{extensions:[gfmAutolinkLiteralToMarkdown(),gfmFootnoteToMarkdown(e),gfmStrikethroughToMarkdown(),gfmTableToMarkdown(e),gfmTaskListItemToMarkdown()]}}export{gfmToMarkdown as n,visit as r,gfmFromMarkdown as t};
@@ -0,0 +1,11 @@
1
+ import{t as esm_default}from"./@ungap/structured-clone.mjs";import{a as position,i as pointStart,r as pointEnd}from"./hast-util-sanitize.mjs";import{t as ok}from"./devlop.mjs";import{f as asciiAlphanumeric}from"./mdast-util-from-markdown.mjs";import{r as visit}from"./mdast-util-gfm.mjs";function normalizeUri(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let o=e.charCodeAt(n),s=``;if(o===37&&asciiAlphanumeric(e.charCodeAt(n+1))&&asciiAlphanumeric(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){let t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(s=String.fromCharCode(o,t),i=1):s=`�`}else s=String.fromCharCode(o);s&&=(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function blockquote(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 hardBreak(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
2
+ `}]}function code(e,t){let n=t.value?t.value+`
3
+ `:``,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 strikethrough(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function emphasis(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function footnoteReference(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=normalizeUri(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,c+=1,e.footnoteCounts.set(r,c);let l={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(c>1?`-`+c:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,l);let u={type:`element`,tagName:`sup`,properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function heading(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 html(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function revert(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 imageReference(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return revert(e,t);let i={src:normalizeUri(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 image(e,t){let n={src:normalizeUri(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 inlineCode(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 linkReference(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return revert(e,t);let i={href:normalizeUri(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 link(e,t){let n={href:normalizeUri(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 listItem(e,t,n){let r=e.all(t),i=n?listLoose(n):listItemLoose(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:`
4
+ `}),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:`
5
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function listLoose(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=listItemLoose(n[r])}return t}function listItemLoose(e){return e.spread??e.children.length>1}function list(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 paragraph(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function root(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function strong(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function table(e,t){let i=e.all(t),a=i.shift(),o=[];if(a){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],n),o.push(n)}if(i.length>0){let a={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(i,!0)},s=pointStart(t.children[1]),c=pointEnd(t.children[t.children.length-1]);s&&c&&(a.position={start:s,end:c}),o.push(a)}let s={type:`element`,tagName:`table`,properties:{},children:e.wrap(o,!0)};return e.patch(t,s),e.applyData(t,s)}function tableRow(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 tableCell(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function trimLines(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(trimLine(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(trimLine(t.slice(i),i>0,!1)),a.join(``)}function trimLine(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===9||t===32;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===9||t===32;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function text(e,t){let n={type:`text`,value:trimLines(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function thematicBreak(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const handlers={blockquote,break:hardBreak,code,delete:strikethrough,emphasis,footnoteReference,heading,html,imageReference,image,inlineCode,linkReference,link,listItem,list,paragraph,root,strong,table,tableCell,tableRow,text,thematicBreak,toml:ignore,yaml:ignore,definition:ignore,footnoteDefinition:ignore};function ignore(){}function defaultFootnoteBackContent(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 defaultFootnoteBackLabel(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function footer(t){let n=typeof t.options.clobberPrefix==`string`?t.options.clobberPrefix:`user-content-`,r=t.options.footnoteBackContent||defaultFootnoteBackContent,i=t.options.footnoteBackLabel||defaultFootnoteBackLabel,a=t.options.footnoteLabel||`Footnotes`,o=t.options.footnoteLabelTagName||`h2`,c=t.options.footnoteLabelProperties||{className:[`sr-only`]},l=[],u=-1;for(;++u<t.footnoteOrder.length;){let e=t.footnoteById.get(t.footnoteOrder[u]);if(!e)continue;let a=t.all(e),o=String(e.identifier).toUpperCase(),c=normalizeUri(o.toLowerCase()),d=0,f=[],p=t.footnoteCounts.get(o);for(;p!==void 0&&++d<=p;){f.length>0&&f.push({type:`text`,value:` `});let e=typeof r==`string`?r:r(u,d);typeof e==`string`&&(e={type:`text`,value:e}),f.push({type:`element`,tagName:`a`,properties:{href:`#`+n+`fnref-`+c+(d>1?`-`+d:``),dataFootnoteBackref:``,ariaLabel:typeof i==`string`?i:i(u,d),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let m=a[a.length-1];if(m&&m.type===`element`&&m.tagName===`p`){let e=m.children[m.children.length-1];e&&e.type===`text`?e.value+=` `:m.children.push({type:`text`,value:` `}),m.children.push(...f)}else a.push(...f);let h={type:`element`,tagName:`li`,properties:{id:n+`fn-`+c},children:t.wrap(a,!0)};t.patch(e,h),l.push(h)}if(l.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:o,properties:{...esm_default(c),id:`footnote-label`},children:[{type:`text`,value:a}]},{type:`text`,value:`
6
+ `},{type:`element`,tagName:`ol`,properties:{},children:t.wrap(l,!0)},{type:`text`,value:`
7
+ `}]}}const own={}.hasOwnProperty,emptyOptions={};function createState(t,n){let r=n||emptyOptions,i=new Map,a=new Map,s={all:l,applyData,definitionById:i,footnoteById:a,footnoteCounts:new Map,footnoteOrder:[],handlers:{...handlers,...r.handlers},one:c,options:r,patch,wrap};return visit(t,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?i:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),s;function c(t,n){let r=t.type,i=s.handlers[r];if(own.call(s.handlers,r)&&i)return i(s,t,n);if(s.options.passThrough&&s.options.passThrough.includes(r)){if(`children`in t){let{children:n,...r}=t,i=esm_default(r);return i.children=s.all(t),i}return esm_default(t)}return(s.options.unknownHandler||defaultUnknownHandler)(s,t,n)}function l(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=s.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=trimMarkdownSpaceStart(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=trimMarkdownSpaceStart(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function patch(e,n){e.position&&(n.position=position(e))}function applyData(t,n){let r=n;if(t&&t.data){let n=t.data.hName,i=t.data.hChildren,a=t.data.hProperties;typeof n==`string`&&(r.type===`element`?r.tagName=n:r={type:`element`,tagName:n,properties:{},children:`children`in r?r.children:[r]}),r.type===`element`&&a&&Object.assign(r.properties,esm_default(a)),`children`in r&&r.children&&i!=null&&(r.children=i)}return r}function defaultUnknownHandler(e,t){let n=t.data||{},r=`value`in t&&!(own.call(n,`hProperties`)||own.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 wrap(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
8
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
9
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
10
+ `}),n}function trimMarkdownSpaceStart(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function toHast(e,t){let n=createState(e,t),r=n.one(e,void 0),i=footer(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
11
+ `},i)),a}export{toHast as t};
@@ -0,0 +1 @@
1
+ import{_ as unicodePunctuation,a as resolveAll,d as asciiAlpha,f as asciiAlphanumeric,g as markdownSpace,h as markdownLineEndingOrSpace,i as factorySpace,l as classifyCharacter,m as markdownLineEnding,o as combineExtensions,p as asciiControl,r as blankLine,s as splice,u as normalizeIdentifier,v as unicodeWhitespace}from"./mdast-util-from-markdown.mjs";const wwwPrefix={tokenize:tokenizeWwwPrefix,partial:!0},domain={tokenize:tokenizeDomain,partial:!0},path={tokenize:tokenizePath,partial:!0},trail={tokenize:tokenizeTrail,partial:!0},emailDomainDotTrail={tokenize:tokenizeEmailDomainDotTrail,partial:!0},wwwAutolink={name:`wwwAutolink`,tokenize:tokenizeWwwAutolink,previous:previousWww},protocolAutolink={name:`protocolAutolink`,tokenize:tokenizeProtocolAutolink,previous:previousProtocol},emailAutolink={name:`emailAutolink`,tokenize:tokenizeEmailAutolink,previous:previousEmail},text={};function gfmAutolinkLiteral(){return{text}}let code=48;for(;code<123;)text[code]=emailAutolink,code++,code===58?code=65:code===91&&(code=97);text[43]=emailAutolink,text[45]=emailAutolink,text[46]=emailAutolink,text[95]=emailAutolink,text[72]=[emailAutolink,protocolAutolink],text[104]=[emailAutolink,protocolAutolink],text[87]=[emailAutolink,wwwAutolink],text[119]=[emailAutolink,wwwAutolink];function tokenizeEmailAutolink(e,t,i){let a=this,o,s;return c;function c(t){return!gfmAtext(t)||!previousEmail.call(a,a.previous)||previousUnbalanced(a.events)?i(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),l(t))}function l(t){return gfmAtext(t)?(e.consume(t),l):t===64?(e.consume(t),u):i(t)}function u(t){return t===46?e.check(emailDomainDotTrail,f,d)(t):t===45||t===95||asciiAlphanumeric(t)?(s=!0,e.consume(t),u):f(t)}function d(t){return e.consume(t),o=!0,u}function f(r){return s&&o&&asciiAlpha(a.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(r)):i(r)}}function tokenizeWwwAutolink(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!previousWww.call(r,r.previous)||previousUnbalanced(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(wwwPrefix,e.attempt(domain,e.attempt(path,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function tokenizeProtocolAutolink(t,r,i){let o=this,s=``,c=!1;return l;function l(e){return(e===72||e===104)&&previousProtocol.call(o,o.previous)&&!previousUnbalanced(o.events)?(t.enter(`literalAutolink`),t.enter(`literalAutolinkHttp`),s+=String.fromCodePoint(e),t.consume(e),d):i(e)}function d(e){if(asciiAlpha(e)&&s.length<5)return s+=String.fromCodePoint(e),t.consume(e),d;if(e===58){let n=s.toLowerCase();if(n===`http`||n===`https`)return t.consume(e),f}return i(e)}function f(e){return e===47?(t.consume(e),c?p:(c=!0,f)):i(e)}function p(n){return n===null||asciiControl(n)||markdownLineEndingOrSpace(n)||unicodeWhitespace(n)||unicodePunctuation(n)?i(n):t.attempt(domain,t.attempt(path,h),i)(n)}function h(e){return t.exit(`literalAutolinkHttp`),t.exit(`literalAutolink`),r(e)}}function tokenizeWwwPrefix(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 tokenizeDomain(t,n,r){let i,o,s;return c;function c(n){return n===46||n===95?t.check(trail,u,l)(n):n===null||markdownLineEndingOrSpace(n)||unicodeWhitespace(n)||n!==45&&unicodePunctuation(n)?u(n):(s=!0,t.consume(n),c)}function l(e){return e===95?i=!0:(o=i,i=void 0),t.consume(e),c}function u(e){return o||i||!s?r(e):n(e)}}function tokenizePath(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(trail,t,o)(s):s===null||markdownLineEndingOrSpace(s)||unicodeWhitespace(s)?t(s):(e.consume(s),i)}function o(t){return t===41&&r++,e.consume(t),i}}function tokenizeTrail(e,t,r){return i;function i(n){return n===33||n===34||n===39||n===41||n===42||n===44||n===46||n===58||n===59||n===63||n===95||n===126?(e.consume(n),i):n===38?(e.consume(n),s):n===93?(e.consume(n),o):n===60||n===null||markdownLineEndingOrSpace(n)||unicodeWhitespace(n)?t(n):r(n)}function o(e){return e===null||e===40||e===91||markdownLineEndingOrSpace(e)||unicodeWhitespace(e)?t(e):i(e)}function s(e){return asciiAlpha(e)?c(e):r(e)}function c(t){return t===59?(e.consume(t),i):asciiAlpha(t)?(e.consume(t),c):r(t)}}function tokenizeEmailDomainDotTrail(e,t,n){return i;function i(t){return e.consume(t),a}function a(e){return asciiAlphanumeric(e)?n(e):t(e)}}function previousWww(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||markdownLineEndingOrSpace(e)}function previousProtocol(e){return!asciiAlpha(e)}function previousEmail(e){return!(e===47||gfmAtext(e))}function gfmAtext(e){return e===43||e===45||e===46||e===95||asciiAlphanumeric(e)}function previousUnbalanced(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}const indent={tokenize:tokenizeIndent,partial:!0};function gfmFootnote(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:tokenizeDefinitionStart,continuation:{tokenize:tokenizeDefinitionContinuation},exit:gfmFootnoteDefinitionEnd}},text:{91:{name:`gfmFootnoteCall`,tokenize:tokenizeGfmFootnoteCall},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:tokenizePotentialGfmFootnoteCall,resolveTo:resolveToPotentialGfmFootnoteCall}}}}function tokenizePotentialGfmFootnoteCall(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=normalizeIdentifier(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 resolveToPotentialGfmFootnoteCall(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 tokenizeGfmFootnoteCall(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o=0,s;return c;function c(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(c){if(o>999||c===93&&!s||c===null||c===91||markdownLineEndingOrSpace(c))return n(c);if(c===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(normalizeIdentifier(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(c),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(c)}return markdownLineEndingOrSpace(c)||(s=!0),o++,e.consume(c),c===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}}function tokenizeDefinitionStart(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),s,c=0,l;return u;function u(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),d}function d(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,f):n(t)}function f(t){if(c>999||t===93&&!l||t===null||t===91||markdownLineEndingOrSpace(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return s=normalizeIdentifier(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),h}return markdownLineEndingOrSpace(t)||(l=!0),c++,e.consume(t),t===92?m:f}function m(t){return t===91||t===92||t===93?(e.consume(t),c++,f):f(t)}function h(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(s)||i.push(s),factorySpace(e,g,`gfmFootnoteDefinitionWhitespace`)):n(t)}function g(e){return t(e)}}function tokenizeDefinitionContinuation(e,t,n){return e.check(blankLine,t,e.attempt(indent,t,n))}function gfmFootnoteDefinitionEnd(e){e.exit(`gfmFootnoteDefinition`)}function tokenizeIndent(e,t,n){let r=this;return factorySpace(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 gfmStrikethrough(e){let n=(e||{}).singleTilde,r={name:`strikethrough`,tokenize:a,resolveAll:i};return n??=!0,{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(e,n){let r=-1;for(;++r<e.length;)if(e[r][0]===`enter`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._close){let i=r;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`strikethroughSequenceTemporary`&&e[i][1]._open&&e[r][1].end.offset-e[r][1].start.offset===e[i][1].end.offset-e[i][1].start.offset){e[r][1].type=`strikethroughSequence`,e[i][1].type=`strikethroughSequence`;let a={type:`strikethrough`,start:Object.assign({},e[i][1].start),end:Object.assign({},e[r][1].end)},o={type:`strikethroughText`,start:Object.assign({},e[i][1].end),end:Object.assign({},e[r][1].start)},s=[[`enter`,a,n],[`enter`,e[i][1],n],[`exit`,e[i][1],n],[`enter`,o,n]],c=n.parser.constructs.insideSpan.null;c&&splice(s,s.length,0,resolveAll(c,e.slice(i+1,r),n)),splice(s,s.length,0,[[`exit`,o,n],[`enter`,e[r][1],n],[`exit`,e[r][1],n],[`exit`,a,n]]),splice(e,i-1,r-i+3,s),r=i+s.length-2;break}}for(r=-1;++r<e.length;)e[r][1].type===`strikethroughSequenceTemporary`&&(e[r][1].type=`data`);return e}function a(e,t,r){let i=this.previous,a=this.events,o=0;return c;function c(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),l(t))}function l(a){let c=classifyCharacter(i);if(a===126)return o>1?r(a):(e.consume(a),o++,l);if(o<2&&!n)return r(a);let u=e.exit(`strikethroughSequenceTemporary`),d=classifyCharacter(a);return u._open=!d||d===2&&!!c,u._close=!c||c===2&&!!d,t(a)}}}var EditMap=class{constructor(){this.map=[]}add(e,t,n){addImplementation(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 addImplementation(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 gfmTableAlign(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 gfmTable(){return{flow:{null:{name:`table`,tokenize:tokenizeTable,resolveAll:resolveTable}}}}function tokenizeTable(e,t,n){let r=this,s=0,l=0,u;return d;function d(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`?E:f;return a===E&&r.parser.lazy[r.now().line]?n(e):a(e)}function f(t){return e.enter(`tableHead`),e.enter(`tableRow`),p(t)}function p(e){return e===124?m(e):(u=!0,l+=1,m(e))}function m(t){return t===null?n(t):markdownLineEnding(t)?l>1?(l=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_):n(t):markdownSpace(t)?factorySpace(e,m,`whitespace`)(t):(l+=1,u&&(u=!1,s+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),u=!0,m):(e.enter(`data`),h(t)))}function h(t){return t===null||t===124||markdownLineEndingOrSpace(t)?(e.exit(`data`),m(t)):(e.consume(t),t===92?g:h)}function g(t){return t===92||t===124?(e.consume(t),h):h(t)}function _(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),u=!1,markdownSpace(t)?factorySpace(e,v,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):v(t))}function v(t){return t===45||t===58?b(t):t===124?(u=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),y):T(t)}function y(t){return markdownSpace(t)?factorySpace(e,b,`whitespace`)(t):b(t)}function b(t){return t===58?(l+=1,u=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),x):t===45?(l+=1,x(t)):t===null||markdownLineEnding(t)?w(t):T(t)}function x(t){return t===45?(e.enter(`tableDelimiterFiller`),S(t)):T(t)}function S(t){return t===45?(e.consume(t),S):t===58?(u=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),C):(e.exit(`tableDelimiterFiller`),C(t))}function C(t){return markdownSpace(t)?factorySpace(e,w,`whitespace`)(t):w(t)}function w(n){return n===124?v(n):n===null||markdownLineEnding(n)?!u||s!==l?T(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):T(n)}function T(e){return n(e)}function E(t){return e.enter(`tableRow`),D(t)}function D(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),D):n===null||markdownLineEnding(n)?(e.exit(`tableRow`),t(n)):markdownSpace(n)?factorySpace(e,D,`whitespace`)(n):(e.enter(`data`),O(n))}function O(t){return t===null||t===124||markdownLineEndingOrSpace(t)?(e.exit(`data`),D(t)):(e.consume(t),t===92?k:O)}function k(t){return t===92||t===124?(e.consume(t),O):O(t)}}function resolveTable(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 EditMap;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(flushTableEnd(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=flushCell(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=flushCell(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=flushCell(f,t,o,i,n,d)):(o[0]=o[1],d=flushCell(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&flushTableEnd(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=gfmTableAlign(t.events,n))}return e}function flushCell(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},getPoint(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=getPoint(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=getPoint(t.events,n[2]),a=getPoint(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({},getPoint(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function flushTableEnd(e,t,n,r,i){let a=[],o=getPoint(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 getPoint(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}const tasklistCheck={name:`tasklistCheck`,tokenize:tokenizeTasklistCheck};function gfmTaskListItem(){return{text:{91:tasklistCheck}}}function tokenizeTasklistCheck(e,t,n){let r=this;return o;function o(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),s)}function s(t){return markdownLineEndingOrSpace(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),l):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),l):n(t)}function l(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),u):n(t)}function u(r){return markdownLineEnding(r)?t(r):markdownSpace(r)?e.check({tokenize:spaceThenNonSpace},t,n)(r):n(r)}}function spaceThenNonSpace(e,t,n){return factorySpace(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function gfm(e){return combineExtensions([gfmAutolinkLiteral(),gfmFootnote(),gfmStrikethrough(e),gfmTable(),gfmTaskListItem()])}export{gfm as t};
@@ -0,0 +1,164 @@
1
+ //#region ../../node_modules/.pnpm/mnemonist@0.40.3_patch_hash=70301b9c235e13bc146bb9528b7979c278952196d5dac8048ab3850adac8f4cf/node_modules/mnemonist/default-map.d.ts
2
+ /**
3
+ * Mnemonist DefaultMap Typings
4
+ * =============================
5
+ */
6
+ declare class DefaultMap<K, V> implements Iterable<[K, V]> {
7
+ // Members
8
+ size: number; // Constructor
9
+ constructor(factory: (key: K, index: number) => V); // Methods
10
+ clear(): void;
11
+ set(key: K, value: V): this;
12
+ delete(key: K): boolean;
13
+ has(key: K): boolean;
14
+ get(key: K): V;
15
+ peek(key: K): V | undefined;
16
+ forEach(callback: (value: V, key: K, map: this) => void, scope?: any): void;
17
+ keys(): IterableIterator<K>;
18
+ values(): IterableIterator<V>;
19
+ entries(): IterableIterator<[K, V]>;
20
+ [Symbol.iterator](): IterableIterator<[K, V]>;
21
+ inspect(): any; // Statics
22
+ static autoIncrement(): number;
23
+ }
24
+ //#endregion
25
+ //#region ../../node_modules/.pnpm/mnemonist@0.40.3_patch_hash=70301b9c235e13bc146bb9528b7979c278952196d5dac8048ab3850adac8f4cf/node_modules/mnemonist/default-weak-map.d.ts
26
+ /**
27
+ * Mnemonist DefaultWeakMap Typings
28
+ * ================================
29
+ */
30
+ declare class DefaultWeakMap<K extends object, V> {
31
+ // Constructor
32
+ constructor(factory: (key: K) => V); // Methods
33
+ clear(): void;
34
+ set(key: K, value: V): this;
35
+ delete(key: K): boolean;
36
+ has(key: K): boolean;
37
+ get(key: K): V;
38
+ peek(key: K): V | undefined;
39
+ inspect(): any;
40
+ }
41
+ //#endregion
42
+ //#region ../../node_modules/.pnpm/mnemonist@0.40.3_patch_hash=70301b9c235e13bc146bb9528b7979c278952196d5dac8048ab3850adac8f4cf/node_modules/mnemonist/linked-list.d.ts
43
+ /**
44
+ * Mnemonist LinkedList Typings
45
+ * =============================
46
+ */
47
+ declare class LinkedList<T> implements Iterable<T> {
48
+ // Members
49
+ size: number; // Constructor
50
+ constructor(); // Methods
51
+ clear(): void;
52
+ first(): T | undefined;
53
+ last(): T | undefined;
54
+ peek(): T | undefined;
55
+ push(value: T): number;
56
+ shift(): T | undefined;
57
+ unshift(value: T): number;
58
+ forEach(callback: (value: T, index: number, list: this) => void, scope?: any): void;
59
+ toArray(): Array<T>;
60
+ values(): IterableIterator<T>;
61
+ entries(): IterableIterator<[number, T]>;
62
+ [Symbol.iterator](): IterableIterator<T>;
63
+ toString(): string;
64
+ toJSON(): Array<T>;
65
+ inspect(): any; // Statics
66
+ static from<I>(iterable: Iterable<I> | {
67
+ [key: string]: I;
68
+ }): LinkedList<I>;
69
+ }
70
+ //#endregion
71
+ //#region ../../node_modules/.pnpm/mnemonist@0.40.3_patch_hash=70301b9c235e13bc146bb9528b7979c278952196d5dac8048ab3850adac8f4cf/node_modules/mnemonist/queue.d.ts
72
+ /**
73
+ * Mnemonist Queue Typings
74
+ * ========================
75
+ */
76
+ declare class Queue<T> implements Iterable<T> {
77
+ // Members
78
+ size: number; // Constructor
79
+ constructor(); // Methods
80
+ clear(): void;
81
+ enqueue(item: T): number;
82
+ dequeue(): T | undefined;
83
+ peek(): T | undefined;
84
+ forEach(callback: (item: T, index: number, queue: this) => void, scope?: any): void;
85
+ toArray(): Array<T>;
86
+ values(): IterableIterator<T>;
87
+ entries(): IterableIterator<[number, T]>;
88
+ [Symbol.iterator](): IterableIterator<T>;
89
+ toString(): string;
90
+ toJSON(): Array<T>;
91
+ inspect(): any; // Statics
92
+ static from<I>(iterable: Iterable<I> | {
93
+ [key: string]: I;
94
+ }): Queue<I>;
95
+ static of<I>(...items: Array<I>): Queue<I>;
96
+ }
97
+ //#endregion
98
+ //#region ../../node_modules/.pnpm/mnemonist@0.40.3_patch_hash=70301b9c235e13bc146bb9528b7979c278952196d5dac8048ab3850adac8f4cf/node_modules/mnemonist/multi-map.d.ts
99
+ /**
100
+ * Mnemonist MultiMap Typings
101
+ * ===========================
102
+ */
103
+ interface MultiMap<K, V, C extends V[] | Set<V> = V[]> extends Iterable<[K, V]> {
104
+ // Members
105
+ dimension: number;
106
+ size: number; // Methods
107
+ clear(): void;
108
+ set(key: K, value: V): this;
109
+ delete(key: K): boolean;
110
+ remove(key: K, value: V): boolean;
111
+ has(key: K): boolean;
112
+ get(key: K): C | undefined;
113
+ multiplicity(key: K): number;
114
+ forEach(callback: (value: V, key: K, map: this) => void, scope?: any): void;
115
+ forEachAssociation(callback: (value: C, key: K, map: this) => void, scope?: any): void;
116
+ keys(): IterableIterator<K>;
117
+ values(): IterableIterator<V>;
118
+ entries(): IterableIterator<[K, V]>;
119
+ containers(): IterableIterator<C>;
120
+ associations(): IterableIterator<[K, C]>;
121
+ [Symbol.iterator](): IterableIterator<[K, V]>;
122
+ inspect(): any;
123
+ toJSON(): any;
124
+ }
125
+ interface MultiMapConstructor {
126
+ new <K, V>(container: SetConstructor): MultiMap<K, V, Set<V>>;
127
+ new <K, V>(container?: ArrayConstructor): MultiMap<K, V, V[]>;
128
+ from<K, V>(iterable: Iterable<[K, V]> | {
129
+ [key: string]: V;
130
+ }, Container: SetConstructor): MultiMap<K, V, Set<V>>;
131
+ from<K, V>(iterable: Iterable<[K, V]> | {
132
+ [key: string]: V;
133
+ }, Container?: ArrayConstructor): MultiMap<K, V, V[]>;
134
+ }
135
+ declare const MultiMap: MultiMapConstructor;
136
+ //#endregion
137
+ //#region ../../node_modules/.pnpm/mnemonist@0.40.3_patch_hash=70301b9c235e13bc146bb9528b7979c278952196d5dac8048ab3850adac8f4cf/node_modules/mnemonist/stack.d.ts
138
+ /**
139
+ * Mnemonist Stack Typings
140
+ * ========================
141
+ */
142
+ declare class Stack<T> implements Iterable<T> {
143
+ // Members
144
+ size: number; // Constructor
145
+ constructor(); // Methods
146
+ clear(): void;
147
+ push(item: T): number;
148
+ pop(): T | undefined;
149
+ peek(): T | undefined;
150
+ forEach(callback: (item: T, index: number, stack: this) => void, scope?: any): void;
151
+ toArray(): Array<T>;
152
+ values(): IterableIterator<T>;
153
+ entries(): IterableIterator<[number, T]>;
154
+ [Symbol.iterator](): IterableIterator<T>;
155
+ toString(): string;
156
+ toJSON(): Array<T>;
157
+ inspect(): any; // Statics
158
+ static from<I>(iterable: Iterable<I> | {
159
+ [key: string]: I;
160
+ }): Stack<I>;
161
+ static of<I>(...items: Array<I>): Stack<I>;
162
+ }
163
+ //#endregion
164
+ export { DefaultWeakMap as a, LinkedList as i, MultiMap as n, DefaultMap as o, Queue as r, Stack as t };
@@ -0,0 +1 @@
1
+ import{r as __toESM,t as __commonJSMin}from"../rolldown-runtime.mjs";import{a as require_iterator,i as require_typed_arrays,o as require_foreach,r as require_iterables}from"./graphology-dag.mjs";var require_default_map=__commonJSMin(((e,t)=>{function n(e){if(typeof e!=`function`)throw Error(`mnemonist/DefaultMap.constructor: expecting a function.`);this.items=new Map,this.factory=e,this.size=0}n.prototype.clear=function(){this.items.clear(),this.size=0},n.prototype.get=function(e){var t=this.items.get(e);return t===void 0&&(t=this.factory(e,this.size),this.items.set(e,t),this.size++),t},n.prototype.peek=function(e){return this.items.get(e)},n.prototype.set=function(e,t){return this.items.set(e,t),this.size=this.items.size,this},n.prototype.has=function(e){return this.items.has(e)},n.prototype.delete=function(e){var t=this.items.delete(e);return this.size=this.items.size,t},n.prototype.forEach=function(e,t){t=arguments.length>1?t:this,this.items.forEach(e,t)},n.prototype.entries=function(){return this.items.entries()},n.prototype.keys=function(){return this.items.keys()},n.prototype.values=function(){return this.items.values()},typeof Symbol<`u`&&(n.prototype[Symbol.iterator]=n.prototype.entries),n.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(n.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=n.prototype.inspect),n.autoIncrement=function(){var e=0;return function(){return e++}},t.exports=n})),require_default_weak_map=__commonJSMin(((e,t)=>{function n(e){if(typeof e!=`function`)throw Error(`mnemonist/DefaultWeakMap.constructor: expecting a function.`);this.items=new WeakMap,this.factory=e}n.prototype.clear=function(){this.items=new WeakMap},n.prototype.get=function(e){var t=this.items.get(e);return t===void 0&&(t=this.factory(e),this.items.set(e,t)),t},n.prototype.peek=function(e){return this.items.get(e)},n.prototype.set=function(e,t){return this.items.set(e,t),this},n.prototype.has=function(e){return this.items.has(e)},n.prototype.delete=function(e){return this.items.delete(e)},n.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(n.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=n.prototype.inspect),t.exports=n})),require_linked_list=__commonJSMin(((e,t)=>{var r=require_iterator(),a=require_foreach();function o(){this.clear()}o.prototype.clear=function(){this.head=null,this.tail=null,this.size=0},o.prototype.first=function(){return this.head?this.head.item:void 0},o.prototype.peek=o.prototype.first,o.prototype.last=function(){return this.tail?this.tail.item:void 0},o.prototype.push=function(e){var t={item:e,next:null};return this.head?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),this.size++,this.size},o.prototype.unshift=function(e){var t={item:e,next:null};return this.head?(this.head.next||(this.tail=this.head),t.next=this.head,this.head=t):(this.head=t,this.tail=t),this.size++,this.size},o.prototype.shift=function(){if(this.size){var e=this.head;return this.head=e.next,this.size--,e.item}},o.prototype.forEach=function(e,t){if(this.size){t=arguments.length>1?t:this;for(var n=this.head,r=0;n;)e.call(t,n.item,r,this),n=n.next,r++}},o.prototype.toArray=function(){if(!this.size)return[];for(var e=Array(this.size),t=0,n=this.size,r=this.head;t<n;t++)e[t]=r.item,r=r.next;return e},o.prototype.values=function(){var e=this.head;return new r(function(){if(!e)return{done:!0};var t=e.item;return e=e.next,{value:t,done:!1}})},o.prototype.entries=function(){var e=this.head,t=0;return new r(function(){if(!e)return{done:!0};var n=e.item;return e=e.next,t++,{value:[t-1,n],done:!1}})},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.toString=function(){return this.toArray().join(`,`)},o.prototype.toJSON=function(){return this.toArray()},o.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,`constructor`,{value:o,enumerable:!1}),e},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.from=function(e){var t=new o;return a(e,function(e){t.push(e)}),t},t.exports=o})),require_multi_map=__commonJSMin(((e,t)=>{var r=require_iterator(),a=require_foreach();function o(e){this.Container=e||Array,this.items=new Map,this.clear(),Object.defineProperty(this.items,`constructor`,{value:o,enumerable:!1})}o.prototype.clear=function(){this.size=0,this.dimension=0,this.items.clear()},o.prototype.set=function(e,t){var n=this.items.get(e),r;return n||(this.dimension++,n=new this.Container,this.items.set(e,n)),this.Container===Set?(r=n.size,n.add(t),r<n.size&&this.size++):(n.push(t),this.size++),this},o.prototype.delete=function(e){var t=this.items.get(e);return t?(this.size-=this.Container===Set?t.size:t.length,this.dimension--,this.items.delete(e),!0):!1},o.prototype.remove=function(e,t){var n=this.items.get(e),r,i;return n?this.Container===Set?(r=n.delete(t),r&&this.size--,n.size===0&&(this.items.delete(e),this.dimension--),r):(i=n.indexOf(t),i===-1?!1:(this.size--,n.length===1?(this.items.delete(e),this.dimension--,!0):(n.splice(i,1),!0))):!1},o.prototype.has=function(e){return this.items.has(e)},o.prototype.get=function(e){return this.items.get(e)},o.prototype.multiplicity=function(e){var t=this.items.get(e);return t===void 0?0:this.Container===Set?t.size:t.length},o.prototype.count=o.prototype.multiplicity,o.prototype.forEach=function(e,t){t=arguments.length>1?t:this;var n;function r(r){e.call(t,r,n)}this.items.forEach(function(e,t){n=t,e.forEach(r)})},o.prototype.forEachAssociation=function(e,t){t=arguments.length>1?t:this,this.items.forEach(e,t)},o.prototype.keys=function(){return this.items.keys()},o.prototype.values=function(){var e=this.items.values(),t=!1,n,i,a,o;return this.Container===Set?new r(function r(){if(!t){if(i=e.next(),i.done)return{done:!0};t=!0,n=i.value.values()}return i=n.next(),i.done?(t=!1,r()):{done:!1,value:i.value}}):new r(function r(){if(!t){if(i=e.next(),i.done)return{done:!0};t=!0,n=i.value,a=0,o=n.length}return a>=o?(t=!1,r()):{done:!1,value:n[a++]}})},o.prototype.entries=function(){var e=this.items.entries(),t=!1,n,i,a,o,s;return this.Container===Set?new r(function r(){if(!t){if(i=e.next(),i.done)return{done:!0};t=!0,a=i.value[0],n=i.value[1].values()}return i=n.next(),i.done?(t=!1,r()):{done:!1,value:[a,i.value]}}):new r(function r(){if(!t){if(i=e.next(),i.done)return{done:!0};t=!0,a=i.value[0],n=i.value[1],o=0,s=n.length}return o>=s?(t=!1,r()):{done:!1,value:[a,n[o++]]}})},o.prototype.containers=function(){return this.items.values()},o.prototype.associations=function(){return this.items.entries()},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.entries),o.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.prototype.toJSON=function(){return this.items},o.from=function(e,t){var n=new o(t);return a(e,function(e,t){n.set(t,e)}),n},t.exports=o})),require_queue=__commonJSMin(((e,t)=>{var r=require_iterator(),a=require_foreach();function o(){this.clear()}o.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},o.prototype.enqueue=function(e){return this.items.push(e),++this.size},o.prototype.dequeue=function(){if(this.size){var e=this.items[this.offset];return++this.offset*2>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,e}},o.prototype.peek=function(){if(this.size)return this.items[this.offset]},o.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=this.offset,r=0,i=this.items.length;n<i;n++,r++)e.call(t,this.items[n],r,this)},o.prototype.toArray=function(){return this.items.slice(this.offset)},o.prototype.values=function(){var e=this.items,t=this.offset;return new r(function(){if(t>=e.length)return{done:!0};var n=e[t];return t++,{value:n,done:!1}})},o.prototype.entries=function(){var e=this.items,t=this.offset,n=0;return new r(function(){if(t>=e.length)return{done:!0};var r=e[t];return t++,{value:[n++,r],done:!1}})},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.toString=function(){return this.toArray().join(`,`)},o.prototype.toJSON=function(){return this.toArray()},o.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,`constructor`,{value:o,enumerable:!1}),e},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.from=function(e){var t=new o;return a(e,function(e){t.enqueue(e)}),t},o.of=function(){return o.from(arguments)},t.exports=o})),require_lru_cache=__commonJSMin(((e,t)=>{var o=require_iterator(),s=require_foreach(),c=require_typed_arrays(),l=require_iterables();function u(e,t,n){if(arguments.length<2&&(n=e,e=null,t=null),this.capacity=n,typeof this.capacity!=`number`||this.capacity<=0)throw Error(`mnemonist/lru-cache: capacity should be positive number.`);if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw Error(`mnemonist/lru-cache: capacity should be a finite positive integer.`);var r=c.getPointerArray(n);this.forward=new r(n),this.backward=new r(n),this.K=typeof e==`function`?new e(n):Array(n),this.V=typeof t==`function`?new t(n):Array(n),this.size=0,this.head=0,this.tail=0,this.items={}}u.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}},u.prototype.splayOnTop=function(e){var t=this.head;if(this.head===e)return this;var n=this.backward[e],r=this.forward[e];return this.tail===e?this.tail=n:this.backward[r]=n,this.forward[n]=r,this.backward[t]=e,this.head=e,this.forward[e]=t,this},u.prototype.set=function(e,t){var n=this.items[e];if(n!==void 0){this.splayOnTop(n),this.V[n]=t;return}this.size<this.capacity?n=this.size++:(n=this.tail,this.tail=this.backward[n],delete this.items[this.K[n]]),this.items[e]=n,this.K[n]=e,this.V[n]=t,this.forward[n]=this.head,this.backward[this.head]=n,this.head=n},u.prototype.setpop=function(e,t){var n=null,r=null,i=this.items[e];return i===void 0?(this.size<this.capacity?i=this.size++:(i=this.tail,this.tail=this.backward[i],n=this.V[i],r=this.K[i],delete this.items[r]),this.items[e]=i,this.K[i]=e,this.V[i]=t,this.forward[i]=this.head,this.backward[this.head]=i,this.head=i,r?{evicted:!0,key:r,value:n}:null):(this.splayOnTop(i),n=this.V[i],this.V[i]=t,{evicted:!1,key:e,value:n})},u.prototype.has=function(e){return e in this.items},u.prototype.get=function(e){var t=this.items[e];if(t!==void 0)return this.splayOnTop(t),this.V[t]},u.prototype.peek=function(e){var t=this.items[e];if(t!==void 0)return this.V[t]},u.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0,r=this.size,i=this.head,a=this.K,o=this.V,s=this.forward;n<r;)e.call(t,o[i],a[i],this),i=s[i],n++},u.prototype.keys=function(){var e=0,t=this.size,n=this.head,r=this.K,i=this.forward;return new o(function(){if(e>=t)return{done:!0};var a=r[n];return e++,e<t&&(n=i[n]),{done:!1,value:a}})},u.prototype.values=function(){var e=0,t=this.size,n=this.head,r=this.V,i=this.forward;return new o(function(){if(e>=t)return{done:!0};var a=r[n];return e++,e<t&&(n=i[n]),{done:!1,value:a}})},u.prototype.entries=function(){var e=0,t=this.size,n=this.head,r=this.K,i=this.V,a=this.forward;return new o(function(){if(e>=t)return{done:!0};var o=r[n],s=i[n];return e++,e<t&&(n=a[n]),{done:!1,value:[o,s]}})},typeof Symbol<`u`&&(u.prototype[Symbol.iterator]=u.prototype.entries),u.prototype.inspect=function(){for(var e=new Map,t=this.entries(),n;n=t.next(),!n.done;)e.set(n.value[0],n.value[1]);return Object.defineProperty(e,`constructor`,{value:u,enumerable:!1}),e},typeof Symbol<`u`&&(u.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=u.prototype.inspect),u.from=function(e,t,n,r){if(arguments.length<2){if(r=l.guessLength(e),typeof r!=`number`)throw Error(`mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.`)}else arguments.length===2&&(r=t,t=null,n=null);var i=new u(t,n,r);return s(e,function(e,t){i.set(t,e)}),i},t.exports=u})),require_lru_map=__commonJSMin(((e,t)=>{var n=require_lru_cache(),o=require_foreach(),s=require_typed_arrays(),c=require_iterables();function l(e,t,n){if(arguments.length<2&&(n=e,e=null,t=null),this.capacity=n,typeof this.capacity!=`number`||this.capacity<=0)throw Error(`mnemonist/lru-map: capacity should be positive number.`);if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw Error(`mnemonist/lru-map: capacity should be a finite positive integer.`);var r=s.getPointerArray(n);this.forward=new r(n),this.backward=new r(n),this.K=typeof e==`function`?new e(n):Array(n),this.V=typeof t==`function`?new t(n):Array(n),this.size=0,this.head=0,this.tail=0,this.items=new Map}l.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items.clear()},l.prototype.set=function(e,t){var n=this.items.get(e);if(n!==void 0){this.splayOnTop(n),this.V[n]=t;return}this.size<this.capacity?n=this.size++:(n=this.tail,this.tail=this.backward[n],this.items.delete(this.K[n])),this.items.set(e,n),this.K[n]=e,this.V[n]=t,this.forward[n]=this.head,this.backward[this.head]=n,this.head=n},l.prototype.setpop=function(e,t){var n=null,r=null,i=this.items.get(e);return i===void 0?(this.size<this.capacity?i=this.size++:(i=this.tail,this.tail=this.backward[i],n=this.V[i],r=this.K[i],this.items.delete(r)),this.items.set(e,i),this.K[i]=e,this.V[i]=t,this.forward[i]=this.head,this.backward[this.head]=i,this.head=i,r?{evicted:!0,key:r,value:n}:null):(this.splayOnTop(i),n=this.V[i],this.V[i]=t,{evicted:!1,key:e,value:n})},l.prototype.has=function(e){return this.items.has(e)},l.prototype.get=function(e){var t=this.items.get(e);if(t!==void 0)return this.splayOnTop(t),this.V[t]},l.prototype.peek=function(e){var t=this.items.get(e);if(t!==void 0)return this.V[t]},l.prototype.splayOnTop=n.prototype.splayOnTop,l.prototype.forEach=n.prototype.forEach,l.prototype.keys=n.prototype.keys,l.prototype.values=n.prototype.values,l.prototype.entries=n.prototype.entries,typeof Symbol<`u`&&(l.prototype[Symbol.iterator]=l.prototype.entries),l.prototype.inspect=n.prototype.inspect,l.from=function(e,t,n,r){if(arguments.length<2){if(r=c.guessLength(e),typeof r!=`number`)throw Error(`mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.`)}else arguments.length===2&&(r=t,t=null,n=null);var i=new l(t,n,r);return o(e,function(e,t){i.set(t,e)}),i},t.exports=l})),require_set=__commonJSMin((e=>{e.intersection=function(){if(arguments.length<2)throw Error(`mnemonist/Set.intersection: needs at least two arguments.`);var e=new Set,t=1/0,n=null,r,i,a=arguments.length;for(i=0;i<a;i++){if(r=arguments[i],r.size===0)return e;r.size<t&&(t=r.size,n=r)}for(var o=n.values(),s,c,l,u;s=o.next(),!s.done;){for(c=s.value,l=!0,i=0;i<a;i++)if(u=arguments[i],u!==n&&!u.has(c)){l=!1;break}l&&e.add(c)}return e},e.union=function(){if(arguments.length<2)throw Error(`mnemonist/Set.union: needs at least two arguments.`);var e=new Set,t,n=arguments.length,r,i;for(t=0;t<n;t++)for(r=arguments[t].values();i=r.next(),!i.done;)e.add(i.value);return e},e.difference=function(e,t){if(!e.size)return new Set;if(!t.size)return new Set(e);for(var n=new Set,r=e.values(),i;i=r.next(),!i.done;)t.has(i.value)||n.add(i.value);return n},e.symmetricDifference=function(e,t){for(var n=new Set,r=e.values(),i;i=r.next(),!i.done;)t.has(i.value)||n.add(i.value);for(r=t.values();i=r.next(),!i.done;)e.has(i.value)||n.add(i.value);return n},e.isSubset=function(e,t){var n=e.values(),r;if(e===t)return!0;if(e.size>t.size)return!1;for(;r=n.next(),!r.done;)if(!t.has(r.value))return!1;return!0},e.isSuperset=function(t,n){return e.isSubset(n,t)},e.add=function(e,t){for(var n=t.values(),r;r=n.next(),!r.done;)e.add(r.value)},e.subtract=function(e,t){for(var n=t.values(),r;r=n.next(),!r.done;)e.delete(r.value)},e.intersect=function(e,t){for(var n=e.values(),r;r=n.next(),!r.done;)t.has(r.value)||e.delete(r.value)},e.disjunct=function(e,t){for(var n=e.values(),r,i=[];r=n.next(),!r.done;)t.has(r.value)&&i.push(r.value);for(n=t.values();r=n.next(),!r.done;)e.has(r.value)||e.add(r.value);for(var a=0,o=i.length;a<o;a++)e.delete(i[a])},e.intersectionSize=function(e,t){var n;if(e.size>t.size&&(n=e,e=t,t=n),e.size===0)return 0;if(e===t)return e.size;for(var r=e.values(),i,a=0;i=r.next(),!i.done;)t.has(i.value)&&a++;return a},e.unionSize=function(t,n){var r=e.intersectionSize(t,n);return t.size+n.size-r},e.jaccard=function(t,n){var r=e.intersectionSize(t,n);return r===0?0:r/(t.size+n.size-r)},e.overlap=function(t,n){var r=e.intersectionSize(t,n);return r===0?0:r/Math.min(t.size,n.size)}})),require_stack=__commonJSMin(((e,t)=>{var r=require_iterator(),a=require_foreach();function o(){this.clear()}o.prototype.clear=function(){this.items=[],this.size=0},o.prototype.push=function(e){return this.items.push(e),++this.size},o.prototype.pop=function(){if(this.size!==0)return this.size--,this.items.pop()},o.prototype.peek=function(){return this.items[this.size-1]},o.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0,r=this.items.length;n<r;n++)e.call(t,this.items[r-n-1],n,this)},o.prototype.toArray=function(){for(var e=Array(this.size),t=this.size-1,n=this.size;n--;)e[n]=this.items[t-n];return e},o.prototype.values=function(){var e=this.items,t=e.length,n=0;return new r(function(){if(n>=t)return{done:!0};var r=e[t-n-1];return n++,{value:r,done:!1}})},o.prototype.entries=function(){var e=this.items,t=e.length,n=0;return new r(function(){if(n>=t)return{done:!0};var r=e[t-n-1];return{value:[n++,r],done:!1}})},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.toString=function(){return this.toArray().join(`,`)},o.prototype.toJSON=function(){return this.toArray()},o.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,`constructor`,{value:o,enumerable:!1}),e},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.from=function(e){var t=new o;return a(e,function(e){t.push(e)}),t},o.of=function(){return o.from(arguments)},t.exports=o})),import_default_map=__toESM(require_default_map(),1),import_default_weak_map=__toESM(require_default_weak_map(),1),import_linked_list=__toESM(require_linked_list(),1),import_multi_map=__toESM(require_multi_map(),1),import_queue=__toESM(require_queue(),1),import_lru_map=__toESM(require_lru_map(),1),import_set=require_set(),import_stack=__toESM(require_stack(),1);export{import_multi_map as a,import_stack as c,import_lru_map as i,import_default_weak_map as n,import_queue as o,import_linked_list as r,import_set as s,import_default_map as t};
@@ -0,0 +1,9 @@
1
+ import{t as __commonJSMin}from"../rolldown-runtime.mjs";var require_natural_compare_lite=__commonJSMin(((e,t)=>{
2
+ /*
3
+ * @version 1.4.0
4
+ * @date 2015-10-26
5
+ * @stability 3 - Stable
6
+ * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
7
+ * @license MIT License
8
+ */
9
+ var n=function(e,t){var n,r,i=1,a=0,o=0,s=String.alphabet;function c(e,t,r){if(r){for(n=t;r=c(e,n),r<76&&r>65;)++n;return+e.slice(t-1,n)}return r=s&&s.indexOf(e.charAt(t)),r>-1?r+76:(r=e.charCodeAt(t)||0,r<45||r>127?r:r<46?65:r<48?r-1:r<58?r+18:r<65?r-11:r<91?r+11:r<97?r-37:r<123?r+5:r-63)}if((e+=``)!=(t+=``)){for(;i;)if(r=c(e,a++),i=c(t,o++),r<76&&i<76&&r>66&&i>66&&(r=c(e,a,a),i=c(t,o,a=n),o=n),r!=i)return r<i?-1:1}return 0};try{t.exports=n}catch{String.naturalCompare=n}}));export{require_natural_compare_lite as t};
@@ -0,0 +1 @@
1
+ function serialize(e){return typeof e==`string`?`'${e}'`:new c().serialize(e)}const c=function(){class e{#e=new Map;compare(e,t){let n=typeof e,i=typeof t;return n===`string`&&i===`string`?e.localeCompare(t):n===`number`&&i===`number`?e-t:String.prototype.localeCompare.call(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,i=n===Object||n===void 0?``:n.name;if(i!==``&&globalThis[i]===n)return this.serializeBuiltInType(i,e);if(typeof e.toJSON==`function`){let t=e.toJSON();return i+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}return this.serializeObjectEntries(i,Object.entries(e))}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t?.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),i=`${e}{`;for(let e=0;e<n.length;e++){let[t,a]=n[e];i+=`${this.serialize(t,!0)}:${this.serialize(a)}`,e<n.length-1&&(i+=`,`)}return i+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e}(),z=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],R=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],r=[];var k=class{_data=new l;_hash=new l([...z]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,o=n[0],s=n[1],u=n[2],d=n[3],f=n[4],p=n[5],m=n[6],h=n[7];for(let n=0;n<64;n++){if(n<16)r[n]=e[t+n]|0;else{let e=r[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,i=r[n-2],o=(i<<15|i>>>17)^(i<<13|i>>>19)^i>>>10;r[n]=t+r[n-7]+o+r[n-16]}let g=f&p^~f&m,_=o&s^o&u^s&u,v=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),y=(f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25),b=h+y+g+R[n]+r[n],x=v+_;h=m,m=p,p=f,f=d+b|0,d=u,u=s,s=o,o=b+x|0}n[0]=n[0]+o|0,n[1]=n[1]+s|0,n[2]=n[2]+u|0,n[3]=n[3]+d|0,n[4]=n[4]+f|0,n[5]=n[5]+p|0,n[6]=n[6]+m|0,n[7]=n[7]+h|0}_append(e){typeof e==`string`&&(e=l.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let i=n*16,a=Math.min(i*4,this._data.sigBytes);if(i){for(let e=0;e<i;e+=16)this._doProcessBlock(this._data.words,e);t=this._data.words.splice(0,i),this._data.sigBytes-=a}return new l(t,a)}},l=class e{words;sigBytes;constructor(e,t){e=this.words=e||[],this.sigBytes=t===void 0?e.length*4:t}static fromUtf8(t){let n=unescape(encodeURIComponent(t)),i=n.length,a=[];for(let e=0;e<i;e++)a[e>>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(a,i)}toBase64(){let e=[];for(let t=0;t<this.sigBytes;t+=3){let n=this.words[t>>>2]>>>24-t%4*8&255,i=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,a=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,o=n<<16|i<<8|a;for(let n=0;n<4&&t*8+n*6<this.sigBytes*8;n++)e.push(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`.charAt(o>>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t<e.sigBytes;t++){let n=e.words[t>>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t<e.sigBytes;t+=4)this.words[this.sigBytes+t>>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function digest(e){return new k().finalize(e).toBase64()}function hash(t){return digest(serialize(t))}export{hash as t};
@@ -0,0 +1 @@
1
+ import{t as sanitize}from"./hast-util-sanitize.mjs";function rehypeSanitize(e){return function(t){return sanitize(t,e)}}export{rehypeSanitize as t};
@@ -0,0 +1 @@
1
+ import{t as toHtml}from"./hast-util-to-html.mjs";function rehypeStringify(e){let t=this,n={...t.data(`settings`),...e};t.compiler=r;function r(e){return toHtml(e,n)}}export{rehypeStringify as t};
@@ -0,0 +1 @@
1
+ import{n as gfmToMarkdown,t as gfmFromMarkdown}from"./mdast-util-gfm.mjs";import{t as gfm}from"./micromark-extension-gfm.mjs";const emptyOptions={};function remarkGfm(e){let t=this,n=e||emptyOptions,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(gfm(n)),a.push(gfmFromMarkdown()),o.push(gfmToMarkdown(n))}export{remarkGfm as t};
@@ -0,0 +1,3 @@
1
+ import{r as visit}from"./mdast-util-gfm.mjs";const alertRegex=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/i,alertLegacyRegex=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)(\/.*)?\]/i,remarkAlert=({legacyTitle:r=!1,tagName:a=`div`}={})=>o=>{visit(o,`blockquote`,(e,o,s)=>{let c=``,l=``,u=!0,d=e.children.map(e=>{if(u&&e.type===`paragraph`){let i=e.children[0],a=i.type===`text`?i.value:``,o=r?alertLegacyRegex:alertRegex,s=a.match(o);if(s&&(u=!1,c=s[1].toLocaleLowerCase(),l=r&&s[2]||c.toLocaleUpperCase(),a.includes(`
2
+ `)&&(e.children[0]={type:`text`,value:a.replace(o,``).replace(/^\n+/,``)}),!a.includes(`
3
+ `))){let t=[];e.children.forEach((e,n)=>{n!=0&&(n==1&&e.type===`break`||t.push(e))}),e.children=[...t]}}return e});c&&(e.data={hName:a,hProperties:{className:[`markdown-alert`,`markdown-alert-${c}`],dir:`auto`}},d.unshift({type:`paragraph`,children:[getAlertIcon(c),{type:`text`,value:l.replace(/^\//,``)}],data:{hProperties:{className:`markdown-alert-title`,dir:`auto`}}})),e.children=[...d]})};function getAlertIcon(e){return{type:`emphasis`,data:{hName:`svg`,hProperties:{className:[`octicon`],viewBox:`0 0 16 16`,width:`16`,height:`16`,ariaHidden:`true`}},children:[{type:`emphasis`,data:{hName:`path`,hProperties:{d:pathData[e]??``}},children:[]}]}}const pathData={note:`M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z`,tip:`M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z`,important:`M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z`,warning:`M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z`,caution:`M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z`};export{remarkAlert as t};
@@ -0,0 +1 @@
1
+ import{t as fromMarkdown}from"./mdast-util-from-markdown.mjs";function remarkParse(e){let t=this;t.parser=n;function n(n){return fromMarkdown(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}export{remarkParse as t};
@@ -0,0 +1 @@
1
+ import{t as toHast}from"./mdast-util-to-hast.mjs";function remarkRehype(e,t){return e&&`run`in e?async function(n,r){let i=toHast(n,{file:r,...t});await e.run(i,r)}:function(n,r){return toHast(n,{file:r,...e||t})}}export{remarkRehype as t};
@@ -0,0 +1 @@
1
+ function e$21(o,s,c){let l=c=>o(c,...s);return c===void 0?l:Object.assign(l,{lazy:c,lazyArgs:s})}function t$39(s,c,l){let u=s.length-c.length;if(u===0)return s(...c);if(u===1)return e$21(s,c,l);throw Error(`Wrong number of arguments`)}function t$38(...o){return t$39(n$34,o)}const n$34=(o,s)=>s.every(s=>s(o));function t$37(...o){return t$39(n$33,o)}const n$33=(o,s)=>s.some(s=>s(o));function t$36(...o){return t$39(n$32,o)}const n$32=(o,s)=>[...o,...s];function e$20(o){return()=>o}const e$19={done:!0,hasNext:!1},t$35={done:!1,hasNext:!1},n$31=()=>e$19,r$14=o=>({hasNext:!0,next:o,done:!1});function t$34(o,...s){let c=o,l=s.map(o=>`lazy`in o?r$13(o):void 0),u=0;for(;u<s.length;){if(l[u]===void 0||!i$7(c)){let o=s[u];c=o(c),u+=1;continue}let o=[];for(let c=u;c<s.length;c++){let s=l[c];if(s===void 0||(o.push(s),s.isSingle))break}let d=[];for(let s of c)if(n$30(s,d,o))break;let{isSingle:f}=o.at(-1);c=f?d[0]:d,u+=o.length}return c}function n$30(o,s,c){if(c.length===0)return s.push(o),!1;let l=o,u=t$35,d=!1;for(let[o,f]of c.entries()){let{index:p,items:m}=f;if(m.push(l),u=f(l,p,m),f.index+=1,u.hasNext){if(u.hasMany??!1){for(let l of u.next)if(n$30(l,s,c.slice(o+1)))return!0;return d}l=u.next}if(!u.hasNext)break;u.done&&(d=!0)}return u.hasNext&&s.push(l),d}function r$13(o){let{lazy:s,lazyArgs:c}=o,l=s(...c);return Object.assign(l,{isSingle:s.single??!1,index:0,items:[]})}function i$7(o){return typeof o==`string`||typeof o==`object`&&!!o&&Symbol.iterator in o}function t$33(o,s){let c=s.length-o.length;if(c===1){let[c,...l]=s;return t$34(c,{lazy:o,lazyArgs:l})}if(c===0){let c={lazy:o,lazyArgs:s};return Object.assign(o=>t$34(o,c),c)}throw Error(`Wrong number of arguments`)}function r$12(...o){return t$39(i$6,o,a$3)}const i$6=(o,s)=>s<0?[...o]:o.slice(s);function a$3(o){if(o<=0)return r$14;let s=o;return o=>s>0?(--s,t$35):{done:!1,hasNext:!0,next:o}}function t$32(...o){return t$39(n$29,o)}const n$29=(o,s)=>o.length>=s,e$18={asc:(o,s)=>o>s,desc:(o,s)=>o<s};function t$31(o,s){let[c,...l]=s;if(!i$5(c))return o(c,r$11(...l));let u=r$11(c,...l);return s=>o(s,u)}function r$11(o,s,...c){let l=typeof o==`function`?o:o[0],u=typeof o==`function`?`asc`:o[1],{[u]:d}=e$18,f=s===void 0?void 0:r$11(s,...c);return(o,s)=>{let c=l(o),u=l(s);return d(c,u)?1:d(u,c)?-1:f?.(o,s)??0}}function i$5(o){if(a$2(o))return!0;if(typeof o!=`object`||!Array.isArray(o))return!1;let[s,c,...l]=o;return a$2(s)&&typeof c==`string`&&c in e$18&&l.length===0}const a$2=o=>typeof o==`function`&&o.length===1;function t$30(...o){return t$39(n$28,o)}function n$28(o,s){for(let[c,l]of o.entries())if(!s(l,c,o))return o.slice(c);return[]}function t$29(...o){return t$39(Object.entries,o)}function n$27(...o){return t$39(r$10,o,i$4)}const r$10=(o,s)=>o.filter(s),i$4=o=>(s,c,l)=>o(s,c,l)?{done:!1,hasNext:!0,next:s}:t$35,e$17=o=>Object.assign(o,{single:!0});function t$28(...o){return t$39(n$26,o)}const n$26=(o,s)=>{for(let c=o.length-1;c>=0;c--){let l=o[c];if(s(l,c,o))return l}};function n$25(...o){return t$39(r$9,o,e$17(i$3))}const r$9=([o])=>o,i$3=()=>a$1,a$1=o=>({hasNext:!0,next:o,done:!0});function t$27(...o){return t$39(n$24,o,r$8)}const n$24=(o,s)=>o.flatMap(s),r$8=o=>(s,c,l)=>{let u=o(s,c,l);return Array.isArray(u)?{done:!1,hasNext:!0,hasMany:!0,next:u}:{done:!1,hasNext:!0,next:u}};function t$26(...o){return t$39(n$23,o,r$7)}function n$23(o,s){return o.forEach(s),o}const r$7=o=>(s,c,l)=>(o(s,c,l),{done:!1,hasNext:!0,next:s});function t$25(...o){return t$39(Object.fromEntries,o)}function t$24(...o){return t$39(n$22,o)}function n$22(o,s){let c={};for(let[l,u]of o.entries())c[u]=s(u,l,o);return c}function t$23(...o){return t$39(n$21,o)}const n$21=(o,s)=>{let c=Object.create(null);for(let l=0;l<o.length;l++){let u=o[l],d=s(u,l,o);if(d!==void 0){let o=c[d];o===void 0?c[d]=[u]:o.push(u)}}return Object.setPrototypeOf(c,Object.prototype),c};function t$22(...o){return t$39(n$20,o)}function n$20(o,s){if(o===s||Object.is(o,s))return!0;if(typeof o!=`object`||typeof s!=`object`||o===null||s===null||Object.getPrototypeOf(o)!==Object.getPrototypeOf(s))return!1;if(Array.isArray(o))return r$6(o,s);if(o instanceof Map)return i$2(o,s);if(o instanceof Set)return a(o,s);if(o instanceof Date)return o.getTime()===s.getTime();if(o instanceof RegExp)return o.toString()===s.toString();if(Object.keys(o).length!==Object.keys(s).length)return!1;for(let[c,l]of Object.entries(o))if(!(c in s)||!n$20(l,s[c]))return!1;return!0}function r$6(o,s){if(o.length!==s.length)return!1;for(let[c,l]of o.entries())if(!n$20(l,s[c]))return!1;return!0}function i$2(o,s){if(o.size!==s.size)return!1;for(let[c,l]of o.entries())if(!s.has(c)||!n$20(l,s.get(c)))return!1;return!0}function a(o,s){if(o.size!==s.size)return!1;let c=[...s];for(let s of o){let o=!1;for(let[l,u]of c.entries())if(n$20(s,u)){o=!0,c.splice(l,1);break}if(!o)return!1}return!0}function e$16(o){return Array.isArray(o)}function e$15(o){return typeof o==`boolean`}function e$14(o){return o!==void 0}function e$13(o){return o===``||o===void 0?!0:Array.isArray(o)?o.length===0:Object.keys(o).length===0}function e$12(o){if(o==null||o===``)return!0;if(typeof o!=`object`)return!1;if(`length`in o&&typeof o.length==`number`)return o.length===0;if(`size`in o&&typeof o.size==`number`)return o.size===0;for(let s in o)return!1;return Object.getOwnPropertySymbols(o).length===0}const e$11=o=>typeof o==`function`;function e$10(o){return o!=null}function e$9(o){return s=>!o(s)}function e$8(o){return o==null}function e$7(o){return typeof o==`number`&&!Number.isNaN(o)}function t$21(...o){return t$39(n$19,o)}function n$19(o,s){if(o===s||Object.is(o,s))return!0;if(typeof o!=`object`||!o||typeof s!=`object`||!s)return!1;if(o instanceof Map&&s instanceof Map)return r$5(o,s);if(o instanceof Set&&s instanceof Set)return i$1(o,s);let c=Object.keys(o);if(c.length!==Object.keys(s).length)return!1;for(let l of c){if(!Object.hasOwn(s,l))return!1;let{[l]:c}=o,{[l]:u}=s;if(c!==u||!Object.is(c,u))return!1}return!0}function r$5(o,s){if(o.size!==s.size)return!1;for(let[c,l]of o){let o=s.get(c);if(l!==o||!Object.is(l,o))return!1}return!0}function i$1(o,s){if(o.size!==s.size)return!1;for(let c of o)if(!s.has(c))return!1;return!0}function e$6(o){return typeof o==`string`}function e$5(o){return!!o}function t$20(...o){return t$39(Object.keys,o)}function t$19(...o){return t$39(n$18,o)}const n$18=o=>o.at(-1);function t$18(...o){return t$39(n$17,o,r$4)}const n$17=(o,s)=>o.map(s),r$4=o=>(s,c,l)=>({done:!1,hasNext:!0,next:o(s,c,l)});function t$17(...o){return t$39(n$16,o)}function n$16(o,s){let c={};for(let[l,u]of o.entries()){let[d,f]=s(u,l,o);c[d]=f}return c}function t$16(...o){return t$39(n$15,o)}function n$15(o,s){let c={};for(let[l,u]of Object.entries(o))c[l]=s(u,l,o);return c}function n$14(...o){return t$39(r$3,o)}function r$3(o,s){if(!t$32(s,1))return{...o};if(!t$32(s,2)){let{[s[0]]:c,...l}=o;return l}let c={...o};for(let o of s)delete c[o];return c}function t$15(...o){return t$39(n$13,o)}function n$13(o,s){let c={...o};for(let[l,u]of Object.entries(c))s(u,l,o)&&delete c[l];return c}function e$4(o){let s=!1,c;return()=>(s||=(c=o(),!0),c)}function t$14(...o){return t$39(n$12,o)}const n$12=o=>o.length===1?o[0]:void 0;function t$13(...o){return t$39(n$11,o)}const n$11=(o,s)=>{let c=[[],[]];for(let[l,u]of o.entries())s(u,l,o)?c[0].push(u):c[1].push(u);return c};function t$12(...o){return t$39(n$10,o)}function n$10(o,s){let c={};for(let l of s)l in o&&(c[l]=o[l]);return c}function t$11(...o){return t$39(n$9,o)}function n$9(o,s){let c={};for(let[l,u]of Object.entries(o))s(u,l,o)&&(c[l]=u);return c}function t$10(...o){return s=>t$34(s,...o)}function e$3(o,...s){return typeof o==`string`||typeof o==`number`||typeof o==`symbol`?c=>t$9(c,o,...s):t$9(o,...s)}function t$9(o,...s){let c=o;for(let o of s){if(c==null)return;c=c[o]}return c}function t$8(...o){return t$39(n$8,o)}function n$8(o,s,c){let l={};for(let[u,d]of o.entries()){let f=s(d,u,o);l[f]=c(d,u,o)}return l}function e$2(o,s){let c=Math.ceil(o),l=Math.floor(s);if(l<c)throw RangeError(`randomInteger: The range [${o.toString()},${s.toString()}] contains no integer`);return Math.floor(Math.random()*(l-c+1)+c)}function t$7(...o){return t$39(n$7,o)}const n$7=(o,s,c)=>o.reduce(s,c);function t$6(...o){return t$39(n$6,o)}function n$6(o){return[...o].reverse()}function t$5(...o){return t$39(n$5,o)}function n$5(o,s){let c=[...o];return c.sort(s),c}function t$4(...o){return t$31(n$4,o)}const n$4=(o,s)=>[...o].sort(s);function e$1(o,s,c){return typeof s==`number`||s===void 0?c=>c.split(o,s):o.split(s,c)}function n$3(...o){return t$39(r$2,o,i)}const r$2=(o,s)=>s<0?[]:o.slice(0,s);function i(o){if(o<=0)return n$31;let s=o;return o=>(--s,{done:s<=0,hasNext:!0,next:o})}function t$3(...o){return t$39(n$2,o)}function n$2(o,s){let c=[];for(let[l,u]of o.entries()){if(!s(u,l,o))break;c.push(u)}return c}function n$1(...o){return t$33(r$1,o)}function r$1(){let o=new Set;return s=>o.has(s)?t$35:(o.add(s),{done:!1,hasNext:!0,next:s})}function t$2(...o){return t$39(Object.values,o)}function e(...o){return o.length===2?(s,...c)=>t$1(s,...o,...c):t$1(...o)}const t$1=(o,s,c,...l)=>s(o,...l)?typeof c==`function`?c(o,...l):c.onTrue(o,...l):typeof c==`function`?o:c.onFalse(o,...l);function t(...o){return t$39(n,o,r)}const n=(o,s)=>o.length<s.length?o.map((o,c)=>[o,s[c]]):s.map((s,c)=>[o[c],s]),r=o=>(s,c)=>({hasNext:!0,next:[s,o[c]],done:c>=o.length-1});export{r$12 as $,t$21 as A,e$16 as B,t$16 as C,t$20 as D,t$19 as E,e$11 as F,t$26 as G,t$23 as H,e$12 as I,t$28 as J,t$27 as K,e$13 as L,e$8 as M,e$9 as N,e$5 as O,e$10 as P,t$32 as Q,e$14 as R,n$14 as S,t$18 as T,t$24 as U,t$22 as V,t$25 as W,t$29 as X,n$27 as Y,t$30 as Z,t$12 as _,t$3 as a,e$4 as b,t$4 as c,t$7 as d,t$34 as et,e$2 as f,t$11 as g,t$10 as h,n$1 as i,t$38 as it,e$7 as j,e$6 as k,t$5 as l,e$3 as m,e as n,t$36 as nt,n$3 as o,t$8 as p,n$25 as q,t$2 as r,t$37 as rt,e$1 as s,t,e$20 as tt,t$6 as u,t$13 as v,t$17 as w,t$15 as x,t$14 as y,e$15 as z};
@@ -0,0 +1 @@
1
+ function trough(){let e=[],n={run:r,use:i};return n;function r(...n){let r=-1,i=n.pop();if(typeof i!=`function`)throw TypeError(`Expected function as last argument, not `+i);a(null,...n);function a(o,...s){let c=e[++r],l=-1;if(o){i(o);return}for(;++l<n.length;)(s[l]===null||s[l]===void 0)&&(s[l]=n[l]);n=s,c?wrap(c,a)(...s):i(null,...s)}}function i(t){if(typeof t!=`function`)throw TypeError("Expected `middelware` to be a function, not "+t);return e.push(t),n}}function wrap(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)}}export{trough as t};
@@ -0,0 +1 @@
1
+ import{r as __toESM}from"../rolldown-runtime.mjs";import{t as ok}from"./devlop.mjs";import{n as stringifyPosition}from"./mdast-util-from-markdown.mjs";import{t as bail}from"./bail.mjs";import{t as require_extend}from"./extend.mjs";import{t as isPlainObject}from"./is-plain-obj.mjs";import{t as trough}from"./trough.mjs";var VFileMessage=class extends Error{constructor(e,t,r){super(),typeof t==`string`&&(r=t,t=void 0);let i=``,a={},o=!1;if(t&&(a=`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`?i=e:!a.cause&&e&&(o=!0,i=e.message,a.cause=e),!a.ruleId&&!a.source&&typeof r==`string`){let e=r.indexOf(`:`);e===-1?a.ruleId=r:(a.source=r.slice(0,e),a.ruleId=r.slice(e+1))}if(!a.place&&a.ancestors&&a.ancestors){let e=a.ancestors[a.ancestors.length-1];e&&(a.place=e.position)}let s=a.place&&`start`in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=stringifyPosition(a.place)||`1:1`,this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack==`string`?a.cause.stack:``,this.actual,this.expected,this.note,this.url}};VFileMessage.prototype.file=``,VFileMessage.prototype.name=``,VFileMessage.prototype.reason=``,VFileMessage.prototype.message=``,VFileMessage.prototype.stack=``,VFileMessage.prototype.column=void 0,VFileMessage.prototype.line=void 0,VFileMessage.prototype.ancestors=void 0,VFileMessage.prototype.cause=void 0,VFileMessage.prototype.fatal=void 0,VFileMessage.prototype.place=void 0,VFileMessage.prototype.ruleId=void 0,VFileMessage.prototype.source=void 0;const minpath={basename,dirname,extname,join,sep:`/`};function basename(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);assertPath$1(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 dirname(e){if(assertPath$1(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 extname(e){assertPath$1(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 join(...e){let t=-1,n;for(;++t<e.length;)assertPath$1(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:normalize(n)}function normalize(e){assertPath$1(e);let t=e.codePointAt(0)===47,n=normalizeString(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function normalizeString(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 assertPath$1(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}const minproc={cwd};function cwd(){return`/`}function isUrl(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function urlToPath(e){if(typeof e==`string`)e=new URL(e);else if(!isUrl(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 getPathFromURLPosix(e)}function getPathFromURLPosix(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)}const order=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`];var VFile=class{constructor(e){let t;t=e?isUrl(e)?{path:e}:typeof e==`string`||isUint8Array$1(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:minproc.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<order.length;){let e=order[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)order.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?minpath.basename(this.path):void 0}set basename(e){assertNonEmpty(e,`basename`),assertPart(e,`basename`),this.path=minpath.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?minpath.dirname(this.path):void 0}set dirname(e){assertPath(this.basename,`dirname`),this.path=minpath.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?minpath.extname(this.path):void 0}set extname(e){if(assertPart(e,`extname`),assertPath(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=minpath.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){isUrl(e)&&(e=urlToPath(e)),assertNonEmpty(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?minpath.basename(this.path,this.extname):void 0}set stem(e){assertNonEmpty(e,`stem`),assertPart(e,`stem`),this.path=minpath.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 VFileMessage(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 assertPart(e,t){if(e&&e.includes(minpath.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+minpath.sep+"`")}function assertNonEmpty(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function assertPath(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function isUint8Array$1(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}const CallableInstance=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r});var import_extend=__toESM(require_extend(),1);const own={}.hasOwnProperty,unified=new class e extends CallableInstance{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=trough()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,import_extend.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(assertUnfrozen(`data`,this.frozen),this.namespace[e]=t,this):own.call(this.namespace,e)&&this.namespace[e]||void 0:e?(assertUnfrozen(`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=vfile(e),n=this.parser||this.Parser;return assertParser(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),assertParser(`process`,this.parser||this.Parser),assertCompiler(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=vfile(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);looksLikeAValue(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(),assertParser(`processSync`,this.parser||this.Parser),assertCompiler(`processSync`,this.compiler||this.Compiler),this.process(e,i),assertDone(`processSync`,`process`,t),n;function i(e,i){t=!0,bail(e),n=i}}run(e,t,n){assertNode(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=vfile(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,i;return this.run(e,t,a),assertDone(`runSync`,`run`,n),i;function a(e,t){bail(e),i=t,n=!0}}stringify(e,t){this.freeze();let n=vfile(t),r=this.compiler||this.Compiler;return assertCompiler(`stringify`,r),assertNode(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(assertUnfrozen(`use`,this.frozen),e!=null)if(typeof e==`function`)c(e,t);else if(typeof e==`object`)Array.isArray(e)?s(e):o(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)c(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;c(t,n)}else o(e);else throw TypeError("Expected usable value, not `"+e+"`")}function o(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");s(e.plugins),e.settings&&(r.settings=(0,import_extend.default)(!0,r.settings,e.settings))}function s(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 c(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,...o]=t,s=n[i][1];isPlainObject(s)&&isPlainObject(r)&&(r=(0,import_extend.default)(!0,s,r)),n[i]=[e,r,...o]}}}}().freeze();function assertParser(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function assertCompiler(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function assertUnfrozen(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 assertNode(e){if(!isPlainObject(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function assertDone(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function vfile(e){return looksLikeAVFile(e)?e:new VFile(e)}function looksLikeAVFile(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function looksLikeAValue(e){return typeof e==`string`||isUint8Array(e)}function isUint8Array(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}export{unified as t};
@@ -0,0 +1 @@
1
+ var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__commonJSMin=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),__exportAll=(e,n)=>{let r={};for(var i in e)__defProp(r,i,{get:e[i],enumerable:!0});return n||__defProp(r,Symbol.toStringTag,{value:`Module`}),r},__copyProps=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=__getOwnPropNames(i),l=0,u=c.length,d;l<u;l++)d=c[l],!__hasOwnProp.call(e,d)&&d!==o&&__defProp(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=__getOwnPropDesc(i,d))||s.enumerable});return e},__toESM=(n,r,a)=>(a=n==null?{}:__create(__getProtoOf(n)),__copyProps(r||!n||!n.__esModule?__defProp(a,`default`,{value:n,enumerable:!0}):a,n));export{__exportAll as n,__toESM as r,__commonJSMin as t};