import{r as el,c as it,g as Ar}from"./syntax-highlight-CQw1bBY6.js";import{k as xn}from"./katex-BSBacQyE.js";var Tr={exports:{}},st={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var tl=el,nl=Symbol.for("react.element"),rl=Symbol.for("react.fragment"),il=Object.prototype.hasOwnProperty,ll=tl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ol={key:!0,ref:!0,__self:!0,__source:!0};function Fr(e,t,n){var r,i={},o=null,l=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)il.call(t,r)&&!ol.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:nl,type:e,key:o,ref:l,props:i,_owner:ll.current}}st.Fragment=rl;st.jsx=Fr;st.jsxs=Fr;Tr.exports=st;var dt=Tr.exports;function kn(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const l=n.slice(i,r).trim();(l||!o)&&t.push(l),i=r+1,r=n.indexOf(",",i)}return t}function al(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ul=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sl=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cl={};function bn(e,t){return(cl.jsx?sl:ul).test(e)}const fl=/[ \t\n\f\r]/g;function hl(e){return typeof e=="object"?e.type==="text"?wn(e.value):!1:wn(e)}function wn(e){return e.replace(fl,"")===""}class Ye{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ye.prototype.normal={};Ye.prototype.property={};Ye.prototype.space=void 0;function Pr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ye(n,r,t)}function Ue(e){return e.toLowerCase()}class ee{constructor(t,n){this.attribute=n,this.property=t}}ee.prototype.attribute="";ee.prototype.booleanish=!1;ee.prototype.boolean=!1;ee.prototype.commaOrSpaceSeparated=!1;ee.prototype.commaSeparated=!1;ee.prototype.defined=!1;ee.prototype.mustUseProperty=!1;ee.prototype.number=!1;ee.prototype.overloadedBoolean=!1;ee.prototype.property="";ee.prototype.spaceSeparated=!1;ee.prototype.space=void 0;let pl=0;const M=Ie(),W=Ie(),Lt=Ie(),E=Ie(),U=Ie(),ve=Ie(),ne=Ie();function Ie(){return 2**++pl}const Mt=Object.freeze(Object.defineProperty({__proto__:null,boolean:M,booleanish:W,commaOrSpaceSeparated:ne,commaSeparated:ve,number:E,overloadedBoolean:Lt,spaceSeparated:U},Symbol.toStringTag,{value:"Module"})),yt=Object.keys(Mt);class Wt extends ee{constructor(t,n,r,i){let o=-1;if(super(t,n),Sn(this,"space",i),typeof r=="number")for(;++o4&&n.slice(0,4)==="data"&&xl.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Cn,bl);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Cn.test(o)){let l=o.replace(yl,kl);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Wt}return new i(r,t)}function kl(e){return"-"+e.toLowerCase()}function bl(e){return e.charAt(1).toUpperCase()}const Nr=Pr([zr,ml,Lr,Mr,_r],"html"),ct=Pr([zr,gl,Lr,Mr,_r],"svg");function En(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function wl(e){return e.join(" ").trim()}var Yt={},In=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Sl=/\n/g,Cl=/^\s*/,El=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Il=/^:\s*/,Al=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Tl=/^[;\s]*/,Fl=/^\s+|\s+$/g,Pl=` `,An="/",Tn="*",Ce="",zl="comment",Dl="declaration";function vl(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var y=m.match(Sl);y&&(n+=y.length);var C=m.lastIndexOf(Pl);r=~C?m.length-C:r+m.length}function o(){var m={line:n,column:r};return function(y){return y.position=new l(m),s(),y}}function l(m){this.start=m,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function a(m){var y=new Error(t.source+":"+n+":"+r+": "+m);if(y.reason=m,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function u(m){var y=m.exec(e);if(y){var C=y[0];return i(C),e=e.slice(C.length),y}}function s(){u(Cl)}function f(m){var y;for(m=m||[];y=c();)y!==!1&&m.push(y);return m}function c(){var m=o();if(!(An!=e.charAt(0)||Tn!=e.charAt(1))){for(var y=2;Ce!=e.charAt(y)&&(Tn!=e.charAt(y)||An!=e.charAt(y+1));)++y;if(y+=2,Ce===e.charAt(y-1))return a("End of comment missing");var C=e.slice(2,y-2);return r+=2,i(C),e=e.slice(y),r+=2,m({type:zl,comment:C})}}function p(){var m=o(),y=u(El);if(y){if(c(),!u(Il))return a("property missing ':'");var C=u(Al),x=m({type:Dl,property:Fn(y[0].replace(In,Ce)),value:C?Fn(C[0].replace(In,Ce)):Ce});return u(Tl),x}}function h(){var m=[];f(m);for(var y;y=p();)y!==!1&&(m.push(y),f(m));return m}return s(),h()}function Fn(e){return e?e.replace(Fl,Ce):Ce}var Ll=vl,Ml=it&&it.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yt,"__esModule",{value:!0});Yt.default=Ol;const _l=Ml(Ll);function Ol(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,_l.default)(e),i=typeof t=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:l,value:a}=o;i?t(l,a,o):a&&(n=n||{},n[l]=a)}),n}var ft={};Object.defineProperty(ft,"__esModule",{value:!0});ft.camelCase=void 0;var Nl=/^--[a-zA-Z0-9_-]+$/,Rl=/-([a-z])/g,Bl=/^[^-]+$/,jl=/^-(webkit|moz|ms|o|khtml)-/,$l=/^-(ms)-/,Hl=function(e){return!e||Bl.test(e)||Nl.test(e)},ql=function(e,t){return t.toUpperCase()},Pn=function(e,t){return"".concat(t,"-")},Ul=function(e,t){return t===void 0&&(t={}),Hl(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace($l,Pn):e=e.replace(jl,Pn),e.replace(Rl,ql))};ft.camelCase=Ul;var Vl=it&&it.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Wl=Vl(Yt),Yl=ft;function _t(e,t){var n={};return!e||typeof e!="string"||(0,Wl.default)(e,function(r,i){r&&i&&(n[(0,Yl.camelCase)(r,t)]=i)}),n}_t.default=_t;var Gl=_t;const Xl=Ar(Gl),Rr=Br("end"),Gt=Br("start");function Br(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Ql(e){const t=Gt(e),n=Rr(e);if(t&&n)return{start:t,end:n}}function $e(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?zn(e.position):"start"in e||"end"in e?zn(e):"line"in e||"column"in e?Ot(e):""}function Ot(e){return Dn(e&&e.line)+":"+Dn(e&&e.column)}function zn(e){return Ot(e&&e.start)+"-"+Ot(e&&e.end)}function Dn(e){return e&&typeof e=="number"?e:1}class K extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=$e(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}K.prototype.file="";K.prototype.name="";K.prototype.reason="";K.prototype.message="";K.prototype.stack="";K.prototype.column=void 0;K.prototype.line=void 0;K.prototype.ancestors=void 0;K.prototype.cause=void 0;K.prototype.fatal=void 0;K.prototype.place=void 0;K.prototype.ruleId=void 0;K.prototype.source=void 0;const Xt={}.hasOwnProperty,Kl=new Map,Jl=/[A-Z]/g,Zl=new Set(["table","tbody","thead","tfoot","tr"]),eo=new Set(["td","th"]),jr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function to(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=so(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=uo(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ct:Nr,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=$r(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function $r(e,t,n){if(t.type==="element")return no(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return ro(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return lo(e,t,n);if(t.type==="mdxjsEsm")return io(e,t);if(t.type==="root")return oo(e,t,n);if(t.type==="text")return ao(e,t)}function no(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ct,e.schema=i),e.ancestors.push(t);const o=qr(e,t.tagName,!1),l=co(e,t);let a=Kt(e,t);return Zl.has(t.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!hl(u):!0})),Hr(e,l,o,t),Qt(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function ro(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ve(e,t.position)}function io(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ve(e,t.position)}function lo(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ct,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:qr(e,t.name,!0),l=fo(e,t),a=Kt(e,t);return Hr(e,l,o,t),Qt(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function oo(e,t,n){const r={};return Qt(r,Kt(e,t)),e.create(t,e.Fragment,r,n)}function ao(e,t){return t.value}function Hr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Qt(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function uo(e,t,n){return r;function r(i,o,l,a){const s=Array.isArray(l.children)?n:t;return a?s(o,l,a):s(o,l)}}function so(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),u=Gt(r);return t(i,o,l,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function co(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Xt.call(t.properties,i)){const o=ho(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&eo.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function fo(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Ve(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else Ve(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Kt(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Kl;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o0?(re(e,e.length,0,t),e):t}const Mn={}.hasOwnProperty;function Vr(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function se(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const J=ke(/[A-Za-z]/),Q=ke(/[\dA-Za-z]/),So=ke(/[#-'*+\--9=?A-Z^-~]/);function lt(e){return e!==null&&(e<32||e===127)}const Nt=ke(/\d/),Co=ke(/[\dA-Fa-f]/),Eo=ke(/[!-/:-@[-`{-~]/);function T(e){return e!==null&&e<-2}function q(e){return e!==null&&(e<0||e===32)}function O(e){return e===-2||e===-1||e===32}const ht=ke(new RegExp("\\p{P}|\\p{S}","u")),Ee=ke(/\s/);function ke(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function _e(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function _(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(u){return O(u)?(e.enter(n),a(u)):t(u)}function a(u){return O(u)&&o++l))return;const N=t.events.length;let j=N,L,k;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){if(L){k=t.events[j][1].end;break}L=!0}for(x(r),S=N;SI;){const v=n[D];t.containerState=v[1],v[0].exit.call(t,e)}n.length=I}function b(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Po(e,t,n){return _(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Le(e){if(e===null||q(e)||Ee(e))return 1;if(ht(e))return 2}function pt(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[n][1].start};On(c,-u),On(p,u),l={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},s=[],e[r][1].end.offset-e[r][1].start.offset&&(s=ie(s,[["enter",e[r][1],t],["exit",e[r][1],t]])),s=ie(s,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),s=ie(s,pt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),s=ie(s,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,s=ie(s,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,re(e,r-1,n-r+3,s),n=r+s.length-f-2;break}}for(n=-1;++n0&&O(S)?_(e,b,"linePrefix",o+1)(S):b(S)}function b(S){return S===null||T(S)?e.check(Nn,y,D)(S):(e.enter("codeFlowValue"),I(S))}function I(S){return S===null||T(S)?(e.exit("codeFlowValue"),b(S)):(e.consume(S),I)}function D(S){return e.exit("codeFenced"),t(S)}function v(S,N,j){let L=0;return k;function k(B){return S.enter("lineEnding"),S.consume(B),S.exit("lineEnding"),F}function F(B){return S.enter("codeFencedFence"),O(B)?_(S,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):P(B)}function P(B){return B===a?(S.enter("codeFencedFenceSequence"),$(B)):j(B)}function $(B){return B===a?(L++,S.consume(B),$):L>=l?(S.exit("codeFencedFenceSequence"),O(B)?_(S,V,"whitespace")(B):V(B)):j(B)}function V(B){return B===null||T(B)?(S.exit("codeFencedFence"),N(B)):j(B)}}}function $o(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const kt={name:"codeIndented",tokenize:qo},Ho={partial:!0,tokenize:Uo};function qo(e,t,n){const r=this;return i;function i(s){return e.enter("codeIndented"),_(e,o,"linePrefix",5)(s)}function o(s){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(s):n(s)}function l(s){return s===null?u(s):T(s)?e.attempt(Ho,l,u)(s):(e.enter("codeFlowValue"),a(s))}function a(s){return s===null||T(s)?(e.exit("codeFlowValue"),l(s)):(e.consume(s),a)}function u(s){return e.exit("codeIndented"),t(s)}}function Uo(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):T(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):_(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):T(l)?i(l):n(l)}}const Vo={name:"codeText",previous:Yo,resolve:Wo,tokenize:Go};function Wo(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Be(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Be(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Be(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Kr(e,t,n,r,i,o,l,a,u){const s=u||Number.POSITIVE_INFINITY;let f=0;return c;function c(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),p):x===null||x===32||x===41||lt(x)?n(x):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),y(x))}function p(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(x))}function h(x){return x===62?(e.exit("chunkString"),e.exit(a),p(x)):x===null||x===60||T(x)?n(x):(e.consume(x),x===92?m:h)}function m(x){return x===60||x===62||x===92?(e.consume(x),h):h(x)}function y(x){return!f&&(x===null||x===41||q(x))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(x)):f999||h===null||h===91||h===93&&!u||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):T(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||T(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),u||(u=!O(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function Zr(e,t,n,r,i,o){let l;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,u):n(p)}function u(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),s(p))}function s(p){return p===l?(e.exit(o),u(l)):p===null?n(p):T(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),_(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||T(p)?(e.exit("chunkString"),s(p)):(e.consume(p),p===92?c:f)}function c(p){return p===l||p===92?(e.consume(p),f):f(p)}}function He(e,t){let n;return r;function r(i){return T(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):O(i)?_(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const na={name:"definition",tokenize:ia},ra={partial:!0,tokenize:la};function ia(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),l(h)}function l(h){return Jr.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=se(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return q(h)?He(e,s)(h):s(h)}function s(h){return Kr(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(ra,c,c)(h)}function c(h){return O(h)?_(e,p,"whitespace")(h):p(h)}function p(h){return h===null||T(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function la(e,t,n){return r;function r(a){return q(a)?He(e,i)(a):n(a)}function i(a){return Zr(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return O(a)?_(e,l,"whitespace")(a):l(a)}function l(a){return a===null||T(a)?t(a):n(a)}}const oa={name:"hardBreakEscape",tokenize:aa};function aa(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return T(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const ua={name:"headingAtx",resolve:sa,tokenize:ca};function sa(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},re(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function ca(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||q(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||T(f)?(e.exit("atxHeading"),t(f)):O(f)?_(e,a,"whitespace")(f):(e.enter("atxHeadingText"),s(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),a(f))}function s(f){return f===null||f===35||q(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),s)}}const fa=["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"],Bn=["pre","script","style","textarea"],ha={concrete:!0,name:"htmlFlow",resolveTo:ga,tokenize:da},pa={partial:!0,tokenize:xa},ma={partial:!0,tokenize:ya};function ga(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function da(e,t,n){const r=this;let i,o,l,a,u;return s;function s(d){return f(d)}function f(d){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(d),c}function c(d){return d===33?(e.consume(d),p):d===47?(e.consume(d),o=!0,y):d===63?(e.consume(d),i=3,r.interrupt?t:g):J(d)?(e.consume(d),l=String.fromCharCode(d),C):n(d)}function p(d){return d===45?(e.consume(d),i=2,h):d===91?(e.consume(d),i=5,a=0,m):J(d)?(e.consume(d),i=4,r.interrupt?t:g):n(d)}function h(d){return d===45?(e.consume(d),r.interrupt?t:g):n(d)}function m(d){const ae="CDATA[";return d===ae.charCodeAt(a++)?(e.consume(d),a===ae.length?r.interrupt?t:P:m):n(d)}function y(d){return J(d)?(e.consume(d),l=String.fromCharCode(d),C):n(d)}function C(d){if(d===null||d===47||d===62||q(d)){const ae=d===47,be=l.toLowerCase();return!ae&&!o&&Bn.includes(be)?(i=1,r.interrupt?t(d):P(d)):fa.includes(l.toLowerCase())?(i=6,ae?(e.consume(d),x):r.interrupt?t(d):P(d)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(d):o?b(d):I(d))}return d===45||Q(d)?(e.consume(d),l+=String.fromCharCode(d),C):n(d)}function x(d){return d===62?(e.consume(d),r.interrupt?t:P):n(d)}function b(d){return O(d)?(e.consume(d),b):k(d)}function I(d){return d===47?(e.consume(d),k):d===58||d===95||J(d)?(e.consume(d),D):O(d)?(e.consume(d),I):k(d)}function D(d){return d===45||d===46||d===58||d===95||Q(d)?(e.consume(d),D):v(d)}function v(d){return d===61?(e.consume(d),S):O(d)?(e.consume(d),v):I(d)}function S(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),u=d,N):O(d)?(e.consume(d),S):j(d)}function N(d){return d===u?(e.consume(d),u=null,L):d===null||T(d)?n(d):(e.consume(d),N)}function j(d){return d===null||d===34||d===39||d===47||d===60||d===61||d===62||d===96||q(d)?v(d):(e.consume(d),j)}function L(d){return d===47||d===62||O(d)?I(d):n(d)}function k(d){return d===62?(e.consume(d),F):n(d)}function F(d){return d===null||T(d)?P(d):O(d)?(e.consume(d),F):n(d)}function P(d){return d===45&&i===2?(e.consume(d),X):d===60&&i===1?(e.consume(d),Y):d===62&&i===4?(e.consume(d),oe):d===63&&i===3?(e.consume(d),g):d===93&&i===5?(e.consume(d),he):T(d)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(pa,pe,$)(d)):d===null||T(d)?(e.exit("htmlFlowData"),$(d)):(e.consume(d),P)}function $(d){return e.check(ma,V,pe)(d)}function V(d){return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),B}function B(d){return d===null||T(d)?$(d):(e.enter("htmlFlowData"),P(d))}function X(d){return d===45?(e.consume(d),g):P(d)}function Y(d){return d===47?(e.consume(d),l="",le):P(d)}function le(d){if(d===62){const ae=l.toLowerCase();return Bn.includes(ae)?(e.consume(d),oe):P(d)}return J(d)&&l.length<8?(e.consume(d),l+=String.fromCharCode(d),le):P(d)}function he(d){return d===93?(e.consume(d),g):P(d)}function g(d){return d===62?(e.consume(d),oe):d===45&&i===2?(e.consume(d),g):P(d)}function oe(d){return d===null||T(d)?(e.exit("htmlFlowData"),pe(d)):(e.consume(d),oe)}function pe(d){return e.exit("htmlFlow"),t(d)}}function ya(e,t,n){const r=this;return i;function i(l){return T(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function xa(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ge,t,n)}}const ka={name:"htmlText",tokenize:ba};function ba(e,t,n){const r=this;let i,o,l;return a;function a(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),u}function u(g){return g===33?(e.consume(g),s):g===47?(e.consume(g),v):g===63?(e.consume(g),I):J(g)?(e.consume(g),j):n(g)}function s(g){return g===45?(e.consume(g),f):g===91?(e.consume(g),o=0,m):J(g)?(e.consume(g),b):n(g)}function f(g){return g===45?(e.consume(g),h):n(g)}function c(g){return g===null?n(g):g===45?(e.consume(g),p):T(g)?(l=c,Y(g)):(e.consume(g),c)}function p(g){return g===45?(e.consume(g),h):c(g)}function h(g){return g===62?X(g):g===45?p(g):c(g)}function m(g){const oe="CDATA[";return g===oe.charCodeAt(o++)?(e.consume(g),o===oe.length?y:m):n(g)}function y(g){return g===null?n(g):g===93?(e.consume(g),C):T(g)?(l=y,Y(g)):(e.consume(g),y)}function C(g){return g===93?(e.consume(g),x):y(g)}function x(g){return g===62?X(g):g===93?(e.consume(g),x):y(g)}function b(g){return g===null||g===62?X(g):T(g)?(l=b,Y(g)):(e.consume(g),b)}function I(g){return g===null?n(g):g===63?(e.consume(g),D):T(g)?(l=I,Y(g)):(e.consume(g),I)}function D(g){return g===62?X(g):I(g)}function v(g){return J(g)?(e.consume(g),S):n(g)}function S(g){return g===45||Q(g)?(e.consume(g),S):N(g)}function N(g){return T(g)?(l=N,Y(g)):O(g)?(e.consume(g),N):X(g)}function j(g){return g===45||Q(g)?(e.consume(g),j):g===47||g===62||q(g)?L(g):n(g)}function L(g){return g===47?(e.consume(g),X):g===58||g===95||J(g)?(e.consume(g),k):T(g)?(l=L,Y(g)):O(g)?(e.consume(g),L):X(g)}function k(g){return g===45||g===46||g===58||g===95||Q(g)?(e.consume(g),k):F(g)}function F(g){return g===61?(e.consume(g),P):T(g)?(l=F,Y(g)):O(g)?(e.consume(g),F):L(g)}function P(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),i=g,$):T(g)?(l=P,Y(g)):O(g)?(e.consume(g),P):(e.consume(g),V)}function $(g){return g===i?(e.consume(g),i=void 0,B):g===null?n(g):T(g)?(l=$,Y(g)):(e.consume(g),$)}function V(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||q(g)?L(g):(e.consume(g),V)}function B(g){return g===47||g===62||q(g)?L(g):n(g)}function X(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function Y(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),le}function le(g){return O(g)?_(e,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):he(g)}function he(g){return e.enter("htmlTextData"),l(g)}}const en={name:"labelEnd",resolveAll:Ea,resolveTo:Ia,tokenize:Aa},wa={tokenize:Ta},Sa={tokenize:Fa},Ca={tokenize:Pa};function Ea(e){let t=-1;const n=[];for(;++t=3&&(s===null||T(s))?(e.exit("thematicBreak"),t(s)):n(s)}function u(s){return s===i?(e.consume(s),r++,u):(e.exit("thematicBreakSequence"),O(s)?_(e,a,"whitespace")(s):a(s))}}const Z={continuation:{tokenize:Ba},exit:$a,name:"list",tokenize:Ra},Oa={partial:!0,tokenize:Ha},Na={partial:!0,tokenize:ja};function Ra(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(h){const m=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Nt(h)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(nt,n,s)(h):s(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return Nt(h)&&++l<10?(e.consume(h),u):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),s(h)):n(h)}function s(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Ge,r.interrupt?n:f,e.attempt(Oa,p,c))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function c(h){return O(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function Ba(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ge,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,_(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!O(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Na,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,_(e,e.attempt(Z,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ja(e,t,n){const r=this;return _(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function $a(e){e.exit(this.containerState.type)}function Ha(e,t,n){const r=this;return _(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!O(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const jn={name:"setextUnderline",resolveTo:qa,tokenize:Ua};function qa(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function Ua(e,t,n){const r=this;let i;return o;function o(s){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=s,l(s)):n(s)}function l(s){return e.enter("setextHeadingLineSequence"),a(s)}function a(s){return s===i?(e.consume(s),a):(e.exit("setextHeadingLineSequence"),O(s)?_(e,u,"lineSuffix")(s):u(s))}function u(s){return s===null||T(s)?(e.exit("setextHeadingLine"),t(s)):n(s)}}const Va={tokenize:Wa};function Wa(e){const t=this,n=e.attempt(Ge,r,e.attempt(this.parser.constructs.flowInitial,i,_(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ko,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Ya={resolveAll:ti()},Ga=ei("string"),Xa=ei("text");function ei(e){return{resolveAll:ti(e==="text"?Qa:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(f){return s(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),u}function u(f){return s(f)?(n.exit("data"),o(f)):(n.consume(f),u)}function s(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function su(e,t){let n=-1;const r=[];let i;for(;++n0){const ue=z.tokenStack[z.tokenStack.length-1];(ue[1]||Hn).call(z,void 0,ue[0])}for(A.position={start:xe(w.length>0?w[0][1].start:{line:1,column:1,offset:0}),end:xe(w.length>0?w[w.length-2][1].end:{line:1,column:1,offset:0})},H=-1;++H0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function Cu(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Eu(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Iu(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=_e(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,a+=1,e.footnoteCounts.set(r,a);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,u);const s={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,s),e.applyData(t,s)}function Au(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Tu(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ii(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function Fu(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ii(e,t);const i={src:_e(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function Pu(e,t){const n={src:_e(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function zu(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Du(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ii(e,t);const i={href:_e(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function vu(e,t){const n={href:_e(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Lu(e,t,n){const r=e.all(t),i=n?Mu(n):li(t),o={},l=[];if(typeof t.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(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:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a1}function _u(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=Gt(t.children[1]),u=Rr(t.children[t.children.length-1]);a&&u&&(l.position={start:a,end:u}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function ju(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let u=-1;const s=[];for(;++u0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Vn(t.slice(i),i>0,!1)),o.join("")}function Vn(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===qn||o===Un;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===qn||o===Un;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function qu(e,t){const n={type:"text",value:Hu(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Uu(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Vu={blockquote:bu,break:wu,code:Su,delete:Cu,emphasis:Eu,footnoteReference:Iu,heading:Au,html:Tu,imageReference:Fu,image:Pu,inlineCode:zu,linkReference:Du,link:vu,listItem:Lu,list:_u,paragraph:Ou,root:Nu,strong:Ru,table:Bu,tableCell:$u,tableRow:ju,text:qu,thematicBreak:Uu,toml:Je,yaml:Je,definition:Je,footnoteDefinition:Je};function Je(){}const oi=-1,mt=0,qe=1,ot=2,tn=3,nn=4,rn=5,ln=6,ai=7,ui=8,Wn=typeof self=="object"?self:globalThis,Wu=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case mt:case oi:return n(l,i);case qe:{const a=n([],i);for(const u of l)a.push(r(u));return a}case ot:{const a=n({},i);for(const[u,s]of l)a[r(u)]=r(s);return a}case tn:return n(new Date(l),i);case nn:{const{source:a,flags:u}=l;return n(new RegExp(a,u),i)}case rn:{const a=n(new Map,i);for(const[u,s]of l)a.set(r(u),r(s));return a}case ln:{const a=n(new Set,i);for(const u of l)a.add(r(u));return a}case ai:{const{name:a,message:u}=l;return n(new Wn[a](u),i)}case ui:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return n(new DataView(a),l)}}return n(new Wn[o](l),i)};return r},Yn=e=>Wu(new Map,e)(0),ze="",{toString:Yu}={},{keys:Gu}=Object,je=e=>{const t=typeof e;if(t!=="object"||!e)return[mt,t];const n=Yu.call(e).slice(8,-1);switch(n){case"Array":return[qe,ze];case"Object":return[ot,ze];case"Date":return[tn,ze];case"RegExp":return[nn,ze];case"Map":return[rn,ze];case"Set":return[ln,ze];case"DataView":return[qe,n]}return n.includes("Array")?[qe,n]:n.includes("Error")?[ai,n]:[ot,n]},Ze=([e,t])=>e===mt&&(t==="function"||t==="symbol"),Xu=(e,t,n,r)=>{const i=(l,a)=>{const u=r.push(l)-1;return n.set(a,u),u},o=l=>{if(n.has(l))return n.get(l);let[a,u]=je(l);switch(a){case mt:{let f=l;switch(u){case"bigint":a=ui,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);f=null;break;case"undefined":return i([oi],l)}return i([a,f],l)}case qe:{if(u){let p=l;return u==="DataView"?p=new Uint8Array(l.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(l)),i([u,[...p]],l)}const f=[],c=i([a,f],l);for(const p of l)f.push(o(p));return c}case ot:{if(u)switch(u){case"BigInt":return i([u,l.toString()],l);case"Boolean":case"Number":case"String":return i([u,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const f=[],c=i([a,f],l);for(const p of Gu(l))(e||!Ze(je(l[p])))&&f.push([o(p),o(l[p])]);return c}case tn:return i([a,l.toISOString()],l);case nn:{const{source:f,flags:c}=l;return i([a,{source:f,flags:c}],l)}case rn:{const f=[],c=i([a,f],l);for(const[p,h]of l)(e||!(Ze(je(p))||Ze(je(h))))&&f.push([o(p),o(h)]);return c}case ln:{const f=[],c=i([a,f],l);for(const p of l)(e||!Ze(je(p)))&&f.push(o(p));return c}}const{message:s}=l;return i([a,{name:u,message:s}],l)};return o},Gn=(e,{json:t,lossy:n}={})=>{const r=[];return Xu(!(t||n),!!t,new Map,r)(e),r},at=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Yn(Gn(e,t)):structuredClone(e):(e,t)=>Yn(Gn(e,t));function Qu(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Ku(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Ju(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Qu,r=e.options.footnoteBackLabel||Ku,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u0&&m.push({type:"text",value:" "});let b=typeof n=="string"?n:n(u,h);typeof b=="string"&&(b={type:"text",value:b}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,h),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const C=f[f.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const b=C.children[C.children.length-1];b&&b.type==="text"?b.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...m)}else f.push(...m);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(s,x),a.push(x)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...at(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:` `}]}}const Xe=function(e){if(e==null)return ns;if(typeof e=="function")return gt(e);if(typeof e=="object")return Array.isArray(e)?Zu(e):es(e);if(typeof e=="string")return ts(e);throw new Error("Expected function, string, or object as test")};function Zu(e){const t=[];let n=-1;for(;++n":""))+")"})}return p;function p(){let h=si,m,y,C;if((!t||o(u,s,f[f.length-1]||void 0))&&(h=ls(n(u,f)),h[0]===Bt))return h;if("children"in u&&u.children){const x=u;if(x.children&&h[0]!==ci)for(y=(r?x.children.length:-1)+l,C=f.concat(x);y>-1&&y0&&n.push({type:"text",value:` `}),n}function Xn(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Qn(e,t){const n=as(e,t),r=n.one(e,void 0),i=Ju(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:` `},i),o}function hs(e,t){return e&&"run"in e?async function(n,r){const i=Qn(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Qn(n,{file:r,...e||t})}}function Kn(e){if(e)throw e}var rt=Object.prototype.hasOwnProperty,fi=Object.prototype.toString,Jn=Object.defineProperty,Zn=Object.getOwnPropertyDescriptor,er=function(t){return typeof Array.isArray=="function"?Array.isArray(t):fi.call(t)==="[object Array]"},tr=function(t){if(!t||fi.call(t)!=="[object Object]")return!1;var n=rt.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&rt.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||rt.call(t,i)},nr=function(t,n){Jn&&n.name==="__proto__"?Jn(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},rr=function(t,n){if(n==="__proto__")if(rt.call(t,n)){if(Zn)return Zn(t,n).value}else return;return t[n]},ps=function e(){var t,n,r,i,o,l,a=arguments[0],u=1,s=arguments.length,f=!1;for(typeof a=="boolean"&&(f=a,a=arguments[1]||{},u=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});ul.length;let u;a&&l.push(i);try{u=e.apply(this,l)}catch(s){const f=s;if(a&&n)throw f;return i(f)}a||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(l,...a){n||(n=!0,t(l,...a))}function o(l){i(null,l)}}const ce={basename:ds,dirname:ys,extname:xs,join:ks,sep:"/"};function ds(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Qe(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function ys(e){if(Qe(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function xs(e){Qe(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const a=e.codePointAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function ks(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function ws(e,t){let n="",r=0,i=-1,o=0,l=-1,a,u;for(;++l<=e.length;){if(l2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return n}function Qe(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Ss={cwd:Cs};function Cs(){return"/"}function Ht(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Es(e){if(typeof e=="string")e=new URL(e);else if(!Ht(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Is(e)}function Is(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n0){let[h,...m]=f;const y=r[p][1];$t(y)&&$t(h)&&(h=wt(!0,y,h)),r[p]=[s,h,...m]}}}}const Ps=new un().freeze();function It(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function At(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Tt(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function lr(e){if(!$t(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function or(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function et(e){return zs(e)?e:new hi(e)}function zs(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ds(e){return typeof e=="string"||vs(e)}function vs(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Ls="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ar=[],ur={allowDangerousHtml:!0},Ms=/^(https?|ircs?|mailto|xmpp)$/i,_s=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Bh(e){const t=Os(e),n=Ns(e);return Rs(t.runSync(t.parse(n),n),e)}function Os(e){const t=e.rehypePlugins||ar,n=e.remarkPlugins||ar,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ur}:ur;return Ps().use(ku).use(n).use(hs,r).use(t)}function Ns(e){const t=e.children||"",n=new hi;return typeof t=="string"&&(n.value=t),n}function Rs(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,u=t.urlTransform||Bs;for(const f of _s)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Ls+f.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),an(e,s),to(e,{Fragment:dt.Fragment,components:i,ignoreInvalidStyle:!0,jsx:dt.jsx,jsxs:dt.jsxs,passKeys:!0,passNode:!0});function s(f,c,p){if(f.type==="raw"&&p&&typeof c=="number")return l?p.children.splice(c,1):p.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let h;for(h in xt)if(Object.hasOwn(xt,h)&&Object.hasOwn(f.properties,h)){const m=f.properties[h],y=xt[h];(y===null||y.includes(f.tagName))&&(f.properties[h]=u(String(m||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):o?o.includes(f.tagName):!1;if(!h&&r&&typeof c=="number"&&(h=!r(f,c,p)),h&&p&&typeof c=="number")return a&&f.children?p.children.splice(c,1,...f.children):p.children.splice(c,1),c}}}function Bs(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Ms.test(e.slice(0,t))?e:""}const sr=/[#.]/g;function js(e,t){const n=e||"",r={};let i=0,o,l;for(;is&&(s=f):f&&(s!==void 0&&s>-1&&u.push(` `.repeat(s)||" "),s=-1,u.push(f))}return u.join("")}function yi(e,t,n){return e.type==="element"?sc(e,t,n):e.type==="text"?n.whitespace==="normal"?xi(e,n):cc(e):[]}function sc(e,t,n){const r=ki(e,n),i=e.children||[];let o=-1,l=[];if(ac(e))return l;let a,u;for(Ut(e)||dr(e)&&hr(t,e,dr)?u=` `:oc(e)?(a=2,u=2):di(e)&&(a=1,u=1);++o0?{type:"text",value:S}:void 0),S===!1?p.lastIndex=D+1:(m!==D&&b.push({type:"text",value:s.value.slice(m,D)}),Array.isArray(S)?b.push(...S):S&&b.push(S),m=D+I[0].length,x=!0),!p.global)break;I=p.exec(s.value)}return x?(m?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=yr(e,"(");let o=yr(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function wi(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ee(n)||ht(n))&&(!t||n!==47)}Si.peek=qc;function _c(){this.buffer()}function Oc(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Nc(){this.buffer()}function Rc(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Bc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=se(this.sliceSerialize(e)).toLowerCase(),n.label=t}function jc(e){this.exit(e)}function $c(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=se(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Hc(e){this.exit(e)}function qc(){return"["}function Si(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const l=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]"),o}function Uc(){return{enter:{gfmFootnoteCallString:_c,gfmFootnoteCall:Oc,gfmFootnoteDefinitionLabelString:Nc,gfmFootnoteDefinition:Rc},exit:{gfmFootnoteCallString:Bc,gfmFootnoteCall:jc,gfmFootnoteDefinitionLabelString:$c,gfmFootnoteDefinition:Hc}}}function Vc(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Si},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,l){const a=o.createTracker(l);let u=a.move("[^");const s=o.enter("footnoteDefinition"),f=o.enter("label");return u+=a.move(o.safe(o.associationId(r),{before:u,after:"]"})),f(),u+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),u+=a.move((t?` `:" ")+o.indentLines(o.containerFlow(r,a.current()),t?Ci:Wc))),s(),u}}function Wc(e,t,n){return t===0?e:Ci(e,t,n)}function Ci(e,t,n){return(n?"":" ")+e}const Yc=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ei.peek=Jc;function Gc(){return{canContainEols:["delete"],enter:{strikethrough:Qc},exit:{strikethrough:Kc}}}function Xc(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Yc}],handlers:{delete:Ei}}}function Qc(e){this.enter({type:"delete",children:[]},e)}function Kc(e){this.exit(e)}function Ei(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function Jc(){return"~"}function Zc(e){return e.length}function ef(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Zc,o=[],l=[],a=[],u=[];let s=0,f=-1;for(;++fs&&(s=e[f].length);++xu[x])&&(u[x]=I)}y.push(b)}l[f]=y,a[f]=C}let c=-1;if(typeof r=="object"&&"length"in r)for(;++cu[c]&&(u[c]=b),h[c]=b),p[c]=I}l.splice(1,0,p),a.splice(1,0,h),f=-1;const m=[];for(;++f "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),rf);return i(),l}function rf(e,t,n){return">"+(n?"":" ")+e}function lf(e,t){return kr(e,t.inConstruct,!0)&&!kr(e,t.notInConstruct,!1)}function kr(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++rl&&(l=o):o=1,i=r+t.length,r=n.indexOf(t,i);return l}function of(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function af(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function uf(e,t,n,r){const i=af(n),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(of(e,n)){const c=n.enter("codeIndented"),p=n.indentLines(o,sf);return c(),p}const a=n.createTracker(r),u=i.repeat(Math.max(Ii(o,i)+1,3)),s=n.enter("codeFenced");let f=a.move(u);if(e.lang){const c=n.enter(`codeFencedLang${l}`);f+=a.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${l}`);f+=a.move(" "),f+=a.move(n.safe(e.meta,{before:f,after:` `,encode:["`"],...a.current()})),c()}return f+=a.move(` `),o&&(f+=a.move(o+` `)),f+=a.move(u),s(),f}function sf(e,t,n){return(n?"":" ")+e}function cn(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function cf(e,t,n,r){const i=cn(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let a=n.enter("label");const u=n.createTracker(r);let s=u.move("[");return s+=u.move(n.safe(n.associationId(e),{before:s,after:"]",...u.current()})),s+=u.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),s+=u.move("<"),s+=u.move(n.safe(e.url,{before:s,after:">",...u.current()})),s+=u.move(">")):(a=n.enter("destinationRaw"),s+=u.move(n.safe(e.url,{before:s,after:e.title?" ":` `,...u.current()}))),a(),e.title&&(a=n.enter(`title${o}`),s+=u.move(" "+i),s+=u.move(n.safe(e.title,{before:s,after:i,...u.current()})),s+=u.move(i),a()),l(),s}function ff(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function We(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ut(e,t,n){const r=Le(e),i=Le(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Ai.peek=hf;function Ai(e,t,n,r){const i=ff(n),o=n.enter("emphasis"),l=n.createTracker(r),a=l.move(i);let u=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const s=u.charCodeAt(0),f=ut(r.before.charCodeAt(r.before.length-1),s,i);f.inside&&(u=We(s)+u.slice(1));const c=u.charCodeAt(u.length-1),p=ut(r.after.charCodeAt(0),c,i);p.inside&&(u=u.slice(0,-1)+We(c));const h=l.move(i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+u+h}function hf(e,t,n){return n.options.emphasis||"*"}function pf(e,t){let n=!1;return an(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Bt}),!!((!e.depth||e.depth<3)&&Jt(e)&&(t.options.setext||n))}function mf(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(pf(e,n)){const f=n.enter("headingSetext"),c=n.enter("phrasing"),p=n.containerPhrasing(e,{...o.current(),before:` `,after:` `});return c(),f(),p+` `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(` `))+1))}const l="#".repeat(i),a=n.enter("headingAtx"),u=n.enter("phrasing");o.move(l+" ");let s=n.containerPhrasing(e,{before:"# ",after:` `,...o.current()});return/^[\t ]/.test(s)&&(s=We(s.charCodeAt(0))+s.slice(1)),s=s?l+" "+s:l,n.options.closeAtx&&(s+=" "+l),u(),a(),s}Ti.peek=gf;function Ti(e){return e.value||""}function gf(){return"<"}Fi.peek=df;function Fi(e,t,n,r){const i=cn(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let a=n.enter("label");const u=n.createTracker(r);let s=u.move("![");return s+=u.move(n.safe(e.alt,{before:s,after:"]",...u.current()})),s+=u.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),s+=u.move("<"),s+=u.move(n.safe(e.url,{before:s,after:">",...u.current()})),s+=u.move(">")):(a=n.enter("destinationRaw"),s+=u.move(n.safe(e.url,{before:s,after:e.title?" ":")",...u.current()}))),a(),e.title&&(a=n.enter(`title${o}`),s+=u.move(" "+i),s+=u.move(n.safe(e.title,{before:s,after:i,...u.current()})),s+=u.move(i),a()),s+=u.move(")"),l(),s}function df(){return"!"}Pi.peek=yf;function Pi(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("![");const s=n.safe(e.alt,{before:u,after:"]",...a.current()});u+=a.move(s+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:u,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!s||s!==c?u+=a.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function yf(){return"!"}zi.peek=xf;function zi(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o\u007F]/.test(e.url))}vi.peek=kf;function vi(e,t,n,r){const i=cn(n),o=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let a,u;if(Di(e,n)){const f=n.stack;n.stack=[],a=n.enter("autolink");let c=l.move("<");return c+=l.move(n.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),a(),n.stack=f,c}a=n.enter("link"),u=n.enter("label");let s=l.move("[");return s+=l.move(n.containerPhrasing(e,{before:s,after:"](",...l.current()})),s+=l.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),s+=l.move("<"),s+=l.move(n.safe(e.url,{before:s,after:">",...l.current()})),s+=l.move(">")):(u=n.enter("destinationRaw"),s+=l.move(n.safe(e.url,{before:s,after:e.title?" ":")",...l.current()}))),u(),e.title&&(u=n.enter(`title${o}`),s+=l.move(" "+i),s+=l.move(n.safe(e.title,{before:s,after:i,...l.current()})),s+=l.move(i),u()),s+=l.move(")"),a(),s}function kf(e,t,n){return Di(e,n)?"<":"["}Li.peek=bf;function Li(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("[");const s=n.containerPhrasing(e,{before:u,after:"]",...a.current()});u+=a.move(s+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:u,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!s||s!==c?u+=a.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function bf(){return"["}function fn(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function wf(e){const t=fn(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Sf(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Mi(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Cf(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?Sf(n):fn(n);const a=e.ordered?l==="."?")":".":wf(n);let u=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),Mi(n)===l&&f){let c=-1;for(;++c-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const u=n.enter("listItem"),s=n.indentLines(n.containerFlow(e,a.current()),f);return u(),s;function f(c,p,h){return p?(h?"":" ".repeat(l))+c:(h?o:o+" ".repeat(l-o.length))+c}}function Af(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),i(),l}const Tf=Xe(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ff(e,t,n,r){return(e.children.some(function(l){return Tf(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Pf(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}_i.peek=zf;function _i(e,t,n,r){const i=Pf(n),o=n.enter("strong"),l=n.createTracker(r),a=l.move(i+i);let u=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const s=u.charCodeAt(0),f=ut(r.before.charCodeAt(r.before.length-1),s,i);f.inside&&(u=We(s)+u.slice(1));const c=u.charCodeAt(u.length-1),p=ut(r.after.charCodeAt(0),c,i);p.inside&&(u=u.slice(0,-1)+We(c));const h=l.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+u+h}function zf(e,t,n){return n.options.strong||"*"}function Df(e,t,n,r){return n.safe(e.value,r)}function vf(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Lf(e,t,n){const r=(Mi(n)+(n.options.ruleSpaces?" ":"")).repeat(vf(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Oi={blockquote:nf,break:br,code:uf,definition:cf,emphasis:Ai,hardBreak:br,heading:mf,html:Ti,image:Fi,imageReference:Pi,inlineCode:zi,link:vi,linkReference:Li,list:Cf,listItem:If,paragraph:Af,root:Ff,strong:_i,text:Df,thematicBreak:Lf};function Mf(){return{enter:{table:_f,tableData:wr,tableHeader:wr,tableRow:Nf},exit:{codeText:Rf,table:Of,tableData:vt,tableHeader:vt,tableRow:vt}}}function _f(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Of(e){this.exit(e),this.data.inTable=void 0}function Nf(e){this.enter({type:"tableRow",children:[]},e)}function vt(e){this.exit(e)}function wr(e){this.enter({type:"tableCell",children:[]},e)}function Rf(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Bf));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Bf(e,t){return t==="|"?t:e}function jf(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";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:l,tableCell:u,tableRow:a}};function l(h,m,y,C){return s(f(h,y,C),h.align)}function a(h,m,y,C){const x=c(h,y,C),b=s([x]);return b.slice(0,b.indexOf(` `))}function u(h,m,y,C){const x=y.enter("tableCell"),b=y.enter("phrasing"),I=y.containerPhrasing(h,{...C,before:o,after:o});return b(),x(),I}function s(h,m){return ef(h,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function f(h,m,y){const C=h.children;let x=-1;const b=[],I=m.enter("table");for(;++x0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const ih={tokenize:hh,partial:!0};function lh(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:sh,continuation:{tokenize:ch},exit:fh}},text:{91:{name:"gfmFootnoteCall",tokenize:uh},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:oh,resolveTo:ah}}}}function oh(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){l=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return a;function a(u){if(!l||!l._balanced)return n(u);const s=se(r.sliceSerialize({start:l.end,end:r.now()}));return s.codePointAt(0)!==94||!o.includes(s.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function ah(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function uh(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(c){if(o>999||c===93&&!l||c===null||c===91||q(c))return n(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(se(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return q(c)||(l=!0),o++,e.consume(c),c===92?f:s}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,s):s(c)}}function sh(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return u;function u(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),s}function s(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(m)}function f(m){if(l>999||m===93&&!a||m===null||m===91||q(m))return n(m);if(m===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return o=se(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return q(m)||(a=!0),l++,e.consume(m),m===92?c:f}function c(m){return m===91||m===92||m===93?(e.consume(m),l++,f):f(m)}function p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(o)||i.push(o),_(e,h,"gfmFootnoteDefinitionWhitespace")):n(m)}function h(m){return t(m)}}function ch(e,t,n){return e.check(Ge,t,e.attempt(ih,t,n))}function fh(e){e.exit("gfmFootnoteDefinition")}function hh(e,t,n){const r=this;return _(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function ph(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let u=-1;for(;++u1?u(m):(l.consume(m),c++,h);if(c<2&&!n)return u(m);const C=l.exit("strikethroughSequenceTemporary"),x=Le(m);return C._open=!x||x===2&&!!y,C._close=!y||y===2&&!!x,a(m)}}}class mh{constructor(){this.map=[]}add(t,n,r){gh(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function gh(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i-1;){const V=r.events[F][1].type;if(V==="lineEnding"||V==="linePrefix")F--;else break}const P=F>-1?r.events[F][1].type:null,$=P==="tableHead"||P==="tableRow"?S:u;return $===S&&r.parser.lazy[r.now().line]?n(k):$(k)}function u(k){return e.enter("tableHead"),e.enter("tableRow"),s(k)}function s(k){return k===124||(l=!0,o+=1),f(k)}function f(k){return k===null?n(k):T(k)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),h):n(k):O(k)?_(e,f,"whitespace")(k):(o+=1,l&&(l=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(k)))}function c(k){return k===null||k===124||q(k)?(e.exit("data"),f(k)):(e.consume(k),k===92?p:c)}function p(k){return k===92||k===124?(e.consume(k),c):c(k)}function h(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),l=!1,O(k)?_(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):m(k))}function m(k){return k===45||k===58?C(k):k===124?(l=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),y):v(k)}function y(k){return O(k)?_(e,C,"whitespace")(k):C(k)}function C(k){return k===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),x):k===45?(o+=1,x(k)):k===null||T(k)?D(k):v(k)}function x(k){return k===45?(e.enter("tableDelimiterFiller"),b(k)):v(k)}function b(k){return k===45?(e.consume(k),b):k===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),I):(e.exit("tableDelimiterFiller"),I(k))}function I(k){return O(k)?_(e,D,"whitespace")(k):D(k)}function D(k){return k===124?m(k):k===null||T(k)?!l||i!==o?v(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):v(k)}function v(k){return n(k)}function S(k){return e.enter("tableRow"),N(k)}function N(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),N):k===null||T(k)?(e.exit("tableRow"),t(k)):O(k)?_(e,N,"whitespace")(k):(e.enter("data"),j(k))}function j(k){return k===null||k===124||q(k)?(e.exit("data"),N(k)):(e.consume(k),k===92?L:j)}function L(k){return k===92||k===124?(e.consume(k),j):j(k)}}function kh(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,u=0,s,f,c;const p=new mh;for(;++nn[2]+1){const m=n[2]+1,y=n[3]-n[2]-1;e.add(m,y,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(o.end=Object.assign({},De(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Cr(e,t,n,r,i){const o=[],l=De(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function De(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const bh={name:"tasklistCheck",tokenize:Sh};function wh(){return{text:{91:bh}}}function Sh(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return q(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),l):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),l):n(u)}function l(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(u)}function a(u){return T(u)?t(u):O(u)?e.check({tokenize:Ch},t,n)(u):n(u)}}function Ch(e,t,n){return _(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Eh(e){return Vr([Xf(),lh(),ph(e),yh(),wh()])}const Ih={};function Hh(e){const t=this,n=e||Ih,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Eh(n)),o.push(Vf()),l.push(Wf(n))}function Ah(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:o},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:a,mathText:l,mathTextData:a}};function e(u){const s={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[s]}},u)}function t(){this.buffer()}function n(){const u=this.resume(),s=this.stack[this.stack.length-1];s.type,s.meta=u}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(u){const s=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),f=this.stack[this.stack.length-1];f.type,this.exit(u),f.value=s;const c=f.data.hChildren[0];c.type,c.tagName,c.children.push({type:"text",value:s}),this.data.mathFlowInside=void 0}function o(u){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},u),this.buffer()}function l(u){const s=this.resume(),f=this.stack[this.stack.length-1];f.type,this.exit(u),f.value=s,f.data.hChildren.push({type:"text",value:s})}function a(u){this.config.enter.data.call(this,u),this.config.exit.data.call(this,u)}}function Th(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),r.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` `,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:r}};function n(o,l,a,u){const s=o.value||"",f=a.createTracker(u),c="$".repeat(Math.max(Ii(s,"$")+1,2)),p=a.enter("mathFlow");let h=f.move(c);if(o.meta){const m=a.enter("mathFlowMeta");h+=f.move(a.safe(o.meta,{after:` `,before:h,encode:["$"],...f.current()})),m()}return h+=f.move(` `),s&&(h+=f.move(s+` `)),h+=f.move(c),p(),h}function r(o,l,a){let u=o.value||"",s=1;for(t||s++;new RegExp("(^|[^$])"+"\\$".repeat(s)+"([^$]|$)").test(u);)s++;const f="$".repeat(s);/[^ \r\n]/.test(u)&&(/^[ \r\n]/.test(u)&&/[ \r\n]$/.test(u)||/^\$|\$$/.test(u))&&(u=" "+u+" ");let c=-1;for(;++c