vibelet 1.2.224 → 1.2.227
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 +14 -37
- package/dist/index.cjs +1 -1
- package/dist/inventory-scan-worker.cjs +1 -1
- package/dist/{tailcat/vibelet-tailcat-darwin-amd64 → remoteDirect/vibelet-remote-direct-darwin-amd64} +0 -0
- package/dist/{tailcat/vibelet-tailcat-darwin-arm64 → remoteDirect/vibelet-remote-direct-darwin-arm64} +0 -0
- package/dist/{tailcat/vibelet-tailcat-linux-amd64 → remoteDirect/vibelet-remote-direct-linux-amd64} +0 -0
- package/dist/{tailcat/vibelet-tailcat-linux-arm64 → remoteDirect/vibelet-remote-direct-linux-arm64} +0 -0
- package/dist/{tailcat/vibelet-tailcat-win32-amd64.exe → remoteDirect/vibelet-remote-direct-win32-amd64.exe} +0 -0
- package/dist/{tailcat/vibelet-tailcat-win32-arm64.exe → remoteDirect/vibelet-remote-direct-win32-arm64.exe} +0 -0
- package/dist/runtime-version.cjs +1 -1
- package/dist/vibelet.mjs +282 -289
- package/dist/web/assets/App-DfyOZYmt.js +12 -0
- package/dist/web/assets/App-t0H-03RW.css +1 -0
- package/dist/web/assets/BrowserControlPanel-dQOp1WlN.js +1 -0
- package/dist/web/assets/ChipGroup-FQF2g0Fr.js +1 -0
- package/dist/web/assets/DiffDrawer-CHjkoGPE.js +2 -0
- package/dist/web/assets/FileCodeEditor-yqSvo7VZ.css +1 -0
- package/dist/web/assets/FilesControlPanel-A7LFhjRm.js +1 -0
- package/dist/web/assets/FilesControlPanel-DsKJrFYk.css +1 -0
- package/dist/web/assets/GlobalPendingDialog-BeOMI3dc.js +1 -0
- package/dist/web/assets/ImageViewer-BQ9YKQDY.js +1 -0
- package/dist/web/assets/ImageViewer-L8SQkFy1.css +1 -0
- package/dist/web/assets/LanguageSettingsPanel-Benilh-Y.js +1 -0
- package/dist/web/assets/NewSessionDialog-B0YMv6RR.js +1 -0
- package/dist/web/assets/NewSessionDialog-CxPwD87T.css +1 -0
- package/dist/web/assets/NotificationSettingsPanel-B_k_PfhC.js +1 -0
- package/dist/web/assets/TerminalControlPanel-DCmHOa9Y.js +13 -0
- package/dist/web/assets/ThemeSettingsPanel-DNDIWk0L.js +1 -0
- package/dist/web/assets/arrow-right-Boi1uHFr.js +1 -0
- package/dist/web/assets/collectMessageImages-BROUPbis.js +3 -0
- package/dist/web/assets/file-editor-FileCodeEditor-CTEWh6kV.js +13 -0
- package/dist/web/assets/file-editor-MarkdownLivePreview-Blr8OOKh.js +1 -0
- package/dist/web/assets/file-editor-clike-B9uivgTg.js +1 -0
- package/dist/web/assets/file-editor-go-CTD25R5P.js +1 -0
- package/dist/web/assets/file-editor-index-C1T947NK.js +13 -0
- package/dist/web/assets/file-editor-index-Cj9yLeGr.js +1 -0
- package/dist/web/assets/file-editor-index-Ckq0jexT.js +6 -0
- package/dist/web/assets/file-editor-index-CxU5Gq1E.js +1 -0
- package/dist/web/assets/file-editor-index-Dv8iMJMj.js +3 -0
- package/dist/web/assets/file-editor-index-DvdSLdIk.js +1 -0
- package/dist/web/assets/file-editor-index-DvenUGpC.js +1 -0
- package/dist/web/assets/file-editor-index-iFiQtQEr.js +1 -0
- package/dist/web/assets/file-editor-rust-Bh1DdySD.js +1 -0
- package/dist/web/assets/file-editor-shell-CjFT_Tl9.js +1 -0
- package/dist/web/assets/file-editor-sql-B0zzsL_y.js +1 -0
- package/dist/web/assets/file-editor-swift-BzpIVaGY.js +1 -0
- package/dist/web/assets/file-editor-toml-Bm5Em-hy.js +1 -0
- package/dist/web/assets/file-editor-yaml-DsCXHVTH.js +1 -0
- package/dist/web/assets/folder-plus-tHXFtdSw.js +1 -0
- package/dist/web/assets/ghostty-vt-DOMeXDrv.wasm +0 -0
- package/dist/web/assets/highlighted-body-TPN3WLV5-D5c7I9mI.js +1 -0
- package/dist/web/assets/index-CoCv7_xG.css +1 -0
- package/dist/web/assets/index-P4_gSQhN.js +71 -0
- package/dist/web/assets/mermaid-O7DHMXV3-BIyESbw5.js +120 -0
- package/dist/web/assets/mermaid-O7DHMXV3-tkqeC_Xz.css +1 -0
- package/dist/web/ghostty-license.txt +21 -0
- package/dist/web/index.html +2 -2
- package/package.json +3 -3
- package/dist/web/assets/App-CAJ3pB85.js +0 -12
- package/dist/web/assets/ArchiveSyncPanel-_lLATKjA.js +0 -1
- package/dist/web/assets/ConnectionSettingsPanel-4MhvD7ra.js +0 -1
- package/dist/web/assets/DaemonSettingsPanel-zHBCPi0h.js +0 -1
- package/dist/web/assets/DiffDrawer-BGx5Fl6h.js +0 -2
- package/dist/web/assets/FilesControlPanel-D7SPEihe.js +0 -2
- package/dist/web/assets/LanguageSettingsPanel-Bofh0WHQ.js +0 -1
- package/dist/web/assets/NotificationSettingsPanel-BafuO9ww.js +0 -1
- package/dist/web/assets/SavedTargetsPanel-lutvzUOp.js +0 -1
- package/dist/web/assets/ThemeSettingsPanel-ARFGBpot.js +0 -1
- package/dist/web/assets/file-text-CpofUkq8.js +0 -1
- package/dist/web/assets/highlighted-body-TPN3WLV5-CEWZdsEu.js +0 -1
- package/dist/web/assets/index-CFMLtw93.css +0 -1
- package/dist/web/assets/index-D3KotGfi.js +0 -17
- package/dist/web/assets/mermaid-O7DHMXV3-BPtfCfol.css +0 -1
- package/dist/web/assets/mermaid-O7DHMXV3-DuCy9NVb.js +0 -124
- /package/dist/web/assets/{splash-logo-SQcOtj-8.png → logo-SQcOtj-8.png} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{x as yt,y as It}from"./App-DfyOZYmt.js";const nn=sn(/[A-Za-z]/),v=sn(/[\dA-Za-z]/),wt=sn(/[#-'*+\--9=?A-Z^-~]/);function Tn(n){return n!==null&&(n<32||n===127)}const Fn=sn(/\d/),zt=sn(/[\dA-Fa-f]/),Ct=sn(/[!-/:-@[-`{-~]/);function w(n){return n!==null&&n<-2}function Y(n){return n!==null&&(n<0||n===32)}function F(n){return n===-2||n===-1||n===32}const Et=sn(new RegExp("\\p{P}|\\p{S}","u")),Tt=sn(/\s/);function sn(n){return r;function r(t){return t!==null&&t>-1&&n.test(String.fromCharCode(t))}}function tn(n,r,t,e){const l=n.length;let i=0,u;if(r<0?r=-r>l?0:l+r:r=r>l?l:r,t=t>0?t:0,e.length<1e4)u=Array.from(e),u.unshift(r,t),n.splice(...u);else for(t&&n.splice(r,t);i<e.length;)u=e.slice(i,i+1e4),u.unshift(r,0),n.splice(...u),i+=1e4,r+=1e4}function Z(n,r){return n.length>0?(tn(n,n.length,0,r),n):r}function Bn(n,r,t){const e=[];let l=-1;for(;++l<n.length;){const i=n[l].resolveAll;i&&!e.includes(i)&&(r=i(r,t),e.push(i))}return r}function gn(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function qn(n){if(n===null||Y(n)||Tt(n))return 1;if(Et(n))return 2}const Ft={};function _t(n,r){const t=Ft,e=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,l=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return vn(n,e,l)}function vn(n,r,t){if(At(n)){if("value"in n)return n.type==="html"&&!t?"":n.value;if(r&&"alt"in n&&n.alt)return n.alt;if("children"in n)return Hn(n.children,r,t)}return Array.isArray(n)?Hn(n,r,t):""}function Hn(n,r,t){const e=[];let l=-1;for(;++l<n.length;)e[l]=vn(n[l],r,t);return e.join("")}function At(n){return!!(n&&typeof n=="object")}const Vn=document.createElement("i");function Pn(n){const r="&"+n+";";Vn.innerHTML=r;const t=Vn.textContent;return t.charCodeAt(t.length-1)===59&&n!=="semi"||t===r?!1:t}function nt(n,r){const t=Number.parseInt(n,r);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}const Bt=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Pt(n){return n.replace(Bt,Lt)}function Lt(n,r,t){if(r)return r;if(t.charCodeAt(0)===35){const l=t.charCodeAt(1),i=l===120||l===88;return nt(t.slice(i?2:1),i?16:10)}return Pn(t)||n}const Qn={}.hasOwnProperty;function Ot(n){const r={};let t=-1;for(;++t<n.length;)Mt(r,n[t]);return r}function Mt(n,r){let t;for(t in r){const l=(Qn.call(n,t)?n[t]:void 0)||(n[t]={}),i=r[t];let u;if(i)for(u in i){Qn.call(l,u)||(l[u]=[]);const a=i[u];Nt(l[u],Array.isArray(a)?a:a?[a]:[])}}}function Nt(n,r){let t=-1;const e=[];for(;++t<r.length;)(r[t].add==="after"?n:e).push(r[t]);tn(n,0,0,e)}const _n={name:"attention",resolveAll:Dt,tokenize:Rt};function Dt(n,r){let t=-1,e,l,i,u,a,f,h,m;for(;++t<n.length;)if(n[t][0]==="enter"&&n[t][1].type==="attentionSequence"&&n[t][1]._close){for(e=t;e--;)if(n[e][0]==="exit"&&n[e][1].type==="attentionSequence"&&n[e][1]._open&&r.sliceSerialize(n[e][1]).charCodeAt(0)===r.sliceSerialize(n[t][1]).charCodeAt(0)){if((n[e][1]._close||n[t][1]._open)&&(n[t][1].end.offset-n[t][1].start.offset)%3&&!((n[e][1].end.offset-n[e][1].start.offset+n[t][1].end.offset-n[t][1].start.offset)%3))continue;f=n[e][1].end.offset-n[e][1].start.offset>1&&n[t][1].end.offset-n[t][1].start.offset>1?2:1;const p={...n[e][1].end},g={...n[t][1].start};jn(p,-f),jn(g,f),u={type:f>1?"strongSequence":"emphasisSequence",start:p,end:{...n[e][1].end}},a={type:f>1?"strongSequence":"emphasisSequence",start:{...n[t][1].start},end:g},i={type:f>1?"strongText":"emphasisText",start:{...n[e][1].end},end:{...n[t][1].start}},l={type:f>1?"strong":"emphasis",start:{...u.start},end:{...a.end}},n[e][1].end={...u.start},n[t][1].start={...a.end},h=[],n[e][1].end.offset-n[e][1].start.offset&&(h=Z(h,[["enter",n[e][1],r],["exit",n[e][1],r]])),h=Z(h,[["enter",l,r],["enter",u,r],["exit",u,r],["enter",i,r]]),h=Z(h,Bn(r.parser.constructs.insideSpan.null,n.slice(e+1,t),r)),h=Z(h,[["exit",i,r],["enter",a,r],["exit",a,r],["exit",l,r]]),n[t][1].end.offset-n[t][1].start.offset?(m=2,h=Z(h,[["enter",n[t][1],r],["exit",n[t][1],r]])):m=0,tn(n,e-1,t-e+3,h),t=e+h.length-m-2;break}}for(t=-1;++t<n.length;)n[t][1].type==="attentionSequence"&&(n[t][1].type="data");return n}function Rt(n,r){const t=this.parser.constructs.attentionMarkers.null,e=this.previous,l=qn(e);let i;return u;function u(f){return i=f,n.enter("attentionSequence"),a(f)}function a(f){if(f===i)return n.consume(f),a;const h=n.exit("attentionSequence"),m=qn(f),p=!m||m===2&&l||t.includes(f),g=!l||l===2&&m||t.includes(e);return h._open=!!(i===42?p:p&&(l||!g)),h._close=!!(i===42?g:g&&(m||!p)),r(f)}}function jn(n,r){n.column+=r,n.offset+=r,n._bufferIndex+=r}const qt={name:"autolink",tokenize:Ht};function Ht(n,r,t){let e=0;return l;function l(c){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(c),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),i}function i(c){return nn(c)?(n.consume(c),u):c===64?t(c):h(c)}function u(c){return c===43||c===45||c===46||v(c)?(e=1,a(c)):h(c)}function a(c){return c===58?(n.consume(c),e=0,f):(c===43||c===45||c===46||v(c))&&e++<32?(n.consume(c),a):(e=0,h(c))}function f(c){return c===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(c),n.exit("autolinkMarker"),n.exit("autolink"),r):c===null||c===32||c===60||Tn(c)?t(c):(n.consume(c),f)}function h(c){return c===64?(n.consume(c),m):wt(c)?(n.consume(c),h):t(c)}function m(c){return v(c)?p(c):t(c)}function p(c){return c===46?(n.consume(c),e=0,m):c===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(c),n.exit("autolinkMarker"),n.exit("autolink"),r):g(c)}function g(c){if((c===45||v(c))&&e++<63){const T=c===45?g:p;return n.consume(c),T}return t(c)}}function L(n,r,t,e){const l=e?e-1:Number.POSITIVE_INFINITY;let i=0;return u;function u(f){return F(f)?(n.enter(t),a(f)):r(f)}function a(f){return F(f)&&i++<l?(n.consume(f),a):(n.exit(t),r(f))}}const zn={partial:!0,tokenize:Vt};function Vt(n,r,t){return e;function e(i){return F(i)?L(n,l,"linePrefix")(i):l(i)}function l(i){return i===null||w(i)?r(i):t(i)}}const tt={continuation:{tokenize:jt},exit:Ut,name:"blockQuote",tokenize:Qt};function Qt(n,r,t){const e=this;return l;function l(u){if(u===62){const a=e.containerState;return a.open||(n.enter("blockQuote",{_container:!0}),a.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(u),n.exit("blockQuoteMarker"),i}return t(u)}function i(u){return F(u)?(n.enter("blockQuotePrefixWhitespace"),n.consume(u),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),r):(n.exit("blockQuotePrefix"),r(u))}}function jt(n,r,t){const e=this;return l;function l(u){return F(u)?L(n,i,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):i(u)}function i(u){return n.attempt(tt,r,t)(u)}}function Ut(n){n.exit("blockQuote")}const et={name:"characterEscape",tokenize:Wt};function Wt(n,r,t){return e;function e(i){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(i),n.exit("escapeMarker"),l}function l(i){return Ct(i)?(n.enter("characterEscapeValue"),n.consume(i),n.exit("characterEscapeValue"),n.exit("characterEscape"),r):t(i)}}const rt={name:"characterReference",tokenize:Yt};function Yt(n,r,t){const e=this;let l=0,i,u;return a;function a(p){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(p),n.exit("characterReferenceMarker"),f}function f(p){return p===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(p),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),i=31,u=v,m(p))}function h(p){return p===88||p===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(p),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),i=6,u=zt,m):(n.enter("characterReferenceValue"),i=7,u=Fn,m(p))}function m(p){if(p===59&&l){const g=n.exit("characterReferenceValue");return u===v&&!Pn(e.sliceSerialize(g))?t(p):(n.enter("characterReferenceMarker"),n.consume(p),n.exit("characterReferenceMarker"),n.exit("characterReference"),r)}return u(p)&&l++<i?(n.consume(p),m):t(p)}}const Un={partial:!0,tokenize:Zt},Wn={concrete:!0,name:"codeFenced",tokenize:$t};function $t(n,r,t){const e=this,l={partial:!0,tokenize:D};let i=0,u=0,a;return f;function f(k){return h(k)}function h(k){const A=e.events[e.events.length-1];return i=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[1],!0).length:0,a=k,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),m(k)}function m(k){return k===a?(u++,n.consume(k),m):u<3?t(k):(n.exit("codeFencedFenceSequence"),F(k)?L(n,p,"whitespace")(k):p(k))}function p(k){return k===null||w(k)?(n.exit("codeFencedFence"),e.interrupt?r(k):n.check(Un,_,M)(k)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),g(k))}function g(k){return k===null||w(k)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),p(k)):F(k)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),L(n,c,"whitespace")(k)):k===96&&k===a?t(k):(n.consume(k),g)}function c(k){return k===null||w(k)?p(k):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),T(k))}function T(k){return k===null||w(k)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),p(k)):k===96&&k===a?t(k):(n.consume(k),T)}function _(k){return n.attempt(l,M,R)(k)}function R(k){return n.enter("lineEnding"),n.consume(k),n.exit("lineEnding"),b}function b(k){return i>0&&F(k)?L(n,q,"linePrefix",i+1)(k):q(k)}function q(k){return k===null||w(k)?n.check(Un,_,M)(k):(n.enter("codeFlowValue"),S(k))}function S(k){return k===null||w(k)?(n.exit("codeFlowValue"),q(k)):(n.consume(k),S)}function M(k){return n.exit("codeFenced"),r(k)}function D(k,A,H){let B=0;return O;function O(E){return k.enter("lineEnding"),k.consume(E),k.exit("lineEnding"),I}function I(E){return k.enter("codeFencedFence"),F(E)?L(k,y,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):y(E)}function y(E){return E===a?(k.enter("codeFencedFenceSequence"),N(E)):H(E)}function N(E){return E===a?(B++,k.consume(E),N):B>=u?(k.exit("codeFencedFenceSequence"),F(E)?L(k,V,"whitespace")(E):V(E)):H(E)}function V(E){return E===null||w(E)?(k.exit("codeFencedFence"),A(E)):H(E)}}}function Zt(n,r,t){const e=this;return l;function l(u){return u===null?t(u):(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),i)}function i(u){return e.parser.lazy[e.now().line]?t(u):r(u)}}const Cn={name:"codeIndented",tokenize:Jt},Gt={partial:!0,tokenize:Kt};function Jt(n,r,t){const e=this;return l;function l(h){return n.enter("codeIndented"),L(n,i,"linePrefix",5)(h)}function i(h){const m=e.events[e.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?u(h):t(h)}function u(h){return h===null?f(h):w(h)?n.attempt(Gt,u,f)(h):(n.enter("codeFlowValue"),a(h))}function a(h){return h===null||w(h)?(n.exit("codeFlowValue"),u(h)):(n.consume(h),a)}function f(h){return n.exit("codeIndented"),r(h)}}function Kt(n,r,t){const e=this;return l;function l(u){return e.parser.lazy[e.now().line]?t(u):w(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),l):L(n,i,"linePrefix",5)(u)}function i(u){const a=e.events[e.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(u):w(u)?l(u):t(u)}}const Xt={name:"codeText",previous:ne,resolve:vt,tokenize:te};function vt(n){let r=n.length-4,t=3,e,l;if((n[t][1].type==="lineEnding"||n[t][1].type==="space")&&(n[r][1].type==="lineEnding"||n[r][1].type==="space")){for(e=t;++e<r;)if(n[e][1].type==="codeTextData"){n[t][1].type="codeTextPadding",n[r][1].type="codeTextPadding",t+=2,r-=2;break}}for(e=t-1,r++;++e<=r;)l===void 0?e!==r&&n[e][1].type!=="lineEnding"&&(l=e):(e===r||n[e][1].type==="lineEnding")&&(n[l][1].type="codeTextData",e!==l+2&&(n[l][1].end=n[e-1][1].end,n.splice(l+2,e-l-2),r-=e-l-2,e=l+2),l=void 0);return n}function ne(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function te(n,r,t){let e=0,l,i;return u;function u(p){return n.enter("codeText"),n.enter("codeTextSequence"),a(p)}function a(p){return p===96?(n.consume(p),e++,a):(n.exit("codeTextSequence"),f(p))}function f(p){return p===null?t(p):p===32?(n.enter("space"),n.consume(p),n.exit("space"),f):p===96?(i=n.enter("codeTextSequence"),l=0,m(p)):w(p)?(n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),f):(n.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||w(p)?(n.exit("codeTextData"),f(p)):(n.consume(p),h)}function m(p){return p===96?(n.consume(p),l++,m):l===e?(n.exit("codeTextSequence"),n.exit("codeText"),r(p)):(i.type="codeTextData",h(p))}}class ee{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,t){const e=t??Number.POSITIVE_INFINITY;return e<this.left.length?this.left.slice(r,e):r>this.left.length?this.right.slice(this.right.length-e+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-e+this.left.length).reverse())}splice(r,t,e){const l=t||0;this.setCursor(Math.trunc(r));const i=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return e&&bn(this.left,e),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),bn(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),bn(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const t=this.left.splice(r,Number.POSITIVE_INFINITY);bn(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);bn(this.left,t.reverse())}}}function bn(n,r){let t=0;if(r.length<1e4)n.push(...r);else for(;t<r.length;)n.push(...r.slice(t,t+1e4)),t+=1e4}function it(n){const r={};let t=-1,e,l,i,u,a,f,h;const m=new ee(n);for(;++t<m.length;){for(;t in r;)t=r[t];if(e=m.get(t),t&&e[1].type==="chunkFlow"&&m.get(t-1)[1].type==="listItemPrefix"&&(f=e[1]._tokenizer.events,i=0,i<f.length&&f[i][1].type==="lineEndingBlank"&&(i+=2),i<f.length&&f[i][1].type==="content"))for(;++i<f.length&&f[i][1].type!=="content";)f[i][1].type==="chunkText"&&(f[i][1]._isInFirstContentOfListItem=!0,i++);if(e[0]==="enter")e[1].contentType&&(Object.assign(r,re(m,t)),t=r[t],h=!0);else if(e[1]._container){for(i=t,l=void 0;i--;)if(u=m.get(i),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(l&&(m.get(l)[1].type="lineEndingBlank"),u[1].type="lineEnding",l=i);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;l&&(e[1].end={...m.get(l)[1].start},a=m.slice(l,t),a.unshift(e),m.splice(l,t-l+1,a))}}return tn(n,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function re(n,r){const t=n.get(r)[1],e=n.get(r)[2];let l=r-1;const i=[];let u=t._tokenizer;u||(u=e.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const a=u.events,f=[],h={};let m,p,g=-1,c=t,T=0,_=0;const R=[_];for(;c;){for(;n.get(++l)[1]!==c;);i.push(l),c._tokenizer||(m=e.sliceStream(c),c.next||m.push(null),p&&u.defineSkip(c.start),c._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(m),c._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),p=c,c=c.next}for(c=t;++g<a.length;)a[g][0]==="exit"&&a[g-1][0]==="enter"&&a[g][1].type===a[g-1][1].type&&a[g][1].start.line!==a[g][1].end.line&&(_=g+1,R.push(_),c._tokenizer=void 0,c.previous=void 0,c=c.next);for(u.events=[],c?(c._tokenizer=void 0,c.previous=void 0):R.pop(),g=R.length;g--;){const b=a.slice(R[g],R[g+1]),q=i.pop();f.push([q,q+b.length-1]),n.splice(q,2,b)}for(f.reverse(),g=-1;++g<f.length;)h[T+f[g][0]]=T+f[g][1],T+=f[g][1]-f[g][0]-1;return h}const ie={resolve:le,tokenize:ae},ue={partial:!0,tokenize:oe};function le(n){return it(n),n}function ae(n,r){let t;return e;function e(a){return n.enter("content"),t=n.enter("chunkContent",{contentType:"content"}),l(a)}function l(a){return a===null?i(a):w(a)?n.check(ue,u,i)(a):(n.consume(a),l)}function i(a){return n.exit("chunkContent"),n.exit("content"),r(a)}function u(a){return n.consume(a),n.exit("chunkContent"),t.next=n.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,l}}function oe(n,r,t){const e=this;return l;function l(u){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),L(n,i,"linePrefix")}function i(u){if(u===null||w(u))return t(u);const a=e.events[e.events.length-1];return!e.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(u):n.interrupt(e.parser.constructs.flow,t,r)(u)}}function ut(n,r,t,e,l,i,u,a,f){const h=f||Number.POSITIVE_INFINITY;let m=0;return p;function p(b){return b===60?(n.enter(e),n.enter(l),n.enter(i),n.consume(b),n.exit(i),g):b===null||b===32||b===41||Tn(b)?t(b):(n.enter(e),n.enter(u),n.enter(a),n.enter("chunkString",{contentType:"string"}),_(b))}function g(b){return b===62?(n.enter(i),n.consume(b),n.exit(i),n.exit(l),n.exit(e),r):(n.enter(a),n.enter("chunkString",{contentType:"string"}),c(b))}function c(b){return b===62?(n.exit("chunkString"),n.exit(a),g(b)):b===null||b===60||w(b)?t(b):(n.consume(b),b===92?T:c)}function T(b){return b===60||b===62||b===92?(n.consume(b),c):c(b)}function _(b){return!m&&(b===null||b===41||Y(b))?(n.exit("chunkString"),n.exit(a),n.exit(u),n.exit(e),r(b)):m<h&&b===40?(n.consume(b),m++,_):b===41?(n.consume(b),m--,_):b===null||b===32||b===40||Tn(b)?t(b):(n.consume(b),b===92?R:_)}function R(b){return b===40||b===41||b===92?(n.consume(b),_):_(b)}}function lt(n,r,t,e,l,i){const u=this;let a=0,f;return h;function h(c){return n.enter(e),n.enter(l),n.consume(c),n.exit(l),n.enter(i),m}function m(c){return a>999||c===null||c===91||c===93&&!f||c===94&&!a&&"_hiddenFootnoteSupport"in u.parser.constructs?t(c):c===93?(n.exit(i),n.enter(l),n.consume(c),n.exit(l),n.exit(e),r):w(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),m):(n.enter("chunkString",{contentType:"string"}),p(c))}function p(c){return c===null||c===91||c===93||w(c)||a++>999?(n.exit("chunkString"),m(c)):(n.consume(c),f||(f=!F(c)),c===92?g:p)}function g(c){return c===91||c===92||c===93?(n.consume(c),a++,p):p(c)}}function at(n,r,t,e,l,i){let u;return a;function a(g){return g===34||g===39||g===40?(n.enter(e),n.enter(l),n.consume(g),n.exit(l),u=g===40?41:g,f):t(g)}function f(g){return g===u?(n.enter(l),n.consume(g),n.exit(l),n.exit(e),r):(n.enter(i),h(g))}function h(g){return g===u?(n.exit(i),f(u)):g===null?t(g):w(g)?(n.enter("lineEnding"),n.consume(g),n.exit("lineEnding"),L(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),m(g))}function m(g){return g===u||g===null||w(g)?(n.exit("chunkString"),h(g)):(n.consume(g),g===92?p:m)}function p(g){return g===u||g===92?(n.consume(g),m):m(g)}}function Sn(n,r){let t;return e;function e(l){return w(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),t=!0,e):F(l)?L(n,e,t?"linePrefix":"lineSuffix")(l):r(l)}}const se={name:"definition",tokenize:he},ce={partial:!0,tokenize:pe};function he(n,r,t){const e=this;let l;return i;function i(c){return n.enter("definition"),u(c)}function u(c){return lt.call(e,n,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(c)}function a(c){return l=gn(e.sliceSerialize(e.events[e.events.length-1][1]).slice(1,-1)),c===58?(n.enter("definitionMarker"),n.consume(c),n.exit("definitionMarker"),f):t(c)}function f(c){return Y(c)?Sn(n,h)(c):h(c)}function h(c){return ut(n,m,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(c)}function m(c){return n.attempt(ce,p,p)(c)}function p(c){return F(c)?L(n,g,"whitespace")(c):g(c)}function g(c){return c===null||w(c)?(n.exit("definition"),e.parser.defined.push(l),r(c)):t(c)}}function pe(n,r,t){return e;function e(a){return Y(a)?Sn(n,l)(a):t(a)}function l(a){return at(n,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return F(a)?L(n,u,"whitespace")(a):u(a)}function u(a){return a===null||w(a)?r(a):t(a)}}const fe={name:"hardBreakEscape",tokenize:me};function me(n,r,t){return e;function e(i){return n.enter("hardBreakEscape"),n.consume(i),l}function l(i){return w(i)?(n.exit("hardBreakEscape"),r(i)):t(i)}}const ge={name:"headingAtx",resolve:xe,tokenize:ke};function xe(n,r){let t=n.length-2,e=3,l,i;return n[e][1].type==="whitespace"&&(e+=2),t-2>e&&n[t][1].type==="whitespace"&&(t-=2),n[t][1].type==="atxHeadingSequence"&&(e===t-1||t-4>e&&n[t-2][1].type==="whitespace")&&(t-=e+1===t?2:4),t>e&&(l={type:"atxHeadingText",start:n[e][1].start,end:n[t][1].end},i={type:"chunkText",start:n[e][1].start,end:n[t][1].end,contentType:"text"},tn(n,e,t-e+1,[["enter",l,r],["enter",i,r],["exit",i,r],["exit",l,r]])),n}function ke(n,r,t){let e=0;return l;function l(m){return n.enter("atxHeading"),i(m)}function i(m){return n.enter("atxHeadingSequence"),u(m)}function u(m){return m===35&&e++<6?(n.consume(m),u):m===null||Y(m)?(n.exit("atxHeadingSequence"),a(m)):t(m)}function a(m){return m===35?(n.enter("atxHeadingSequence"),f(m)):m===null||w(m)?(n.exit("atxHeading"),r(m)):F(m)?L(n,a,"whitespace")(m):(n.enter("atxHeadingText"),h(m))}function f(m){return m===35?(n.consume(m),f):(n.exit("atxHeadingSequence"),a(m))}function h(m){return m===null||m===35||Y(m)?(n.exit("atxHeadingText"),a(m)):(n.consume(m),h)}}const de=["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"],Yn=["pre","script","style","textarea"],be={concrete:!0,name:"htmlFlow",resolveTo:Ie,tokenize:we},Se={partial:!0,tokenize:Ce},ye={partial:!0,tokenize:ze};function Ie(n){let r=n.length;for(;r--&&!(n[r][0]==="enter"&&n[r][1].type==="htmlFlow"););return r>1&&n[r-2][1].type==="linePrefix"&&(n[r][1].start=n[r-2][1].start,n[r+1][1].start=n[r-2][1].start,n.splice(r-2,2)),n}function we(n,r,t){const e=this;let l,i,u,a,f;return h;function h(s){return m(s)}function m(s){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(s),p}function p(s){return s===33?(n.consume(s),g):s===47?(n.consume(s),i=!0,_):s===63?(n.consume(s),l=3,e.interrupt?r:o):nn(s)?(n.consume(s),u=String.fromCharCode(s),R):t(s)}function g(s){return s===45?(n.consume(s),l=2,c):s===91?(n.consume(s),l=5,a=0,T):nn(s)?(n.consume(s),l=4,e.interrupt?r:o):t(s)}function c(s){return s===45?(n.consume(s),e.interrupt?r:o):t(s)}function T(s){const K="CDATA[";return s===K.charCodeAt(a++)?(n.consume(s),a===K.length?e.interrupt?r:y:T):t(s)}function _(s){return nn(s)?(n.consume(s),u=String.fromCharCode(s),R):t(s)}function R(s){if(s===null||s===47||s===62||Y(s)){const K=s===47,cn=u.toLowerCase();return!K&&!i&&Yn.includes(cn)?(l=1,e.interrupt?r(s):y(s)):de.includes(u.toLowerCase())?(l=6,K?(n.consume(s),b):e.interrupt?r(s):y(s)):(l=7,e.interrupt&&!e.parser.lazy[e.now().line]?t(s):i?q(s):S(s))}return s===45||v(s)?(n.consume(s),u+=String.fromCharCode(s),R):t(s)}function b(s){return s===62?(n.consume(s),e.interrupt?r:y):t(s)}function q(s){return F(s)?(n.consume(s),q):O(s)}function S(s){return s===47?(n.consume(s),O):s===58||s===95||nn(s)?(n.consume(s),M):F(s)?(n.consume(s),S):O(s)}function M(s){return s===45||s===46||s===58||s===95||v(s)?(n.consume(s),M):D(s)}function D(s){return s===61?(n.consume(s),k):F(s)?(n.consume(s),D):S(s)}function k(s){return s===null||s===60||s===61||s===62||s===96?t(s):s===34||s===39?(n.consume(s),f=s,A):F(s)?(n.consume(s),k):H(s)}function A(s){return s===f?(n.consume(s),f=null,B):s===null||w(s)?t(s):(n.consume(s),A)}function H(s){return s===null||s===34||s===39||s===47||s===60||s===61||s===62||s===96||Y(s)?D(s):(n.consume(s),H)}function B(s){return s===47||s===62||F(s)?S(s):t(s)}function O(s){return s===62?(n.consume(s),I):t(s)}function I(s){return s===null||w(s)?y(s):F(s)?(n.consume(s),I):t(s)}function y(s){return s===45&&l===2?(n.consume(s),U):s===60&&l===1?(n.consume(s),Q):s===62&&l===4?(n.consume(s),J):s===63&&l===3?(n.consume(s),o):s===93&&l===5?(n.consume(s),en):w(s)&&(l===6||l===7)?(n.exit("htmlFlowData"),n.check(Se,rn,N)(s)):s===null||w(s)?(n.exit("htmlFlowData"),N(s)):(n.consume(s),y)}function N(s){return n.check(ye,V,rn)(s)}function V(s){return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),E}function E(s){return s===null||w(s)?N(s):(n.enter("htmlFlowData"),y(s))}function U(s){return s===45?(n.consume(s),o):y(s)}function Q(s){return s===47?(n.consume(s),u="",G):y(s)}function G(s){if(s===62){const K=u.toLowerCase();return Yn.includes(K)?(n.consume(s),J):y(s)}return nn(s)&&u.length<8?(n.consume(s),u+=String.fromCharCode(s),G):y(s)}function en(s){return s===93?(n.consume(s),o):y(s)}function o(s){return s===62?(n.consume(s),J):s===45&&l===2?(n.consume(s),o):y(s)}function J(s){return s===null||w(s)?(n.exit("htmlFlowData"),rn(s)):(n.consume(s),J)}function rn(s){return n.exit("htmlFlow"),r(s)}}function ze(n,r,t){const e=this;return l;function l(u){return w(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),i):t(u)}function i(u){return e.parser.lazy[e.now().line]?t(u):r(u)}}function Ce(n,r,t){return e;function e(l){return n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),n.attempt(zn,r,t)}}const Ee={name:"htmlText",tokenize:Te};function Te(n,r,t){const e=this;let l,i,u;return a;function a(o){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(o),f}function f(o){return o===33?(n.consume(o),h):o===47?(n.consume(o),D):o===63?(n.consume(o),S):nn(o)?(n.consume(o),H):t(o)}function h(o){return o===45?(n.consume(o),m):o===91?(n.consume(o),i=0,T):nn(o)?(n.consume(o),q):t(o)}function m(o){return o===45?(n.consume(o),c):t(o)}function p(o){return o===null?t(o):o===45?(n.consume(o),g):w(o)?(u=p,Q(o)):(n.consume(o),p)}function g(o){return o===45?(n.consume(o),c):p(o)}function c(o){return o===62?U(o):o===45?g(o):p(o)}function T(o){const J="CDATA[";return o===J.charCodeAt(i++)?(n.consume(o),i===J.length?_:T):t(o)}function _(o){return o===null?t(o):o===93?(n.consume(o),R):w(o)?(u=_,Q(o)):(n.consume(o),_)}function R(o){return o===93?(n.consume(o),b):_(o)}function b(o){return o===62?U(o):o===93?(n.consume(o),b):_(o)}function q(o){return o===null||o===62?U(o):w(o)?(u=q,Q(o)):(n.consume(o),q)}function S(o){return o===null?t(o):o===63?(n.consume(o),M):w(o)?(u=S,Q(o)):(n.consume(o),S)}function M(o){return o===62?U(o):S(o)}function D(o){return nn(o)?(n.consume(o),k):t(o)}function k(o){return o===45||v(o)?(n.consume(o),k):A(o)}function A(o){return w(o)?(u=A,Q(o)):F(o)?(n.consume(o),A):U(o)}function H(o){return o===45||v(o)?(n.consume(o),H):o===47||o===62||Y(o)?B(o):t(o)}function B(o){return o===47?(n.consume(o),U):o===58||o===95||nn(o)?(n.consume(o),O):w(o)?(u=B,Q(o)):F(o)?(n.consume(o),B):U(o)}function O(o){return o===45||o===46||o===58||o===95||v(o)?(n.consume(o),O):I(o)}function I(o){return o===61?(n.consume(o),y):w(o)?(u=I,Q(o)):F(o)?(n.consume(o),I):B(o)}function y(o){return o===null||o===60||o===61||o===62||o===96?t(o):o===34||o===39?(n.consume(o),l=o,N):w(o)?(u=y,Q(o)):F(o)?(n.consume(o),y):(n.consume(o),V)}function N(o){return o===l?(n.consume(o),l=void 0,E):o===null?t(o):w(o)?(u=N,Q(o)):(n.consume(o),N)}function V(o){return o===null||o===34||o===39||o===60||o===61||o===96?t(o):o===47||o===62||Y(o)?B(o):(n.consume(o),V)}function E(o){return o===47||o===62||Y(o)?B(o):t(o)}function U(o){return o===62?(n.consume(o),n.exit("htmlTextData"),n.exit("htmlText"),r):t(o)}function Q(o){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),G}function G(o){return F(o)?L(n,en,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):en(o)}function en(o){return n.enter("htmlTextData"),u(o)}}const Ln={name:"labelEnd",resolveAll:Be,resolveTo:Pe,tokenize:Le},Fe={tokenize:Oe},_e={tokenize:Me},Ae={tokenize:Ne};function Be(n){let r=-1;const t=[];for(;++r<n.length;){const e=n[r][1];if(t.push(n[r]),e.type==="labelImage"||e.type==="labelLink"||e.type==="labelEnd"){const l=e.type==="labelImage"?4:2;e.type="data",r+=l}}return n.length!==t.length&&tn(n,0,n.length,t),n}function Pe(n,r){let t=n.length,e=0,l,i,u,a;for(;t--;)if(l=n[t][1],i){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;n[t][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(u){if(n[t][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(i=t,l.type!=="labelLink")){e=2;break}}else l.type==="labelEnd"&&(u=t);const f={type:n[i][1].type==="labelLink"?"link":"image",start:{...n[i][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[i][1].start},end:{...n[u][1].end}},m={type:"labelText",start:{...n[i+e+2][1].end},end:{...n[u-2][1].start}};return a=[["enter",f,r],["enter",h,r]],a=Z(a,n.slice(i+1,i+e+3)),a=Z(a,[["enter",m,r]]),a=Z(a,Bn(r.parser.constructs.insideSpan.null,n.slice(i+e+4,u-3),r)),a=Z(a,[["exit",m,r],n[u-2],n[u-1],["exit",h,r]]),a=Z(a,n.slice(u+1)),a=Z(a,[["exit",f,r]]),tn(n,i,n.length,a),n}function Le(n,r,t){const e=this;let l=e.events.length,i,u;for(;l--;)if((e.events[l][1].type==="labelImage"||e.events[l][1].type==="labelLink")&&!e.events[l][1]._balanced){i=e.events[l][1];break}return a;function a(g){return i?i._inactive?p(g):(u=e.parser.defined.includes(gn(e.sliceSerialize({start:i.end,end:e.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(g),n.exit("labelMarker"),n.exit("labelEnd"),f):t(g)}function f(g){return g===40?n.attempt(Fe,m,u?m:p)(g):g===91?n.attempt(_e,m,u?h:p)(g):u?m(g):p(g)}function h(g){return n.attempt(Ae,m,p)(g)}function m(g){return r(g)}function p(g){return i._balanced=!0,t(g)}}function Oe(n,r,t){return e;function e(p){return n.enter("resource"),n.enter("resourceMarker"),n.consume(p),n.exit("resourceMarker"),l}function l(p){return Y(p)?Sn(n,i)(p):i(p)}function i(p){return p===41?m(p):ut(n,u,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function u(p){return Y(p)?Sn(n,f)(p):m(p)}function a(p){return t(p)}function f(p){return p===34||p===39||p===40?at(n,h,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):m(p)}function h(p){return Y(p)?Sn(n,m)(p):m(p)}function m(p){return p===41?(n.enter("resourceMarker"),n.consume(p),n.exit("resourceMarker"),n.exit("resource"),r):t(p)}}function Me(n,r,t){const e=this;return l;function l(a){return lt.call(e,n,i,u,"reference","referenceMarker","referenceString")(a)}function i(a){return e.parser.defined.includes(gn(e.sliceSerialize(e.events[e.events.length-1][1]).slice(1,-1)))?r(a):t(a)}function u(a){return t(a)}}function Ne(n,r,t){return e;function e(i){return n.enter("reference"),n.enter("referenceMarker"),n.consume(i),n.exit("referenceMarker"),l}function l(i){return i===93?(n.enter("referenceMarker"),n.consume(i),n.exit("referenceMarker"),n.exit("reference"),r):t(i)}}const De={name:"labelStartImage",resolveAll:Ln.resolveAll,tokenize:Re};function Re(n,r,t){const e=this;return l;function l(a){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(a),n.exit("labelImageMarker"),i}function i(a){return a===91?(n.enter("labelMarker"),n.consume(a),n.exit("labelMarker"),n.exit("labelImage"),u):t(a)}function u(a){return a===94&&"_hiddenFootnoteSupport"in e.parser.constructs?t(a):r(a)}}const qe={name:"labelStartLink",resolveAll:Ln.resolveAll,tokenize:He};function He(n,r,t){const e=this;return l;function l(u){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(u),n.exit("labelMarker"),n.exit("labelLink"),i}function i(u){return u===94&&"_hiddenFootnoteSupport"in e.parser.constructs?t(u):r(u)}}const En={name:"lineEnding",tokenize:Ve};function Ve(n,r){return t;function t(e){return n.enter("lineEnding"),n.consume(e),n.exit("lineEnding"),L(n,r,"linePrefix")}}const In={name:"thematicBreak",tokenize:Qe};function Qe(n,r,t){let e=0,l;return i;function i(h){return n.enter("thematicBreak"),u(h)}function u(h){return l=h,a(h)}function a(h){return h===l?(n.enter("thematicBreakSequence"),f(h)):e>=3&&(h===null||w(h))?(n.exit("thematicBreak"),r(h)):t(h)}function f(h){return h===l?(n.consume(h),e++,f):(n.exit("thematicBreakSequence"),F(h)?L(n,a,"whitespace")(h):a(h))}}const W={continuation:{tokenize:Ye},exit:Ze,name:"list",tokenize:We},je={partial:!0,tokenize:Ge},Ue={partial:!0,tokenize:$e};function We(n,r,t){const e=this,l=e.events[e.events.length-1];let i=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,u=0;return a;function a(c){const T=e.containerState.type||(c===42||c===43||c===45?"listUnordered":"listOrdered");if(T==="listUnordered"?!e.containerState.marker||c===e.containerState.marker:Fn(c)){if(e.containerState.type||(e.containerState.type=T,n.enter(T,{_container:!0})),T==="listUnordered")return n.enter("listItemPrefix"),c===42||c===45?n.check(In,t,h)(c):h(c);if(!e.interrupt||c===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),f(c)}return t(c)}function f(c){return Fn(c)&&++u<10?(n.consume(c),f):(!e.interrupt||u<2)&&(e.containerState.marker?c===e.containerState.marker:c===41||c===46)?(n.exit("listItemValue"),h(c)):t(c)}function h(c){return n.enter("listItemMarker"),n.consume(c),n.exit("listItemMarker"),e.containerState.marker=e.containerState.marker||c,n.check(zn,e.interrupt?t:m,n.attempt(je,g,p))}function m(c){return e.containerState.initialBlankLine=!0,i++,g(c)}function p(c){return F(c)?(n.enter("listItemPrefixWhitespace"),n.consume(c),n.exit("listItemPrefixWhitespace"),g):t(c)}function g(c){return e.containerState.size=i+e.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(c)}}function Ye(n,r,t){const e=this;return e.containerState._closeFlow=void 0,n.check(zn,l,i);function l(a){return e.containerState.furtherBlankLines=e.containerState.furtherBlankLines||e.containerState.initialBlankLine,L(n,r,"listItemIndent",e.containerState.size+1)(a)}function i(a){return e.containerState.furtherBlankLines||!F(a)?(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,u(a)):(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,n.attempt(Ue,r,u)(a))}function u(a){return e.containerState._closeFlow=!0,e.interrupt=void 0,L(n,n.attempt(W,r,t),"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function $e(n,r,t){const e=this;return L(n,l,"listItemIndent",e.containerState.size+1);function l(i){const u=e.events[e.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===e.containerState.size?r(i):t(i)}}function Ze(n){n.exit(this.containerState.type)}function Ge(n,r,t){const e=this;return L(n,l,"listItemPrefixWhitespace",e.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(i){const u=e.events[e.events.length-1];return!F(i)&&u&&u[1].type==="listItemPrefixWhitespace"?r(i):t(i)}}const $n={name:"setextUnderline",resolveTo:Je,tokenize:Ke};function Je(n,r){let t=n.length,e,l,i;for(;t--;)if(n[t][0]==="enter"){if(n[t][1].type==="content"){e=t;break}n[t][1].type==="paragraph"&&(l=t)}else n[t][1].type==="content"&&n.splice(t,1),!i&&n[t][1].type==="definition"&&(i=t);const u={type:"setextHeading",start:{...n[e][1].start},end:{...n[n.length-1][1].end}};return n[l][1].type="setextHeadingText",i?(n.splice(l,0,["enter",u,r]),n.splice(i+1,0,["exit",n[e][1],r]),n[e][1].end={...n[i][1].end}):n[e][1]=u,n.push(["exit",u,r]),n}function Ke(n,r,t){const e=this;let l;return i;function i(h){let m=e.events.length,p;for(;m--;)if(e.events[m][1].type!=="lineEnding"&&e.events[m][1].type!=="linePrefix"&&e.events[m][1].type!=="content"){p=e.events[m][1].type==="paragraph";break}return!e.parser.lazy[e.now().line]&&(e.interrupt||p)?(n.enter("setextHeadingLine"),l=h,u(h)):t(h)}function u(h){return n.enter("setextHeadingLineSequence"),a(h)}function a(h){return h===l?(n.consume(h),a):(n.exit("setextHeadingLineSequence"),F(h)?L(n,f,"lineSuffix")(h):f(h))}function f(h){return h===null||w(h)?(n.exit("setextHeadingLine"),r(h)):t(h)}}function wn(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?Zn(n.position):"start"in n||"end"in n?Zn(n):"line"in n||"column"in n?An(n):""}function An(n){return Gn(n&&n.line)+":"+Gn(n&&n.column)}function Zn(n){return An(n&&n.start)+"-"+An(n&&n.end)}function Gn(n){return n&&typeof n=="number"?n:1}const Xe={tokenize:ve};function ve(n){const r=n.attempt(this.parser.constructs.contentInitial,e,l);let t;return r;function e(a){if(a===null){n.consume(a);return}return n.enter("lineEnding"),n.consume(a),n.exit("lineEnding"),L(n,r,"linePrefix")}function l(a){return n.enter("paragraph"),i(a)}function i(a){const f=n.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=f),t=f,u(a)}function u(a){if(a===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(a);return}return w(a)?(n.consume(a),n.exit("chunkText"),i):(n.consume(a),u)}}const nr={tokenize:tr},Jn={tokenize:er};function tr(n){const r=this,t=[];let e=0,l,i,u;return a;function a(S){if(e<t.length){const M=t[e];return r.containerState=M[1],n.attempt(M[0].continuation,f,h)(S)}return h(S)}function f(S){if(e++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,l&&q();const M=r.events.length;let D=M,k;for(;D--;)if(r.events[D][0]==="exit"&&r.events[D][1].type==="chunkFlow"){k=r.events[D][1].end;break}b(e);let A=M;for(;A<r.events.length;)r.events[A][1].end={...k},A++;return tn(r.events,D+1,0,r.events.slice(M)),r.events.length=A,h(S)}return a(S)}function h(S){if(e===t.length){if(!l)return g(S);if(l.currentConstruct&&l.currentConstruct.concrete)return T(S);r.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return r.containerState={},n.check(Jn,m,p)(S)}function m(S){return l&&q(),b(e),g(S)}function p(S){return r.parser.lazy[r.now().line]=e!==t.length,u=r.now().offset,T(S)}function g(S){return r.containerState={},n.attempt(Jn,c,T)(S)}function c(S){return e++,t.push([r.currentConstruct,r.containerState]),g(S)}function T(S){if(S===null){l&&q(),b(0),n.consume(S);return}return l=l||r.parser.flow(r.now()),n.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:i}),_(S)}function _(S){if(S===null){R(n.exit("chunkFlow"),!0),b(0),n.consume(S);return}return w(S)?(n.consume(S),R(n.exit("chunkFlow")),e=0,r.interrupt=void 0,a):(n.consume(S),_)}function R(S,M){const D=r.sliceStream(S);if(M&&D.push(null),S.previous=i,i&&(i.next=S),i=S,l.defineSkip(S.start),l.write(D),r.parser.lazy[S.start.line]){let k=l.events.length;for(;k--;)if(l.events[k][1].start.offset<u&&(!l.events[k][1].end||l.events[k][1].end.offset>u))return;const A=r.events.length;let H=A,B,O;for(;H--;)if(r.events[H][0]==="exit"&&r.events[H][1].type==="chunkFlow"){if(B){O=r.events[H][1].end;break}B=!0}for(b(e),k=A;k<r.events.length;)r.events[k][1].end={...O},k++;tn(r.events,H+1,0,r.events.slice(A)),r.events.length=k}}function b(S){let M=t.length;for(;M-- >S;){const D=t[M];r.containerState=D[1],D[0].exit.call(r,n)}t.length=S}function q(){l.write([null]),i=void 0,l=void 0,r.containerState._closeFlow=void 0}}function er(n,r,t){return L(n,n.attempt(this.parser.constructs.document,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const rr={tokenize:ir};function ir(n){const r=this,t=n.attempt(zn,e,n.attempt(this.parser.constructs.flowInitial,l,L(n,n.attempt(this.parser.constructs.flow,l,n.attempt(ie,l)),"linePrefix")));return t;function e(i){if(i===null){n.consume(i);return}return n.enter("lineEndingBlank"),n.consume(i),n.exit("lineEndingBlank"),r.currentConstruct=void 0,t}function l(i){if(i===null){n.consume(i);return}return n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),r.currentConstruct=void 0,t}}const ur={resolveAll:st()},lr=ot("string"),ar=ot("text");function ot(n){return{resolveAll:st(n==="text"?or:void 0),tokenize:r};function r(t){const e=this,l=this.parser.constructs[n],i=t.attempt(l,u,a);return u;function u(m){return h(m)?i(m):a(m)}function a(m){if(m===null){t.consume(m);return}return t.enter("data"),t.consume(m),f}function f(m){return h(m)?(t.exit("data"),i(m)):(t.consume(m),f)}function h(m){if(m===null)return!0;const p=l[m];let g=-1;if(p)for(;++g<p.length;){const c=p[g];if(!c.previous||c.previous.call(e,e.previous))return!0}return!1}}}function st(n){return r;function r(t,e){let l=-1,i;for(;++l<=t.length;)i===void 0?t[l]&&t[l][1].type==="data"&&(i=l,l++):(!t[l]||t[l][1].type!=="data")&&(l!==i+2&&(t[i][1].end=t[l-1][1].end,t.splice(i+2,l-i-2),l=i+2),i=void 0);return n?n(t,e):t}}function or(n,r){let t=0;for(;++t<=n.length;)if((t===n.length||n[t][1].type==="lineEnding")&&n[t-1][1].type==="data"){const e=n[t-1][1],l=r.sliceStream(e);let i=l.length,u=-1,a=0,f;for(;i--;){const h=l[i];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)a++,u--;if(u)break;u=-1}else if(h===-2)f=!0,a++;else if(h!==-1){i++;break}}if(r._contentTypeTextTrailing&&t===n.length&&(a=0),a){const h={type:t===n.length||f||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?u:e.start._bufferIndex+u,_index:e.start._index+i,line:e.end.line,column:e.end.column-a,offset:e.end.offset-a},end:{...e.end}};e.end={...h.start},e.start.offset===e.end.offset?Object.assign(e,h):(n.splice(t,0,["enter",h,r],["exit",h,r]),t+=2)}t++}return n}const sr={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:tt},cr={91:se},hr={[-2]:Cn,[-1]:Cn,32:Cn},pr={35:ge,42:In,45:[$n,In],60:be,61:$n,95:In,96:Wn,126:Wn},fr={38:rt,92:et},mr={[-5]:En,[-4]:En,[-3]:En,33:De,38:rt,42:_n,60:[qt,Ee],91:qe,92:[fe,et],93:Ln,95:_n,96:Xt},gr={null:[_n,ur]},xr={null:[42,95]},kr={null:[]},dr=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:xr,contentInitial:cr,disable:kr,document:sr,flow:pr,flowInitial:hr,insideSpan:gr,string:fr,text:mr},Symbol.toStringTag,{value:"Module"}));function br(n,r,t){let e={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const l={},i=[];let u=[],a=[];const f={attempt:A(D),check:A(k),consume:q,enter:S,exit:M,interrupt:A(k,{interrupt:!0})},h={code:null,containerState:{},defineSkip:_,events:[],now:T,parser:n,previous:null,sliceSerialize:g,sliceStream:c,write:p};let m=r.tokenize.call(h,f);return r.resolveAll&&i.push(r),h;function p(I){return u=Z(u,I),R(),u[u.length-1]!==null?[]:(H(r,0),h.events=Bn(i,h.events,h),h.events)}function g(I,y){return yr(c(I),y)}function c(I){return Sr(u,I)}function T(){const{_bufferIndex:I,_index:y,line:N,column:V,offset:E}=e;return{_bufferIndex:I,_index:y,line:N,column:V,offset:E}}function _(I){l[I.line]=I.column,O()}function R(){let I;for(;e._index<u.length;){const y=u[e._index];if(typeof y=="string")for(I=e._index,e._bufferIndex<0&&(e._bufferIndex=0);e._index===I&&e._bufferIndex<y.length;)b(y.charCodeAt(e._bufferIndex));else b(y)}}function b(I){m=m(I)}function q(I){w(I)?(e.line++,e.column=1,e.offset+=I===-3?2:1,O()):I!==-1&&(e.column++,e.offset++),e._bufferIndex<0?e._index++:(e._bufferIndex++,e._bufferIndex===u[e._index].length&&(e._bufferIndex=-1,e._index++)),h.previous=I}function S(I,y){const N=y||{};return N.type=I,N.start=T(),h.events.push(["enter",N,h]),a.push(N),N}function M(I){const y=a.pop();return y.end=T(),h.events.push(["exit",y,h]),y}function D(I,y){H(I,y.from)}function k(I,y){y.restore()}function A(I,y){return N;function N(V,E,U){let Q,G,en,o;return Array.isArray(V)?rn(V):"tokenize"in V?rn([V]):J(V);function J(j){return xn;function xn(an){const pn=an!==null&&j[an],fn=an!==null&&j.null,yn=[...Array.isArray(pn)?pn:pn?[pn]:[],...Array.isArray(fn)?fn:fn?[fn]:[]];return rn(yn)(an)}}function rn(j){return Q=j,G=0,j.length===0?U:s(j[G])}function s(j){return xn;function xn(an){return o=B(),en=j,j.partial||(h.currentConstruct=j),j.name&&h.parser.constructs.disable.null.includes(j.name)?cn():j.tokenize.call(y?Object.assign(Object.create(h),y):h,f,K,cn)(an)}}function K(j){return I(en,o),E}function cn(j){return o.restore(),++G<Q.length?s(Q[G]):U}}}function H(I,y){I.resolveAll&&!i.includes(I)&&i.push(I),I.resolve&&tn(h.events,y,h.events.length-y,I.resolve(h.events.slice(y),h)),I.resolveTo&&(h.events=I.resolveTo(h.events,h))}function B(){const I=T(),y=h.previous,N=h.currentConstruct,V=h.events.length,E=Array.from(a);return{from:V,restore:U};function U(){e=I,h.previous=y,h.currentConstruct=N,h.events.length=V,a=E,O()}}function O(){e.line in l&&e.column<2&&(e.column=l[e.line],e.offset+=l[e.line]-1)}}function Sr(n,r){const t=r.start._index,e=r.start._bufferIndex,l=r.end._index,i=r.end._bufferIndex;let u;if(t===l)u=[n[t].slice(e,i)];else{if(u=n.slice(t,l),e>-1){const a=u[0];typeof a=="string"?u[0]=a.slice(e):u.shift()}i>0&&u.push(n[l].slice(0,i))}return u}function yr(n,r){let t=-1;const e=[];let l;for(;++t<n.length;){const i=n[t];let u;if(typeof i=="string")u=i;else switch(i){case-5:{u="\r";break}case-4:{u=`
|
|
2
|
+
`;break}case-3:{u=`\r
|
|
3
|
+
`;break}case-2:{u=r?" ":" ";break}case-1:{if(!r&&l)continue;u=" ";break}default:u=String.fromCharCode(i)}l=i===-2,e.push(u)}return e.join("")}function Ir(n){const e={constructs:Ot([dr,...(n||{}).extensions||[]]),content:l(Xe),defined:[],document:l(nr),flow:l(rr),lazy:{},string:l(lr),text:l(ar)};return e;function l(i){return u;function u(a){return br(e,i,a)}}}function wr(n){for(;!it(n););return n}const Kn=/[\0\t\n\r]/g;function zr(){let n=1,r="",t=!0,e;return l;function l(i,u,a){const f=[];let h,m,p,g,c;for(i=r+(typeof i=="string"?i.toString():new TextDecoder(u||void 0).decode(i)),p=0,r="",t&&(i.charCodeAt(0)===65279&&p++,t=void 0);p<i.length;){if(Kn.lastIndex=p,h=Kn.exec(i),g=h&&h.index!==void 0?h.index:i.length,c=i.charCodeAt(g),!h){r=i.slice(p);break}if(c===10&&p===g&&e)f.push(-3),e=void 0;else switch(e&&(f.push(-5),e=void 0),p<g&&(f.push(i.slice(p,g)),n+=g-p),c){case 0:{f.push(65533),n++;break}case 9:{for(m=Math.ceil(n/4)*4,f.push(-2);n++<m;)f.push(-1);break}case 10:{f.push(-4),n=1;break}default:e=!0,n=1}p=g+1}return a&&(e&&f.push(-5),r&&f.push(r),f.push(null)),f}}const ct={}.hasOwnProperty;function Cr(n,r,t){return r&&typeof r=="object"&&(t=r,r=void 0),Er(t)(wr(Ir(t).document().write(zr()(n,r,!0))))}function Er(n){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Dn),autolinkProtocol:B,autolinkEmail:B,atxHeading:i(On),blockQuote:i(fn),characterEscape:B,characterReference:B,codeFenced:i(yn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:i(yn,u),codeText:i(pt,u),codeTextData:B,data:B,codeFlowValue:B,definition:i(ft),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:i(mt),hardBreakEscape:i(Mn),hardBreakTrailing:i(Mn),htmlFlow:i(Nn,u),htmlFlowData:B,htmlText:i(Nn,u),htmlTextData:B,image:i(gt),label:u,link:i(Dn),listItem:i(xt),listItemValue:g,listOrdered:i(Rn,p),listUnordered:i(Rn),paragraph:i(kt),reference:s,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:i(On),strong:i(dt),thematicBreak:i(St)},exit:{atxHeading:f(),atxHeadingSequence:D,autolink:f(),autolinkEmail:pn,autolinkProtocol:an,blockQuote:f(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:cn,characterReferenceMarkerNumeric:cn,characterReferenceValue:j,characterReference:xn,codeFenced:f(R),codeFencedFence:_,codeFencedFenceInfo:c,codeFencedFenceMeta:T,codeFlowValue:O,codeIndented:f(b),codeText:f(E),codeTextData:O,data:O,definition:f(),definitionDestinationString:M,definitionLabelString:q,definitionTitleString:S,emphasis:f(),hardBreakEscape:f(y),hardBreakTrailing:f(y),htmlFlow:f(N),htmlFlowData:O,htmlText:f(V),htmlTextData:O,image:f(Q),label:en,labelText:G,lineEnding:I,link:f(U),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:K,resourceDestinationString:o,resourceTitleString:J,resource:rn,setextHeading:f(H),setextHeadingLineSequence:A,setextHeadingText:k,strong:f(),thematicBreak:f()}};ht(r,(n||{}).mdastExtensions||[]);const t={};return e;function e(x){let d={type:"root",children:[]};const z={stack:[d],tokenStack:[],config:r,enter:a,exit:h,buffer:u,resume:m,data:t},C=[];let P=-1;for(;++P<x.length;)if(x[P][1].type==="listOrdered"||x[P][1].type==="listUnordered")if(x[P][0]==="enter")C.push(P);else{const X=C.pop();P=l(x,X,P)}for(P=-1;++P<x.length;){const X=r[x[P][0]];ct.call(X,x[P][1].type)&&X[x[P][1].type].call(Object.assign({sliceSerialize:x[P][2].sliceSerialize},z),x[P][1])}if(z.tokenStack.length>0){const X=z.tokenStack[z.tokenStack.length-1];(X[1]||Xn).call(z,void 0,X[0])}for(d.position={start:on(x.length>0?x[0][1].start:{line:1,column:1,offset:0}),end:on(x.length>0?x[x.length-2][1].end:{line:1,column:1,offset:0})},P=-1;++P<r.transforms.length;)d=r.transforms[P](d)||d;return d}function l(x,d,z){let C=d-1,P=-1,X=!1,hn,un,kn,dn;for(;++C<=z;){const $=x[C];switch($[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{$[0]==="enter"?P++:P--,dn=void 0;break}case"lineEndingBlank":{$[0]==="enter"&&(hn&&!dn&&!P&&!kn&&(kn=C),dn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:dn=void 0}if(!P&&$[0]==="enter"&&$[1].type==="listItemPrefix"||P===-1&&$[0]==="exit"&&($[1].type==="listUnordered"||$[1].type==="listOrdered")){if(hn){let mn=C;for(un=void 0;mn--;){const ln=x[mn];if(ln[1].type==="lineEnding"||ln[1].type==="lineEndingBlank"){if(ln[0]==="exit")continue;un&&(x[un][1].type="lineEndingBlank",X=!0),ln[1].type="lineEnding",un=mn}else if(!(ln[1].type==="linePrefix"||ln[1].type==="blockQuotePrefix"||ln[1].type==="blockQuotePrefixWhitespace"||ln[1].type==="blockQuoteMarker"||ln[1].type==="listItemIndent"))break}kn&&(!un||kn<un)&&(hn._spread=!0),hn.end=Object.assign({},un?x[un][1].start:$[1].end),x.splice(un||C,0,["exit",hn,$[2]]),C++,z++}if($[1].type==="listItemPrefix"){const mn={type:"listItem",_spread:!1,start:Object.assign({},$[1].start),end:void 0};hn=mn,x.splice(C,0,["enter",mn,$[2]]),C++,z++,kn=void 0,dn=!0}}}return x[d][1]._spread=X,z}function i(x,d){return z;function z(C){a.call(this,x(C),C),d&&d.call(this,C)}}function u(){this.stack.push({type:"fragment",children:[]})}function a(x,d,z){this.stack[this.stack.length-1].children.push(x),this.stack.push(x),this.tokenStack.push([d,z||void 0]),x.position={start:on(d.start),end:void 0}}function f(x){return d;function d(z){x&&x.call(this,z),h.call(this,z)}}function h(x,d){const z=this.stack.pop(),C=this.tokenStack.pop();if(C)C[0].type!==x.type&&(d?d.call(this,x,C[0]):(C[1]||Xn).call(this,x,C[0]));else throw new Error("Cannot close `"+x.type+"` ("+wn({start:x.start,end:x.end})+"): it’s not open");z.position.end=on(x.end)}function m(){return _t(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function g(x){if(this.data.expectingFirstListItemValue){const d=this.stack[this.stack.length-2];d.start=Number.parseInt(this.sliceSerialize(x),10),this.data.expectingFirstListItemValue=void 0}}function c(){const x=this.resume(),d=this.stack[this.stack.length-1];d.lang=x}function T(){const x=this.resume(),d=this.stack[this.stack.length-1];d.meta=x}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function R(){const x=this.resume(),d=this.stack[this.stack.length-1];d.value=x.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const x=this.resume(),d=this.stack[this.stack.length-1];d.value=x.replace(/(\r?\n|\r)$/g,"")}function q(x){const d=this.resume(),z=this.stack[this.stack.length-1];z.label=d,z.identifier=gn(this.sliceSerialize(x)).toLowerCase()}function S(){const x=this.resume(),d=this.stack[this.stack.length-1];d.title=x}function M(){const x=this.resume(),d=this.stack[this.stack.length-1];d.url=x}function D(x){const d=this.stack[this.stack.length-1];if(!d.depth){const z=this.sliceSerialize(x).length;d.depth=z}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function A(x){const d=this.stack[this.stack.length-1];d.depth=this.sliceSerialize(x).codePointAt(0)===61?1:2}function H(){this.data.setextHeadingSlurpLineEnding=void 0}function B(x){const z=this.stack[this.stack.length-1].children;let C=z[z.length-1];(!C||C.type!=="text")&&(C=bt(),C.position={start:on(x.start),end:void 0},z.push(C)),this.stack.push(C)}function O(x){const d=this.stack.pop();d.value+=this.sliceSerialize(x),d.position.end=on(x.end)}function I(x){const d=this.stack[this.stack.length-1];if(this.data.atHardBreak){const z=d.children[d.children.length-1];z.position.end=on(x.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(d.type)&&(B.call(this,x),O.call(this,x))}function y(){this.data.atHardBreak=!0}function N(){const x=this.resume(),d=this.stack[this.stack.length-1];d.value=x}function V(){const x=this.resume(),d=this.stack[this.stack.length-1];d.value=x}function E(){const x=this.resume(),d=this.stack[this.stack.length-1];d.value=x}function U(){const x=this.stack[this.stack.length-1];if(this.data.inReference){const d=this.data.referenceType||"shortcut";x.type+="Reference",x.referenceType=d,delete x.url,delete x.title}else delete x.identifier,delete x.label;this.data.referenceType=void 0}function Q(){const x=this.stack[this.stack.length-1];if(this.data.inReference){const d=this.data.referenceType||"shortcut";x.type+="Reference",x.referenceType=d,delete x.url,delete x.title}else delete x.identifier,delete x.label;this.data.referenceType=void 0}function G(x){const d=this.sliceSerialize(x),z=this.stack[this.stack.length-2];z.label=Pt(d),z.identifier=gn(d).toLowerCase()}function en(){const x=this.stack[this.stack.length-1],d=this.resume(),z=this.stack[this.stack.length-1];if(this.data.inReference=!0,z.type==="link"){const C=x.children;z.children=C}else z.alt=d}function o(){const x=this.resume(),d=this.stack[this.stack.length-1];d.url=x}function J(){const x=this.resume(),d=this.stack[this.stack.length-1];d.title=x}function rn(){this.data.inReference=void 0}function s(){this.data.referenceType="collapsed"}function K(x){const d=this.resume(),z=this.stack[this.stack.length-1];z.label=d,z.identifier=gn(this.sliceSerialize(x)).toLowerCase(),this.data.referenceType="full"}function cn(x){this.data.characterReferenceType=x.type}function j(x){const d=this.sliceSerialize(x),z=this.data.characterReferenceType;let C;z?(C=nt(d,z==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):C=Pn(d);const P=this.stack[this.stack.length-1];P.value+=C}function xn(x){const d=this.stack.pop();d.position.end=on(x.end)}function an(x){O.call(this,x);const d=this.stack[this.stack.length-1];d.url=this.sliceSerialize(x)}function pn(x){O.call(this,x);const d=this.stack[this.stack.length-1];d.url="mailto:"+this.sliceSerialize(x)}function fn(){return{type:"blockquote",children:[]}}function yn(){return{type:"code",lang:null,meta:null,value:""}}function pt(){return{type:"inlineCode",value:""}}function ft(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function mt(){return{type:"emphasis",children:[]}}function On(){return{type:"heading",depth:0,children:[]}}function Mn(){return{type:"break"}}function Nn(){return{type:"html",value:""}}function gt(){return{type:"image",title:null,url:"",alt:null}}function Dn(){return{type:"link",title:null,url:"",children:[]}}function Rn(x){return{type:"list",ordered:x.type==="listOrdered",start:null,spread:x._spread,children:[]}}function xt(x){return{type:"listItem",spread:x._spread,checked:null,children:[]}}function kt(){return{type:"paragraph",children:[]}}function dt(){return{type:"strong",children:[]}}function bt(){return{type:"text",value:""}}function St(){return{type:"thematicBreak"}}}function on(n){return{line:n.line,column:n.column,offset:n.offset}}function ht(n,r){let t=-1;for(;++t<r.length;){const e=r[t];Array.isArray(e)?ht(n,e):Tr(n,e)}}function Tr(n,r){let t;for(t in r)if(ct.call(r,t))switch(t){case"canContainEols":{const e=r[t];e&&n[t].push(...e);break}case"transforms":{const e=r[t];e&&n[t].push(...e);break}case"enter":case"exit":{const e=r[t];e&&Object.assign(n[t],e);break}}}function Xn(n,r){throw n?new Error("Cannot close `"+n.type+"` ("+wn({start:n.start,end:n.end})+"): a different token (`"+r.type+"`, "+wn({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+wn({start:r.start,end:r.end})+") is still open")}function Fr(n,r){const t=Cr(yt(n));It()(t);const e=new Map,l=(u,a)=>{a(u),u.children?.forEach(f=>l(f,a))};l(t,u=>{u.type==="definition"&&u.identifier&&u.url&&e.set(u.identifier.toLowerCase(),u.url)});const i=[];return l(t,u=>{const a=u.type==="image"?u.url:u.type==="imageReference"?e.get(u.identifier?.toLowerCase()??""):void 0;a&&i.push({src:a,alt:u.alt??void 0,cwd:r})}),i}const Ar=Object.freeze(Object.defineProperty({__proto__:null,collectMessageImages:Fr},Symbol.toStringTag,{value:"Module"}));export{Et as a,v as b,qn as c,nn as d,Tn as e,zn as f,L as g,w as h,F as i,Ot as j,wn as k,Cr as l,Y as m,gn as n,Fr as o,Z as p,Ar as q,Bn as r,tn as s,_t as t,Tt as u};
|