- ✅ Ticket 1.1: Estructura Clean Architecture en backend - ✅ Ticket 1.2: Schemas Zod compartidos - ✅ Ticket 1.3: Refactorización drugs.ts (1362 → 8 archivos modulares) - ✅ Ticket 1.4: Refactorización procedures.ts (3583 → 6 archivos modulares) - ✅ Ticket 1.5: Eliminación de duplicidades (~50 líneas) Cambios principales: - Creada estructura Clean Architecture en backend/src/ - Schemas Zod compartidos en backend/src/shared/schemas/ - Refactorización modular de drugs y procedures - Utilidades genéricas en src/utils/ (filter, validation) - Eliminados scripts obsoletos y documentación antigua - Corregidos errores: QueryClient, import test-error-handling - Build verificado y funcionando correctamente
30 lines
115 KiB
JavaScript
30 lines
115 KiB
JavaScript
import{d as ue,b as Ot,p as Hn,e as jn,g as $n,v as ae,h as Vn,i as Un,j as $t,k as be,l as Xt,V as Wn,m as Ue,n as Qn,q as wt,r as we,u as Yn,E as Gn,w as Zn,x as Pt,y as Jn,z as Kn,A as Xn,B as tr,C as er,D as nr,F as rr,G as ir,H as lr,I as ur,J as ar,K as or,L as sr,M as cr,N as hr,O as fr,P as pr,Q as mr,R as gr,S as kr,T as xr,U as dr,W as yr,X as br,Y as wr,Z as Cr,_ as Sr,$ as Ir,a0 as zr,a1 as Ar,a2 as Tr,a3 as Er,a4 as Fr,a5 as Lr,a6 as Pr,a7 as Dr,a8 as _r,a9 as Br,aa as Mr,ab as Or,ac as Rr}from"./1-vendor-utils-Delnuc0l.js";import{aF as Nt}from"./0-vendor-react-DWOJpYrt.js";const Nr={};function oe(t,n){const e=Nr,r=typeof e.includeImageAlt=="boolean"?e.includeImageAlt:!0,l=typeof e.includeHtml=="boolean"?e.includeHtml:!0;return We(t,r,l)}function We(t,n,e){if(vr(t)){if("value"in t)return t.type==="html"&&!e?"":t.value;if(n&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Ce(t.children,n,e)}return Array.isArray(t)?Ce(t,n,e):""}function Ce(t,n,e){const r=[];let l=-1;for(;++l<t.length;)r[l]=We(t[l],n,e);return r.join("")}function vr(t){return!!(t&&typeof t=="object")}function Z(t,n,e,r){const l=t.length;let u=0,i;if(n<0?n=-n>l?0:l+n:n=n>l?l:n,e=e>0?e:0,r.length<1e4)i=Array.from(r),i.unshift(n,e),t.splice(...i);else for(e&&t.splice(n,e);u<r.length;)i=r.slice(u,u+1e4),i.unshift(n,0),t.splice(...i),u+=1e4,n+=1e4}function J(t,n){return t.length>0?(Z(t,t.length,0,n),t):n}const Se={}.hasOwnProperty;function Qe(t){const n={};let e=-1;for(;++e<t.length;)qr(n,t[e]);return n}function qr(t,n){let e;for(e in n){const l=(Se.call(t,e)?t[e]:void 0)||(t[e]={}),u=n[e];let i;if(u)for(i in u){Se.call(l,i)||(l[i]=[]);const a=u[i];Hr(l[i],Array.isArray(a)?a:a?[a]:[])}}}function Hr(t,n){let e=-1;const r=[];for(;++e<n.length;)(n[e].add==="after"?t:r).push(n[e]);Z(t,0,0,r)}function Ye(t,n){const e=Number.parseInt(t,n);return e<9||e===11||e>13&&e<32||e>126&&e<160||e>55295&&e<57344||e>64975&&e<65008||(e&65535)===65535||(e&65535)===65534||e>1114111?"<22>":String.fromCodePoint(e)}function nt(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Q=ht(/[A-Za-z]/),W=ht(/[\dA-Za-z]/),jr=ht(/[#-'*+\--9=?A-Z^-~]/);function vt(t){return t!==null&&(t<32||t===127)}const te=ht(/\d/),$r=ht(/[\dA-Fa-f]/),Vr=ht(/[!-/:-@[-`{-~]/);function T(t){return t!==null&&t<-2}function H(t){return t!==null&&(t<0||t===32)}function P(t){return t===-2||t===-1||t===32}const Ht=ht(new RegExp("\\p{P}|\\p{S}","u")),gt=ht(/\s/);function ht(t){return n;function n(e){return e!==null&&e>-1&&t.test(String.fromCharCode(e))}}function Ct(t){const n=[];let e=-1,r=0,l=0;for(;++e<t.length;){const u=t.charCodeAt(e);let i="";if(u===37&&W(t.charCodeAt(e+1))&&W(t.charCodeAt(e+2)))l=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(i=String.fromCharCode(u));else if(u>55295&&u<57344){const a=t.charCodeAt(e+1);u<56320&&a>56319&&a<57344?(i=String.fromCharCode(u,a),l=1):i="<22>"}else i=String.fromCharCode(u);i&&(n.push(t.slice(r,e),encodeURIComponent(i)),r=e+l+1,i=""),l&&(e+=l,l=0)}return n.join("")+t.slice(r)}function M(t,n,e,r){const l=r?r-1:Number.POSITIVE_INFINITY;let u=0;return i;function i(s){return P(s)?(t.enter(e),a(s)):n(s)}function a(s){return P(s)&&u++<l?(t.consume(s),a):(t.exit(e),n(s))}}const Ur={tokenize:Wr};function Wr(t){const n=t.attempt(this.parser.constructs.contentInitial,r,l);let e;return n;function r(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),M(t,n,"linePrefix")}function l(a){return t.enter("paragraph"),u(a)}function u(a){const s=t.enter("chunkText",{contentType:"text",previous:e});return e&&(e.next=s),e=s,i(a)}function i(a){if(a===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(a);return}return T(a)?(t.consume(a),t.exit("chunkText"),u):(t.consume(a),i)}}const Qr={tokenize:Yr},Ie={tokenize:Gr};function Yr(t){const n=this,e=[];let r=0,l,u,i;return a;function a(w){if(r<e.length){const D=e[r];return n.containerState=D[1],t.attempt(D[0].continuation,s,o)(w)}return o(w)}function s(w){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,l&&A();const D=n.events.length;let B=D,b;for(;B--;)if(n.events[B][0]==="exit"&&n.events[B][1].type==="chunkFlow"){b=n.events[B][1].end;break}y(r);let z=D;for(;z<n.events.length;)n.events[z][1].end={...b},z++;return Z(n.events,B+1,0,n.events.slice(D)),n.events.length=z,o(w)}return a(w)}function o(w){if(r===e.length){if(!l)return p(w);if(l.currentConstruct&&l.currentConstruct.concrete)return k(w);n.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return n.containerState={},t.check(Ie,h,c)(w)}function h(w){return l&&A(),y(r),p(w)}function c(w){return n.parser.lazy[n.now().line]=r!==e.length,i=n.now().offset,k(w)}function p(w){return n.containerState={},t.attempt(Ie,f,k)(w)}function f(w){return r++,e.push([n.currentConstruct,n.containerState]),p(w)}function k(w){if(w===null){l&&A(),y(0),t.consume(w);return}return l=l||n.parser.flow(n.now()),t.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:u}),C(w)}function C(w){if(w===null){I(t.exit("chunkFlow"),!0),y(0),t.consume(w);return}return T(w)?(t.consume(w),I(t.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(t.consume(w),C)}function I(w,D){const B=n.sliceStream(w);if(D&&B.push(null),w.previous=u,u&&(u.next=w),u=w,l.defineSkip(w.start),l.write(B),n.parser.lazy[w.start.line]){let b=l.events.length;for(;b--;)if(l.events[b][1].start.offset<i&&(!l.events[b][1].end||l.events[b][1].end.offset>i))return;const z=n.events.length;let N=z,R,x;for(;N--;)if(n.events[N][0]==="exit"&&n.events[N][1].type==="chunkFlow"){if(R){x=n.events[N][1].end;break}R=!0}for(y(r),b=z;b<n.events.length;)n.events[b][1].end={...x},b++;Z(n.events,N+1,0,n.events.slice(z)),n.events.length=b}}function y(w){let D=e.length;for(;D-- >w;){const B=e[D];n.containerState=B[1],B[0].exit.call(n,t)}e.length=w}function A(){l.write([null]),u=void 0,l=void 0,n.containerState._closeFlow=void 0}}function Gr(t,n,e){return M(t,t.attempt(this.parser.constructs.document,n,e),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function bt(t){if(t===null||H(t)||gt(t))return 1;if(Ht(t))return 2}function jt(t,n,e){const r=[];let l=-1;for(;++l<t.length;){const u=t[l].resolveAll;u&&!r.includes(u)&&(n=u(n,e),r.push(u))}return n}const ee={name:"attention",resolveAll:Zr,tokenize:Jr};function Zr(t,n){let e=-1,r,l,u,i,a,s,o,h;for(;++e<t.length;)if(t[e][0]==="enter"&&t[e][1].type==="attentionSequence"&&t[e][1]._close){for(r=e;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&n.sliceSerialize(t[r][1]).charCodeAt(0)===n.sliceSerialize(t[e][1]).charCodeAt(0)){if((t[r][1]._close||t[e][1]._open)&&(t[e][1].end.offset-t[e][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[e][1].end.offset-t[e][1].start.offset)%3))continue;s=t[r][1].end.offset-t[r][1].start.offset>1&&t[e][1].end.offset-t[e][1].start.offset>1?2:1;const c={...t[r][1].end},p={...t[e][1].start};ze(c,-s),ze(p,s),i={type:s>1?"strongSequence":"emphasisSequence",start:c,end:{...t[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...t[e][1].start},end:p},u={type:s>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[e][1].start}},l={type:s>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},t[r][1].end={...i.start},t[e][1].start={...a.end},o=[],t[r][1].end.offset-t[r][1].start.offset&&(o=J(o,[["enter",t[r][1],n],["exit",t[r][1],n]])),o=J(o,[["enter",l,n],["enter",i,n],["exit",i,n],["enter",u,n]]),o=J(o,jt(n.parser.constructs.insideSpan.null,t.slice(r+1,e),n)),o=J(o,[["exit",u,n],["enter",a,n],["exit",a,n],["exit",l,n]]),t[e][1].end.offset-t[e][1].start.offset?(h=2,o=J(o,[["enter",t[e][1],n],["exit",t[e][1],n]])):h=0,Z(t,r-1,e-r+3,o),e=r+o.length-h-2;break}}for(e=-1;++e<t.length;)t[e][1].type==="attentionSequence"&&(t[e][1].type="data");return t}function Jr(t,n){const e=this.parser.constructs.attentionMarkers.null,r=this.previous,l=bt(r);let u;return i;function i(s){return u=s,t.enter("attentionSequence"),a(s)}function a(s){if(s===u)return t.consume(s),a;const o=t.exit("attentionSequence"),h=bt(s),c=!h||h===2&&l||e.includes(s),p=!l||l===2&&h||e.includes(r);return o._open=!!(u===42?c:c&&(l||!p)),o._close=!!(u===42?p:p&&(h||!c)),n(s)}}function ze(t,n){t.column+=n,t.offset+=n,t._bufferIndex+=n}const Kr={name:"autolink",tokenize:Xr};function Xr(t,n,e){let r=0;return l;function l(f){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(f),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),u}function u(f){return Q(f)?(t.consume(f),i):f===64?e(f):o(f)}function i(f){return f===43||f===45||f===46||W(f)?(r=1,a(f)):o(f)}function a(f){return f===58?(t.consume(f),r=0,s):(f===43||f===45||f===46||W(f))&&r++<32?(t.consume(f),a):(r=0,o(f))}function s(f){return f===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(f),t.exit("autolinkMarker"),t.exit("autolink"),n):f===null||f===32||f===60||vt(f)?e(f):(t.consume(f),s)}function o(f){return f===64?(t.consume(f),h):jr(f)?(t.consume(f),o):e(f)}function h(f){return W(f)?c(f):e(f)}function c(f){return f===46?(t.consume(f),r=0,h):f===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(f),t.exit("autolinkMarker"),t.exit("autolink"),n):p(f)}function p(f){if((f===45||W(f))&&r++<63){const k=f===45?p:c;return t.consume(f),k}return e(f)}}const Ft={partial:!0,tokenize:ti};function ti(t,n,e){return r;function r(u){return P(u)?M(t,l,"linePrefix")(u):l(u)}function l(u){return u===null||T(u)?n(u):e(u)}}const Ge={continuation:{tokenize:ni},exit:ri,name:"blockQuote",tokenize:ei};function ei(t,n,e){const r=this;return l;function l(i){if(i===62){const a=r.containerState;return a.open||(t.enter("blockQuote",{_container:!0}),a.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(i),t.exit("blockQuoteMarker"),u}return e(i)}function u(i){return P(i)?(t.enter("blockQuotePrefixWhitespace"),t.consume(i),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),n):(t.exit("blockQuotePrefix"),n(i))}}function ni(t,n,e){const r=this;return l;function l(i){return P(i)?M(t,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):u(i)}function u(i){return t.attempt(Ge,n,e)(i)}}function ri(t){t.exit("blockQuote")}const Ze={name:"characterEscape",tokenize:ii};function ii(t,n,e){return r;function r(u){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(u),t.exit("escapeMarker"),l}function l(u){return Vr(u)?(t.enter("characterEscapeValue"),t.consume(u),t.exit("characterEscapeValue"),t.exit("characterEscape"),n):e(u)}}const Je={name:"characterReference",tokenize:li};function li(t,n,e){const r=this;let l=0,u,i;return a;function a(c){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(c),t.exit("characterReferenceMarker"),s}function s(c){return c===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(c),t.exit("characterReferenceMarkerNumeric"),o):(t.enter("characterReferenceValue"),u=31,i=W,h(c))}function o(c){return c===88||c===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(c),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),u=6,i=$r,h):(t.enter("characterReferenceValue"),u=7,i=te,h(c))}function h(c){if(c===59&&l){const p=t.exit("characterReferenceValue");return i===W&&!ue(r.sliceSerialize(p))?e(c):(t.enter("characterReferenceMarker"),t.consume(c),t.exit("characterReferenceMarker"),t.exit("characterReference"),n)}return i(c)&&l++<u?(t.consume(c),h):e(c)}}const Ae={partial:!0,tokenize:ai},Te={concrete:!0,name:"codeFenced",tokenize:ui};function ui(t,n,e){const r=this,l={partial:!0,tokenize:B};let u=0,i=0,a;return s;function s(b){return o(b)}function o(b){const z=r.events[r.events.length-1];return u=z&&z[1].type==="linePrefix"?z[2].sliceSerialize(z[1],!0).length:0,a=b,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),h(b)}function h(b){return b===a?(i++,t.consume(b),h):i<3?e(b):(t.exit("codeFencedFenceSequence"),P(b)?M(t,c,"whitespace")(b):c(b))}function c(b){return b===null||T(b)?(t.exit("codeFencedFence"),r.interrupt?n(b):t.check(Ae,C,D)(b)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===null||T(b)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),c(b)):P(b)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),M(t,f,"whitespace")(b)):b===96&&b===a?e(b):(t.consume(b),p)}function f(b){return b===null||T(b)?c(b):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),k(b))}function k(b){return b===null||T(b)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),c(b)):b===96&&b===a?e(b):(t.consume(b),k)}function C(b){return t.attempt(l,D,I)(b)}function I(b){return t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),y}function y(b){return u>0&&P(b)?M(t,A,"linePrefix",u+1)(b):A(b)}function A(b){return b===null||T(b)?t.check(Ae,C,D)(b):(t.enter("codeFlowValue"),w(b))}function w(b){return b===null||T(b)?(t.exit("codeFlowValue"),A(b)):(t.consume(b),w)}function D(b){return t.exit("codeFenced"),n(b)}function B(b,z,N){let R=0;return x;function x(O){return b.enter("lineEnding"),b.consume(O),b.exit("lineEnding"),E}function E(O){return b.enter("codeFencedFence"),P(O)?M(b,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):F(O)}function F(O){return O===a?(b.enter("codeFencedFenceSequence"),v(O)):N(O)}function v(O){return O===a?(R++,b.consume(O),v):R>=i?(b.exit("codeFencedFenceSequence"),P(O)?M(b,j,"whitespace")(O):j(O)):N(O)}function j(O){return O===null||T(O)?(b.exit("codeFencedFence"),z(O)):N(O)}}}function ai(t,n,e){const r=this;return l;function l(i){return i===null?e(i):(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),u)}function u(i){return r.parser.lazy[r.now().line]?e(i):n(i)}}const Vt={name:"codeIndented",tokenize:si},oi={partial:!0,tokenize:ci};function si(t,n,e){const r=this;return l;function l(o){return t.enter("codeIndented"),M(t,u,"linePrefix",5)(o)}function u(o){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?i(o):e(o)}function i(o){return o===null?s(o):T(o)?t.attempt(oi,i,s)(o):(t.enter("codeFlowValue"),a(o))}function a(o){return o===null||T(o)?(t.exit("codeFlowValue"),i(o)):(t.consume(o),a)}function s(o){return t.exit("codeIndented"),n(o)}}function ci(t,n,e){const r=this;return l;function l(i){return r.parser.lazy[r.now().line]?e(i):T(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),l):M(t,u,"linePrefix",5)(i)}function u(i){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(i):T(i)?l(i):e(i)}}const hi={name:"codeText",previous:pi,resolve:fi,tokenize:mi};function fi(t){let n=t.length-4,e=3,r,l;if((t[e][1].type==="lineEnding"||t[e][1].type==="space")&&(t[n][1].type==="lineEnding"||t[n][1].type==="space")){for(r=e;++r<n;)if(t[r][1].type==="codeTextData"){t[e][1].type="codeTextPadding",t[n][1].type="codeTextPadding",e+=2,n-=2;break}}for(r=e-1,n++;++r<=n;)l===void 0?r!==n&&t[r][1].type!=="lineEnding"&&(l=r):(r===n||t[r][1].type==="lineEnding")&&(t[l][1].type="codeTextData",r!==l+2&&(t[l][1].end=t[r-1][1].end,t.splice(l+2,r-l-2),n-=r-l-2,r=l+2),l=void 0);return t}function pi(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function mi(t,n,e){let r=0,l,u;return i;function i(c){return t.enter("codeText"),t.enter("codeTextSequence"),a(c)}function a(c){return c===96?(t.consume(c),r++,a):(t.exit("codeTextSequence"),s(c))}function s(c){return c===null?e(c):c===32?(t.enter("space"),t.consume(c),t.exit("space"),s):c===96?(u=t.enter("codeTextSequence"),l=0,h(c)):T(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s):(t.enter("codeTextData"),o(c))}function o(c){return c===null||c===32||c===96||T(c)?(t.exit("codeTextData"),s(c)):(t.consume(c),o)}function h(c){return c===96?(t.consume(c),l++,h):l===r?(t.exit("codeTextSequence"),t.exit("codeText"),n(c)):(u.type="codeTextData",o(c))}}class gi{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,e){const r=e??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,e,r){const l=e||0;this.setCursor(Math.trunc(n));const u=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return r&&At(this.left,r),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),At(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),At(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const e=this.left.splice(n,Number.POSITIVE_INFINITY);At(this.right,e.reverse())}else{const e=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);At(this.left,e.reverse())}}}function At(t,n){let e=0;if(n.length<1e4)t.push(...n);else for(;e<n.length;)t.push(...n.slice(e,e+1e4)),e+=1e4}function Ke(t){const n={};let e=-1,r,l,u,i,a,s,o;const h=new gi(t);for(;++e<h.length;){for(;e in n;)e=n[e];if(r=h.get(e),e&&r[1].type==="chunkFlow"&&h.get(e-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,u=0,u<s.length&&s[u][1].type==="lineEndingBlank"&&(u+=2),u<s.length&&s[u][1].type==="content"))for(;++u<s.length&&s[u][1].type!=="content";)s[u][1].type==="chunkText"&&(s[u][1]._isInFirstContentOfListItem=!0,u++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,ki(h,e)),e=n[e],o=!0);else if(r[1]._container){for(u=e,l=void 0;u--;)if(i=h.get(u),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank")i[0]==="enter"&&(l&&(h.get(l)[1].type="lineEndingBlank"),i[1].type="lineEnding",l=u);else if(!(i[1].type==="linePrefix"||i[1].type==="listItemIndent"))break;l&&(r[1].end={...h.get(l)[1].start},a=h.slice(l,e),a.unshift(r),h.splice(l,e-l+1,a))}}return Z(t,0,Number.POSITIVE_INFINITY,h.slice(0)),!o}function ki(t,n){const e=t.get(n)[1],r=t.get(n)[2];let l=n-1;const u=[];let i=e._tokenizer;i||(i=r.parser[e.contentType](e.start),e._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const a=i.events,s=[],o={};let h,c,p=-1,f=e,k=0,C=0;const I=[C];for(;f;){for(;t.get(++l)[1]!==f;);u.push(l),f._tokenizer||(h=r.sliceStream(f),f.next||h.push(null),c&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(h),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),c=f,f=f.next}for(f=e;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(C=p+1,I.push(C),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):I.pop(),p=I.length;p--;){const y=a.slice(I[p],I[p+1]),A=u.pop();s.push([A,A+y.length-1]),t.splice(A,2,y)}for(s.reverse(),p=-1;++p<s.length;)o[k+s[p][0]]=k+s[p][1],k+=s[p][1]-s[p][0]-1;return o}const xi={resolve:yi,tokenize:bi},di={partial:!0,tokenize:wi};function yi(t){return Ke(t),t}function bi(t,n){let e;return r;function r(a){return t.enter("content"),e=t.enter("chunkContent",{contentType:"content"}),l(a)}function l(a){return a===null?u(a):T(a)?t.check(di,i,u)(a):(t.consume(a),l)}function u(a){return t.exit("chunkContent"),t.exit("content"),n(a)}function i(a){return t.consume(a),t.exit("chunkContent"),e.next=t.enter("chunkContent",{contentType:"content",previous:e}),e=e.next,l}}function wi(t,n,e){const r=this;return l;function l(i){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),M(t,u,"linePrefix")}function u(i){if(i===null||T(i))return e(i);const 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?n(i):t.interrupt(r.parser.constructs.flow,e,n)(i)}}function Xe(t,n,e,r,l,u,i,a,s){const o=s||Number.POSITIVE_INFINITY;let h=0;return c;function c(y){return y===60?(t.enter(r),t.enter(l),t.enter(u),t.consume(y),t.exit(u),p):y===null||y===32||y===41||vt(y)?e(y):(t.enter(r),t.enter(i),t.enter(a),t.enter("chunkString",{contentType:"string"}),C(y))}function p(y){return y===62?(t.enter(u),t.consume(y),t.exit(u),t.exit(l),t.exit(r),n):(t.enter(a),t.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(t.exit("chunkString"),t.exit(a),p(y)):y===null||y===60||T(y)?e(y):(t.consume(y),y===92?k:f)}function k(y){return y===60||y===62||y===92?(t.consume(y),f):f(y)}function C(y){return!h&&(y===null||y===41||H(y))?(t.exit("chunkString"),t.exit(a),t.exit(i),t.exit(r),n(y)):h<o&&y===40?(t.consume(y),h++,C):y===41?(t.consume(y),h--,C):y===null||y===32||y===40||vt(y)?e(y):(t.consume(y),y===92?I:C)}function I(y){return y===40||y===41||y===92?(t.consume(y),C):C(y)}}function tn(t,n,e,r,l,u){const i=this;let a=0,s;return o;function o(f){return t.enter(r),t.enter(l),t.consume(f),t.exit(l),t.enter(u),h}function h(f){return a>999||f===null||f===91||f===93&&!s||f===94&&!a&&"_hiddenFootnoteSupport"in i.parser.constructs?e(f):f===93?(t.exit(u),t.enter(l),t.consume(f),t.exit(l),t.exit(r),n):T(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),h):(t.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===null||f===91||f===93||T(f)||a++>999?(t.exit("chunkString"),h(f)):(t.consume(f),s||(s=!P(f)),f===92?p:c)}function p(f){return f===91||f===92||f===93?(t.consume(f),a++,c):c(f)}}function en(t,n,e,r,l,u){let i;return a;function a(p){return p===34||p===39||p===40?(t.enter(r),t.enter(l),t.consume(p),t.exit(l),i=p===40?41:p,s):e(p)}function s(p){return p===i?(t.enter(l),t.consume(p),t.exit(l),t.exit(r),n):(t.enter(u),o(p))}function o(p){return p===i?(t.exit(u),s(i)):p===null?e(p):T(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),M(t,o,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===i||p===null||T(p)?(t.exit("chunkString"),o(p)):(t.consume(p),p===92?c:h)}function c(p){return p===i||p===92?(t.consume(p),h):h(p)}}function Tt(t,n){let e;return r;function r(l){return T(l)?(t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),e=!0,r):P(l)?M(t,r,e?"linePrefix":"lineSuffix")(l):n(l)}}const Ci={name:"definition",tokenize:Ii},Si={partial:!0,tokenize:zi};function Ii(t,n,e){const r=this;let l;return u;function u(f){return t.enter("definition"),i(f)}function i(f){return tn.call(r,t,a,e,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return l=nt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(t.enter("definitionMarker"),t.consume(f),t.exit("definitionMarker"),s):e(f)}function s(f){return H(f)?Tt(t,o)(f):o(f)}function o(f){return Xe(t,h,e,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function h(f){return t.attempt(Si,c,c)(f)}function c(f){return P(f)?M(t,p,"whitespace")(f):p(f)}function p(f){return f===null||T(f)?(t.exit("definition"),r.parser.defined.push(l),n(f)):e(f)}}function zi(t,n,e){return r;function r(a){return H(a)?Tt(t,l)(a):e(a)}function l(a){return en(t,u,e,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function u(a){return P(a)?M(t,i,"whitespace")(a):i(a)}function i(a){return a===null||T(a)?n(a):e(a)}}const Ai={name:"hardBreakEscape",tokenize:Ti};function Ti(t,n,e){return r;function r(u){return t.enter("hardBreakEscape"),t.consume(u),l}function l(u){return T(u)?(t.exit("hardBreakEscape"),n(u)):e(u)}}const Ei={name:"headingAtx",resolve:Fi,tokenize:Li};function Fi(t,n){let e=t.length-2,r=3,l,u;return t[r][1].type==="whitespace"&&(r+=2),e-2>r&&t[e][1].type==="whitespace"&&(e-=2),t[e][1].type==="atxHeadingSequence"&&(r===e-1||e-4>r&&t[e-2][1].type==="whitespace")&&(e-=r+1===e?2:4),e>r&&(l={type:"atxHeadingText",start:t[r][1].start,end:t[e][1].end},u={type:"chunkText",start:t[r][1].start,end:t[e][1].end,contentType:"text"},Z(t,r,e-r+1,[["enter",l,n],["enter",u,n],["exit",u,n],["exit",l,n]])),t}function Li(t,n,e){let r=0;return l;function l(h){return t.enter("atxHeading"),u(h)}function u(h){return t.enter("atxHeadingSequence"),i(h)}function i(h){return h===35&&r++<6?(t.consume(h),i):h===null||H(h)?(t.exit("atxHeadingSequence"),a(h)):e(h)}function a(h){return h===35?(t.enter("atxHeadingSequence"),s(h)):h===null||T(h)?(t.exit("atxHeading"),n(h)):P(h)?M(t,a,"whitespace")(h):(t.enter("atxHeadingText"),o(h))}function s(h){return h===35?(t.consume(h),s):(t.exit("atxHeadingSequence"),a(h))}function o(h){return h===null||h===35||H(h)?(t.exit("atxHeadingText"),a(h)):(t.consume(h),o)}}const Pi=["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"],Ee=["pre","script","style","textarea"],Di={concrete:!0,name:"htmlFlow",resolveTo:Mi,tokenize:Oi},_i={partial:!0,tokenize:Ni},Bi={partial:!0,tokenize:Ri};function Mi(t){let n=t.length;for(;n--&&!(t[n][0]==="enter"&&t[n][1].type==="htmlFlow"););return n>1&&t[n-2][1].type==="linePrefix"&&(t[n][1].start=t[n-2][1].start,t[n+1][1].start=t[n-2][1].start,t.splice(n-2,2)),t}function Oi(t,n,e){const r=this;let l,u,i,a,s;return o;function o(g){return h(g)}function h(g){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(g),c}function c(g){return g===33?(t.consume(g),p):g===47?(t.consume(g),u=!0,C):g===63?(t.consume(g),l=3,r.interrupt?n:m):Q(g)?(t.consume(g),i=String.fromCharCode(g),I):e(g)}function p(g){return g===45?(t.consume(g),l=2,f):g===91?(t.consume(g),l=5,a=0,k):Q(g)?(t.consume(g),l=4,r.interrupt?n:m):e(g)}function f(g){return g===45?(t.consume(g),r.interrupt?n:m):e(g)}function k(g){const tt="CDATA[";return g===tt.charCodeAt(a++)?(t.consume(g),a===tt.length?r.interrupt?n:F:k):e(g)}function C(g){return Q(g)?(t.consume(g),i=String.fromCharCode(g),I):e(g)}function I(g){if(g===null||g===47||g===62||H(g)){const tt=g===47,ft=i.toLowerCase();return!tt&&!u&&Ee.includes(ft)?(l=1,r.interrupt?n(g):F(g)):Pi.includes(i.toLowerCase())?(l=6,tt?(t.consume(g),y):r.interrupt?n(g):F(g)):(l=7,r.interrupt&&!r.parser.lazy[r.now().line]?e(g):u?A(g):w(g))}return g===45||W(g)?(t.consume(g),i+=String.fromCharCode(g),I):e(g)}function y(g){return g===62?(t.consume(g),r.interrupt?n:F):e(g)}function A(g){return P(g)?(t.consume(g),A):x(g)}function w(g){return g===47?(t.consume(g),x):g===58||g===95||Q(g)?(t.consume(g),D):P(g)?(t.consume(g),w):x(g)}function D(g){return g===45||g===46||g===58||g===95||W(g)?(t.consume(g),D):B(g)}function B(g){return g===61?(t.consume(g),b):P(g)?(t.consume(g),B):w(g)}function b(g){return g===null||g===60||g===61||g===62||g===96?e(g):g===34||g===39?(t.consume(g),s=g,z):P(g)?(t.consume(g),b):N(g)}function z(g){return g===s?(t.consume(g),s=null,R):g===null||T(g)?e(g):(t.consume(g),z)}function N(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||H(g)?B(g):(t.consume(g),N)}function R(g){return g===47||g===62||P(g)?w(g):e(g)}function x(g){return g===62?(t.consume(g),E):e(g)}function E(g){return g===null||T(g)?F(g):P(g)?(t.consume(g),E):e(g)}function F(g){return g===45&&l===2?(t.consume(g),U):g===60&&l===1?(t.consume(g),$):g===62&&l===4?(t.consume(g),X):g===63&&l===3?(t.consume(g),m):g===93&&l===5?(t.consume(g),it):T(g)&&(l===6||l===7)?(t.exit("htmlFlowData"),t.check(_i,lt,v)(g)):g===null||T(g)?(t.exit("htmlFlowData"),v(g)):(t.consume(g),F)}function v(g){return t.check(Bi,j,lt)(g)}function j(g){return t.enter("lineEnding"),t.consume(g),t.exit("lineEnding"),O}function O(g){return g===null||T(g)?v(g):(t.enter("htmlFlowData"),F(g))}function U(g){return g===45?(t.consume(g),m):F(g)}function $(g){return g===47?(t.consume(g),i="",K):F(g)}function K(g){if(g===62){const tt=i.toLowerCase();return Ee.includes(tt)?(t.consume(g),X):F(g)}return Q(g)&&i.length<8?(t.consume(g),i+=String.fromCharCode(g),K):F(g)}function it(g){return g===93?(t.consume(g),m):F(g)}function m(g){return g===62?(t.consume(g),X):g===45&&l===2?(t.consume(g),m):F(g)}function X(g){return g===null||T(g)?(t.exit("htmlFlowData"),lt(g)):(t.consume(g),X)}function lt(g){return t.exit("htmlFlow"),n(g)}}function Ri(t,n,e){const r=this;return l;function l(i){return T(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),u):e(i)}function u(i){return r.parser.lazy[r.now().line]?e(i):n(i)}}function Ni(t,n,e){return r;function r(l){return t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),t.attempt(Ft,n,e)}}const vi={name:"htmlText",tokenize:qi};function qi(t,n,e){const r=this;let l,u,i;return a;function a(m){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(m),s}function s(m){return m===33?(t.consume(m),o):m===47?(t.consume(m),B):m===63?(t.consume(m),w):Q(m)?(t.consume(m),N):e(m)}function o(m){return m===45?(t.consume(m),h):m===91?(t.consume(m),u=0,k):Q(m)?(t.consume(m),A):e(m)}function h(m){return m===45?(t.consume(m),f):e(m)}function c(m){return m===null?e(m):m===45?(t.consume(m),p):T(m)?(i=c,$(m)):(t.consume(m),c)}function p(m){return m===45?(t.consume(m),f):c(m)}function f(m){return m===62?U(m):m===45?p(m):c(m)}function k(m){const X="CDATA[";return m===X.charCodeAt(u++)?(t.consume(m),u===X.length?C:k):e(m)}function C(m){return m===null?e(m):m===93?(t.consume(m),I):T(m)?(i=C,$(m)):(t.consume(m),C)}function I(m){return m===93?(t.consume(m),y):C(m)}function y(m){return m===62?U(m):m===93?(t.consume(m),y):C(m)}function A(m){return m===null||m===62?U(m):T(m)?(i=A,$(m)):(t.consume(m),A)}function w(m){return m===null?e(m):m===63?(t.consume(m),D):T(m)?(i=w,$(m)):(t.consume(m),w)}function D(m){return m===62?U(m):w(m)}function B(m){return Q(m)?(t.consume(m),b):e(m)}function b(m){return m===45||W(m)?(t.consume(m),b):z(m)}function z(m){return T(m)?(i=z,$(m)):P(m)?(t.consume(m),z):U(m)}function N(m){return m===45||W(m)?(t.consume(m),N):m===47||m===62||H(m)?R(m):e(m)}function R(m){return m===47?(t.consume(m),U):m===58||m===95||Q(m)?(t.consume(m),x):T(m)?(i=R,$(m)):P(m)?(t.consume(m),R):U(m)}function x(m){return m===45||m===46||m===58||m===95||W(m)?(t.consume(m),x):E(m)}function E(m){return m===61?(t.consume(m),F):T(m)?(i=E,$(m)):P(m)?(t.consume(m),E):R(m)}function F(m){return m===null||m===60||m===61||m===62||m===96?e(m):m===34||m===39?(t.consume(m),l=m,v):T(m)?(i=F,$(m)):P(m)?(t.consume(m),F):(t.consume(m),j)}function v(m){return m===l?(t.consume(m),l=void 0,O):m===null?e(m):T(m)?(i=v,$(m)):(t.consume(m),v)}function j(m){return m===null||m===34||m===39||m===60||m===61||m===96?e(m):m===47||m===62||H(m)?R(m):(t.consume(m),j)}function O(m){return m===47||m===62||H(m)?R(m):e(m)}function U(m){return m===62?(t.consume(m),t.exit("htmlTextData"),t.exit("htmlText"),n):e(m)}function $(m){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(m),t.exit("lineEnding"),K}function K(m){return P(m)?M(t,it,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):it(m)}function it(m){return t.enter("htmlTextData"),i(m)}}const se={name:"labelEnd",resolveAll:Vi,resolveTo:Ui,tokenize:Wi},Hi={tokenize:Qi},ji={tokenize:Yi},$i={tokenize:Gi};function Vi(t){let n=-1;const e=[];for(;++n<t.length;){const r=t[n][1];if(e.push(t[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const l=r.type==="labelImage"?4:2;r.type="data",n+=l}}return t.length!==e.length&&Z(t,0,t.length,e),t}function Ui(t,n){let e=t.length,r=0,l,u,i,a;for(;e--;)if(l=t[e][1],u){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;t[e][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(i){if(t[e][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(u=e,l.type!=="labelLink")){r=2;break}}else l.type==="labelEnd"&&(i=e);const s={type:t[u][1].type==="labelLink"?"link":"image",start:{...t[u][1].start},end:{...t[t.length-1][1].end}},o={type:"label",start:{...t[u][1].start},end:{...t[i][1].end}},h={type:"labelText",start:{...t[u+r+2][1].end},end:{...t[i-2][1].start}};return a=[["enter",s,n],["enter",o,n]],a=J(a,t.slice(u+1,u+r+3)),a=J(a,[["enter",h,n]]),a=J(a,jt(n.parser.constructs.insideSpan.null,t.slice(u+r+4,i-3),n)),a=J(a,[["exit",h,n],t[i-2],t[i-1],["exit",o,n]]),a=J(a,t.slice(i+1)),a=J(a,[["exit",s,n]]),Z(t,u,t.length,a),t}function Wi(t,n,e){const r=this;let l=r.events.length,u,i;for(;l--;)if((r.events[l][1].type==="labelImage"||r.events[l][1].type==="labelLink")&&!r.events[l][1]._balanced){u=r.events[l][1];break}return a;function a(p){return u?u._inactive?c(p):(i=r.parser.defined.includes(nt(r.sliceSerialize({start:u.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(p),t.exit("labelMarker"),t.exit("labelEnd"),s):e(p)}function s(p){return p===40?t.attempt(Hi,h,i?h:c)(p):p===91?t.attempt(ji,h,i?o:c)(p):i?h(p):c(p)}function o(p){return t.attempt($i,h,c)(p)}function h(p){return n(p)}function c(p){return u._balanced=!0,e(p)}}function Qi(t,n,e){return r;function r(c){return t.enter("resource"),t.enter("resourceMarker"),t.consume(c),t.exit("resourceMarker"),l}function l(c){return H(c)?Tt(t,u)(c):u(c)}function u(c){return c===41?h(c):Xe(t,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function i(c){return H(c)?Tt(t,s)(c):h(c)}function a(c){return e(c)}function s(c){return c===34||c===39||c===40?en(t,o,e,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):h(c)}function o(c){return H(c)?Tt(t,h)(c):h(c)}function h(c){return c===41?(t.enter("resourceMarker"),t.consume(c),t.exit("resourceMarker"),t.exit("resource"),n):e(c)}}function Yi(t,n,e){const r=this;return l;function l(a){return tn.call(r,t,u,i,"reference","referenceMarker","referenceString")(a)}function u(a){return r.parser.defined.includes(nt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):e(a)}function i(a){return e(a)}}function Gi(t,n,e){return r;function r(u){return t.enter("reference"),t.enter("referenceMarker"),t.consume(u),t.exit("referenceMarker"),l}function l(u){return u===93?(t.enter("referenceMarker"),t.consume(u),t.exit("referenceMarker"),t.exit("reference"),n):e(u)}}const Zi={name:"labelStartImage",resolveAll:se.resolveAll,tokenize:Ji};function Ji(t,n,e){const r=this;return l;function l(a){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(a),t.exit("labelImageMarker"),u}function u(a){return a===91?(t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelImage"),i):e(a)}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?e(a):n(a)}}const Ki={name:"labelStartLink",resolveAll:se.resolveAll,tokenize:Xi};function Xi(t,n,e){const r=this;return l;function l(i){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(i),t.exit("labelMarker"),t.exit("labelLink"),u}function u(i){return i===94&&"_hiddenFootnoteSupport"in r.parser.constructs?e(i):n(i)}}const Ut={name:"lineEnding",tokenize:tl};function tl(t,n){return e;function e(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),M(t,n,"linePrefix")}}const Rt={name:"thematicBreak",tokenize:el};function el(t,n,e){let r=0,l;return u;function u(o){return t.enter("thematicBreak"),i(o)}function i(o){return l=o,a(o)}function a(o){return o===l?(t.enter("thematicBreakSequence"),s(o)):r>=3&&(o===null||T(o))?(t.exit("thematicBreak"),n(o)):e(o)}function s(o){return o===l?(t.consume(o),r++,s):(t.exit("thematicBreakSequence"),P(o)?M(t,a,"whitespace")(o):a(o))}}const Y={continuation:{tokenize:ll},exit:al,name:"list",tokenize:il},nl={partial:!0,tokenize:ol},rl={partial:!0,tokenize:ul};function il(t,n,e){const r=this,l=r.events[r.events.length-1];let u=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,i=0;return a;function a(f){const k=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:te(f)){if(r.containerState.type||(r.containerState.type=k,t.enter(k,{_container:!0})),k==="listUnordered")return t.enter("listItemPrefix"),f===42||f===45?t.check(Rt,e,o)(f):o(f);if(!r.interrupt||f===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),s(f)}return e(f)}function s(f){return te(f)&&++i<10?(t.consume(f),s):(!r.interrupt||i<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(t.exit("listItemValue"),o(f)):e(f)}function o(f){return t.enter("listItemMarker"),t.consume(f),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,t.check(Ft,r.interrupt?e:h,t.attempt(nl,p,c))}function h(f){return r.containerState.initialBlankLine=!0,u++,p(f)}function c(f){return P(f)?(t.enter("listItemPrefixWhitespace"),t.consume(f),t.exit("listItemPrefixWhitespace"),p):e(f)}function p(f){return r.containerState.size=u+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,n(f)}}function ll(t,n,e){const r=this;return r.containerState._closeFlow=void 0,t.check(Ft,l,u);function l(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,M(t,n,"listItemIndent",r.containerState.size+1)(a)}function u(a){return r.containerState.furtherBlankLines||!P(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(rl,n,i)(a))}function i(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,M(t,t.attempt(Y,n,e),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ul(t,n,e){const r=this;return M(t,l,"listItemIndent",r.containerState.size+1);function l(u){const i=r.events[r.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?n(u):e(u)}}function al(t){t.exit(this.containerState.type)}function ol(t,n,e){const r=this;return M(t,l,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(u){const i=r.events[r.events.length-1];return!P(u)&&i&&i[1].type==="listItemPrefixWhitespace"?n(u):e(u)}}const Fe={name:"setextUnderline",resolveTo:sl,tokenize:cl};function sl(t,n){let e=t.length,r,l,u;for(;e--;)if(t[e][0]==="enter"){if(t[e][1].type==="content"){r=e;break}t[e][1].type==="paragraph"&&(l=e)}else t[e][1].type==="content"&&t.splice(e,1),!u&&t[e][1].type==="definition"&&(u=e);const i={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[l][1].type="setextHeadingText",u?(t.splice(l,0,["enter",i,n]),t.splice(u+1,0,["exit",t[r][1],n]),t[r][1].end={...t[u][1].end}):t[r][1]=i,t.push(["exit",i,n]),t}function cl(t,n,e){const r=this;let l;return u;function u(o){let h=r.events.length,c;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){c=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(t.enter("setextHeadingLine"),l=o,i(o)):e(o)}function i(o){return t.enter("setextHeadingLineSequence"),a(o)}function a(o){return o===l?(t.consume(o),a):(t.exit("setextHeadingLineSequence"),P(o)?M(t,s,"lineSuffix")(o):s(o))}function s(o){return o===null||T(o)?(t.exit("setextHeadingLine"),n(o)):e(o)}}const hl={tokenize:fl};function fl(t){const n=this,e=t.attempt(Ft,r,t.attempt(this.parser.constructs.flowInitial,l,M(t,t.attempt(this.parser.constructs.flow,l,t.attempt(xi,l)),"linePrefix")));return e;function r(u){if(u===null){t.consume(u);return}return t.enter("lineEndingBlank"),t.consume(u),t.exit("lineEndingBlank"),n.currentConstruct=void 0,e}function l(u){if(u===null){t.consume(u);return}return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),n.currentConstruct=void 0,e}}const pl={resolveAll:rn()},ml=nn("string"),gl=nn("text");function nn(t){return{resolveAll:rn(t==="text"?kl:void 0),tokenize:n};function n(e){const r=this,l=this.parser.constructs[t],u=e.attempt(l,i,a);return i;function i(h){return o(h)?u(h):a(h)}function a(h){if(h===null){e.consume(h);return}return e.enter("data"),e.consume(h),s}function s(h){return o(h)?(e.exit("data"),u(h)):(e.consume(h),s)}function o(h){if(h===null)return!0;const c=l[h];let p=-1;if(c)for(;++p<c.length;){const f=c[p];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function rn(t){return n;function n(e,r){let l=-1,u;for(;++l<=e.length;)u===void 0?e[l]&&e[l][1].type==="data"&&(u=l,l++):(!e[l]||e[l][1].type!=="data")&&(l!==u+2&&(e[u][1].end=e[l-1][1].end,e.splice(u+2,l-u-2),l=u+2),u=void 0);return t?t(e,r):e}}function kl(t,n){let e=0;for(;++e<=t.length;)if((e===t.length||t[e][1].type==="lineEnding")&&t[e-1][1].type==="data"){const r=t[e-1][1],l=n.sliceStream(r);let u=l.length,i=-1,a=0,s;for(;u--;){const o=l[u];if(typeof o=="string"){for(i=o.length;o.charCodeAt(i-1)===32;)a++,i--;if(i)break;i=-1}else if(o===-2)s=!0,a++;else if(o!==-1){u++;break}}if(n._contentTypeTextTrailing&&e===t.length&&(a=0),a){const o={type:e===t.length||s||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?i:r.start._bufferIndex+i,_index:r.start._index+u,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(t.splice(e,0,["enter",o,n],["exit",o,n]),e+=2)}e++}return t}const xl={42:Y,43:Y,45:Y,48:Y,49:Y,50:Y,51:Y,52:Y,53:Y,54:Y,55:Y,56:Y,57:Y,62:Ge},dl={91:Ci},yl={[-2]:Vt,[-1]:Vt,32:Vt},bl={35:Ei,42:Rt,45:[Fe,Rt],60:Di,61:Fe,95:Rt,96:Te,126:Te},wl={38:Je,92:Ze},Cl={[-5]:Ut,[-4]:Ut,[-3]:Ut,33:Zi,38:Je,42:ee,60:[Kr,vi],91:Ki,92:[Ai,Ze],93:se,95:ee,96:hi},Sl={null:[ee,pl]},Il={null:[42,95]},zl={null:[]},Al=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Il,contentInitial:dl,disable:zl,document:xl,flow:bl,flowInitial:yl,insideSpan:Sl,string:wl,text:Cl},Symbol.toStringTag,{value:"Module"}));function Tl(t,n,e){let r={_bufferIndex:-1,_index:0,line:e&&e.line||1,column:e&&e.column||1,offset:e&&e.offset||0};const l={},u=[];let i=[],a=[];const s={attempt:z(B),check:z(b),consume:A,enter:w,exit:D,interrupt:z(b,{interrupt:!0})},o={code:null,containerState:{},defineSkip:C,events:[],now:k,parser:t,previous:null,sliceSerialize:p,sliceStream:f,write:c};let h=n.tokenize.call(o,s);return n.resolveAll&&u.push(n),o;function c(E){return i=J(i,E),I(),i[i.length-1]!==null?[]:(N(n,0),o.events=jt(u,o.events,o),o.events)}function p(E,F){return Fl(f(E),F)}function f(E){return El(i,E)}function k(){const{_bufferIndex:E,_index:F,line:v,column:j,offset:O}=r;return{_bufferIndex:E,_index:F,line:v,column:j,offset:O}}function C(E){l[E.line]=E.column,x()}function I(){let E;for(;r._index<i.length;){const F=i[r._index];if(typeof F=="string")for(E=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===E&&r._bufferIndex<F.length;)y(F.charCodeAt(r._bufferIndex));else y(F)}}function y(E){h=h(E)}function A(E){T(E)?(r.line++,r.column=1,r.offset+=E===-3?2:1,x()):E!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++)),o.previous=E}function w(E,F){const v=F||{};return v.type=E,v.start=k(),o.events.push(["enter",v,o]),a.push(v),v}function D(E){const F=a.pop();return F.end=k(),o.events.push(["exit",F,o]),F}function B(E,F){N(E,F.from)}function b(E,F){F.restore()}function z(E,F){return v;function v(j,O,U){let $,K,it,m;return Array.isArray(j)?lt(j):"tokenize"in j?lt([j]):X(j);function X(V){return St;function St(st){const kt=st!==null&&V[st],xt=st!==null&&V.null,Lt=[...Array.isArray(kt)?kt:kt?[kt]:[],...Array.isArray(xt)?xt:xt?[xt]:[]];return lt(Lt)(st)}}function lt(V){return $=V,K=0,V.length===0?U:g(V[K])}function g(V){return St;function St(st){return m=R(),it=V,V.partial||(o.currentConstruct=V),V.name&&o.parser.constructs.disable.null.includes(V.name)?ft():V.tokenize.call(F?Object.assign(Object.create(o),F):o,s,tt,ft)(st)}}function tt(V){return E(it,m),O}function ft(V){return m.restore(),++K<$.length?g($[K]):U}}}function N(E,F){E.resolveAll&&!u.includes(E)&&u.push(E),E.resolve&&Z(o.events,F,o.events.length-F,E.resolve(o.events.slice(F),o)),E.resolveTo&&(o.events=E.resolveTo(o.events,o))}function R(){const E=k(),F=o.previous,v=o.currentConstruct,j=o.events.length,O=Array.from(a);return{from:j,restore:U};function U(){r=E,o.previous=F,o.currentConstruct=v,o.events.length=j,a=O,x()}}function x(){r.line in l&&r.column<2&&(r.column=l[r.line],r.offset+=l[r.line]-1)}}function El(t,n){const e=n.start._index,r=n.start._bufferIndex,l=n.end._index,u=n.end._bufferIndex;let i;if(e===l)i=[t[e].slice(r,u)];else{if(i=t.slice(e,l),r>-1){const a=i[0];typeof a=="string"?i[0]=a.slice(r):i.shift()}u>0&&i.push(t[l].slice(0,u))}return i}function Fl(t,n){let e=-1;const r=[];let l;for(;++e<t.length;){const u=t[e];let i;if(typeof u=="string")i=u;else switch(u){case-5:{i="\r";break}case-4:{i=`
|
||
`;break}case-3:{i=`\r
|
||
`;break}case-2:{i=n?" ":" ";break}case-1:{if(!n&&l)continue;i=" ";break}default:i=String.fromCharCode(u)}l=u===-2,r.push(i)}return r.join("")}function Ll(t){const r={constructs:Qe([Al,...(t||{}).extensions||[]]),content:l(Ur),defined:[],document:l(Qr),flow:l(hl),lazy:{},string:l(ml),text:l(gl)};return r;function l(u){return i;function i(a){return Tl(r,u,a)}}}function Pl(t){for(;!Ke(t););return t}const Le=/[\0\t\n\r]/g;function Dl(){let t=1,n="",e=!0,r;return l;function l(u,i,a){const s=[];let o,h,c,p,f;for(u=n+(typeof u=="string"?u.toString():new TextDecoder(i||void 0).decode(u)),c=0,n="",e&&(u.charCodeAt(0)===65279&&c++,e=void 0);c<u.length;){if(Le.lastIndex=c,o=Le.exec(u),p=o&&o.index!==void 0?o.index:u.length,f=u.charCodeAt(p),!o){n=u.slice(c);break}if(f===10&&c===p&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),c<p&&(s.push(u.slice(c,p)),t+=p-c),f){case 0:{s.push(65533),t++;break}case 9:{for(h=Math.ceil(t/4)*4,s.push(-2);t++<h;)s.push(-1);break}case 10:{s.push(-4),t=1;break}default:r=!0,t=1}c=p+1}return a&&(r&&s.push(-5),n&&s.push(n),s.push(null)),s}}const _l=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Bl(t){return t.replace(_l,Ml)}function Ml(t,n,e){if(n)return n;if(e.charCodeAt(0)===35){const l=e.charCodeAt(1),u=l===120||l===88;return Ye(e.slice(u?2:1),u?16:10)}return ue(e)||t}const ln={}.hasOwnProperty;function Ol(t,n,e){return typeof n!="string"&&(e=n,n=void 0),Rl(e)(Pl(Ll(e).document().write(Dl()(t,n,!0))))}function Rl(t){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(de),autolinkProtocol:R,autolinkEmail:R,atxHeading:u(ge),blockQuote:u(xt),characterEscape:R,characterReference:R,codeFenced:u(Lt),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:u(Lt,i),codeText:u(Dn,i),codeTextData:R,data:R,codeFlowValue:R,definition:u(_n),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:u(Bn),hardBreakEscape:u(ke),hardBreakTrailing:u(ke),htmlFlow:u(xe,i),htmlFlowData:R,htmlText:u(xe,i),htmlTextData:R,image:u(Mn),label:i,link:u(de),listItem:u(On),listItemValue:p,listOrdered:u(ye,c),listUnordered:u(ye),paragraph:u(Rn),reference:g,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:u(ge),strong:u(Nn),thematicBreak:u(qn)},exit:{atxHeading:s(),atxHeadingSequence:B,autolink:s(),autolinkEmail:kt,autolinkProtocol:st,blockQuote:s(),characterEscapeValue:x,characterReferenceMarkerHexadecimal:ft,characterReferenceMarkerNumeric:ft,characterReferenceValue:V,characterReference:St,codeFenced:s(I),codeFencedFence:C,codeFencedFenceInfo:f,codeFencedFenceMeta:k,codeFlowValue:x,codeIndented:s(y),codeText:s(O),codeTextData:x,data:x,definition:s(),definitionDestinationString:D,definitionLabelString:A,definitionTitleString:w,emphasis:s(),hardBreakEscape:s(F),hardBreakTrailing:s(F),htmlFlow:s(v),htmlFlowData:x,htmlText:s(j),htmlTextData:x,image:s($),label:it,labelText:K,lineEnding:E,link:s(U),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:tt,resourceDestinationString:m,resourceTitleString:X,resource:lt,setextHeading:s(N),setextHeadingLineSequence:z,setextHeadingText:b,strong:s(),thematicBreak:s()}};un(n,(t||{}).mdastExtensions||[]);const e={};return r;function r(d){let S={type:"root",children:[]};const L={stack:[S],tokenStack:[],config:n,enter:a,exit:o,buffer:i,resume:h,data:e},_=[];let q=-1;for(;++q<d.length;)if(d[q][1].type==="listOrdered"||d[q][1].type==="listUnordered")if(d[q][0]==="enter")_.push(q);else{const et=_.pop();q=l(d,et,q)}for(q=-1;++q<d.length;){const et=n[d[q][0]];ln.call(et,d[q][1].type)&&et[d[q][1].type].call(Object.assign({sliceSerialize:d[q][2].sliceSerialize},L),d[q][1])}if(L.tokenStack.length>0){const et=L.tokenStack[L.tokenStack.length-1];(et[1]||Pe).call(L,void 0,et[0])}for(S.position={start:ct(d.length>0?d[0][1].start:{line:1,column:1,offset:0}),end:ct(d.length>0?d[d.length-2][1].end:{line:1,column:1,offset:0})},q=-1;++q<n.transforms.length;)S=n.transforms[q](S)||S;return S}function l(d,S,L){let _=S-1,q=-1,et=!1,pt,ut,It,zt;for(;++_<=L;){const G=d[_];switch(G[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{G[0]==="enter"?q++:q--,zt=void 0;break}case"lineEndingBlank":{G[0]==="enter"&&(pt&&!zt&&!q&&!It&&(It=_),zt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:zt=void 0}if(!q&&G[0]==="enter"&&G[1].type==="listItemPrefix"||q===-1&&G[0]==="exit"&&(G[1].type==="listUnordered"||G[1].type==="listOrdered")){if(pt){let dt=_;for(ut=void 0;dt--;){const at=d[dt];if(at[1].type==="lineEnding"||at[1].type==="lineEndingBlank"){if(at[0]==="exit")continue;ut&&(d[ut][1].type="lineEndingBlank",et=!0),at[1].type="lineEnding",ut=dt}else if(!(at[1].type==="linePrefix"||at[1].type==="blockQuotePrefix"||at[1].type==="blockQuotePrefixWhitespace"||at[1].type==="blockQuoteMarker"||at[1].type==="listItemIndent"))break}It&&(!ut||It<ut)&&(pt._spread=!0),pt.end=Object.assign({},ut?d[ut][1].start:G[1].end),d.splice(ut||_,0,["exit",pt,G[2]]),_++,L++}if(G[1].type==="listItemPrefix"){const dt={type:"listItem",_spread:!1,start:Object.assign({},G[1].start),end:void 0};pt=dt,d.splice(_,0,["enter",dt,G[2]]),_++,L++,It=void 0,zt=!0}}}return d[S][1]._spread=et,L}function u(d,S){return L;function L(_){a.call(this,d(_),_),S&&S.call(this,_)}}function i(){this.stack.push({type:"fragment",children:[]})}function a(d,S,L){this.stack[this.stack.length-1].children.push(d),this.stack.push(d),this.tokenStack.push([S,L||void 0]),d.position={start:ct(S.start),end:void 0}}function s(d){return S;function S(L){d&&d.call(this,L),o.call(this,L)}}function o(d,S){const L=this.stack.pop(),_=this.tokenStack.pop();if(_)_[0].type!==d.type&&(S?S.call(this,d,_[0]):(_[1]||Pe).call(this,d,_[0]));else throw new Error("Cannot close `"+d.type+"` ("+Ot({start:d.start,end:d.end})+"): it’s not open");L.position.end=ct(d.end)}function h(){return oe(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(d){if(this.data.expectingFirstListItemValue){const S=this.stack[this.stack.length-2];S.start=Number.parseInt(this.sliceSerialize(d),10),this.data.expectingFirstListItemValue=void 0}}function f(){const d=this.resume(),S=this.stack[this.stack.length-1];S.lang=d}function k(){const d=this.resume(),S=this.stack[this.stack.length-1];S.meta=d}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function I(){const d=this.resume(),S=this.stack[this.stack.length-1];S.value=d.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const d=this.resume(),S=this.stack[this.stack.length-1];S.value=d.replace(/(\r?\n|\r)$/g,"")}function A(d){const S=this.resume(),L=this.stack[this.stack.length-1];L.label=S,L.identifier=nt(this.sliceSerialize(d)).toLowerCase()}function w(){const d=this.resume(),S=this.stack[this.stack.length-1];S.title=d}function D(){const d=this.resume(),S=this.stack[this.stack.length-1];S.url=d}function B(d){const S=this.stack[this.stack.length-1];if(!S.depth){const L=this.sliceSerialize(d).length;S.depth=L}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function z(d){const S=this.stack[this.stack.length-1];S.depth=this.sliceSerialize(d).codePointAt(0)===61?1:2}function N(){this.data.setextHeadingSlurpLineEnding=void 0}function R(d){const L=this.stack[this.stack.length-1].children;let _=L[L.length-1];(!_||_.type!=="text")&&(_=vn(),_.position={start:ct(d.start),end:void 0},L.push(_)),this.stack.push(_)}function x(d){const S=this.stack.pop();S.value+=this.sliceSerialize(d),S.position.end=ct(d.end)}function E(d){const S=this.stack[this.stack.length-1];if(this.data.atHardBreak){const L=S.children[S.children.length-1];L.position.end=ct(d.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(S.type)&&(R.call(this,d),x.call(this,d))}function F(){this.data.atHardBreak=!0}function v(){const d=this.resume(),S=this.stack[this.stack.length-1];S.value=d}function j(){const d=this.resume(),S=this.stack[this.stack.length-1];S.value=d}function O(){const d=this.resume(),S=this.stack[this.stack.length-1];S.value=d}function U(){const d=this.stack[this.stack.length-1];if(this.data.inReference){const S=this.data.referenceType||"shortcut";d.type+="Reference",d.referenceType=S,delete d.url,delete d.title}else delete d.identifier,delete d.label;this.data.referenceType=void 0}function $(){const d=this.stack[this.stack.length-1];if(this.data.inReference){const S=this.data.referenceType||"shortcut";d.type+="Reference",d.referenceType=S,delete d.url,delete d.title}else delete d.identifier,delete d.label;this.data.referenceType=void 0}function K(d){const S=this.sliceSerialize(d),L=this.stack[this.stack.length-2];L.label=Bl(S),L.identifier=nt(S).toLowerCase()}function it(){const d=this.stack[this.stack.length-1],S=this.resume(),L=this.stack[this.stack.length-1];if(this.data.inReference=!0,L.type==="link"){const _=d.children;L.children=_}else L.alt=S}function m(){const d=this.resume(),S=this.stack[this.stack.length-1];S.url=d}function X(){const d=this.resume(),S=this.stack[this.stack.length-1];S.title=d}function lt(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function tt(d){const S=this.resume(),L=this.stack[this.stack.length-1];L.label=S,L.identifier=nt(this.sliceSerialize(d)).toLowerCase(),this.data.referenceType="full"}function ft(d){this.data.characterReferenceType=d.type}function V(d){const S=this.sliceSerialize(d),L=this.data.characterReferenceType;let _;L?(_=Ye(S,L==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):_=ue(S);const q=this.stack[this.stack.length-1];q.value+=_}function St(d){const S=this.stack.pop();S.position.end=ct(d.end)}function st(d){x.call(this,d);const S=this.stack[this.stack.length-1];S.url=this.sliceSerialize(d)}function kt(d){x.call(this,d);const S=this.stack[this.stack.length-1];S.url="mailto:"+this.sliceSerialize(d)}function xt(){return{type:"blockquote",children:[]}}function Lt(){return{type:"code",lang:null,meta:null,value:""}}function Dn(){return{type:"inlineCode",value:""}}function _n(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Bn(){return{type:"emphasis",children:[]}}function ge(){return{type:"heading",depth:0,children:[]}}function ke(){return{type:"break"}}function xe(){return{type:"html",value:""}}function Mn(){return{type:"image",title:null,url:"",alt:null}}function de(){return{type:"link",title:null,url:"",children:[]}}function ye(d){return{type:"list",ordered:d.type==="listOrdered",start:null,spread:d._spread,children:[]}}function On(d){return{type:"listItem",spread:d._spread,checked:null,children:[]}}function Rn(){return{type:"paragraph",children:[]}}function Nn(){return{type:"strong",children:[]}}function vn(){return{type:"text",value:""}}function qn(){return{type:"thematicBreak"}}}function ct(t){return{line:t.line,column:t.column,offset:t.offset}}function un(t,n){let e=-1;for(;++e<n.length;){const r=n[e];Array.isArray(r)?un(t,r):Nl(t,r)}}function Nl(t,n){let e;for(e in n)if(ln.call(n,e))switch(e){case"canContainEols":{const r=n[e];r&&t[e].push(...r);break}case"transforms":{const r=n[e];r&&t[e].push(...r);break}case"enter":case"exit":{const r=n[e];r&&Object.assign(t[e],r);break}}}function Pe(t,n){throw t?new Error("Cannot close `"+t.type+"` ("+Ot({start:t.start,end:t.end})+"): a different token (`"+n.type+"`, "+Ot({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Ot({start:n.start,end:n.end})+") is still open")}function Yo(t){const n=this;n.parser=e;function e(r){return Ol(r,{...n.data("settings"),...t,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function vl(t,n){const e={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(n),!0)};return t.patch(n,e),t.applyData(n,e)}function ql(t,n){const e={type:"element",tagName:"br",properties:{},children:[]};return t.patch(n,e),[t.applyData(n,e),{type:"text",value:`
|
||
`}]}function Hl(t,n){const e=n.value?n.value+`
|
||
`:"",r={},l=n.lang?n.lang.split(/\s+/):[];l.length>0&&(r.className=["language-"+l[0]]);let u={type:"element",tagName:"code",properties:r,children:[{type:"text",value:e}]};return n.meta&&(u.data={meta:n.meta}),t.patch(n,u),u=t.applyData(n,u),u={type:"element",tagName:"pre",properties:{},children:[u]},t.patch(n,u),u}function jl(t,n){const e={type:"element",tagName:"del",properties:{},children:t.all(n)};return t.patch(n,e),t.applyData(n,e)}function $l(t,n){const e={type:"element",tagName:"em",properties:{},children:t.all(n)};return t.patch(n,e),t.applyData(n,e)}function Vl(t,n){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),l=Ct(r.toLowerCase()),u=t.footnoteOrder.indexOf(r);let i,a=t.footnoteCounts.get(r);a===void 0?(a=0,t.footnoteOrder.push(r),i=t.footnoteOrder.length):i=u+1,a+=1,t.footnoteCounts.set(r,a);const s={type:"element",tagName:"a",properties:{href:"#"+e+"fn-"+l,id:e+"fnref-"+l+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};t.patch(n,s);const o={type:"element",tagName:"sup",properties:{},children:[s]};return t.patch(n,o),t.applyData(n,o)}function Ul(t,n){const e={type:"element",tagName:"h"+n.depth,properties:{},children:t.all(n)};return t.patch(n,e),t.applyData(n,e)}function Wl(t,n){if(t.options.allowDangerousHtml){const e={type:"raw",value:n.value};return t.patch(n,e),t.applyData(n,e)}}function an(t,n){const e=n.referenceType;let r="]";if(e==="collapsed"?r+="[]":e==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const l=t.all(n),u=l[0];u&&u.type==="text"?u.value="["+u.value:l.unshift({type:"text",value:"["});const i=l[l.length-1];return i&&i.type==="text"?i.value+=r:l.push({type:"text",value:r}),l}function Ql(t,n){const e=String(n.identifier).toUpperCase(),r=t.definitionById.get(e);if(!r)return an(t,n);const l={src:Ct(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(l.title=r.title);const u={type:"element",tagName:"img",properties:l,children:[]};return t.patch(n,u),t.applyData(n,u)}function Yl(t,n){const e={src:Ct(n.url)};n.alt!==null&&n.alt!==void 0&&(e.alt=n.alt),n.title!==null&&n.title!==void 0&&(e.title=n.title);const r={type:"element",tagName:"img",properties:e,children:[]};return t.patch(n,r),t.applyData(n,r)}function Gl(t,n){const e={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};t.patch(n,e);const r={type:"element",tagName:"code",properties:{},children:[e]};return t.patch(n,r),t.applyData(n,r)}function Zl(t,n){const e=String(n.identifier).toUpperCase(),r=t.definitionById.get(e);if(!r)return an(t,n);const l={href:Ct(r.url||"")};r.title!==null&&r.title!==void 0&&(l.title=r.title);const u={type:"element",tagName:"a",properties:l,children:t.all(n)};return t.patch(n,u),t.applyData(n,u)}function Jl(t,n){const e={href:Ct(n.url)};n.title!==null&&n.title!==void 0&&(e.title=n.title);const r={type:"element",tagName:"a",properties:e,children:t.all(n)};return t.patch(n,r),t.applyData(n,r)}function Kl(t,n,e){const r=t.all(n),l=e?Xl(e):on(n),u={},i=[];if(typeof n.checked=="boolean"){const h=r[0];let c;h&&h.type==="element"&&h.tagName==="p"?c=h:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const h=r[a];(l||a!==0||h.type!=="element"||h.tagName!=="p")&&i.push({type:"text",value:`
|
||
`}),h.type==="element"&&h.tagName==="p"&&!l?i.push(...h.children):i.push(h)}const s=r[r.length-1];s&&(l||s.type!=="element"||s.tagName!=="p")&&i.push({type:"text",value:`
|
||
`});const o={type:"element",tagName:"li",properties:u,children:i};return t.patch(n,o),t.applyData(n,o)}function Xl(t){let n=!1;if(t.type==="list"){n=t.spread||!1;const e=t.children;let r=-1;for(;!n&&++r<e.length;)n=on(e[r])}return n}function on(t){const n=t.spread;return n??t.children.length>1}function tu(t,n){const e={},r=t.all(n);let l=-1;for(typeof n.start=="number"&&n.start!==1&&(e.start=n.start);++l<r.length;){const i=r[l];if(i.type==="element"&&i.tagName==="li"&&i.properties&&Array.isArray(i.properties.className)&&i.properties.className.includes("task-list-item")){e.className=["contains-task-list"];break}}const u={type:"element",tagName:n.ordered?"ol":"ul",properties:e,children:t.wrap(r,!0)};return t.patch(n,u),t.applyData(n,u)}function eu(t,n){const e={type:"element",tagName:"p",properties:{},children:t.all(n)};return t.patch(n,e),t.applyData(n,e)}function nu(t,n){const e={type:"root",children:t.wrap(t.all(n))};return t.patch(n,e),t.applyData(n,e)}function ru(t,n){const e={type:"element",tagName:"strong",properties:{},children:t.all(n)};return t.patch(n,e),t.applyData(n,e)}function iu(t,n){const e=t.all(n),r=e.shift(),l=[];if(r){const i={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(n.children[0],i),l.push(i)}if(e.length>0){const i={type:"element",tagName:"tbody",properties:{},children:t.wrap(e,!0)},a=Hn(n.children[1]),s=jn(n.children[n.children.length-1]);a&&s&&(i.position={start:a,end:s}),l.push(i)}const u={type:"element",tagName:"table",properties:{},children:t.wrap(l,!0)};return t.patch(n,u),t.applyData(n,u)}function lu(t,n,e){const r=e?e.children:void 0,u=(r?r.indexOf(n):1)===0?"th":"td",i=e&&e.type==="table"?e.align:void 0,a=i?i.length:n.children.length;let s=-1;const o=[];for(;++s<a;){const c=n.children[s],p={},f=i?i[s]:void 0;f&&(p.align=f);let k={type:"element",tagName:u,properties:p,children:[]};c&&(k.children=t.all(c),t.patch(c,k),k=t.applyData(c,k)),o.push(k)}const h={type:"element",tagName:"tr",properties:{},children:t.wrap(o,!0)};return t.patch(n,h),t.applyData(n,h)}function uu(t,n){const e={type:"element",tagName:"td",properties:{},children:t.all(n)};return t.patch(n,e),t.applyData(n,e)}function au(t,n){const e={type:"text",value:$n(String(n.value))};return t.patch(n,e),t.applyData(n,e)}function ou(t,n){const e={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(n,e),t.applyData(n,e)}const su={blockquote:vl,break:ql,code:Hl,delete:jl,emphasis:$l,footnoteReference:Vl,heading:Ul,html:Wl,imageReference:Ql,image:Yl,inlineCode:Gl,linkReference:Zl,link:Jl,listItem:Kl,list:tu,paragraph:eu,root:nu,strong:ru,table:iu,tableCell:uu,tableRow:lu,text:au,thematicBreak:ou,toml:Dt,yaml:Dt,definition:Dt,footnoteDefinition:Dt};function Dt(){}function cu(t,n){const e=[{type:"text",value:"↩"}];return n>1&&e.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),e}function hu(t,n){return"Back to reference "+(t+1)+(n>1?"-"+n:"")}function fu(t){const n=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",e=t.options.footnoteBackContent||cu,r=t.options.footnoteBackLabel||hu,l=t.options.footnoteLabel||"Footnotes",u=t.options.footnoteLabelTagName||"h2",i=t.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s<t.footnoteOrder.length;){const o=t.footnoteById.get(t.footnoteOrder[s]);if(!o)continue;const h=t.all(o),c=String(o.identifier).toUpperCase(),p=Ct(c.toLowerCase());let f=0;const k=[],C=t.footnoteCounts.get(c);for(;C!==void 0&&++f<=C;){k.length>0&&k.push({type:"text",value:" "});let A=typeof e=="string"?e:e(s,f);typeof A=="string"&&(A={type:"text",value:A}),k.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,f),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const I=h[h.length-1];if(I&&I.type==="element"&&I.tagName==="p"){const A=I.children[I.children.length-1];A&&A.type==="text"?A.value+=" ":I.children.push({type:"text",value:" "}),I.children.push(...k)}else h.push(...k);const y={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:t.wrap(h,!0)};t.patch(o,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Nt(i),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
|
||
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(a,!0)},{type:"text",value:`
|
||
`}]}}const ne={}.hasOwnProperty,pu={};function mu(t,n){const e=n||pu,r=new Map,l=new Map,u=new Map,i={...su,...e.handlers},a={all:o,applyData:ku,definitionById:r,footnoteById:l,footnoteCounts:u,footnoteOrder:[],handlers:i,one:s,options:e,patch:gu,wrap:du};return ae(t,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const c=h.type==="definition"?r:l,p=String(h.identifier).toUpperCase();c.has(p)||c.set(p,h)}}),a;function s(h,c){const p=h.type,f=a.handlers[p];if(ne.call(a.handlers,p)&&f)return f(a,h,c);if(a.options.passThrough&&a.options.passThrough.includes(p)){if("children"in h){const{children:C,...I}=h,y=Nt(I);return y.children=a.all(h),y}return Nt(h)}return(a.options.unknownHandler||xu)(a,h,c)}function o(h){const c=[];if("children"in h){const p=h.children;let f=-1;for(;++f<p.length;){const k=a.one(p[f],h);if(k){if(f&&p[f-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=De(k.value)),!Array.isArray(k)&&k.type==="element")){const C=k.children[0];C&&C.type==="text"&&(C.value=De(C.value))}Array.isArray(k)?c.push(...k):c.push(k)}}}return c}}function gu(t,n){t.position&&(n.position=Vn(t))}function ku(t,n){let e=n;if(t&&t.data){const r=t.data.hName,l=t.data.hChildren,u=t.data.hProperties;if(typeof r=="string")if(e.type==="element")e.tagName=r;else{const i="children"in e?e.children:[e];e={type:"element",tagName:r,properties:{},children:i}}e.type==="element"&&u&&Object.assign(e.properties,Nt(u)),"children"in e&&e.children&&l!==null&&l!==void 0&&(e.children=l)}return e}function xu(t,n){const e=n.data||{},r="value"in n&&!(ne.call(e,"hProperties")||ne.call(e,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:t.all(n)};return t.patch(n,r),t.applyData(n,r)}function du(t,n){const e=[];let r=-1;for(n&&e.push({type:"text",value:`
|
||
`});++r<t.length;)r&&e.push({type:"text",value:`
|
||
`}),e.push(t[r]);return n&&t.length>0&&e.push({type:"text",value:`
|
||
`}),e}function De(t){let n=0,e=t.charCodeAt(n);for(;e===9||e===32;)n++,e=t.charCodeAt(n);return t.slice(n)}function _e(t,n){const e=mu(t,n),r=e.one(t,void 0),l=fu(e),u=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return l&&u.children.push({type:"text",value:`
|
||
`},l),u}function Go(t,n){return t&&"run"in t?async function(e,r){const l=_e(e,{file:r,...n});await t.run(l,r)}:function(e,r){return _e(e,{file:r,...t||n})}}const yu=(function(t){const r=this.constructor.prototype,l=r[t],u=function(){return l.apply(u,arguments)};return Object.setPrototypeOf(u,r),u}),bu={}.hasOwnProperty;class ce extends yu{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Un()}copy(){const n=new ce;let e=-1;for(;++e<this.attachers.length;){const r=this.attachers[e];n.use(...r)}return n.data($t(!0,{},this.namespace)),n}data(n,e){return typeof n=="string"?arguments.length===2?(Yt("data",this.frozen),this.namespace[n]=e,this):bu.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Yt("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[e,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const l=e.call(n,...r);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const e=_t(n),r=this.parser||this.Parser;return Wt("parse",r),r(String(e),e)}process(n,e){const r=this;return this.freeze(),Wt("process",this.parser||this.Parser),Qt("process",this.compiler||this.Compiler),e?l(void 0,e):new Promise(l);function l(u,i){const a=_t(n),s=r.parse(a);r.run(s,a,function(h,c,p){if(h||!c||!p)return o(h);const f=c,k=r.stringify(f,p);Cu(k)?p.value=k:p.result=k,o(h,p)});function o(h,c){h||!c?i(h):u?u(c):e(void 0,c)}}}processSync(n){let e=!1,r;return this.freeze(),Wt("processSync",this.parser||this.Parser),Qt("processSync",this.compiler||this.Compiler),this.process(n,l),Me("processSync","process",e),r;function l(u,i){e=!0,be(u),r=i}}run(n,e,r){Be(n),this.freeze();const l=this.transformers;return!r&&typeof e=="function"&&(r=e,e=void 0),r?u(void 0,r):new Promise(u);function u(i,a){const s=_t(e);l.run(n,s,o);function o(h,c,p){const f=c||n;h?a(h):i?i(f):r(void 0,f,p)}}}runSync(n,e){let r=!1,l;return this.run(n,e,u),Me("runSync","run",r),l;function u(i,a){be(i),l=a,r=!0}}stringify(n,e){this.freeze();const r=_t(e),l=this.compiler||this.Compiler;return Qt("stringify",l),Be(n),l(n,r)}use(n,...e){const r=this.attachers,l=this.namespace;if(Yt("use",this.frozen),n!=null)if(typeof n=="function")s(n,e);else if(typeof n=="object")Array.isArray(n)?a(n):i(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function u(o){if(typeof o=="function")s(o,[]);else if(typeof o=="object")if(Array.isArray(o)){const[h,...c]=o;s(h,c)}else i(o);else throw new TypeError("Expected usable value, not `"+o+"`")}function i(o){if(!("plugins"in o)&&!("settings"in o))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(o.plugins),o.settings&&(l.settings=$t(!0,l.settings,o.settings))}function a(o){let h=-1;if(o!=null)if(Array.isArray(o))for(;++h<o.length;){const c=o[h];u(c)}else throw new TypeError("Expected a list of plugins, not `"+o+"`")}function s(o,h){let c=-1,p=-1;for(;++c<r.length;)if(r[c][0]===o){p=c;break}if(p===-1)r.push([o,...h]);else if(h.length>0){let[f,...k]=h;const C=r[p][1];Xt(C)&&Xt(f)&&(f=$t(!0,C,f)),r[p]=[o,f,...k]}}}}const Zo=new ce().freeze();function Wt(t,n){if(typeof n!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Qt(t,n){if(typeof n!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Yt(t,n){if(n)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Be(t){if(!Xt(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Me(t,n,e){if(!e)throw new Error("`"+t+"` finished async. Use `"+n+"` instead")}function _t(t){return wu(t)?t:new Wn(t)}function wu(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function Cu(t){return typeof t=="string"||Su(t)}function Su(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}function Iu(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function zu(t,n,e){const l=Ue((e||{}).ignore||[]),u=Au(n);let i=-1;for(;++i<u.length;)Qn(t,"text",a);function a(o,h){let c=-1,p;for(;++c<h.length;){const f=h[c],k=p?p.children:void 0;if(l(f,k?k.indexOf(f):void 0,p))return;p=f}if(p)return s(o,h)}function s(o,h){const c=h[h.length-1],p=u[i][0],f=u[i][1];let k=0;const I=c.children.indexOf(o);let y=!1,A=[];p.lastIndex=0;let w=p.exec(o.value);for(;w;){const D=w.index,B={index:w.index,input:w.input,stack:[...h,o]};let b=f(...w,B);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?p.lastIndex=D+1:(k!==D&&A.push({type:"text",value:o.value.slice(k,D)}),Array.isArray(b)?A.push(...b):b&&A.push(b),k=D+w[0].length,y=!0),!p.global)break;w=p.exec(o.value)}return y?(k<o.value.length&&A.push({type:"text",value:o.value.slice(k)}),c.children.splice(I,1,...A)):A=[o],I+A.length}}function Au(t){const n=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const e=!t[0]||Array.isArray(t[0])?t:[t];let r=-1;for(;++r<e.length;){const l=e[r];n.push([Tu(l[0]),Eu(l[1])])}return n}function Tu(t){return typeof t=="string"?new RegExp(Iu(t),"g"):t}function Eu(t){return typeof t=="function"?t:function(){return t}}const Gt="phrasing",Zt=["autolink","link","image","label"];function Fu(){return{transforms:[Ou],enter:{literalAutolink:Pu,literalAutolinkEmail:Jt,literalAutolinkHttp:Jt,literalAutolinkWww:Jt},exit:{literalAutolink:Mu,literalAutolinkEmail:Bu,literalAutolinkHttp:Du,literalAutolinkWww:_u}}}function Lu(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Gt,notInConstruct:Zt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Gt,notInConstruct:Zt},{character:":",before:"[ps]",after:"\\/",inConstruct:Gt,notInConstruct:Zt}]}}function Pu(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Jt(t){this.config.enter.autolinkProtocol.call(this,t)}function Du(t){this.config.exit.autolinkProtocol.call(this,t)}function _u(t){this.config.exit.data.call(this,t);const n=this.stack[this.stack.length-1];wt(n.type==="link"),n.url="http://"+this.sliceSerialize(t)}function Bu(t){this.config.exit.autolinkEmail.call(this,t)}function Mu(t){this.exit(t)}function Ou(t){zu(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Ru],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Nu]],{ignore:["link","linkReference"]})}function Ru(t,n,e,r,l){let u="";if(!sn(l)||(/^w/i.test(n)&&(e=n+e,n="",u="http://"),!vu(e)))return!1;const i=qu(e+r);if(!i[0])return!1;const a={type:"link",title:null,url:u+n+i[0],children:[{type:"text",value:n+i[0]}]};return i[1]?[a,{type:"text",value:i[1]}]:a}function Nu(t,n,e,r){return!sn(r,!0)||/[-\d_]$/.test(e)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+e,children:[{type:"text",value:n+"@"+e}]}}function vu(t){const n=t.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function qu(t){const n=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!n)return[t,void 0];t=t.slice(0,n.index);let e=n[0],r=e.indexOf(")");const l=we(t,"(");let u=we(t,")");for(;r!==-1&&l>u;)t+=e.slice(0,r+1),e=e.slice(r+1),r=e.indexOf(")"),u++;return[t,e]}function sn(t,n){const e=t.input.charCodeAt(t.index-1);return(t.index===0||gt(e)||Ht(e))&&(!n||e!==47)}cn.peek=Gu;function Hu(){this.buffer()}function ju(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function $u(){this.buffer()}function Vu(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Uu(t){const n=this.resume(),e=this.stack[this.stack.length-1];wt(e.type==="footnoteReference"),e.identifier=nt(this.sliceSerialize(t)).toLowerCase(),e.label=n}function Wu(t){this.exit(t)}function Qu(t){const n=this.resume(),e=this.stack[this.stack.length-1];wt(e.type==="footnoteDefinition"),e.identifier=nt(this.sliceSerialize(t)).toLowerCase(),e.label=n}function Yu(t){this.exit(t)}function Gu(){return"["}function cn(t,n,e,r){const l=e.createTracker(r);let u=l.move("[^");const i=e.enter("footnoteReference"),a=e.enter("reference");return u+=l.move(e.safe(e.associationId(t),{after:"]",before:u})),a(),i(),u+=l.move("]"),u}function Zu(){return{enter:{gfmFootnoteCallString:Hu,gfmFootnoteCall:ju,gfmFootnoteDefinitionLabelString:$u,gfmFootnoteDefinition:Vu},exit:{gfmFootnoteCallString:Uu,gfmFootnoteCall:Wu,gfmFootnoteDefinitionLabelString:Qu,gfmFootnoteDefinition:Yu}}}function Ju(t){let n=!1;return t&&t.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:e,footnoteReference:cn},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function e(r,l,u,i){const a=u.createTracker(i);let s=a.move("[^");const o=u.enter("footnoteDefinition"),h=u.enter("label");return s+=a.move(u.safe(u.associationId(r),{before:s,after:"]"})),h(),s+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),s+=a.move((n?`
|
||
`:" ")+u.indentLines(u.containerFlow(r,a.current()),n?hn:Ku))),o(),s}}function Ku(t,n,e){return n===0?t:hn(t,n,e)}function hn(t,n,e){return(e?"":" ")+t}const Xu=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];fn.peek=ia;function ta(){return{canContainEols:["delete"],enter:{strikethrough:na},exit:{strikethrough:ra}}}function ea(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Xu}],handlers:{delete:fn}}}function na(t){this.enter({type:"delete",children:[]},t)}function ra(t){this.exit(t)}function fn(t,n,e,r){const l=e.createTracker(r),u=e.enter("strikethrough");let i=l.move("~~");return i+=e.containerPhrasing(t,{...l.current(),before:i,after:"~"}),i+=l.move("~~"),u(),i}function ia(){return"~"}function la(t,n,e,r){const l=e.enter("blockquote"),u=e.createTracker(r);u.move("> "),u.shift(2);const i=e.indentLines(e.containerFlow(t,u.current()),ua);return l(),i}function ua(t,n,e){return">"+(e?"":" ")+t}function aa(t,n){return Oe(t,n.inConstruct,!0)&&!Oe(t,n.notInConstruct,!1)}function Oe(t,n,e){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return e;let r=-1;for(;++r<n.length;)if(t.includes(n[r]))return!0;return!1}function Re(t,n,e,r){let l=-1;for(;++l<e.unsafe.length;)if(e.unsafe[l].character===`
|
||
`&&aa(e.stack,e.unsafe[l]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
||
`}function oa(t,n){return!!(n.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function sa(t){const n=t.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function ca(t,n,e,r){const l=sa(e),u=t.value||"",i=l==="`"?"GraveAccent":"Tilde";if(oa(t,e)){const c=e.enter("codeIndented"),p=e.indentLines(u,ha);return c(),p}const a=e.createTracker(r),s=l.repeat(Math.max(Yn(u,l)+1,3)),o=e.enter("codeFenced");let h=a.move(s);if(t.lang){const c=e.enter(`codeFencedLang${i}`);h+=a.move(e.safe(t.lang,{before:h,after:" ",encode:["`"],...a.current()})),c()}if(t.lang&&t.meta){const c=e.enter(`codeFencedMeta${i}`);h+=a.move(" "),h+=a.move(e.safe(t.meta,{before:h,after:`
|
||
`,encode:["`"],...a.current()})),c()}return h+=a.move(`
|
||
`),u&&(h+=a.move(u+`
|
||
`)),h+=a.move(s),o(),h}function ha(t,n,e){return(e?"":" ")+t}function he(t){const n=t.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function fa(t,n,e,r){const l=he(e),u=l==='"'?"Quote":"Apostrophe",i=e.enter("definition");let a=e.enter("label");const s=e.createTracker(r);let o=s.move("[");return o+=s.move(e.safe(e.associationId(t),{before:o,after:"]",...s.current()})),o+=s.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=e.enter("destinationLiteral"),o+=s.move("<"),o+=s.move(e.safe(t.url,{before:o,after:">",...s.current()})),o+=s.move(">")):(a=e.enter("destinationRaw"),o+=s.move(e.safe(t.url,{before:o,after:t.title?" ":`
|
||
`,...s.current()}))),a(),t.title&&(a=e.enter(`title${u}`),o+=s.move(" "+l),o+=s.move(e.safe(t.title,{before:o,after:l,...s.current()})),o+=s.move(l),a()),i(),o}function pa(t){const n=t.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function Et(t){return"&#x"+t.toString(16).toUpperCase()+";"}function qt(t,n,e){const r=bt(t),l=bt(n);return r===void 0?l===void 0?e==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}pn.peek=ma;function pn(t,n,e,r){const l=pa(e),u=e.enter("emphasis"),i=e.createTracker(r),a=i.move(l);let s=i.move(e.containerPhrasing(t,{after:l,before:a,...i.current()}));const o=s.charCodeAt(0),h=qt(r.before.charCodeAt(r.before.length-1),o,l);h.inside&&(s=Et(o)+s.slice(1));const c=s.charCodeAt(s.length-1),p=qt(r.after.charCodeAt(0),c,l);p.inside&&(s=s.slice(0,-1)+Et(c));const f=i.move(l);return u(),e.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},a+s+f}function ma(t,n,e){return e.options.emphasis||"*"}function ga(t,n){let e=!1;return ae(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return e=!0,Gn}),!!((!t.depth||t.depth<3)&&oe(t)&&(n.options.setext||e))}function ka(t,n,e,r){const l=Math.max(Math.min(6,t.depth||1),1),u=e.createTracker(r);if(ga(t,e)){const h=e.enter("headingSetext"),c=e.enter("phrasing"),p=e.containerPhrasing(t,{...u.current(),before:`
|
||
`,after:`
|
||
`});return c(),h(),p+`
|
||
`+(l===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
||
`))+1))}const i="#".repeat(l),a=e.enter("headingAtx"),s=e.enter("phrasing");u.move(i+" ");let o=e.containerPhrasing(t,{before:"# ",after:`
|
||
`,...u.current()});return/^[\t ]/.test(o)&&(o=Et(o.charCodeAt(0))+o.slice(1)),o=o?i+" "+o:i,e.options.closeAtx&&(o+=" "+i),s(),a(),o}mn.peek=xa;function mn(t){return t.value||""}function xa(){return"<"}gn.peek=da;function gn(t,n,e,r){const l=he(e),u=l==='"'?"Quote":"Apostrophe",i=e.enter("image");let a=e.enter("label");const s=e.createTracker(r);let o=s.move("![");return o+=s.move(e.safe(t.alt,{before:o,after:"]",...s.current()})),o+=s.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=e.enter("destinationLiteral"),o+=s.move("<"),o+=s.move(e.safe(t.url,{before:o,after:">",...s.current()})),o+=s.move(">")):(a=e.enter("destinationRaw"),o+=s.move(e.safe(t.url,{before:o,after:t.title?" ":")",...s.current()}))),a(),t.title&&(a=e.enter(`title${u}`),o+=s.move(" "+l),o+=s.move(e.safe(t.title,{before:o,after:l,...s.current()})),o+=s.move(l),a()),o+=s.move(")"),i(),o}function da(){return"!"}kn.peek=ya;function kn(t,n,e,r){const l=t.referenceType,u=e.enter("imageReference");let i=e.enter("label");const a=e.createTracker(r);let s=a.move("![");const o=e.safe(t.alt,{before:s,after:"]",...a.current()});s+=a.move(o+"]["),i();const h=e.stack;e.stack=[],i=e.enter("reference");const c=e.safe(e.associationId(t),{before:s,after:"]",...a.current()});return i(),e.stack=h,u(),l==="full"||!o||o!==c?s+=a.move(c+"]"):l==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function ya(){return"!"}xn.peek=ba;function xn(t,n,e){let r=t.value||"",l="`",u=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(r);)l+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++u<e.unsafe.length;){const i=e.unsafe[u],a=e.compilePattern(i);let s;if(i.atBreak)for(;s=a.exec(r);){let o=s.index;r.charCodeAt(o)===10&&r.charCodeAt(o-1)===13&&o--,r=r.slice(0,o)+" "+r.slice(s.index+1)}}return l+r+l}function ba(){return"`"}function dn(t,n){const e=oe(t);return!!(!n.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(e===t.url||"mailto:"+e===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}yn.peek=wa;function yn(t,n,e,r){const l=he(e),u=l==='"'?"Quote":"Apostrophe",i=e.createTracker(r);let a,s;if(dn(t,e)){const h=e.stack;e.stack=[],a=e.enter("autolink");let c=i.move("<");return c+=i.move(e.containerPhrasing(t,{before:c,after:">",...i.current()})),c+=i.move(">"),a(),e.stack=h,c}a=e.enter("link"),s=e.enter("label");let o=i.move("[");return o+=i.move(e.containerPhrasing(t,{before:o,after:"](",...i.current()})),o+=i.move("]("),s(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(s=e.enter("destinationLiteral"),o+=i.move("<"),o+=i.move(e.safe(t.url,{before:o,after:">",...i.current()})),o+=i.move(">")):(s=e.enter("destinationRaw"),o+=i.move(e.safe(t.url,{before:o,after:t.title?" ":")",...i.current()}))),s(),t.title&&(s=e.enter(`title${u}`),o+=i.move(" "+l),o+=i.move(e.safe(t.title,{before:o,after:l,...i.current()})),o+=i.move(l),s()),o+=i.move(")"),a(),o}function wa(t,n,e){return dn(t,e)?"<":"["}bn.peek=Ca;function bn(t,n,e,r){const l=t.referenceType,u=e.enter("linkReference");let i=e.enter("label");const a=e.createTracker(r);let s=a.move("[");const o=e.containerPhrasing(t,{before:s,after:"]",...a.current()});s+=a.move(o+"]["),i();const h=e.stack;e.stack=[],i=e.enter("reference");const c=e.safe(e.associationId(t),{before:s,after:"]",...a.current()});return i(),e.stack=h,u(),l==="full"||!o||o!==c?s+=a.move(c+"]"):l==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function Ca(){return"["}function fe(t){const n=t.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function Sa(t){const n=fe(t),e=t.options.bulletOther;if(!e)return n==="*"?"-":"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(e===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+e+"`) to be different");return e}function Ia(t){const n=t.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function wn(t){const n=t.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function za(t,n,e,r){const l=e.enter("list"),u=e.bulletCurrent;let i=t.ordered?Ia(e):fe(e);const a=t.ordered?i==="."?")":".":Sa(e);let s=n&&e.bulletLastUsed?i===e.bulletLastUsed:!1;if(!t.ordered){const h=t.children?t.children[0]:void 0;if((i==="*"||i==="-")&&h&&(!h.children||!h.children[0])&&e.stack[e.stack.length-1]==="list"&&e.stack[e.stack.length-2]==="listItem"&&e.stack[e.stack.length-3]==="list"&&e.stack[e.stack.length-4]==="listItem"&&e.indexStack[e.indexStack.length-1]===0&&e.indexStack[e.indexStack.length-2]===0&&e.indexStack[e.indexStack.length-3]===0&&(s=!0),wn(e)===i&&h){let c=-1;for(;++c<t.children.length;){const p=t.children[c];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){s=!0;break}}}}s&&(i=a),e.bulletCurrent=i;const o=e.containerFlow(t,r);return e.bulletLastUsed=i,e.bulletCurrent=u,l(),o}function Aa(t){const n=t.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function Ta(t,n,e,r){const l=Aa(e);let u=e.bulletCurrent||fe(e);n&&n.type==="list"&&n.ordered&&(u=(typeof n.start=="number"&&n.start>-1?n.start:1)+(e.options.incrementListMarker===!1?0:n.children.indexOf(t))+u);let i=u.length+1;(l==="tab"||l==="mixed"&&(n&&n.type==="list"&&n.spread||t.spread))&&(i=Math.ceil(i/4)*4);const a=e.createTracker(r);a.move(u+" ".repeat(i-u.length)),a.shift(i);const s=e.enter("listItem"),o=e.indentLines(e.containerFlow(t,a.current()),h);return s(),o;function h(c,p,f){return p?(f?"":" ".repeat(i))+c:(f?u:u+" ".repeat(i-u.length))+c}}function Ea(t,n,e,r){const l=e.enter("paragraph"),u=e.enter("phrasing"),i=e.containerPhrasing(t,r);return u(),l(),i}const Fa=Ue(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function La(t,n,e,r){return(t.children.some(function(i){return Fa(i)})?e.containerPhrasing:e.containerFlow).call(e,t,r)}function Pa(t){const n=t.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}Cn.peek=Da;function Cn(t,n,e,r){const l=Pa(e),u=e.enter("strong"),i=e.createTracker(r),a=i.move(l+l);let s=i.move(e.containerPhrasing(t,{after:l,before:a,...i.current()}));const o=s.charCodeAt(0),h=qt(r.before.charCodeAt(r.before.length-1),o,l);h.inside&&(s=Et(o)+s.slice(1));const c=s.charCodeAt(s.length-1),p=qt(r.after.charCodeAt(0),c,l);p.inside&&(s=s.slice(0,-1)+Et(c));const f=i.move(l+l);return u(),e.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},a+s+f}function Da(t,n,e){return e.options.strong||"*"}function _a(t,n,e,r){return e.safe(t.value,r)}function Ba(t){const n=t.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function Ma(t,n,e){const r=(wn(e)+(e.options.ruleSpaces?" ":"")).repeat(Ba(e));return e.options.ruleSpaces?r.slice(0,-1):r}const Sn={blockquote:la,break:Re,code:ca,definition:fa,emphasis:pn,hardBreak:Re,heading:ka,html:mn,image:gn,imageReference:kn,inlineCode:xn,link:yn,linkReference:bn,list:za,listItem:Ta,paragraph:Ea,root:La,strong:Cn,text:_a,thematicBreak:Ma};function Oa(){return{enter:{table:Ra,tableData:Ne,tableHeader:Ne,tableRow:va},exit:{codeText:qa,table:Na,tableData:Kt,tableHeader:Kt,tableRow:Kt}}}function Ra(t){const n=t._align;this.enter({type:"table",align:n.map(function(e){return e==="none"?null:e}),children:[]},t),this.data.inTable=!0}function Na(t){this.exit(t),this.data.inTable=void 0}function va(t){this.enter({type:"tableRow",children:[]},t)}function Kt(t){this.exit(t)}function Ne(t){this.enter({type:"tableCell",children:[]},t)}function qa(t){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Ha));const e=this.stack[this.stack.length-1];wt(e.type==="inlineCode"),e.value=n,this.exit(t)}function Ha(t,n){return n==="|"?n:t}function ja(t){const n=t||{},e=n.tableCellPadding,r=n.tablePipeAlign,l=n.stringLength,u=e?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
||
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:i,tableCell:s,tableRow:a}};function i(f,k,C,I){return o(h(f,C,I),f.align)}function a(f,k,C,I){const y=c(f,C,I),A=o([y]);return A.slice(0,A.indexOf(`
|
||
`))}function s(f,k,C,I){const y=C.enter("tableCell"),A=C.enter("phrasing"),w=C.containerPhrasing(f,{...I,before:u,after:u});return A(),y(),w}function o(f,k){return Zn(f,{align:k,alignDelimiters:r,padding:e,stringLength:l})}function h(f,k,C){const I=f.children;let y=-1;const A=[],w=k.enter("table");for(;++y<I.length;)A[y]=c(I[y],k,C);return w(),A}function c(f,k,C){const I=f.children;let y=-1;const A=[],w=k.enter("tableRow");for(;++y<I.length;)A[y]=s(I[y],f,k,C);return w(),A}function p(f,k,C){let I=Sn.inlineCode(f,k,C);return C.stack.includes("tableCell")&&(I=I.replace(/\|/g,"\\$&")),I}}function $a(){return{exit:{taskListCheckValueChecked:ve,taskListCheckValueUnchecked:ve,paragraph:Ua}}}function Va(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Wa}}}function ve(t){const n=this.stack[this.stack.length-2];wt(n.type==="listItem"),n.checked=t.type==="taskListCheckValueChecked"}function Ua(t){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const e=this.stack[this.stack.length-1];wt(e.type==="paragraph");const r=e.children[0];if(r&&r.type==="text"){const l=n.children;let u=-1,i;for(;++u<l.length;){const a=l[u];if(a.type==="paragraph"){i=a;break}}i===e&&(r.value=r.value.slice(1),r.value.length===0?e.children.shift():e.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,e.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function Wa(t,n,e,r){const l=t.children[0],u=typeof t.checked=="boolean"&&l&&l.type==="paragraph",i="["+(t.checked?"x":" ")+"] ",a=e.createTracker(r);u&&a.move(i);let s=Sn.listItem(t,n,e,{...r,...a.current()});return u&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,o)),s;function o(h){return h+i}}function Qa(){return[Fu(),Zu(),ta(),Oa(),$a()]}function Ya(t){return{extensions:[Lu(),Ju(t),ea(),ja(t),Va()]}}const Ga={tokenize:eo,partial:!0},In={tokenize:no,partial:!0},zn={tokenize:ro,partial:!0},An={tokenize:io,partial:!0},Za={tokenize:lo,partial:!0},Tn={name:"wwwAutolink",tokenize:Xa,previous:Fn},En={name:"protocolAutolink",tokenize:to,previous:Ln},ot={name:"emailAutolink",tokenize:Ka,previous:Pn},rt={};function Ja(){return{text:rt}}let mt=48;for(;mt<123;)rt[mt]=ot,mt++,mt===58?mt=65:mt===91&&(mt=97);rt[43]=ot;rt[45]=ot;rt[46]=ot;rt[95]=ot;rt[72]=[ot,En];rt[104]=[ot,En];rt[87]=[ot,Tn];rt[119]=[ot,Tn];function Ka(t,n,e){const r=this;let l,u;return i;function i(c){return!re(c)||!Pn.call(r,r.previous)||pe(r.events)?e(c):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(c))}function a(c){return re(c)?(t.consume(c),a):c===64?(t.consume(c),s):e(c)}function s(c){return c===46?t.check(Za,h,o)(c):c===45||c===95||W(c)?(u=!0,t.consume(c),s):h(c)}function o(c){return t.consume(c),l=!0,s}function h(c){return u&&l&&Q(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),n(c)):e(c)}}function Xa(t,n,e){const r=this;return l;function l(i){return i!==87&&i!==119||!Fn.call(r,r.previous)||pe(r.events)?e(i):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(Ga,t.attempt(In,t.attempt(zn,u),e),e)(i))}function u(i){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),n(i)}}function to(t,n,e){const r=this;let l="",u=!1;return i;function i(c){return(c===72||c===104)&&Ln.call(r,r.previous)&&!pe(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),l+=String.fromCodePoint(c),t.consume(c),a):e(c)}function a(c){if(Q(c)&&l.length<5)return l+=String.fromCodePoint(c),t.consume(c),a;if(c===58){const p=l.toLowerCase();if(p==="http"||p==="https")return t.consume(c),s}return e(c)}function s(c){return c===47?(t.consume(c),u?o:(u=!0,s)):e(c)}function o(c){return c===null||vt(c)||H(c)||gt(c)||Ht(c)?e(c):t.attempt(In,t.attempt(zn,h),e)(c)}function h(c){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),n(c)}}function eo(t,n,e){let r=0;return l;function l(i){return(i===87||i===119)&&r<3?(r++,t.consume(i),l):i===46&&r===3?(t.consume(i),u):e(i)}function u(i){return i===null?e(i):n(i)}}function no(t,n,e){let r,l,u;return i;function i(o){return o===46||o===95?t.check(An,s,a)(o):o===null||H(o)||gt(o)||o!==45&&Ht(o)?s(o):(u=!0,t.consume(o),i)}function a(o){return o===95?r=!0:(l=r,r=void 0),t.consume(o),i}function s(o){return l||r||!u?e(o):n(o)}}function ro(t,n){let e=0,r=0;return l;function l(i){return i===40?(e++,t.consume(i),l):i===41&&r<e?u(i):i===33||i===34||i===38||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===93||i===95||i===126?t.check(An,n,u)(i):i===null||H(i)||gt(i)?n(i):(t.consume(i),l)}function u(i){return i===41&&r++,t.consume(i),l}}function io(t,n,e){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(t.consume(a),r):a===38?(t.consume(a),u):a===93?(t.consume(a),l):a===60||a===null||H(a)||gt(a)?n(a):e(a)}function l(a){return a===null||a===40||a===91||H(a)||gt(a)?n(a):r(a)}function u(a){return Q(a)?i(a):e(a)}function i(a){return a===59?(t.consume(a),r):Q(a)?(t.consume(a),i):e(a)}}function lo(t,n,e){return r;function r(u){return t.consume(u),l}function l(u){return W(u)?e(u):n(u)}}function Fn(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||H(t)}function Ln(t){return!Q(t)}function Pn(t){return!(t===47||re(t))}function re(t){return t===43||t===45||t===46||t===95||W(t)}function pe(t){let n=t.length,e=!1;for(;n--;){const r=t[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){e=!0;break}if(r._gfmAutolinkLiteralWalkedInto){e=!1;break}}return t.length>0&&!e&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),e}const uo={tokenize:mo,partial:!0};function ao(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:ho,continuation:{tokenize:fo},exit:po}},text:{91:{name:"gfmFootnoteCall",tokenize:co},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:oo,resolveTo:so}}}}function oo(t,n,e){const r=this;let l=r.events.length;const u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;l--;){const s=r.events[l][1];if(s.type==="labelImage"){i=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return a;function a(s){if(!i||!i._balanced)return e(s);const o=nt(r.sliceSerialize({start:i.end,end:r.now()}));return o.codePointAt(0)!==94||!u.includes(o.slice(1))?e(s):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(s),t.exit("gfmFootnoteCallLabelMarker"),n(s))}}function so(t,n){let e=t.length;for(;e--;)if(t[e][1].type==="labelImage"&&t[e][0]==="enter"){t[e][1];break}t[e+1][1].type="data",t[e+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[e+3][1].start),end:Object.assign({},t[t.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},t[e+3][1].end),end:Object.assign({},t[e+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},t[t.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},a=[t[e+1],t[e+2],["enter",r,n],t[e+3],t[e+4],["enter",l,n],["exit",l,n],["enter",u,n],["enter",i,n],["exit",i,n],["exit",u,n],t[t.length-2],t[t.length-1],["exit",r,n]];return t.splice(e,t.length-e+1,...a),t}function co(t,n,e){const r=this,l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,i;return a;function a(c){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(c),t.exit("gfmFootnoteCallLabelMarker"),s}function s(c){return c!==94?e(c):(t.enter("gfmFootnoteCallMarker"),t.consume(c),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",o)}function o(c){if(u>999||c===93&&!i||c===null||c===91||H(c))return e(c);if(c===93){t.exit("chunkString");const p=t.exit("gfmFootnoteCallString");return l.includes(nt(r.sliceSerialize(p)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(c),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),n):e(c)}return H(c)||(i=!0),u++,t.consume(c),c===92?h:o}function h(c){return c===91||c===92||c===93?(t.consume(c),u++,o):o(c)}}function ho(t,n,e){const r=this,l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,i=0,a;return s;function s(k){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionLabelMarker"),o}function o(k){return k===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",h):e(k)}function h(k){if(i>999||k===93&&!a||k===null||k===91||H(k))return e(k);if(k===93){t.exit("chunkString");const C=t.exit("gfmFootnoteDefinitionLabelString");return u=nt(r.sliceSerialize(C)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),p}return H(k)||(a=!0),i++,t.consume(k),k===92?c:h}function c(k){return k===91||k===92||k===93?(t.consume(k),i++,h):h(k)}function p(k){return k===58?(t.enter("definitionMarker"),t.consume(k),t.exit("definitionMarker"),l.includes(u)||l.push(u),M(t,f,"gfmFootnoteDefinitionWhitespace")):e(k)}function f(k){return n(k)}}function fo(t,n,e){return t.check(Ft,n,t.attempt(uo,n,e))}function po(t){t.exit("gfmFootnoteDefinition")}function mo(t,n,e){const r=this;return M(t,l,"gfmFootnoteDefinitionIndent",5);function l(u){const i=r.events[r.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===4?n(u):e(u)}}function go(t){let e=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:u,resolveAll:l};return e==null&&(e=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function l(i,a){let s=-1;for(;++s<i.length;)if(i[s][0]==="enter"&&i[s][1].type==="strikethroughSequenceTemporary"&&i[s][1]._close){let o=s;for(;o--;)if(i[o][0]==="exit"&&i[o][1].type==="strikethroughSequenceTemporary"&&i[o][1]._open&&i[s][1].end.offset-i[s][1].start.offset===i[o][1].end.offset-i[o][1].start.offset){i[s][1].type="strikethroughSequence",i[o][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},i[o][1].start),end:Object.assign({},i[s][1].end)},c={type:"strikethroughText",start:Object.assign({},i[o][1].end),end:Object.assign({},i[s][1].start)},p=[["enter",h,a],["enter",i[o][1],a],["exit",i[o][1],a],["enter",c,a]],f=a.parser.constructs.insideSpan.null;f&&Z(p,p.length,0,jt(f,i.slice(o+1,s),a)),Z(p,p.length,0,[["exit",c,a],["enter",i[s][1],a],["exit",i[s][1],a],["exit",h,a]]),Z(i,o-1,s-o+3,p),s=o+p.length-2;break}}for(s=-1;++s<i.length;)i[s][1].type==="strikethroughSequenceTemporary"&&(i[s][1].type="data");return i}function u(i,a,s){const o=this.previous,h=this.events;let c=0;return p;function p(k){return o===126&&h[h.length-1][1].type!=="characterEscape"?s(k):(i.enter("strikethroughSequenceTemporary"),f(k))}function f(k){const C=bt(o);if(k===126)return c>1?s(k):(i.consume(k),c++,f);if(c<2&&!e)return s(k);const I=i.exit("strikethroughSequenceTemporary"),y=bt(k);return I._open=!y||y===2&&!!C,I._close=!C||C===2&&!!y,a(k)}}}class ko{constructor(){this.map=[]}add(n,e,r){xo(this,n,e,r)}consume(n){if(this.map.sort(function(u,i){return u[0]-i[0]}),this.map.length===0)return;let e=this.map.length;const r=[];for(;e>0;)e-=1,r.push(n.slice(this.map[e][0]+this.map[e][1]),this.map[e][2]),n.length=this.map[e][0];r.push(n.slice()),n.length=0;let l=r.pop();for(;l;){for(const u of l)n.push(u);l=r.pop()}this.map.length=0}}function xo(t,n,e,r){let l=0;if(!(e===0&&r.length===0)){for(;l<t.map.length;){if(t.map[l][0]===n){t.map[l][1]+=e,t.map[l][2].push(...r);return}l+=1}t.map.push([n,e,r])}}function yo(t,n){let e=!1;const r=[];for(;n<t.length;){const l=t[n];if(e){if(l[0]==="enter")l[1].type==="tableContent"&&r.push(t[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(t[n-1][1].type==="tableDelimiterMarker"){const u=r.length-1;r[u]=r[u]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(e=!0);n+=1}return r}function bo(){return{flow:{null:{name:"table",tokenize:wo,resolveAll:Co}}}}function wo(t,n,e){const r=this;let l=0,u=0,i;return a;function a(x){let E=r.events.length-1;for(;E>-1;){const j=r.events[E][1].type;if(j==="lineEnding"||j==="linePrefix")E--;else break}const F=E>-1?r.events[E][1].type:null,v=F==="tableHead"||F==="tableRow"?b:s;return v===b&&r.parser.lazy[r.now().line]?e(x):v(x)}function s(x){return t.enter("tableHead"),t.enter("tableRow"),o(x)}function o(x){return x===124||(i=!0,u+=1),h(x)}function h(x){return x===null?e(x):T(x)?u>1?(u=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),f):e(x):P(x)?M(t,h,"whitespace")(x):(u+=1,i&&(i=!1,l+=1),x===124?(t.enter("tableCellDivider"),t.consume(x),t.exit("tableCellDivider"),i=!0,h):(t.enter("data"),c(x)))}function c(x){return x===null||x===124||H(x)?(t.exit("data"),h(x)):(t.consume(x),x===92?p:c)}function p(x){return x===92||x===124?(t.consume(x),c):c(x)}function f(x){return r.interrupt=!1,r.parser.lazy[r.now().line]?e(x):(t.enter("tableDelimiterRow"),i=!1,P(x)?M(t,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):k(x))}function k(x){return x===45||x===58?I(x):x===124?(i=!0,t.enter("tableCellDivider"),t.consume(x),t.exit("tableCellDivider"),C):B(x)}function C(x){return P(x)?M(t,I,"whitespace")(x):I(x)}function I(x){return x===58?(u+=1,i=!0,t.enter("tableDelimiterMarker"),t.consume(x),t.exit("tableDelimiterMarker"),y):x===45?(u+=1,y(x)):x===null||T(x)?D(x):B(x)}function y(x){return x===45?(t.enter("tableDelimiterFiller"),A(x)):B(x)}function A(x){return x===45?(t.consume(x),A):x===58?(i=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(x),t.exit("tableDelimiterMarker"),w):(t.exit("tableDelimiterFiller"),w(x))}function w(x){return P(x)?M(t,D,"whitespace")(x):D(x)}function D(x){return x===124?k(x):x===null||T(x)?!i||l!==u?B(x):(t.exit("tableDelimiterRow"),t.exit("tableHead"),n(x)):B(x)}function B(x){return e(x)}function b(x){return t.enter("tableRow"),z(x)}function z(x){return x===124?(t.enter("tableCellDivider"),t.consume(x),t.exit("tableCellDivider"),z):x===null||T(x)?(t.exit("tableRow"),n(x)):P(x)?M(t,z,"whitespace")(x):(t.enter("data"),N(x))}function N(x){return x===null||x===124||H(x)?(t.exit("data"),z(x)):(t.consume(x),x===92?R:N)}function R(x){return x===92||x===124?(t.consume(x),N):N(x)}}function Co(t,n){let e=-1,r=!0,l=0,u=[0,0,0,0],i=[0,0,0,0],a=!1,s=0,o,h,c;const p=new ko;for(;++e<t.length;){const f=t[e],k=f[1];f[0]==="enter"?k.type==="tableHead"?(a=!1,s!==0&&(qe(p,n,s,o,h),h=void 0,s=0),o={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},p.add(e,0,[["enter",o,n]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(r=!0,c=void 0,u=[0,0,0,0],i=[0,e+1,0,0],a&&(a=!1,h={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},p.add(e,0,[["enter",h,n]])),l=k.type==="tableDelimiterRow"?2:h?3:1):l&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(r=!1,i[2]===0&&(u[1]!==0&&(i[0]=i[1],c=Bt(p,n,u,l,void 0,c),u=[0,0,0,0]),i[2]=e)):k.type==="tableCellDivider"&&(r?r=!1:(u[1]!==0&&(i[0]=i[1],c=Bt(p,n,u,l,void 0,c)),u=i,i=[u[1],e,0,0])):k.type==="tableHead"?(a=!0,s=e):k.type==="tableRow"||k.type==="tableDelimiterRow"?(s=e,u[1]!==0?(i[0]=i[1],c=Bt(p,n,u,l,e,c)):i[1]!==0&&(c=Bt(p,n,i,l,e,c)),l=0):l&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(i[3]=e)}for(s!==0&&qe(p,n,s,o,h),p.consume(n.events),e=-1;++e<n.events.length;){const f=n.events[e];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=yo(n.events,e))}return t}function Bt(t,n,e,r,l,u){const i=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";e[0]!==0&&(u.end=Object.assign({},yt(n.events,e[0])),t.add(e[0],0,[["exit",u,n]]));const s=yt(n.events,e[1]);if(u={type:i,start:Object.assign({},s),end:Object.assign({},s)},t.add(e[1],0,[["enter",u,n]]),e[2]!==0){const o=yt(n.events,e[2]),h=yt(n.events,e[3]),c={type:a,start:Object.assign({},o),end:Object.assign({},h)};if(t.add(e[2],0,[["enter",c,n]]),r!==2){const p=n.events[e[2]],f=n.events[e[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",e[3]>e[2]+1){const k=e[2]+1,C=e[3]-e[2]-1;t.add(k,C,[])}}t.add(e[3]+1,0,[["exit",c,n]])}return l!==void 0&&(u.end=Object.assign({},yt(n.events,l)),t.add(l,0,[["exit",u,n]]),u=void 0),u}function qe(t,n,e,r,l){const u=[],i=yt(n.events,e);l&&(l.end=Object.assign({},i),u.push(["exit",l,n])),r.end=Object.assign({},i),u.push(["exit",r,n]),t.add(e+1,0,u)}function yt(t,n){const e=t[n],r=e[0]==="enter"?"start":"end";return e[1][r]}const So={name:"tasklistCheck",tokenize:zo};function Io(){return{text:{91:So}}}function zo(t,n,e){const r=this;return l;function l(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?e(s):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(s),t.exit("taskListCheckMarker"),u)}function u(s){return H(s)?(t.enter("taskListCheckValueUnchecked"),t.consume(s),t.exit("taskListCheckValueUnchecked"),i):s===88||s===120?(t.enter("taskListCheckValueChecked"),t.consume(s),t.exit("taskListCheckValueChecked"),i):e(s)}function i(s){return s===93?(t.enter("taskListCheckMarker"),t.consume(s),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),a):e(s)}function a(s){return T(s)?n(s):P(s)?t.check({tokenize:Ao},n,e)(s):e(s)}}function Ao(t,n,e){return M(t,r,"whitespace");function r(l){return l===null?e(l):n(l)}}function To(t){return Qe([Ja(),ao(),go(t),bo(),Io()])}const Eo={};function Jo(t){const n=this,e=t||Eo,r=n.data(),l=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),i=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);l.push(To(e)),u.push(Qa()),i.push(Ya(e))}const Mt={}.hasOwnProperty,He={yaml:"-",toml:"+"};function me(t){const n=[];let e=-1;const r=Array.isArray(t)?t:t?[t]:["yaml"];for(;++e<r.length;)n[e]=Fo(r[e]);return n}function Fo(t){let n=t;if(typeof n=="string"){if(!Mt.call(He,n))throw Pt("Missing matter definition for `%s`",n);n={type:n,marker:He[n]}}else if(typeof n!="object")throw Pt("Expected matter to be an object, not `%j`",n);if(!Mt.call(n,"type"))throw Pt("Missing `type` in matter `%j`",n);if(!Mt.call(n,"fence")&&!Mt.call(n,"marker"))throw Pt("Missing `marker` or `fence` in matter `%j`",n);return n}function Lo(t){const n=me(t),e={};let r=-1;for(;++r<n.length;){const l=n[r],u=ie(l,"open").charCodeAt(0),i=Po(l),a=e[u];Array.isArray(a)?a.push(i):e[u]=[i]}return{flow:e}}function Po(t){const n=t.anywhere,e=t.type,r=e+"Fence",l=r+"Sequence",u=e+"Value",i={tokenize:h,partial:!0};let a,s=0;return{tokenize:o,concrete:!0};function o(c,p,f){const k=this;return C;function C(z){const N=k.now();return N.column===1&&(N.line===1||n)&&(a=ie(t,"open"),s=0,z===a.charCodeAt(s))?(c.enter(e),c.enter(r),c.enter(l),I(z)):f(z)}function I(z){return s===a.length?(c.exit(l),P(z)?(c.enter("whitespace"),y(z)):A(z)):z===a.charCodeAt(s++)?(c.consume(z),I):f(z)}function y(z){return P(z)?(c.consume(z),y):(c.exit("whitespace"),A(z))}function A(z){return T(z)?(c.exit(r),c.enter("lineEnding"),c.consume(z),c.exit("lineEnding"),a=ie(t,"close"),s=0,c.attempt(i,b,w)):f(z)}function w(z){return z===null||T(z)?B(z):(c.enter(u),D(z))}function D(z){return z===null||T(z)?(c.exit(u),B(z)):(c.consume(z),D)}function B(z){return z===null?f(z):(c.enter("lineEnding"),c.consume(z),c.exit("lineEnding"),c.attempt(i,b,w))}function b(z){return c.exit(e),p(z)}}function h(c,p,f){let k=0;return C;function C(w){return w===a.charCodeAt(k)?(c.enter(r),c.enter(l),I(w)):f(w)}function I(w){return k===a.length?(c.exit(l),P(w)?(c.enter("whitespace"),y(w)):A(w)):w===a.charCodeAt(k++)?(c.consume(w),I):f(w)}function y(w){return P(w)?(c.consume(w),y):(c.exit("whitespace"),A(w))}function A(w){return w===null||T(w)?(c.exit(r),p(w)):f(w)}}}function ie(t,n){return t.marker?je(t.marker,n).repeat(3):je(t.fence,n)}function je(t,n){return typeof t=="string"?t:t[n]}function Do(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function _o(t){const n=me(t),e={},r={};let l=-1;for(;++l<n.length;){const u=n[l];e[u.type]=Bo(u),r[u.type]=Mo,r[u.type+"Value"]=Oo}return{enter:e,exit:r}}function Bo(t){return n;function n(e){this.enter({type:t.type,value:""},e),this.buffer()}}function Mo(t){const n=this.resume(),e=this.stack[this.stack.length-1];this.exit(t),e.value=n.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function Oo(t){this.config.enter.data.call(this,t),this.config.exit.data.call(this,t)}function Ro(t){const n=[],e={},r=me(t);let l=-1;for(;++l<r.length;){const u=r[l];e[u.type]=No(u);const i=le(u,"open");n.push({atBreak:!0,character:i.charAt(0),after:Do(i.charAt(1))})}return{unsafe:n,handlers:e}}function No(t){const n=le(t,"open"),e=le(t,"close");return r;function r(l){return n+(l.value?`
|
||
`+l.value:"")+`
|
||
`+e}}function le(t,n){return t.marker?$e(t.marker,n).repeat(3):$e(t.fence,n)}function $e(t,n){return typeof t=="string"?t:t[n]}const vo="yaml";function Ko(t){const n=this,e=t||vo,r=n.data(),l=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),i=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);l.push(Lo(e)),u.push(_o(e)),i.push(Ro(e))}function Xo(t){return function(n,e){return Jn(n,{...t,file:e})}}function ts(t){return function(n){return Kn(n,t)}}const qo={arduino:Mr,bash:Br,c:_r,cpp:Dr,csharp:Pr,css:Lr,diff:Fr,go:Er,graphql:Tr,ini:Ar,java:zr,javascript:Ir,json:Sr,kotlin:Cr,less:wr,lua:br,makefile:yr,markdown:dr,objectivec:xr,perl:kr,php:gr,"php-template":mr,plaintext:pr,python:fr,"python-repl":hr,r:cr,ruby:sr,rust:or,scss:ar,shell:ur,sql:lr,swift:ir,typescript:rr,vbnet:nr,wasm:er,xml:tr,yaml:Xn},Ve={},Ho="hljs-";function jo(t){const n=Or.newInstance();return t&&u(t),{highlight:e,highlightAuto:r,listLanguages:l,register:u,registerAlias:i,registered:a};function e(s,o,h){const c=h||Ve,p=typeof c.prefix=="string"?c.prefix:Ho;if(!n.getLanguage(s))throw new Error("Unknown language: `"+s+"` is not registered");n.configure({__emitter:$o,classPrefix:p});const f=n.highlight(o,{ignoreIllegals:!0,language:s});if(f.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:f.errorRaised});const k=f._emitter.root,C=k.data;return C.language=f.language,C.relevance=f.relevance,k}function r(s,o){const c=(o||Ve).subset||l();let p=-1,f=0,k;for(;++p<c.length;){const C=c[p];if(!n.getLanguage(C))continue;const I=e(C,s,o);I.data&&I.data.relevance!==void 0&&I.data.relevance>f&&(f=I.data.relevance,k=I)}return k||{type:"root",children:[],data:{language:void 0,relevance:f}}}function l(){return n.listLanguages()}function u(s,o){if(typeof s=="string")n.registerLanguage(s,o);else{let h;for(h in s)Object.hasOwn(s,h)&&n.registerLanguage(h,s[h])}}function i(s,o){if(typeof s=="string")n.registerAliases(typeof o=="string"?o:[...o],{languageName:s});else{let h;for(h in s)if(Object.hasOwn(s,h)){const c=s[h];n.registerAliases(typeof c=="string"?c:[...c],{languageName:h})}}}function a(s){return!!n.getLanguage(s)}}class $o{constructor(n){this.options=n,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(n){if(n==="")return;const e=this.stack[this.stack.length-1],r=e.children[e.children.length-1];r&&r.type==="text"?r.value+=n:e.children.push({type:"text",value:n})}startScope(n){this.openNode(String(n))}endScope(){this.closeNode()}__addSublanguage(n,e){const r=this.stack[this.stack.length-1],l=n.root.children;e?r.children.push({type:"element",tagName:"span",properties:{className:[e]},children:l}):r.children.push(...l)}openNode(n){const e=this,r=n.split(".").map(function(i,a){return a?i+"_".repeat(a):e.options.classPrefix+i}),l=this.stack[this.stack.length-1],u={type:"element",tagName:"span",properties:{className:r},children:[]};l.children.push(u),this.stack.push(u)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const Vo={};function es(t){const n=t||Vo,e=n.aliases,r=n.detect||!1,l=n.languages||qo,u=n.plainText,i=n.prefix,a=n.subset;let s="hljs";const o=jo(l);if(e&&o.registerAlias(e),i){const h=i.indexOf("-");s=h===-1?i:i.slice(0,h)}return function(h,c){ae(h,"element",function(p,f,k){if(p.tagName!=="code"||!k||k.type!=="element"||k.tagName!=="pre")return;const C=Uo(p);if(C===!1||!C&&!r||C&&u&&u.includes(C))return;Array.isArray(p.properties.className)||(p.properties.className=[]),p.properties.className.includes(s)||p.properties.className.unshift(s);const I=Rr(p,{whitespace:"pre"});let y;try{y=C?o.highlight(C,I,{prefix:i}):o.highlightAuto(I,{prefix:i,subset:a})}catch(A){const w=A;if(C&&/Unknown language/.test(w.message)){c.message("Cannot highlight as `"+C+"`, it’s not registered",{ancestors:[k,p],cause:w,place:p.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw w}!C&&y.data&&y.data.language&&p.properties.className.push("language-"+y.data.language),y.children.length>0&&(p.children=y.children)})}}function Uo(t){const n=t.properties.className;let e=-1;if(!Array.isArray(n))return;let r;for(;++e<n.length;){const l=String(n[e]);if(l==="no-highlight"||l==="nohighlight")return!1;!r&&l.slice(0,5)==="lang-"&&(r=l.slice(5)),!r&&l.slice(0,9)==="language-"&&(r=l.slice(9))}return r}export{ts as a,es as b,Jo as c,Ko as d,Yo as e,Go as f,Xo as r,Zo as u};
|