github-markdown-adf 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -3
- package/dist/browser/index.iife.js +17 -17
- package/dist/browser/index.js +16 -16
- package/dist/index.cjs +100 -52
- package/dist/index.d.cts +24 -7
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +24 -7
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +100 -52
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -107,6 +107,7 @@ A self-contained browser bundle with all dependencies inlined is available via C
|
|
|
107
107
|
| Task lists | `- [ ] todo` / `- [x] done` |
|
|
108
108
|
| Code blocks | ` ```lang ` fenced blocks |
|
|
109
109
|
| Tables | GFM pipe tables |
|
|
110
|
+
| Mentions | Plain `@username` text → ADF mention nodes when `mdToAdf` mentions option is enabled |
|
|
110
111
|
| GitHub Alerts | `> [!NOTE]`, `> [!WARNING]`, `> [!TIP]`, `> [!IMPORTANT]`, `> [!CAUTION]` → ADF Panels |
|
|
111
112
|
| Expandable sections | `<details><summary>…</summary>…</details>` → ADF Expand nodes |
|
|
112
113
|
|
|
@@ -140,25 +141,48 @@ import { mdToAdf, adfToMd } from 'github-markdown-adf';
|
|
|
140
141
|
|
|
141
142
|
Converts a GFM string to an ADF document object. Parses using mdast and micromark GFM extensions, with support for tables, task lists, strikethrough, and GitHub Alert syntax (`> [!NOTE]`, `> [!WARNING]`, etc.).
|
|
142
143
|
|
|
144
|
+
### `mdToAdf(markdown: string, options?: MdToAdfOptions): AdfDoc`
|
|
145
|
+
|
|
146
|
+
Converts a GFM string to an ADF document object, with optional parsing controls such as custom mention mapping.
|
|
147
|
+
|
|
143
148
|
### `adfToMd(adf: AdfDoc, options?: AdfToMdOptions): string`
|
|
144
149
|
|
|
145
150
|
Converts an ADF document object to a GFM string. Handles all standard ADF node and mark types and produces clean, readable output targeting GitHub Flavored Markdown.
|
|
146
151
|
|
|
147
152
|
## Options
|
|
148
153
|
|
|
149
|
-
`adfToMd`
|
|
154
|
+
`mdToAdf` and `adfToMd` accept an optional second argument to control mention handling and rendering behaviour.
|
|
155
|
+
|
|
156
|
+
### `MdToAdfOptions`
|
|
157
|
+
|
|
158
|
+
| Option | Type | Default | Description |
|
|
159
|
+
|---|---|---|---|
|
|
160
|
+
| `mentions` | `boolean \| ((username: string) => MentionNode['attrs'] \| null \| undefined)` | `false` | When omitted or `false`, plain `@username` text stays unchanged. When `true`, plain `@alice` text becomes `{ type: 'mention', attrs: { id: 'alice', text: '@alice' } }`. When a function is provided, it receives the username without the `@` prefix and should return mention attrs. Returning `null` or `undefined` leaves the original markdown text unchanged. |
|
|
150
161
|
|
|
151
162
|
### `AdfToMdOptions`
|
|
152
163
|
|
|
153
164
|
| Option | Type | Default | Description |
|
|
154
165
|
|---|---|---|---|
|
|
155
|
-
| `mentions` | `boolean` | `true` | When `true`, renders mention nodes as the display text if available, otherwise as `@{id}`. When `false`, renders as plain text: display text if available, otherwise just the bare `{id}` without an `@` prefix. |
|
|
166
|
+
| `mentions` | `boolean \| ((attrs: MentionNode['attrs']) => string)` | `true` | When `true`, renders mention nodes as the display text if available, otherwise as `@{id}`. When `false`, renders as plain text: display text if available, otherwise just the bare `{id}` without an `@` prefix. When a function is provided, it receives the mention attrs and its return value is used as-is. |
|
|
156
167
|
|
|
157
168
|
### Usage example
|
|
158
169
|
|
|
159
170
|
```typescript
|
|
171
|
+
// Convert plain @mentions into ADF mention nodes
|
|
172
|
+
const adfDoc = mdToAdf('Assigned to @some-user', {
|
|
173
|
+
mentions: (username) => ({
|
|
174
|
+
id: 'jira-account-id',
|
|
175
|
+
text: username === 'some-user' ? '@Some User' : `@${username}`,
|
|
176
|
+
}),
|
|
177
|
+
});
|
|
178
|
+
|
|
160
179
|
// Render mentions as plain text instead of @-tagged references
|
|
161
180
|
const md = adfToMd(adfDoc, { mentions: false });
|
|
181
|
+
|
|
182
|
+
// Render mentions with a custom formatter
|
|
183
|
+
const mdWithCustomMentions = adfToMd(adfDoc, {
|
|
184
|
+
mentions: (attrs) => `[@${attrs.text ?? attrs.id}](https://example.com/users/${attrs.id})`,
|
|
185
|
+
});
|
|
162
186
|
```
|
|
163
187
|
|
|
164
188
|
## TypeScript Types
|
|
@@ -170,7 +194,7 @@ import type { AdfDoc, AdfNode, AdfMark, AdfInlineNode, AdfTopLevelBlockNode } fr
|
|
|
170
194
|
// Also available: ParagraphNode, HeadingNode, TableNode, PanelNode, CodeBlockNode,
|
|
171
195
|
// BulletListNode, OrderedListNode, TaskListNode, TextNode, MentionNode, ...and more
|
|
172
196
|
|
|
173
|
-
import type { AdfToMdOptions } from 'github-markdown-adf';
|
|
197
|
+
import type { AdfToMdOptions, MdToAdfOptions } from 'github-markdown-adf';
|
|
174
198
|
```
|
|
175
199
|
|
|
176
200
|
## Requirements
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var GithubMarkdownAdf=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r};let r={};function i(e,t){let n=t||r;return a(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function a(e,t,n){if(s(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return o(e.children,t,n)}return Array.isArray(e)?o(e,t,n):``}function o(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=a(e[i],t,n);return r.join(``)}function s(e){return!!(e&&typeof e==`object`)}let c=document.createElement(`i`);function l(e){let t=`&`+e+`;`;c.innerHTML=t;let n=c.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function u(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function d(e,t){return e.length>0?(u(e,e.length,0,t),e):t}let f={}.hasOwnProperty;function p(e){let t={},n=-1;for(;++n<e.length;)m(t,e[n]);return t}function m(e,t){let n;for(n in t){let r=(f.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){f.call(r,a)||(r[a]=[]);let e=i[a];h(r[a],Array.isArray(e)?e:e?[e]:[])}}}function h(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);u(e,0,0,r)}function g(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function _(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}let v=A(/[A-Za-z]/),y=A(/[\dA-Za-z]/),b=A(/[#-'*+\--9=?A-Z^-~]/);function x(e){return e!==null&&(e<32||e===127)}let S=A(/\d/),C=A(/[\dA-Fa-f]/),w=A(/[!-/:-@[-`{-~]/);function T(e){return e!==null&&e<-2}function E(e){return e!==null&&(e<0||e===32)}function D(e){return e===-2||e===-1||e===32}let O=A(/\p{P}|\p{S}/u),k=A(/\s/);function A(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function j(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return D(r)?(e.enter(n),s(r)):t(r)}function s(r){return D(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}let M={tokenize:N};function N(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),j(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return T(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}let P={tokenize:ee},F={tokenize:te};function ee(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}v(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return u(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return p(a);if(i.currentConstruct&&i.currentConstruct.concrete)return h(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(F,d,f)(a)}function d(e){return i&&y(),v(r),p(e)}function f(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(F,m,h)(n)}function m(e){return r++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){if(n===null){i&&y(),v(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),g(n)}function g(n){if(n===null){_(e.exit(`chunkFlow`),!0),v(0),e.consume(n);return}return T(n)?(e.consume(n),_(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),g)}function _(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(v(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;u(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function v(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function y(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function te(e,t,n){return j(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function I(e){if(e===null||E(e)||k(e))return 1;if(O(e))return 2}function L(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}let R={name:`attention`,resolveAll:z,tokenize:B};function z(e,t){let n=-1,r,i,a,o,s,c,l,f;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let p={...e[r][1].end},m={...e[n][1].start};V(p,-c),V(m,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:p,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:m},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=d(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=d(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=d(l,L(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=d(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,l=d(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):f=0,u(e,r-1,n-r+3,l),n=r+l.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function B(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=I(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=I(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function V(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let ne={name:`autolink`,tokenize:re};function re(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return v(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||y(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||y(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||x(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):b(t)?(e.consume(t),l):n(t)}function u(e){return y(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||y(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}let H={partial:!0,tokenize:ie};function ie(e,t,n){return r;function r(t){return D(t)?j(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||T(e)?t(e):n(e)}}let ae={continuation:{tokenize:se},exit:ce,name:`blockQuote`,tokenize:oe};function oe(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return D(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function se(e,t,n){let r=this;return i;function i(t){return D(t)?j(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(ae,t,n)(r)}}function ce(e){e.exit(`blockQuote`)}let le={name:`characterEscape`,tokenize:ue};function ue(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return w(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}let de={name:`characterReference`,tokenize:fe};function fe(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),u):(e.enter(`characterReferenceValue`),a=31,o=y,d(t))}function u(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=C,d):(e.enter(`characterReferenceValue`),a=7,o=S,d(t))}function d(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===y&&!l(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),d):n(s)}}let pe={partial:!0,tokenize:ge},me={concrete:!0,name:`codeFenced`,tokenize:he};function he(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),D(t)?j(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||T(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(pe,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||T(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):D(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),j(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||T(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||T(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&D(t)?j(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||T(t)?e.check(pe,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||T(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),D(t)?j(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),D(t)?j(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||T(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function ge(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}let U={name:`codeIndented`,tokenize:ve},_e={partial:!0,tokenize:ye};function ve(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),j(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):T(t)?e.attempt(_e,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||T(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function ye(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):T(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):j(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):T(e)?i(e):n(e)}}let be={name:`codeText`,previous:Se,resolve:xe,tokenize:Ce};function xe(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Se(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Ce(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):T(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||T(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var we=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&W(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),W(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),W(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);W(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);W(this.left,t.reverse())}}};function W(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Te(e){let t={},n=-1,r,i,a,o,s,c,l,d=new we(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type===`chunkFlow`&&d.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Ee(d,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=d.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(d.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...d.get(i)[1].start},s=d.slice(i,n),s.unshift(r),d.splice(i,n-i+1,s))}}return u(e,0,1/0,d.slice(0)),!l}function Ee(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}let De={resolve:ke,tokenize:Ae},Oe={partial:!0,tokenize:je};function ke(e){return Te(e),e}function Ae(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):T(t)?e.check(Oe,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function je(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j(e,a,`linePrefix`)}function a(i){if(i===null||T(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Me(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||x(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||T(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||E(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||x(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Ne(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):T(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||T(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!D(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Pe(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):T(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||T(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Fe(e,t){let n;return r;function r(i){return T(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):D(i)?j(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}let Ie={name:`definition`,tokenize:Re},Le={partial:!0,tokenize:ze};function Re(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Ne.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=_(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return E(t)?Fe(e,l)(t):l(t)}function l(t){return Me(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Le,d,d)(t)}function d(t){return D(t)?j(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||T(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function ze(e,t,n){return r;function r(t){return E(t)?Fe(e,i)(t):n(t)}function i(t){return Pe(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return D(t)?j(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||T(e)?t(e):n(e)}}let Be={name:`hardBreakEscape`,tokenize:Ve};function Ve(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return T(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}let He={name:`headingAtx`,resolve:Ue,tokenize:We};function Ue(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},u(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function We(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||E(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||T(n)?(e.exit(`atxHeading`),t(n)):D(n)?j(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||E(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}let Ge=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Ke=[`pre`,`script`,`style`,`textarea`],qe={concrete:!0,name:`htmlFlow`,resolveTo:Xe,tokenize:Ze},Je={partial:!0,tokenize:$e},Ye={partial:!0,tokenize:Qe};function Xe(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Ze(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:z):v(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):v(a)?(e.consume(a),i=4,r.interrupt?t:z):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:z):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:N:m):n(i)}function h(t){return v(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||E(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Ke.includes(l)?(i=1,r.interrupt?t(s):N(s)):Ge.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):N(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?b(s):x(s))}return s===45||y(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:N):n(i)}function b(t){return D(t)?(e.consume(t),b):j(t)}function x(t){return t===47?(e.consume(t),j):t===58||t===95||v(t)?(e.consume(t),S):D(t)?(e.consume(t),x):j(t)}function S(t){return t===45||t===46||t===58||t===95||y(t)?(e.consume(t),S):C(t)}function C(t){return t===61?(e.consume(t),w):D(t)?(e.consume(t),C):x(t)}function w(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,O):D(t)?(e.consume(t),w):k(t)}function O(t){return t===c?(e.consume(t),c=null,A):t===null||T(t)?n(t):(e.consume(t),O)}function k(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||E(t)?C(t):(e.consume(t),k)}function A(e){return e===47||e===62||D(e)?x(e):n(e)}function j(t){return t===62?(e.consume(t),M):n(t)}function M(t){return t===null||T(t)?N(t):D(t)?(e.consume(t),M):n(t)}function N(t){return t===45&&i===2?(e.consume(t),te):t===60&&i===1?(e.consume(t),I):t===62&&i===4?(e.consume(t),B):t===63&&i===3?(e.consume(t),z):t===93&&i===5?(e.consume(t),R):T(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Je,V,P)(t)):t===null||T(t)?(e.exit(`htmlFlowData`),P(t)):(e.consume(t),N)}function P(t){return e.check(Ye,F,V)(t)}function F(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return t===null||T(t)?P(t):(e.enter(`htmlFlowData`),N(t))}function te(t){return t===45?(e.consume(t),z):N(t)}function I(t){return t===47?(e.consume(t),o=``,L):N(t)}function L(t){if(t===62){let n=o.toLowerCase();return Ke.includes(n)?(e.consume(t),B):N(t)}return v(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),L):N(t)}function R(t){return t===93?(e.consume(t),z):N(t)}function z(t){return t===62?(e.consume(t),B):t===45&&i===2?(e.consume(t),z):N(t)}function B(t){return t===null||T(t)?(e.exit(`htmlFlowData`),V(t)):(e.consume(t),B)}function V(n){return e.exit(`htmlFlow`),t(n)}}function Qe(e,t,n){let r=this;return i;function i(t){return T(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function $e(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(H,t,n)}}let et={name:`htmlText`,tokenize:tt};function tt(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),C):t===63?(e.consume(t),x):v(t)?(e.consume(t),k):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):v(t)?(e.consume(t),b):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):T(t)?(o=d,L(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?I(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):T(t)?(o=h,L(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?I(t):t===93?(e.consume(t),_):h(t)}function b(t){return t===null||t===62?I(t):T(t)?(o=b,L(t)):(e.consume(t),b)}function x(t){return t===null?n(t):t===63?(e.consume(t),S):T(t)?(o=x,L(t)):(e.consume(t),x)}function S(e){return e===62?I(e):x(e)}function C(t){return v(t)?(e.consume(t),w):n(t)}function w(t){return t===45||y(t)?(e.consume(t),w):O(t)}function O(t){return T(t)?(o=O,L(t)):D(t)?(e.consume(t),O):I(t)}function k(t){return t===45||y(t)?(e.consume(t),k):t===47||t===62||E(t)?A(t):n(t)}function A(t){return t===47?(e.consume(t),I):t===58||t===95||v(t)?(e.consume(t),M):T(t)?(o=A,L(t)):D(t)?(e.consume(t),A):I(t)}function M(t){return t===45||t===46||t===58||t===95||y(t)?(e.consume(t),M):N(t)}function N(t){return t===61?(e.consume(t),P):T(t)?(o=N,L(t)):D(t)?(e.consume(t),N):A(t)}function P(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,F):T(t)?(o=P,L(t)):D(t)?(e.consume(t),P):(e.consume(t),ee)}function F(t){return t===i?(e.consume(t),i=void 0,te):t===null?n(t):T(t)?(o=F,L(t)):(e.consume(t),F)}function ee(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||E(t)?A(t):(e.consume(t),ee)}function te(e){return e===47||e===62||E(e)?A(e):n(e)}function I(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function L(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),R}function R(t){return D(t)?j(e,z,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):z(t)}function z(t){return e.enter(`htmlTextData`),o(t)}}let nt={name:`labelEnd`,resolveAll:ot,resolveTo:st,tokenize:ct},rt={tokenize:lt},it={tokenize:ut},at={tokenize:dt};function ot(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&u(e,0,e.length,n),e}function st(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},f={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=d(s,e.slice(a+1,a+r+3)),s=d(s,[[`enter`,f,t]]),s=d(s,L(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=d(s,[[`exit`,f,t],e[o-2],e[o-1],[`exit`,l,t]]),s=d(s,e.slice(o+1)),s=d(s,[[`exit`,c,t]]),u(e,a,e.length,s),e}function ct(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(_(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(rt,u,o?u:d)(t):t===91?e.attempt(it,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(at,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function lt(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return E(t)?Fe(e,a)(t):a(t)}function a(t){return t===41?u(t):Me(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return E(t)?Fe(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Pe(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return E(t)?Fe(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function ut(e,t,n){let r=this;return i;function i(t){return Ne.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(_(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function dt(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}let ft={name:`labelStartImage`,resolveAll:nt.resolveAll,tokenize:pt};function pt(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}let mt={name:`labelStartLink`,resolveAll:nt.resolveAll,tokenize:ht};function ht(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}let gt={name:`lineEnding`,tokenize:_t};function _t(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),j(e,t,`linePrefix`)}}let vt={name:`thematicBreak`,tokenize:yt};function yt(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||T(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),D(t)?j(e,s,`whitespace`)(t):s(t))}}let G={continuation:{tokenize:Ct},exit:Tt,name:`list`,tokenize:St},bt={partial:!0,tokenize:Et},xt={partial:!0,tokenize:wt};function St(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:S(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(vt,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return S(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(H,r.interrupt?n:u,e.attempt(bt,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return D(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Ct(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(H,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,j(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!D(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(xt,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,j(e,e.attempt(G,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function wt(e,t,n){let r=this;return j(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Tt(e){e.exit(this.containerState.type)}function Et(e,t,n){let r=this;return j(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!D(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}let Dt={name:`setextUnderline`,resolveTo:Ot,tokenize:kt};function Ot(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function kt(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),D(t)?j(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||T(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}let At={tokenize:jt};function jt(e){let t=this,n=e.attempt(H,r,e.attempt(this.parser.constructs.flowInitial,i,j(e,e.attempt(this.parser.constructs.flow,i,e.attempt(De,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}let Mt={resolveAll:It()},Nt=Ft(`string`),Pt=Ft(`text`);function Ft(e){return{resolveAll:It(e===`text`?Lt:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function It(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Lt(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Rt=n({attentionMarkers:()=>Kt,contentInitial:()=>Bt,disable:()=>qt,document:()=>zt,flow:()=>Ht,flowInitial:()=>Vt,insideSpan:()=>Gt,string:()=>Ut,text:()=>Wt});let zt={42:G,43:G,45:G,48:G,49:G,50:G,51:G,52:G,53:G,54:G,55:G,56:G,57:G,62:ae},Bt={91:Ie},Vt={[-2]:U,[-1]:U,32:U},Ht={35:He,42:vt,45:[Dt,vt],60:qe,61:Dt,95:vt,96:me,126:me},Ut={38:de,92:le},Wt={[-5]:gt,[-4]:gt,[-3]:gt,33:ft,38:de,42:R,60:[ne,et],91:mt,92:[Be,le],93:nt,95:R,96:be},Gt={null:[R,Mt]},Kt={null:[42,95]},qt={null:[]};function Jt(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:E(C),check:E(w),consume:b,enter:x,exit:S,interrupt:E(w,{interrupt:!0})},l={code:null,containerState:{},defineSkip:_,events:[],now:g,parser:e,previous:null,sliceSerialize:m,sliceStream:h,write:p},f=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function p(e){return o=d(o,e),v(),o[o.length-1]===null?(D(t,0),l.events=L(a,l.events,l),l.events):[]}function m(e,t){return Xt(h(e),t)}function h(e){return Yt(o,e)}function g(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function _(e){i[e.line]=e.column,k()}function v(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)y(t.charCodeAt(r._bufferIndex));else y(t)}}function y(e){f=f(e)}function b(e){T(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,k()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function x(e,t){let n=t||{};return n.type=e,n.start=g(),l.events.push([`enter`,n,l]),s.push(n),n}function S(e){let t=s.pop();return t.end=g(),l.events.push([`exit`,t,l]),t}function C(e,t){D(e,t.from)}function w(e,t){t.restore()}function E(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=O(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function D(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&u(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function O(){let e=g(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Yt(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Xt(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
1
|
+
var GithubMarkdownAdf=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r};let r={};function i(e,t){let n=t||r;return a(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function a(e,t,n){if(s(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return o(e.children,t,n)}return Array.isArray(e)?o(e,t,n):``}function o(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=a(e[i],t,n);return r.join(``)}function s(e){return!!(e&&typeof e==`object`)}let c=document.createElement(`i`);function l(e){let t=`&`+e+`;`;c.innerHTML=t;let n=c.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function u(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function d(e,t){return e.length>0?(u(e,e.length,0,t),e):t}let f={}.hasOwnProperty;function p(e){let t={},n=-1;for(;++n<e.length;)m(t,e[n]);return t}function m(e,t){let n;for(n in t){let r=(f.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){f.call(r,a)||(r[a]=[]);let e=i[a];h(r[a],Array.isArray(e)?e:e?[e]:[])}}}function h(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);u(e,0,0,r)}function g(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function _(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}let v=A(/[A-Za-z]/),y=A(/[\dA-Za-z]/),b=A(/[#-'*+\--9=?A-Z^-~]/);function x(e){return e!==null&&(e<32||e===127)}let S=A(/\d/),C=A(/[\dA-Fa-f]/),w=A(/[!-/:-@[-`{-~]/);function T(e){return e!==null&&e<-2}function E(e){return e!==null&&(e<0||e===32)}function D(e){return e===-2||e===-1||e===32}let O=A(/\p{P}|\p{S}/u),k=A(/\s/);function A(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function j(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return D(r)?(e.enter(n),s(r)):t(r)}function s(r){return D(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}let M={tokenize:N};function N(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),j(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return T(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}let P={tokenize:ee},F={tokenize:te};function ee(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}v(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return u(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return p(a);if(i.currentConstruct&&i.currentConstruct.concrete)return h(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(F,d,f)(a)}function d(e){return i&&y(),v(r),p(e)}function f(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(F,m,h)(n)}function m(e){return r++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){if(n===null){i&&y(),v(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),g(n)}function g(n){if(n===null){_(e.exit(`chunkFlow`),!0),v(0),e.consume(n);return}return T(n)?(e.consume(n),_(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),g)}function _(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(v(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;u(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function v(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function y(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function te(e,t,n){return j(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function I(e){if(e===null||E(e)||k(e))return 1;if(O(e))return 2}function L(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}let R={name:`attention`,resolveAll:z,tokenize:B};function z(e,t){let n=-1,r,i,a,o,s,c,l,f;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let p={...e[r][1].end},m={...e[n][1].start};V(p,-c),V(m,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:p,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:m},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=d(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=d(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=d(l,L(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=d(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,l=d(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):f=0,u(e,r-1,n-r+3,l),n=r+l.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function B(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=I(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=I(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function V(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let ne={name:`autolink`,tokenize:re};function re(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return v(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||y(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||y(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||x(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):b(t)?(e.consume(t),l):n(t)}function u(e){return y(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||y(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}let H={partial:!0,tokenize:ie};function ie(e,t,n){return r;function r(t){return D(t)?j(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||T(e)?t(e):n(e)}}let ae={continuation:{tokenize:se},exit:ce,name:`blockQuote`,tokenize:oe};function oe(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return D(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function se(e,t,n){let r=this;return i;function i(t){return D(t)?j(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(ae,t,n)(r)}}function ce(e){e.exit(`blockQuote`)}let le={name:`characterEscape`,tokenize:ue};function ue(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return w(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}let de={name:`characterReference`,tokenize:fe};function fe(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),u):(e.enter(`characterReferenceValue`),a=31,o=y,d(t))}function u(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=C,d):(e.enter(`characterReferenceValue`),a=7,o=S,d(t))}function d(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===y&&!l(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),d):n(s)}}let pe={partial:!0,tokenize:ge},me={concrete:!0,name:`codeFenced`,tokenize:he};function he(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),D(t)?j(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||T(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(pe,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||T(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):D(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),j(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||T(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||T(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&D(t)?j(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||T(t)?e.check(pe,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||T(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),D(t)?j(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),D(t)?j(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||T(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function ge(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}let _e={name:`codeIndented`,tokenize:ye},ve={partial:!0,tokenize:be};function ye(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),j(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):T(t)?e.attempt(ve,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||T(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function be(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):T(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):j(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):T(e)?i(e):n(e)}}let xe={name:`codeText`,previous:Ce,resolve:Se,tokenize:we};function Se(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Ce(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function we(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):T(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||T(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Te=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&U(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),U(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),U(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);U(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);U(this.left,t.reverse())}}};function U(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ee(e){let t={},n=-1,r,i,a,o,s,c,l,d=new Te(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type===`chunkFlow`&&d.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,De(d,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=d.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(d.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...d.get(i)[1].start},s=d.slice(i,n),s.unshift(r),d.splice(i,n-i+1,s))}}return u(e,0,1/0,d.slice(0)),!l}function De(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}let Oe={resolve:Ae,tokenize:je},ke={partial:!0,tokenize:Me};function Ae(e){return Ee(e),e}function je(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):T(t)?e.check(ke,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Me(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j(e,a,`linePrefix`)}function a(i){if(i===null||T(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Ne(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||x(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||T(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||E(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||x(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Pe(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):T(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||T(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!D(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Fe(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):T(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||T(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Ie(e,t){let n;return r;function r(i){return T(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):D(i)?j(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}let Le={name:`definition`,tokenize:ze},Re={partial:!0,tokenize:Be};function ze(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Pe.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=_(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return E(t)?Ie(e,l)(t):l(t)}function l(t){return Ne(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Re,d,d)(t)}function d(t){return D(t)?j(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||T(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Be(e,t,n){return r;function r(t){return E(t)?Ie(e,i)(t):n(t)}function i(t){return Fe(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return D(t)?j(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||T(e)?t(e):n(e)}}let Ve={name:`hardBreakEscape`,tokenize:He};function He(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return T(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}let Ue={name:`headingAtx`,resolve:We,tokenize:Ge};function We(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},u(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Ge(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||E(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||T(n)?(e.exit(`atxHeading`),t(n)):D(n)?j(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||E(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}let Ke=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),qe=[`pre`,`script`,`style`,`textarea`],Je={concrete:!0,name:`htmlFlow`,resolveTo:Ze,tokenize:Qe},Ye={partial:!0,tokenize:et},Xe={partial:!0,tokenize:$e};function Ze(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Qe(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:z):v(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):v(a)?(e.consume(a),i=4,r.interrupt?t:z):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:z):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:N:m):n(i)}function h(t){return v(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||E(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&qe.includes(l)?(i=1,r.interrupt?t(s):N(s)):Ke.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):N(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?b(s):x(s))}return s===45||y(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:N):n(i)}function b(t){return D(t)?(e.consume(t),b):j(t)}function x(t){return t===47?(e.consume(t),j):t===58||t===95||v(t)?(e.consume(t),S):D(t)?(e.consume(t),x):j(t)}function S(t){return t===45||t===46||t===58||t===95||y(t)?(e.consume(t),S):C(t)}function C(t){return t===61?(e.consume(t),w):D(t)?(e.consume(t),C):x(t)}function w(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,O):D(t)?(e.consume(t),w):k(t)}function O(t){return t===c?(e.consume(t),c=null,A):t===null||T(t)?n(t):(e.consume(t),O)}function k(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||E(t)?C(t):(e.consume(t),k)}function A(e){return e===47||e===62||D(e)?x(e):n(e)}function j(t){return t===62?(e.consume(t),M):n(t)}function M(t){return t===null||T(t)?N(t):D(t)?(e.consume(t),M):n(t)}function N(t){return t===45&&i===2?(e.consume(t),te):t===60&&i===1?(e.consume(t),I):t===62&&i===4?(e.consume(t),B):t===63&&i===3?(e.consume(t),z):t===93&&i===5?(e.consume(t),R):T(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Ye,V,P)(t)):t===null||T(t)?(e.exit(`htmlFlowData`),P(t)):(e.consume(t),N)}function P(t){return e.check(Xe,F,V)(t)}function F(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return t===null||T(t)?P(t):(e.enter(`htmlFlowData`),N(t))}function te(t){return t===45?(e.consume(t),z):N(t)}function I(t){return t===47?(e.consume(t),o=``,L):N(t)}function L(t){if(t===62){let n=o.toLowerCase();return qe.includes(n)?(e.consume(t),B):N(t)}return v(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),L):N(t)}function R(t){return t===93?(e.consume(t),z):N(t)}function z(t){return t===62?(e.consume(t),B):t===45&&i===2?(e.consume(t),z):N(t)}function B(t){return t===null||T(t)?(e.exit(`htmlFlowData`),V(t)):(e.consume(t),B)}function V(n){return e.exit(`htmlFlow`),t(n)}}function $e(e,t,n){let r=this;return i;function i(t){return T(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function et(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(H,t,n)}}let tt={name:`htmlText`,tokenize:nt};function nt(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),C):t===63?(e.consume(t),x):v(t)?(e.consume(t),k):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):v(t)?(e.consume(t),b):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):T(t)?(o=d,L(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?I(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):T(t)?(o=h,L(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?I(t):t===93?(e.consume(t),_):h(t)}function b(t){return t===null||t===62?I(t):T(t)?(o=b,L(t)):(e.consume(t),b)}function x(t){return t===null?n(t):t===63?(e.consume(t),S):T(t)?(o=x,L(t)):(e.consume(t),x)}function S(e){return e===62?I(e):x(e)}function C(t){return v(t)?(e.consume(t),w):n(t)}function w(t){return t===45||y(t)?(e.consume(t),w):O(t)}function O(t){return T(t)?(o=O,L(t)):D(t)?(e.consume(t),O):I(t)}function k(t){return t===45||y(t)?(e.consume(t),k):t===47||t===62||E(t)?A(t):n(t)}function A(t){return t===47?(e.consume(t),I):t===58||t===95||v(t)?(e.consume(t),M):T(t)?(o=A,L(t)):D(t)?(e.consume(t),A):I(t)}function M(t){return t===45||t===46||t===58||t===95||y(t)?(e.consume(t),M):N(t)}function N(t){return t===61?(e.consume(t),P):T(t)?(o=N,L(t)):D(t)?(e.consume(t),N):A(t)}function P(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,F):T(t)?(o=P,L(t)):D(t)?(e.consume(t),P):(e.consume(t),ee)}function F(t){return t===i?(e.consume(t),i=void 0,te):t===null?n(t):T(t)?(o=F,L(t)):(e.consume(t),F)}function ee(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||E(t)?A(t):(e.consume(t),ee)}function te(e){return e===47||e===62||E(e)?A(e):n(e)}function I(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function L(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),R}function R(t){return D(t)?j(e,z,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):z(t)}function z(t){return e.enter(`htmlTextData`),o(t)}}let rt={name:`labelEnd`,resolveAll:st,resolveTo:ct,tokenize:lt},it={tokenize:ut},at={tokenize:dt},ot={tokenize:ft};function st(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&u(e,0,e.length,n),e}function ct(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},f={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=d(s,e.slice(a+1,a+r+3)),s=d(s,[[`enter`,f,t]]),s=d(s,L(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=d(s,[[`exit`,f,t],e[o-2],e[o-1],[`exit`,l,t]]),s=d(s,e.slice(o+1)),s=d(s,[[`exit`,c,t]]),u(e,a,e.length,s),e}function lt(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(_(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(it,u,o?u:d)(t):t===91?e.attempt(at,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(ot,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function ut(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return E(t)?Ie(e,a)(t):a(t)}function a(t){return t===41?u(t):Ne(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return E(t)?Ie(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Fe(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return E(t)?Ie(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function dt(e,t,n){let r=this;return i;function i(t){return Pe.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(_(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function ft(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}let pt={name:`labelStartImage`,resolveAll:rt.resolveAll,tokenize:mt};function mt(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}let ht={name:`labelStartLink`,resolveAll:rt.resolveAll,tokenize:gt};function gt(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}let _t={name:`lineEnding`,tokenize:vt};function vt(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),j(e,t,`linePrefix`)}}let yt={name:`thematicBreak`,tokenize:bt};function bt(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||T(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),D(t)?j(e,s,`whitespace`)(t):s(t))}}let W={continuation:{tokenize:wt},exit:Et,name:`list`,tokenize:Ct},xt={partial:!0,tokenize:Dt},St={partial:!0,tokenize:Tt};function Ct(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:S(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(yt,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return S(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(H,r.interrupt?n:u,e.attempt(xt,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return D(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function wt(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(H,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,j(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!D(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(St,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,j(e,e.attempt(W,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Tt(e,t,n){let r=this;return j(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Et(e){e.exit(this.containerState.type)}function Dt(e,t,n){let r=this;return j(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!D(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}let Ot={name:`setextUnderline`,resolveTo:kt,tokenize:At};function kt(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function At(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),D(t)?j(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||T(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}let jt={tokenize:Mt};function Mt(e){let t=this,n=e.attempt(H,r,e.attempt(this.parser.constructs.flowInitial,i,j(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Oe,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}let Nt={resolveAll:Lt()},Pt=It(`string`),Ft=It(`text`);function It(e){return{resolveAll:Lt(e===`text`?Rt:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Lt(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Rt(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var zt=n({attentionMarkers:()=>qt,contentInitial:()=>Vt,disable:()=>Jt,document:()=>Bt,flow:()=>Ut,flowInitial:()=>Ht,insideSpan:()=>Kt,string:()=>Wt,text:()=>Gt});let Bt={42:W,43:W,45:W,48:W,49:W,50:W,51:W,52:W,53:W,54:W,55:W,56:W,57:W,62:ae},Vt={91:Le},Ht={[-2]:_e,[-1]:_e,32:_e},Ut={35:Ue,42:yt,45:[Ot,yt],60:Je,61:Ot,95:yt,96:me,126:me},Wt={38:de,92:le},Gt={[-5]:_t,[-4]:_t,[-3]:_t,33:pt,38:de,42:R,60:[ne,tt],91:ht,92:[Ve,le],93:rt,95:R,96:xe},Kt={null:[R,Nt]},qt={null:[42,95]},Jt={null:[]};function Yt(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:E(C),check:E(w),consume:b,enter:x,exit:S,interrupt:E(w,{interrupt:!0})},l={code:null,containerState:{},defineSkip:_,events:[],now:g,parser:e,previous:null,sliceSerialize:m,sliceStream:h,write:p},f=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function p(e){return o=d(o,e),v(),o[o.length-1]===null?(D(t,0),l.events=L(a,l.events,l),l.events):[]}function m(e,t){return Zt(h(e),t)}function h(e){return Xt(o,e)}function g(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function _(e){i[e.line]=e.column,k()}function v(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)y(t.charCodeAt(r._bufferIndex));else y(t)}}function y(e){f=f(e)}function b(e){T(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,k()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function x(e,t){let n=t||{};return n.type=e,n.start=g(),l.events.push([`enter`,n,l]),s.push(n),n}function S(e){let t=s.pop();return t.end=g(),l.events.push([`exit`,t,l]),t}function C(e,t){D(e,t.from)}function w(e,t){t.restore()}function E(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=O(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function D(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&u(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function O(){let e=g(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Xt(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Zt(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
2
2
|
`;break;case-3:o=`\r
|
|
3
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Zt(e){let t={constructs:p([Rt,...(e||{}).extensions||[]]),content:n(M),defined:[],document:n(P),flow:n(At),lazy:{},string:n(Nt),text:n(Pt)};return t;function n(e){return n;function n(n){return Jt(t,e,n)}}}function Qt(e){for(;!Te(e););return e}let $t=/[\0\t\n\r]/g;function en(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if($t.lastIndex=u,c=$t.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}let tn=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nn(e){return e.replace(tn,rn)}function rn(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return g(n.slice(t?2:1),t?16:10)}return l(n)||e}function an(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?sn(e.position):`start`in e||`end`in e?sn(e):`line`in e||`column`in e?on(e):``}function on(e){return cn(e&&e.line)+`:`+cn(e&&e.column)}function sn(e){return on(e&&e.start)+`-`+on(e&&e.end)}function cn(e){return e&&typeof e==`number`?e:1}let ln={}.hasOwnProperty;function un(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),dn(n)(Qt(Zt(n).document().write(en()(e,t,!0))))}function dn(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(ge),autolinkProtocol:k,autolinkEmail:k,atxHeading:o(fe),blockQuote:o(se),characterEscape:k,characterReference:k,codeFenced:o(ce),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(ce,s),codeText:o(le,s),codeTextData:k,data:k,codeFlowValue:k,definition:o(ue),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(de),hardBreakEscape:o(pe),hardBreakTrailing:o(pe),htmlFlow:o(me,s),htmlFlowData:k,htmlText:o(me,s),htmlTextData:k,image:o(he),label:s,link:o(ge),listItem:o(_e),listItemValue:m,listOrdered:o(U,p),listUnordered:o(U),paragraph:o(ve),reference:V,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(fe),strong:o(ye),thematicBreak:o(xe)},exit:{atxHeading:u(),atxHeadingSequence:T,autolink:u(),autolinkEmail:oe,autolinkProtocol:ae,blockQuote:u(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:H,characterReference:ie,codeFenced:u(b),codeFencedFence:y,codeFencedFenceInfo:h,codeFencedFenceMeta:v,codeFlowValue:A,codeIndented:u(x),codeText:u(F),codeTextData:A,data:A,definition:u(),definitionDestinationString:w,definitionLabelString:S,definitionTitleString:C,emphasis:u(),hardBreakEscape:u(M),hardBreakTrailing:u(M),htmlFlow:u(N),htmlFlowData:A,htmlText:u(P),htmlTextData:A,image:u(te),label:L,labelText:I,lineEnding:j,link:u(ee),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ne,resourceDestinationString:R,resourceTitleString:z,resource:B,setextHeading:u(O),setextHeadingLineSequence:D,setextHeadingText:E,strong:u(),thematicBreak:u()}};fn(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},i={stack:[r],tokenStack:[],config:t,enter:c,exit:d,buffer:s,resume:f,data:n},o=[],l=-1;for(;++l<e.length;)(e[l][1].type===`listOrdered`||e[l][1].type===`listUnordered`)&&(e[l][0]===`enter`?o.push(l):l=a(e,o.pop(),l));for(l=-1;++l<e.length;){let n=t[e[l][0]];ln.call(n,e[l][1].type)&&n[e[l][1].type].call(Object.assign({sliceSerialize:e[l][2].sliceSerialize},i),e[l][1])}if(i.tokenStack.length>0){let e=i.tokenStack[i.tokenStack.length-1];(e[1]||mn).call(i,void 0,e[0])}for(r.position={start:K(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:K(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},l=-1;++l<t.transforms.length;)r=t.transforms[l](r)||r;return r}function a(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:K(t.start),end:void 0}}function u(e){return t;function t(t){e&&e.call(this,t),d.call(this,t)}}function d(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||mn).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+an({start:e.start,end:e.end})+`): it’s not open`);n.position.end=K(e.end)}function f(){return i(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function m(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function S(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=_(this.sliceSerialize(e)).toLowerCase()}function C(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function w(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function T(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function E(){this.data.setextHeadingSlurpLineEnding=!0}function D(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function k(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=be(),n.position={start:K(e.start),end:void 0},t.push(n)),this.stack.push(n)}function A(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=K(e.end)}function j(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=K(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(k.call(this,e),A.call(this,e))}function M(){this.data.atHardBreak=!0}function N(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function P(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ee(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function te(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function I(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=nn(t),n.identifier=_(t).toLowerCase()}function L(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function R(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function z(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function B(){this.data.inReference=void 0}function V(){this.data.referenceType=`collapsed`}function ne(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=_(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function re(e){this.data.characterReferenceType=e.type}function H(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=g(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=l(t);let i=this.stack[this.stack.length-1];i.value+=r}function ie(e){let t=this.stack.pop();t.position.end=K(e.end)}function ae(e){A.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function oe(e){A.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function se(){return{type:`blockquote`,children:[]}}function ce(){return{type:`code`,lang:null,meta:null,value:``}}function le(){return{type:`inlineCode`,value:``}}function ue(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function de(){return{type:`emphasis`,children:[]}}function fe(){return{type:`heading`,depth:0,children:[]}}function pe(){return{type:`break`}}function me(){return{type:`html`,value:``}}function he(){return{type:`image`,title:null,url:``,alt:null}}function ge(){return{type:`link`,title:null,url:``,children:[]}}function U(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function _e(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function ve(){return{type:`paragraph`,children:[]}}function ye(){return{type:`strong`,children:[]}}function be(){return{type:`text`,value:``}}function xe(){return{type:`thematicBreak`}}}function K(e){return{line:e.line,column:e.column,offset:e.offset}}function fn(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?fn(e,r):pn(e,r)}}function pn(e,t){let n;for(n in t)if(ln.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function mn(e,t){throw e?Error("Cannot close `"+e.type+"` ("+an({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+an({start:t.start,end:t.end})+`) is open`):Error("Cannot close document, a token (`"+t.type+"`, "+an({start:t.start,end:t.end})+`) is still open`)}function hn(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function gn(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}let _n=(function(e){if(e==null)return Sn;if(typeof e==`function`)return xn(e);if(typeof e==`object`)return Array.isArray(e)?vn(e):yn(e);if(typeof e==`string`)return bn(e);throw Error(`Expected function, string, or object as test`)});function vn(e){let t=[],n=-1;for(;++n<e.length;)t[n]=_n(e[n]);return xn(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function yn(e){let t=e;return xn(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function bn(e){return xn(t);function t(t){return t&&t.type===e}}function xn(e){return t;function t(t,n,r){return!!(Cn(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Sn(){return!0}function Cn(e){return typeof e==`object`&&!!e&&`type`in e}function wn(e){return e}let Tn=[];function En(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=_n(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+wn(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=Tn,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Dn(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Dn(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?Tn:[e]}function On(e,t,n){let r=_n((n||{}).ignore||[]),i=kn(t),a=-1;for(;++a<i.length;)En(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function kn(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([An(e[0]),jn(e[1])])}return t}function An(e){return typeof e==`string`?new RegExp(gn(e),`g`):e}function jn(e){return typeof e==`function`?e:function(){return e}}function Mn(){return{transforms:[zn],enter:{literalAutolink:Nn,literalAutolinkEmail:Pn,literalAutolinkHttp:Pn,literalAutolinkWww:Pn},exit:{literalAutolink:Rn,literalAutolinkEmail:Ln,literalAutolinkHttp:Fn,literalAutolinkWww:In}}}function Nn(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Pn(e){this.config.enter.autolinkProtocol.call(this,e)}function Fn(e){this.config.exit.autolinkProtocol.call(this,e)}function In(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 Ln(e){this.config.exit.autolinkEmail.call(this,e)}function Rn(e){this.exit(e)}function zn(e){On(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Bn],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Vn]],{ignore:[`link`,`linkReference`]})}function Bn(e,t,n,r,i){let a=``;if(!Wn(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Hn(n)))return!1;let o=Un(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 Vn(e,t,n,r){return!Wn(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Hn(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 Un(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=hn(e,`(`),a=hn(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Wn(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||k(n)||O(n))&&(!t||n!==47)}er.peek=$n;function Gn(){this.buffer()}function Kn(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function qn(){this.buffer()}function Jn(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Yn(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Xn(e){this.exit(e)}function Zn(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Qn(e){this.exit(e)}function $n(){return`[`}function er(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 tr(){return{enter:{gfmFootnoteCallString:Gn,gfmFootnoteCall:Kn,gfmFootnoteDefinitionLabelString:qn,gfmFootnoteDefinition:Jn},exit:{gfmFootnoteCallString:Yn,gfmFootnoteCall:Xn,gfmFootnoteDefinitionLabelString:Zn,gfmFootnoteDefinition:Qn}}}ar.peek=or;function nr(){return{canContainEols:[`delete`],enter:{strikethrough:rr},exit:{strikethrough:ir}}}function rr(e){this.enter({type:`delete`,children:[]},e)}function ir(e){this.exit(e)}function ar(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 or(){return`~`}function sr(){return{enter:{table:cr,tableData:fr,tableHeader:fr,tableRow:ur},exit:{codeText:pr,table:lr,tableData:dr,tableHeader:dr,tableRow:dr}}}function cr(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 lr(e){this.exit(e),this.data.inTable=void 0}function ur(e){this.enter({type:`tableRow`,children:[]},e)}function dr(e){this.exit(e)}function fr(e){this.enter({type:`tableCell`,children:[]},e)}function pr(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,mr));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function mr(e,t){return t===`|`?t:e}function hr(){return{exit:{taskListCheckValueChecked:gr,taskListCheckValueUnchecked:gr,paragraph:_r}}}function gr(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function _r(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 vr(){return[Mn(),tr(),nr(),sr(),hr()]}let yr={tokenize:Ar,partial:!0},br={tokenize:jr,partial:!0},xr={tokenize:Mr,partial:!0},Sr={tokenize:Nr,partial:!0},Cr={tokenize:Pr,partial:!0},wr={name:`wwwAutolink`,tokenize:Or,previous:Fr},Tr={name:`protocolAutolink`,tokenize:kr,previous:Ir},q={name:`emailAutolink`,tokenize:Dr,previous:Lr},J={};function Er(){return{text:J}}let Y=48;for(;Y<123;)J[Y]=q,Y++,Y===58?Y=65:Y===91&&(Y=97);J[43]=q,J[45]=q,J[46]=q,J[95]=q,J[72]=[q,Tr],J[104]=[q,Tr],J[87]=[q,wr],J[119]=[q,wr];function Dr(e,t,n){let r=this,i,a;return o;function o(t){return!Rr(t)||!Lr.call(r,r.previous)||zr(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Rr(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Cr,u,l)(t):t===45||t===95||y(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&v(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Or(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Fr.call(r,r.previous)||zr(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(yr,e.attempt(br,e.attempt(xr,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function kr(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Ir.call(r,r.previous)&&!zr(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(v(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||x(t)||E(t)||k(t)||O(t)?n(t):e.attempt(br,e.attempt(xr,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Ar(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 jr(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Sr,c,s)(t):t===null||E(t)||k(t)||t!==45&&O(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Mr(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Sr,t,a)(o):o===null||E(o)||k(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Nr(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||E(o)||k(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||E(e)||k(e)?t(e):r(e)}function a(e){return v(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):v(t)?(e.consume(t),o):n(t)}}function Pr(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return y(e)?n(e):t(e)}}function Fr(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||E(e)}function Ir(e){return!v(e)}function Lr(e){return!(e===47||Rr(e))}function Rr(e){return e===43||e===45||e===46||e===95||y(e)}function zr(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}let Br={tokenize:Jr,partial:!0};function Vr(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Gr,continuation:{tokenize:Kr},exit:qr}},text:{91:{name:`gfmFootnoteCall`,tokenize:Wr},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Hr,resolveTo:Ur}}}}function Hr(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=_(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 Ur(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 Wr(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||E(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(_(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return E(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Gr(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||E(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=_(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return E(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),j(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Kr(e,t,n){return e.check(H,t,e.attempt(Br,t,n))}function qr(e){e.exit(`gfmFootnoteDefinition`)}function Jr(e,t,n){let r=this;return j(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 Yr(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&u(o,o.length,0,L(s,e.slice(r+1,n),t)),u(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),u(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=I(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=I(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Xr=class{constructor(){this.map=[]}add(e,t,n){Zr(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 Zr(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 Qr(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 $r(){return{flow:{null:{name:`table`,tokenize:ei,resolveAll:ti}}}}function ei(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):T(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):D(t)?j(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||E(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,D(t)?j(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return D(t)?j(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||T(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return D(t)?j(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||T(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||T(n)?(e.exit(`tableRow`),t(n)):D(n)?j(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||E(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?O:w)}function O(t){return t===92||t===124?(e.consume(t),w):w(t)}}function ti(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 Xr;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(ri(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=ni(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=ni(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=ni(f,t,o,i,n,d)):(o[0]=o[1],d=ni(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&ri(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=Qr(t.events,n))}return e}function ni(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},X(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=X(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=X(t.events,n[2]),a=X(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({},X(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function ri(e,t,n,r,i){let a=[],o=X(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 X(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}let ii={name:`tasklistCheck`,tokenize:oi};function ai(){return{text:{91:ii}}}function oi(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return E(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return T(r)?t(r):D(r)?e.check({tokenize:si},t,n)(r):n(r)}}function si(e,t,n){return j(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function ci(e){return p([Er(),Vr(),Yr(e),$r(),ai()])}let li={extensions:[ci()],mdastExtensions:[vr()]};function ui(e){return un(e,li)}let di={ts:`typescript`,js:`javascript`,jsx:`javascript`,tsx:`typescript`,py:`python`,rb:`ruby`,sh:`bash`,zsh:`bash`,shell:`bash`,yml:`yaml`,md:`markdown`,rs:`rust`,kt:`kotlin`,tf:`hcl`,dockerfile:`docker`};function fi(e){if(!e)return;let t=e.toLowerCase().trim();if(t)return di[t]??t}let pi=/^<(ins|sub|sup)>$/i,mi=/^<\/(ins|sub|sup)>$/i;function hi(e){let t=e.toLowerCase();return t===`ins`?{type:`underline`}:t===`sub`?{type:`subsup`,attrs:{type:`sub`}}:t===`sup`?{type:`subsup`,attrs:{type:`sup`}}:null}function Z(e){let t=[],n=[];for(let r of e){if(r.type===`html`){let e=pi.exec(r.value);if(e){let n=hi(e[1]??``);n&&t.push(n);continue}if(mi.exec(r.value)){t.pop();continue}}n.push(...gi(r,t.slice()))}return n}function gi(e,t){switch(e.type){case`text`:return e.value?[_i(e.value,t)]:[];case`inlineCode`:{let n=[...t.filter(e=>e.type===`link`),{type:`code`}];return[_i(e.value,n)]}case`strong`:return e.children.flatMap(e=>gi(e,[...t,{type:`strong`}]));case`emphasis`:return e.children.flatMap(e=>gi(e,[...t,{type:`em`}]));case`delete`:return e.children.flatMap(e=>gi(e,[...t,{type:`strike`}]));case`link`:{let n={type:`link`,attrs:{href:e.url,...e.title?{title:e.title}:{}}};return e.children.flatMap(e=>gi(e,[...t,n]))}case`image`:return[{type:`inlineCard`,attrs:{url:e.url}}];case`break`:return[{type:`hardBreak`}];case`html`:return vi(e.value,t);case`linkReference`:case`imageReference`:return[];default:return[]}}function _i(e,t){let n={type:`text`,text:e};return t.length>0&&(n.marks=t),n}function vi(e,t){let n=e.replace(/<[^>]+>/g,``);return n?[_i(n,t)]:[]}function yi(e){return{type:`heading`,attrs:{level:e.depth},content:Z(e.children)}}function bi(e){return{type:`paragraph`,content:Z(e.children)}}function xi(e){let t={type:`codeBlock`},n=fi(e.lang);return n&&(t.attrs={language:n}),e.value&&(t.content=[{type:`text`,text:e.value}]),t}function Si(e){return{type:`rule`}}let Ci=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*/i,wi={NOTE:`note`,TIP:`info`,IMPORTANT:`warning`,WARNING:`warning`,CAUTION:`error`};function Ti(e,t,n){let r=e.children[0].value.replace(Ci,``).trim(),i=e.children.slice(1),a=[];if(r||i.length>0){let e={type:`paragraph`,children:[...r?[{type:`text`,value:r}]:[],...i]};e.children.length>0&&a.push(bi(e))}return a.push(...n(t)),a.length===0&&a.push({type:`paragraph`,content:[]}),a}function Ei(e,t){let n=e.children[0];if(n?.type!==`paragraph`)return null;let r=n.children[0];if(r?.type!==`text`)return null;let i=Ci.exec(r.value);if(!i)return null;let a=wi[(i[1]??`NOTE`).toUpperCase()]??`info`,o=Ti(n,e.children.slice(1),t);return{type:`panel`,attrs:{panelType:a},content:o}}function Di(e,t){let n=Ei(e,t);if(n)return n;let r=t(e.children);return{type:`blockquote`,content:r.length>0?r:[{type:`paragraph`,content:[]}]}}let Oi=/^<details[^>]*>\s*<summary[^>]*>([\s\S]*?)<\/summary>\s*$/i,ki=/^<\/details>\s*$/i,Ai=new Set([`paragraph`,`heading`,`bulletList`,`orderedList`,`codeBlock`,`blockquote`,`panel`,`rule`,`table`,`mediaGroup`,`mediaSingle`,`nestedExpand`]);function ji(e){return Ai.has(e.type)}function Mi(e){let t=/^<details[^>]*>\s*/i.exec(e);if(!t)return null;let n=t[0].length,r=e.slice(n),i=/^<summary[^>]*>/i.exec(r);if(!i)return null;n+=i[0].length;let a=e.slice(n),o=a.search(/<\/summary>/i);if(o===-1)return null;let s=a.slice(0,o);n+=o+10;let c=n,l=/<details[^>]*>/gi,u=/<\/details>/gi,d=1;l.lastIndex=c,u.lastIndex=c;let f=-1;for(;d>0;){let t=l.exec(e),r=u.exec(e);if(!r)return null;if(t&&t.index<r.index){d++,u.lastIndex=l.lastIndex;continue}if(d--,d===0){f=r.index,n=r.index+r[0].length;break}l.lastIndex=u.lastIndex}return f===-1||e.slice(n).trim().length>0?null:{title:s,body:e.slice(c,f)}}function Ni(e){let t=new Map,n=[];for(let r=0;r<e.length;r++){let i=e[r];if(i.type===`html`){let e=i.value;if(Oi.test(e))n.push(r);else if(ki.test(e)){let e=n.pop();e!==void 0&&t.set(e,r)}}}return t}function Pi(e,t){let n=[],r=Ni(e),i=0;for(;i<e.length;){let a=Fi(e,i,r,t);if(a){ji(a.node)&&n.push(a.node),i=a.next;continue}let o=t(e[i]);o&&ji(o)&&n.push(o),i++}return n}function Fi(e,t,n,r){let i=e[t];if(i.type!==`html`)return null;let a=Mi(i.value);if(a){let e=a.title.trim(),n=a.body.trim(),i=n?Pi(ui(n).children,r):[];return{node:{type:`expand`,attrs:{title:e},content:i},next:t+1}}let o=Oi.exec(i.value);if(o){let i=(o[1]??``).trim(),a=n.get(t)??-1;if(a!==-1){let n=Pi(e.slice(t+1,a),r);return{node:{type:`expand`,attrs:{title:i},content:n},next:a+1}}}return null}function Ii(e){let t=e.value.replace(/<[^>]+>/g,``).trim();return t?{type:`paragraph`,content:[{type:`text`,text:t}]}:null}function Li(){return crypto.randomUUID()}function Ri(e,t){return e.children.some(e=>e.checked!==null&&e.checked!==void 0)?Hi(e):e.ordered?Bi(e,t):zi(e,t)}function zi(e,t){return{type:`bulletList`,content:e.children.map(e=>Vi(e,t))}}function Bi(e,t){let n={type:`orderedList`,content:e.children.map(e=>Vi(e,t))};return e.start!==null&&e.start!==void 0&&e.start!==1&&(n.attrs={order:e.start}),n}function Vi(e,t){let n=[];for(let r of e.children)if(r.type===`paragraph`)n.push({type:`paragraph`,content:Z(r.children)});else if(r.type===`list`){let e=Ri(r,t);e.type===`taskList`?n.length===0&&n.push({type:`paragraph`,content:[]}):(n.length===0&&n.push({type:`paragraph`,content:[]}),n.push(e))}else if(r.type===`code`)n.push({type:`codeBlock`,content:[{type:`text`,text:r.value}],...r.lang?{attrs:{language:r.lang}}:{}});else{let e=t(r);e&&e.type===`paragraph`&&n.push(e)}return n.length===0&&n.push({type:`paragraph`,content:[]}),{type:`listItem`,content:n}}function Hi(e){let t=Li(),n=e.children.map(e=>{let t=e.checked===!0?`DONE`:`TODO`,n=e.children.filter(e=>e.type===`paragraph`).flatMap(e=>Z(e.children)),r={type:`taskItem`,attrs:{localId:Li(),state:t}};return n.length>0&&(r.content=n),r});return{type:`taskList`,attrs:{localId:t},content:n}}function Ui(e){let t=e.children;if(t.length===0)return{type:`table`,content:[]};let n=t[0],r=t.slice(1),i=[];n&&i.push({type:`tableRow`,content:n.children.map(e=>Wi(e))});for(let e of r)i.push({type:`tableRow`,content:e.children.map(e=>Gi(e))});return{type:`table`,content:i}}function Wi(e){let t=Z(e.children);return{type:`tableHeader`,attrs:{},content:[{type:`paragraph`,content:t.length>0?t:[]}]}}function Gi(e){let t=Z(e.children);return{type:`tableCell`,attrs:{},content:[{type:`paragraph`,content:t.length>0?t:[]}]}}function Ki(e){return{version:1,type:`doc`,content:qi(e.children)}}function qi(e){let t=[],n=Ni(e),r=0;for(;r<e.length;){let i=Fi(e,r,n,Ji);if(i){t.push(i.node),r=i.next;continue}let a=Ji(e[r]);a&&t.push(a),r++}return t}function Ji(e){switch(e.type){case`heading`:return yi(e);case`paragraph`:return bi(e);case`code`:return xi(e);case`thematicBreak`:return Si(e);case`blockquote`:return Di(e,e=>e.flatMap(e=>{let t=Ji(e);return t?[t]:[]}));case`list`:return Ri(e,Ji);case`table`:return Ui(e);case`html`:return Ii(e);default:return null}}function Yi(e){return e.replace(/\0/g,``)}function Xi(e){return e.replace(/\r\n/g,`
|
|
3
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Qt(e){let t={constructs:p([zt,...(e||{}).extensions||[]]),content:n(M),defined:[],document:n(P),flow:n(jt),lazy:{},string:n(Pt),text:n(Ft)};return t;function n(e){return n;function n(n){return Yt(t,e,n)}}}function $t(e){for(;!Ee(e););return e}let en=/[\0\t\n\r]/g;function tn(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(en.lastIndex=u,c=en.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}let nn=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function rn(e){return e.replace(nn,an)}function an(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return g(n.slice(t?2:1),t?16:10)}return l(n)||e}function on(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?cn(e.position):`start`in e||`end`in e?cn(e):`line`in e||`column`in e?sn(e):``}function sn(e){return ln(e&&e.line)+`:`+ln(e&&e.column)}function cn(e){return sn(e&&e.start)+`-`+sn(e&&e.end)}function ln(e){return e&&typeof e==`number`?e:1}let un={}.hasOwnProperty;function dn(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),fn(n)($t(Qt(n).document().write(tn()(e,t,!0))))}function fn(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(ge),autolinkProtocol:k,autolinkEmail:k,atxHeading:o(fe),blockQuote:o(se),characterEscape:k,characterReference:k,codeFenced:o(ce),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(ce,s),codeText:o(le,s),codeTextData:k,data:k,codeFlowValue:k,definition:o(ue),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(de),hardBreakEscape:o(pe),hardBreakTrailing:o(pe),htmlFlow:o(me,s),htmlFlowData:k,htmlText:o(me,s),htmlTextData:k,image:o(he),label:s,link:o(ge),listItem:o(ve),listItemValue:m,listOrdered:o(_e,p),listUnordered:o(_e),paragraph:o(ye),reference:V,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(fe),strong:o(be),thematicBreak:o(Se)},exit:{atxHeading:u(),atxHeadingSequence:T,autolink:u(),autolinkEmail:oe,autolinkProtocol:ae,blockQuote:u(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:H,characterReference:ie,codeFenced:u(b),codeFencedFence:y,codeFencedFenceInfo:h,codeFencedFenceMeta:v,codeFlowValue:A,codeIndented:u(x),codeText:u(F),codeTextData:A,data:A,definition:u(),definitionDestinationString:w,definitionLabelString:S,definitionTitleString:C,emphasis:u(),hardBreakEscape:u(M),hardBreakTrailing:u(M),htmlFlow:u(N),htmlFlowData:A,htmlText:u(P),htmlTextData:A,image:u(te),label:L,labelText:I,lineEnding:j,link:u(ee),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ne,resourceDestinationString:R,resourceTitleString:z,resource:B,setextHeading:u(O),setextHeadingLineSequence:D,setextHeadingText:E,strong:u(),thematicBreak:u()}};pn(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},i={stack:[r],tokenStack:[],config:t,enter:c,exit:d,buffer:s,resume:f,data:n},o=[],l=-1;for(;++l<e.length;)(e[l][1].type===`listOrdered`||e[l][1].type===`listUnordered`)&&(e[l][0]===`enter`?o.push(l):l=a(e,o.pop(),l));for(l=-1;++l<e.length;){let n=t[e[l][0]];un.call(n,e[l][1].type)&&n[e[l][1].type].call(Object.assign({sliceSerialize:e[l][2].sliceSerialize},i),e[l][1])}if(i.tokenStack.length>0){let e=i.tokenStack[i.tokenStack.length-1];(e[1]||hn).call(i,void 0,e[0])}for(r.position={start:G(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:G(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},l=-1;++l<t.transforms.length;)r=t.transforms[l](r)||r;return r}function a(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:G(t.start),end:void 0}}function u(e){return t;function t(t){e&&e.call(this,t),d.call(this,t)}}function d(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||hn).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+on({start:e.start,end:e.end})+`): it’s not open`);n.position.end=G(e.end)}function f(){return i(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function m(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function S(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=_(this.sliceSerialize(e)).toLowerCase()}function C(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function w(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function T(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function E(){this.data.setextHeadingSlurpLineEnding=!0}function D(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function k(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=xe(),n.position={start:G(e.start),end:void 0},t.push(n)),this.stack.push(n)}function A(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=G(e.end)}function j(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=G(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(k.call(this,e),A.call(this,e))}function M(){this.data.atHardBreak=!0}function N(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function P(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ee(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function te(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function I(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=rn(t),n.identifier=_(t).toLowerCase()}function L(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function R(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function z(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function B(){this.data.inReference=void 0}function V(){this.data.referenceType=`collapsed`}function ne(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=_(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function re(e){this.data.characterReferenceType=e.type}function H(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=g(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=l(t);let i=this.stack[this.stack.length-1];i.value+=r}function ie(e){let t=this.stack.pop();t.position.end=G(e.end)}function ae(e){A.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function oe(e){A.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function se(){return{type:`blockquote`,children:[]}}function ce(){return{type:`code`,lang:null,meta:null,value:``}}function le(){return{type:`inlineCode`,value:``}}function ue(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function de(){return{type:`emphasis`,children:[]}}function fe(){return{type:`heading`,depth:0,children:[]}}function pe(){return{type:`break`}}function me(){return{type:`html`,value:``}}function he(){return{type:`image`,title:null,url:``,alt:null}}function ge(){return{type:`link`,title:null,url:``,children:[]}}function _e(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ve(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function ye(){return{type:`paragraph`,children:[]}}function be(){return{type:`strong`,children:[]}}function xe(){return{type:`text`,value:``}}function Se(){return{type:`thematicBreak`}}}function G(e){return{line:e.line,column:e.column,offset:e.offset}}function pn(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?pn(e,r):mn(e,r)}}function mn(e,t){let n;for(n in t)if(un.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function hn(e,t){throw e?Error("Cannot close `"+e.type+"` ("+on({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+on({start:t.start,end:t.end})+`) is open`):Error("Cannot close document, a token (`"+t.type+"`, "+on({start:t.start,end:t.end})+`) is still open`)}function gn(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function _n(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}let vn=(function(e){if(e==null)return Cn;if(typeof e==`function`)return Sn(e);if(typeof e==`object`)return Array.isArray(e)?yn(e):bn(e);if(typeof e==`string`)return xn(e);throw Error(`Expected function, string, or object as test`)});function yn(e){let t=[],n=-1;for(;++n<e.length;)t[n]=vn(e[n]);return Sn(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function bn(e){let t=e;return Sn(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function xn(e){return Sn(t);function t(t){return t&&t.type===e}}function Sn(e){return t;function t(t,n,r){return!!(wn(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Cn(){return!0}function wn(e){return typeof e==`object`&&!!e&&`type`in e}function Tn(e){return e}let En=[];function Dn(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=vn(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+Tn(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=En,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=On(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function On(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?En:[e]}function kn(e,t,n){let r=vn((n||{}).ignore||[]),i=An(t),a=-1;for(;++a<i.length;)Dn(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function An(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([jn(e[0]),Mn(e[1])])}return t}function jn(e){return typeof e==`string`?new RegExp(_n(e),`g`):e}function Mn(e){return typeof e==`function`?e:function(){return e}}function Nn(){return{transforms:[Bn],enter:{literalAutolink:Pn,literalAutolinkEmail:Fn,literalAutolinkHttp:Fn,literalAutolinkWww:Fn},exit:{literalAutolink:zn,literalAutolinkEmail:Rn,literalAutolinkHttp:In,literalAutolinkWww:Ln}}}function Pn(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Fn(e){this.config.enter.autolinkProtocol.call(this,e)}function In(e){this.config.exit.autolinkProtocol.call(this,e)}function Ln(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 Rn(e){this.config.exit.autolinkEmail.call(this,e)}function zn(e){this.exit(e)}function Bn(e){kn(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Vn],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Hn]],{ignore:[`link`,`linkReference`]})}function Vn(e,t,n,r,i){let a=``;if(!Gn(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Un(n)))return!1;let o=Wn(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 Hn(e,t,n,r){return!Gn(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Un(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 Wn(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=gn(e,`(`),a=gn(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Gn(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||k(n)||O(n))&&(!t||n!==47)}tr.peek=er;function Kn(){this.buffer()}function qn(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Jn(){this.buffer()}function Yn(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Xn(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Zn(e){this.exit(e)}function Qn(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_(this.sliceSerialize(e)).toLowerCase(),n.label=t}function $n(e){this.exit(e)}function er(){return`[`}function tr(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 nr(){return{enter:{gfmFootnoteCallString:Kn,gfmFootnoteCall:qn,gfmFootnoteDefinitionLabelString:Jn,gfmFootnoteDefinition:Yn},exit:{gfmFootnoteCallString:Xn,gfmFootnoteCall:Zn,gfmFootnoteDefinitionLabelString:Qn,gfmFootnoteDefinition:$n}}}or.peek=sr;function rr(){return{canContainEols:[`delete`],enter:{strikethrough:ir},exit:{strikethrough:ar}}}function ir(e){this.enter({type:`delete`,children:[]},e)}function ar(e){this.exit(e)}function or(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 sr(){return`~`}function cr(){return{enter:{table:lr,tableData:pr,tableHeader:pr,tableRow:dr},exit:{codeText:mr,table:ur,tableData:fr,tableHeader:fr,tableRow:fr}}}function lr(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 ur(e){this.exit(e),this.data.inTable=void 0}function dr(e){this.enter({type:`tableRow`,children:[]},e)}function fr(e){this.exit(e)}function pr(e){this.enter({type:`tableCell`,children:[]},e)}function mr(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,hr));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function hr(e,t){return t===`|`?t:e}function gr(){return{exit:{taskListCheckValueChecked:_r,taskListCheckValueUnchecked:_r,paragraph:vr}}}function _r(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function vr(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 yr(){return[Nn(),nr(),rr(),cr(),gr()]}let br={tokenize:jr,partial:!0},xr={tokenize:Mr,partial:!0},Sr={tokenize:Nr,partial:!0},Cr={tokenize:Pr,partial:!0},wr={tokenize:Fr,partial:!0},Tr={name:`wwwAutolink`,tokenize:kr,previous:Ir},Er={name:`protocolAutolink`,tokenize:Ar,previous:Lr},K={name:`emailAutolink`,tokenize:Or,previous:Rr},q={};function Dr(){return{text:q}}let J=48;for(;J<123;)q[J]=K,J++,J===58?J=65:J===91&&(J=97);q[43]=K,q[45]=K,q[46]=K,q[95]=K,q[72]=[K,Er],q[104]=[K,Er],q[87]=[K,Tr],q[119]=[K,Tr];function Or(e,t,n){let r=this,i,a;return o;function o(t){return!zr(t)||!Rr.call(r,r.previous)||Br(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return zr(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(wr,u,l)(t):t===45||t===95||y(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&v(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function kr(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Ir.call(r,r.previous)||Br(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(br,e.attempt(xr,e.attempt(Sr,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Ar(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Lr.call(r,r.previous)&&!Br(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(v(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||x(t)||E(t)||k(t)||O(t)?n(t):e.attempt(xr,e.attempt(Sr,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function jr(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 Mr(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Cr,c,s)(t):t===null||E(t)||k(t)||t!==45&&O(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Nr(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Cr,t,a)(o):o===null||E(o)||k(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Pr(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||E(o)||k(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||E(e)||k(e)?t(e):r(e)}function a(e){return v(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):v(t)?(e.consume(t),o):n(t)}}function Fr(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return y(e)?n(e):t(e)}}function Ir(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||E(e)}function Lr(e){return!v(e)}function Rr(e){return!(e===47||zr(e))}function zr(e){return e===43||e===45||e===46||e===95||y(e)}function Br(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}let Vr={tokenize:Yr,partial:!0};function Hr(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Kr,continuation:{tokenize:qr},exit:Jr}},text:{91:{name:`gfmFootnoteCall`,tokenize:Gr},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Ur,resolveTo:Wr}}}}function Ur(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=_(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 Wr(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 Gr(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||E(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(_(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return E(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Kr(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||E(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=_(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return E(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),j(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function qr(e,t,n){return e.check(H,t,e.attempt(Vr,t,n))}function Jr(e){e.exit(`gfmFootnoteDefinition`)}function Yr(e,t,n){let r=this;return j(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 Xr(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&u(o,o.length,0,L(s,e.slice(r+1,n),t)),u(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),u(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=I(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=I(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Zr=class{constructor(){this.map=[]}add(e,t,n){Qr(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 Qr(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 $r(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 ei(){return{flow:{null:{name:`table`,tokenize:ti,resolveAll:ni}}}}function ti(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):T(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):D(t)?j(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||E(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,D(t)?j(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return D(t)?j(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||T(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return D(t)?j(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||T(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||T(n)?(e.exit(`tableRow`),t(n)):D(n)?j(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||E(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?O:w)}function O(t){return t===92||t===124?(e.consume(t),w):w(t)}}function ni(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 Zr;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(ii(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=ri(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=ri(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=ri(f,t,o,i,n,d)):(o[0]=o[1],d=ri(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&ii(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=$r(t.events,n))}return e}function ri(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Y(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Y(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=Y(t.events,n[2]),a=Y(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({},Y(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function ii(e,t,n,r,i){let a=[],o=Y(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 Y(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}let ai={name:`tasklistCheck`,tokenize:si};function oi(){return{text:{91:ai}}}function si(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return E(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return T(r)?t(r):D(r)?e.check({tokenize:ci},t,n)(r):n(r)}}function ci(e,t,n){return j(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function li(e){return p([Dr(),Hr(),Xr(e),ei(),oi()])}let ui={extensions:[li()],mdastExtensions:[yr()]};function di(e){return dn(e,ui)}let fi={ts:`typescript`,js:`javascript`,jsx:`javascript`,tsx:`typescript`,py:`python`,rb:`ruby`,sh:`bash`,zsh:`bash`,shell:`bash`,yml:`yaml`,md:`markdown`,rs:`rust`,kt:`kotlin`,tf:`hcl`,dockerfile:`docker`};function pi(e){if(!e)return;let t=e.toLowerCase().trim();if(t)return fi[t]??t}let mi=/^<(ins|sub|sup)>$/i,hi=/^<\/(ins|sub|sup)>$/i,gi=/(^|[^A-Za-z0-9_@])@([A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)(?=$|[^A-Za-z0-9._@-])/g;function _i(e){let t=e.toLowerCase();return t===`ins`?{type:`underline`}:t===`sub`?{type:`subsup`,attrs:{type:`sub`}}:t===`sup`?{type:`subsup`,attrs:{type:`sup`}}:null}function X(e,t){let n=[],r=[];for(let i of e){if(i.type===`html`){let e=mi.exec(i.value);if(e){let t=_i(e[1]??``);t&&n.push(t);continue}if(hi.exec(i.value)){n.pop();continue}}r.push(...Z(i,n.slice(),t))}return r}function Z(e,t,n){switch(e.type){case`text`:return e.value?vi(e.value,t,n):[];case`inlineCode`:{let n=[...t.filter(e=>e.type===`link`),{type:`code`}];return[yi(e.value,n)]}case`strong`:return e.children.flatMap(e=>Z(e,[...t,{type:`strong`}],n));case`emphasis`:return e.children.flatMap(e=>Z(e,[...t,{type:`em`}],n));case`delete`:return e.children.flatMap(e=>Z(e,[...t,{type:`strike`}],n));case`link`:{let r={type:`link`,attrs:{href:e.url,...e.title?{title:e.title}:{}}};return e.children.flatMap(e=>Z(e,[...t,r],n))}case`image`:return[{type:`inlineCard`,attrs:{url:e.url}}];case`break`:return[{type:`hardBreak`}];case`html`:return Ci(e.value,t);case`linkReference`:case`imageReference`:return[];default:return[]}}function vi(e,t,n){if(!n?.mentions||t.length>0)return[yi(e,t)];let r=[],i=0;for(let a of e.matchAll(gi)){let o=a.index??0,s=a[1]??``,c=a[2];if(!c)continue;let l=o+s.length,u=o+a[0].length;bi(r,e.slice(i,l),t);let d=xi(c,n.mentions);d?r.push(d):bi(r,e.slice(l,u),t),i=u}return r.length===0?[yi(e,t)]:(bi(r,e.slice(i),t),r)}function yi(e,t){let n={type:`text`,text:e};return t.length>0&&(n.marks=t),n}function bi(e,t,n){if(!t)return;let r=e[e.length-1];if(r?.type===`text`&&Si(r.marks,n)){r.text+=t;return}e.push(yi(t,n))}function xi(e,t){let n=typeof t==`function`?t(e):{id:e,text:`@${e}`};return n?{type:`mention`,attrs:n}:null}function Si(e,t){let n=e??[];return n.length===t.length?n.every((e,n)=>JSON.stringify(e)===JSON.stringify(t[n])):!1}function Ci(e,t){let n=e.replace(/<[^>]+>/g,``);return n?[yi(n,t)]:[]}function wi(e,t){return{type:`heading`,attrs:{level:e.depth},content:X(e.children,t)}}function Ti(e,t){return{type:`paragraph`,content:X(e.children,t)}}function Ei(e){let t={type:`codeBlock`},n=pi(e.lang);return n&&(t.attrs={language:n}),e.value&&(t.content=[{type:`text`,text:e.value}]),t}function Di(e){return{type:`rule`}}let Oi=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*/i,ki={NOTE:`note`,TIP:`info`,IMPORTANT:`warning`,WARNING:`warning`,CAUTION:`error`};function Ai(e,t,n,r){let i=e.children[0].value.replace(Oi,``).trim(),a=e.children.slice(1),o=[];if(i||a.length>0){let e={type:`paragraph`,children:[...i?[{type:`text`,value:i}]:[],...a]};e.children.length>0&&o.push(Ti(e,r))}return o.push(...n(t)),o.length===0&&o.push({type:`paragraph`,content:[]}),o}function ji(e,t,n){let r=e.children[0];if(r?.type!==`paragraph`)return null;let i=r.children[0];if(i?.type!==`text`)return null;let a=Oi.exec(i.value);if(!a)return null;let o=ki[(a[1]??`NOTE`).toUpperCase()]??`info`,s=Ai(r,e.children.slice(1),t,n);return{type:`panel`,attrs:{panelType:o},content:s}}function Mi(e,t,n){let r=ji(e,t,n);if(r)return r;let i=t(e.children);return{type:`blockquote`,content:i.length>0?i:[{type:`paragraph`,content:[]}]}}let Ni=/^<details[^>]*>\s*<summary[^>]*>([\s\S]*?)<\/summary>\s*$/i,Pi=/^<\/details>\s*$/i,Fi=new Set([`paragraph`,`heading`,`bulletList`,`orderedList`,`codeBlock`,`blockquote`,`panel`,`rule`,`table`,`mediaGroup`,`mediaSingle`,`nestedExpand`]);function Ii(e){return Fi.has(e.type)}function Li(e){let t=/^<details[^>]*>\s*/i.exec(e);if(!t)return null;let n=t[0].length,r=e.slice(n),i=/^<summary[^>]*>/i.exec(r);if(!i)return null;n+=i[0].length;let a=e.slice(n),o=a.search(/<\/summary>/i);if(o===-1)return null;let s=a.slice(0,o);n+=o+10;let c=n,l=/<details[^>]*>/gi,u=/<\/details>/gi,d=1;l.lastIndex=c,u.lastIndex=c;let f=-1;for(;d>0;){let t=l.exec(e),r=u.exec(e);if(!r)return null;if(t&&t.index<r.index){d++,u.lastIndex=l.lastIndex;continue}if(d--,d===0){f=r.index,n=r.index+r[0].length;break}l.lastIndex=u.lastIndex}return f===-1||e.slice(n).trim().length>0?null:{title:s,body:e.slice(c,f)}}function Ri(e){let t=new Map,n=[];for(let r=0;r<e.length;r++){let i=e[r];if(i.type===`html`){let e=i.value;if(Ni.test(e))n.push(r);else if(Pi.test(e)){let e=n.pop();e!==void 0&&t.set(e,r)}}}return t}function zi(e,t){let n=[],r=Ri(e),i=0;for(;i<e.length;){let a=Bi(e,i,r,t);if(a){Ii(a.node)&&n.push(a.node),i=a.next;continue}let o=t(e[i]);o&&Ii(o)&&n.push(o),i++}return n}function Bi(e,t,n,r){let i=e[t];if(i.type!==`html`)return null;let a=Li(i.value);if(a){let e=a.title.trim(),n=a.body.trim(),i=n?zi(di(n).children,r):[];return{node:{type:`expand`,attrs:{title:e},content:i},next:t+1}}let o=Ni.exec(i.value);if(o){let i=(o[1]??``).trim(),a=n.get(t)??-1;if(a!==-1){let n=zi(e.slice(t+1,a),r);return{node:{type:`expand`,attrs:{title:i},content:n},next:a+1}}}return null}function Vi(e){let t=e.value.replace(/<[^>]+>/g,``).trim();return t?{type:`paragraph`,content:[{type:`text`,text:t}]}:null}function Hi(){return crypto.randomUUID()}function Ui(e,t,n){return e.children.some(e=>e.checked!==null&&e.checked!==void 0)?qi(e,n):e.ordered?Gi(e,t,n):Wi(e,t,n)}function Wi(e,t,n){return{type:`bulletList`,content:e.children.map(e=>Ki(e,t,n))}}function Gi(e,t,n){let r={type:`orderedList`,content:e.children.map(e=>Ki(e,t,n))};return e.start!==null&&e.start!==void 0&&e.start!==1&&(r.attrs={order:e.start}),r}function Ki(e,t,n){let r=[];for(let i of e.children)if(i.type===`paragraph`)r.push({type:`paragraph`,content:X(i.children,n)});else if(i.type===`list`){let e=Ui(i,t,n);e.type===`taskList`?r.length===0&&r.push({type:`paragraph`,content:[]}):(r.length===0&&r.push({type:`paragraph`,content:[]}),r.push(e))}else if(i.type===`code`)r.push({type:`codeBlock`,content:[{type:`text`,text:i.value}],...i.lang?{attrs:{language:i.lang}}:{}});else{let e=t(i);e&&e.type===`paragraph`&&r.push(e)}return r.length===0&&r.push({type:`paragraph`,content:[]}),{type:`listItem`,content:r}}function qi(e,t){let n=Hi(),r=e.children.map(e=>{let n=e.checked===!0?`DONE`:`TODO`,r=e.children.filter(e=>e.type===`paragraph`).flatMap(e=>X(e.children,t)),i={type:`taskItem`,attrs:{localId:Hi(),state:n}};return r.length>0&&(i.content=r),i});return{type:`taskList`,attrs:{localId:n},content:r}}function Ji(e,t){let n=e.children;if(n.length===0)return{type:`table`,content:[]};let r=n[0],i=n.slice(1),a=[];r&&a.push({type:`tableRow`,content:r.children.map(e=>Yi(e,t))});for(let e of i)a.push({type:`tableRow`,content:e.children.map(e=>Xi(e,t))});return{type:`table`,content:a}}function Yi(e,t){let n=X(e.children,t);return{type:`tableHeader`,attrs:{},content:[{type:`paragraph`,content:n.length>0?n:[]}]}}function Xi(e,t){let n=X(e.children,t);return{type:`tableCell`,attrs:{},content:[{type:`paragraph`,content:n.length>0?n:[]}]}}function Zi(e,t){return{version:1,type:`doc`,content:Qi(e.children,t)}}function Qi(e,t){let n=[],r=Ri(e),i=0;for(;i<e.length;){let a=Bi(e,i,r,e=>$i(e,t));if(a){n.push(a.node),i=a.next;continue}let o=$i(e[i],t);o&&n.push(o),i++}return n}function $i(e,t){switch(e.type){case`heading`:return wi(e,t);case`paragraph`:return Ti(e,t);case`code`:return Ei(e);case`thematicBreak`:return Di(e);case`blockquote`:return Mi(e,e=>e.flatMap(e=>{let n=$i(e,t);return n?[n]:[]}),t);case`list`:return Ui(e,e=>$i(e,t),t);case`table`:return Ji(e,t);case`html`:return Vi(e);default:return null}}function ea(e){return e.replace(/\0/g,``)}function ta(e){return e.replace(/\r\n/g,`
|
|
4
4
|
`).replace(/\r/g,`
|
|
5
|
-
`)}function
|
|
5
|
+
`)}function na(e){return e.replace(/[^\S\n]+$/gm,``)}function ra(e){return e.replace(/\n{3,}/g,`
|
|
6
6
|
|
|
7
|
-
`)}function
|
|
8
|
-
`;case`mention`:return t?.mentions===!1?e.attrs.text??e.attrs.id:e.attrs.text??`@${e.attrs.id}`;case`emoji`:return e.attrs.text??`:${e.attrs.shortName}:`;case`date`:return e.attrs.timestamp;case`status`:return`\`[${e.attrs.text}]\``;case`inlineCard`:return e.attrs.url?`<${e.attrs.url}>`:``;case`mediaInline`:return``;default:return``}}function
|
|
7
|
+
`)}function ia(e){return ra(na(ta(ea(e))))}function aa(e){return ea(ta(e))}function oa(e,t){return Zi(di(aa(e)),t)}let sa=/([\\`*_[\]~|<])/g;function ca(e){let t=e.replace(sa,`\\$1`);return t=t.replace(/^(#{1,6} )/m,`\\$1`),t=t.replace(/^([-+]) /m,`\\$1 `),t=t.replace(/^> /m,`\\> `),t=t.replace(/^(\d+)\./m,`$1\\.`),t}function la(e,t){if(!t||t.length===0)return e;let n=e;if(t.some(e=>e.type===`code`)){let e=t.find(e=>e.type===`link`);return n=`\`${n}\``,e&&(n=`[${n}](${e.attrs.href})`),n}for(let e of t)switch(e.type){case`strong`:n=`**${n}**`;break;case`em`:n=`*${n}*`;break;case`strike`:n=`~~${n}~~`;break;case`underline`:n=`<ins>${n}</ins>`;break;case`subsup`:n=e.attrs.type===`sub`?`<sub>${n}</sub>`:`<sup>${n}</sup>`;break;case`link`:n=`[${n}](${e.attrs.href}${e.attrs.title?` "${e.attrs.title}"`:``})`;break;case`textColor`:case`backgroundColor`:case`alignment`:case`indentation`:case`breakout`:case`border`:case`annotation`:case`dataConsumer`:case`fragment`:break}return n}function Q(e,t){return!e||e.length===0?``:e.map(e=>ua(e,t)).join(``)}function ua(e,t){switch(e.type){case`text`:return la(ca(e.text),e.marks);case`hardBreak`:return`\\
|
|
8
|
+
`;case`mention`:return t?.mentions===!1?e.attrs.text??e.attrs.id:typeof t?.mentions==`function`?t.mentions(e.attrs):e.attrs.text??`@${e.attrs.id}`;case`emoji`:return e.attrs.text??`:${e.attrs.shortName}:`;case`date`:return e.attrs.timestamp;case`status`:return`\`[${e.attrs.text}]\``;case`inlineCard`:return e.attrs.url?`<${e.attrs.url}>`:``;case`mediaInline`:return``;default:return``}}function da(e,t){return`${`#`.repeat(e.attrs.level)} ${Q(e.content,t)}`}function fa(e,t){return Q(e.content,t)}function pa(e){return`\`\`\`${e.attrs?.language??``}\n${e.content?.map(e=>e.text).join(``)??``}\n\`\`\``}function ma(e){return`---`}function ha(e,t){return e.content.map(e=>t(e)).join(`
|
|
9
9
|
|
|
10
10
|
`).split(`
|
|
11
11
|
`).map(e=>`> ${e}`).join(`
|
|
12
|
-
`)}function
|
|
13
|
-
`)}function
|
|
14
|
-
`)}function
|
|
15
|
-
`)}function
|
|
16
|
-
`)}function
|
|
17
|
-
`+
|
|
18
|
-
`+
|
|
12
|
+
`)}function ga(e,t=0,n){return e.content.map(e=>ba(e,`-`,t,n)).join(`
|
|
13
|
+
`)}function _a(e,t=0,n){let r=e.attrs?.order??1;return e.content.map((e,i)=>ba(e,`${r+i}.`,t,n)).join(`
|
|
14
|
+
`)}function va(e,t=0,n){return e.content.map(e=>`${` `.repeat(t)}- ${e.attrs.state===`DONE`?`[x]`:`[ ]`} ${Q(e.content,n)}`).join(`
|
|
15
|
+
`)}function ya(e,t=0,n){return e.content.map(e=>`${` `.repeat(t)}- [x] ${Q(e.content,n)}`).join(`
|
|
16
|
+
`)}function ba(e,t,n,r){let i=` `.repeat(n),a=[];for(let t of e.content)if(t.type===`paragraph`)a.push(Q(t.content,r));else if(t.type===`bulletList`)a.push(`
|
|
17
|
+
`+ga(t,n+1,r));else if(t.type===`orderedList`)a.push(`
|
|
18
|
+
`+_a(t,n+1,r));else if(t.type===`codeBlock`){let e=t.attrs?.language??``,n=t.content?.map(e=>e.text).join(``)??``;a.push(`\n\`\`\`${e}\n${n}\n\`\`\``)}return`${i}${t} ${a.join(``)}`}let xa={note:`NOTE`,info:`TIP`,tip:`TIP`,warning:`WARNING`,success:`NOTE`,error:`CAUTION`,custom:`NOTE`};function Sa(e,t){let n=xa[e.attrs.panelType]??`NOTE`,r=e.content.map(e=>t(e)).join(`
|
|
19
19
|
|
|
20
20
|
`);return[`> [!${n}]`,...r.split(`
|
|
21
21
|
`).map(e=>`> ${e}`)].join(`
|
|
22
|
-
`)}function
|
|
22
|
+
`)}function Ca(e,t){return`<details>\n<summary>${e.attrs.title??``}</summary>\n\n${e.content.map(e=>t(e)).join(`
|
|
23
23
|
|
|
24
|
-
`)}\n</details>`}function
|
|
25
|
-
`)}function $(e,t){switch(e.type){case`paragraph`:return
|
|
24
|
+
`)}\n</details>`}function wa(e){let t=e.content[0];if(!t)return``;let n=t.attrs.alt??`image`;if(t.attrs.type===`link`){let e=t.attrs.url;if(e)return``}return`[media: ${t.attrs.id}]`}function Ta(e){let t=e.attrs.url;return t?`[${t}](${t})`:``}function Ea(e){return`[${e.attrs.url}](${e.attrs.url})`}function Da(e){let t=e.content;if(t.length===0)return``;let n=t[0];if(!n)return``;let r=n.content.some(e=>e.type===`tableHeader`),i=e=>{let t=e.content.find(e=>e.type===`paragraph`);return t&&Q(t.content).trim()||` `},a=[];if(r){let e=n.content.map(i);a.push(`| ${e.join(` | `)} |`),a.push(`| ${e.map(()=>`---`).join(` | `)} |`);for(let e of t.slice(1)){let t=e.content.map(i);a.push(`| ${t.join(` | `)} |`)}}else{let e=n.content.length,r=Array(e).fill(` `);a.push(`| ${r.join(` | `)} |`),a.push(`| ${r.map(()=>`---`).join(` | `)} |`);for(let e of t){let t=e.content.map(i);a.push(`| ${t.join(` | `)} |`)}}return a.join(`
|
|
25
|
+
`)}function $(e,t){switch(e.type){case`paragraph`:return fa(e,t);case`heading`:return da(e,t);case`codeBlock`:return pa(e);case`rule`:return ma(e);case`blockquote`:return ha(e,e=>$(e,t));case`bulletList`:return ga(e,0,t);case`orderedList`:return _a(e,0,t);case`taskList`:return va(e,0,t);case`decisionList`:return ya(e,0,t);case`table`:return Da(e);case`panel`:return Sa(e,e=>$(e,t));case`expand`:return Ca(e,e=>$(e,t));case`nestedExpand`:return Ca(e,e=>$(e,t));case`mediaSingle`:return wa(e);case`blockCard`:return Ta(e);case`embedCard`:return Ea(e);case`layoutSection`:return Oa(e,t);default:return``}}function Oa(e,t){return e.content.map(e=>e.content.map(e=>$(e,t)).join(`
|
|
26
26
|
|
|
27
27
|
`)).join(`
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
|
-
`)}function
|
|
31
|
+
`)}function ka(e,t){return ia(e.content.map(e=>$(e,t)).filter(e=>e.length>0).join(`
|
|
32
32
|
|
|
33
|
-
`))}return e.adfToMd=
|
|
33
|
+
`))}return e.adfToMd=ka,e.mdToAdf=oa,e})({});
|